:root {
  color-scheme: dark;
  --ink: #180d07;
  --wood: #3d2110;
  --wood-light: #704019;
  --gold: #d3a04f;
  --gold-soft: #f1d69a;
  --paper: #e6c98c;
  --danger: #bd4a3e;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #080503; }
body { color: #f7e8c6; font-family: Georgia, "Times New Roman", serif; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.inn-shell {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #050302;
}

.inn-stage {
  --inn-bard-left: 21.5%;
  --inn-bard-top: 23.5%;
  --inn-bard-width: 14%;
  --inn-storyteller-left: 71.5%;
  --inn-storyteller-top: 66%;
  --inn-storyteller-width: 10%;
  position: relative;
  width: min(100vw, 177.7778vh);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #080503;
  box-shadow: 0 0 70px #000;
}

.inn-background, .inn-layer {
  position: absolute;
  user-select: none;
  pointer-events: none;
}
.inn-background { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.inn-hostess {
  z-index: 3;
  width: 55%;
  left: 28%;
  bottom: -8%;
  filter: drop-shadow(0 1.3vw 1.2vw rgba(0, 0, 0, .72));
}
.inn-reserved {
  z-index: 5;
  width: 13.5%;
  left: 9.2%;
  top: 48%;
  transform: rotate(-1.5deg);
  filter: drop-shadow(0 .7vw .7vw rgba(0, 0, 0, .75));
}
.inn-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
:is(.inn-bard, .inn-storyteller) {
  position: absolute;
  z-index: 8;
  left: var(--inn-bard-left);
  top: var(--inn-bard-top);
  width: var(--inn-bard-width);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform-origin: 50% 100%;
  animation: inn-bard-idle 12s ease-in-out infinite;
  clip-path: polygon(27% 0, 9% 11%, 15% 24%, 4% 38%, 12% 62%, 18% 84%, 39% 100%, 57% 99%, 68% 88%, 94% 83%, 79% 64%, 79% 42%, 66% 25%, 58% 10%, 44% 0);
}
:is(.inn-bard, .inn-storyteller):hover, :is(.inn-bard, .inn-storyteller):focus-visible { filter: brightness(1.08); }
:is(.inn-bard, .inn-storyteller):focus-visible {
  outline: 2px solid rgba(237, 180, 82, .95);
  outline-offset: .35vw;
}
:is(.inn-bard-img, .inn-storyteller-img) {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  filter: brightness(.96) contrast(1.02) saturate(.93) drop-shadow(0 .7vw .9vw rgba(0, 0, 0, .46));
}
:is(.inn-bard-tooltip, .inn-storyteller-tooltip) {
  position: absolute;
  z-index: 10;
  left: 16%;
  top: 17%;
  width: min(19rem, 34%);
  padding: .65rem .8rem;
  border: 1px solid rgba(211, 160, 79, .7);
  border-radius: 6px;
  color: var(--gold-soft);
  background: rgba(20, 10, 5, .92);
  box-shadow: 0 .8rem 1.8rem rgba(0, 0, 0, .45);
  opacity: 0;
  transform: translateY(.35rem);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}
:is(.inn-bard-tooltip, .inn-storyteller-tooltip) strong, :is(.inn-bard-tooltip, .inn-storyteller-tooltip) span { display: block; }
:is(.inn-bard-tooltip, .inn-storyteller-tooltip) span { margin-top: .2rem; color: #d8bd8e; font-size: clamp(.55rem, .9vw, .86rem); }
:is(.inn-bard, .inn-storyteller):hover + :is(.inn-bard-tooltip, .inn-storyteller-tooltip), :is(.inn-bard, .inn-storyteller):focus-visible + :is(.inn-bard-tooltip, .inn-storyteller-tooltip) {
  opacity: 1;
  transform: translateY(0);
}
.inn-exit {
  position: absolute;
  z-index: 9;
  top: 1.3%;
  right: 1.2%;
  width: 13.5%;
  transition: transform .18s ease, filter .18s ease;
}
.inn-exit img { display: block; width: 100%; }
.inn-exit:hover, .inn-exit:focus-visible { transform: scale(1.04); filter: brightness(1.18); }

.inn-hotspot {
  position: absolute;
  z-index: 7;
  border: 1px solid transparent;
  border-radius: .6vw;
  background: transparent;
  color: transparent;
  cursor: pointer;
}
.inn-hotspot span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.inn-hotspot:hover, .inn-hotspot:focus-visible {
  outline: none;
  border-color: rgba(237, 180, 82, .8);
  background: rgba(216, 155, 61, .12);
  box-shadow: 0 0 1.2vw rgba(226, 163, 67, .45), inset 0 0 .8vw rgba(226, 163, 67, .25);
}
.hs-board { left: 38.7%; top: 24%; width: 18.5%; height: 20%; }
.hs-trophies { left: 61%; top: 23%; width: 14.5%; height: 34%; }
.hs-chests { left: 76%; top: 36%; width: 19%; height: 29%; }
.hs-general { left: 31%; top: 48%; width: 12%; height: 27%; }
.hs-creators { left: 8%; top: 35%; width: 21%; height: 28%; }
.hs-hostess { z-index: 6; left: 44%; top: 34%; width: 27%; height: 63%; }
.hs-services { left: .5%; top: 65%; width: 29%; height: 31%; }
.hs-services::before {
  content: "";
  position: absolute;
  inset: 5%;
  background: url("./imagen_servicios_posada.png") center / contain no-repeat;
  pointer-events: none;
}
.inn-secta-deck {
  position: absolute;
  z-index: 9;
  left: 31.2%;
  top: 67.2%;
  width: 10.6%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 .55vw .65vw rgba(0, 0, 0, .72));
  transform: rotate(-3deg);
  transition: transform .18s ease, filter .18s ease;
}
.inn-secta-deck img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}
.inn-secta-deck:hover,
.inn-secta-deck:focus-visible {
  outline: none;
  transform: rotate(-3deg) translateY(-.25vw) scale(1.05);
  filter: brightness(1.1) drop-shadow(0 0 .9vw rgba(226, 163, 67, .62)) drop-shadow(0 .55vw .65vw rgba(0, 0, 0, .72));
}
.inn-secta-deck:focus-visible {
  outline: 2px solid rgba(237, 180, 82, .95);
  outline-offset: .35vw;
}
.debug-hotspots .inn-hotspot {
  border-color: #75d7ff;
  background: rgba(40, 180, 255, .18);
  box-shadow: inset 0 0 0 2px rgba(40, 180, 255, .3);
}
.debug-hotspots .inn-hotspot span {
  width: auto;
  height: auto;
  padding: .25rem .4rem;
  overflow: visible;
  clip: auto;
  color: #fff;
  background: rgba(0, 0, 0, .82);
}

.inn-status {
  position: absolute;
  z-index: 8;
  left: 1.5%;
  bottom: 1.5%;
  max-width: 44%;
  padding: .42rem .7rem;
  border: 1px solid rgba(211, 160, 79, .6);
  border-radius: 4px;
  color: var(--gold-soft);
  background: rgba(20, 10, 5, .84);
  font-size: clamp(.72rem, 1.1vw, .95rem);
}

.inn-modal[hidden], .inn-toast[hidden] { display: none; }
.inn-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.inn-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .72); backdrop-filter: blur(3px); }
.inn-panel {
  position: relative;
  z-index: 1;
  width: min(980px, 94vw);
  max-height: min(88dvh, 900px);
  overflow: auto;
  padding: clamp(18px, 3vw, 32px);
  border: 3px solid #8f5c24;
  border-radius: 8px;
  background:
    linear-gradient(rgba(40, 21, 11, .76), rgba(18, 9, 5, .9)),
    url("/assets/posada/chat/parchment_texture.png") center / cover,
    repeating-linear-gradient(90deg, #2d160a 0 30px, #371b0d 30px 60px);
  box-shadow: 0 22px 70px #000, inset 0 0 0 2px rgba(229, 176, 88, .2);
}
.inn-panel::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(211, 160, 79, .35); pointer-events: none; }
.inn-panel::after { content: ""; position: absolute; z-index: -1; inset: -13px; border: 12px solid transparent; border-image: url("/assets/posada/chat/wood_divider.png") 30 round; pointer-events: none; }
.inn-close { position: sticky; z-index: 5; top: 0; float: right; width: 38px; height: 38px; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold-soft); background: #4c2712; cursor: pointer; }
.inn-close:hover { background: #754019; }
.inn-panel h1, .inn-panel h2, .inn-panel h3 { color: var(--gold-soft); letter-spacing: 0; }
.inn-panel h1 { margin: 0 48px 8px 0; font-size: clamp(1.55rem, 4vw, 2.5rem); }
.inn-panel h2 { font-size: 1.2rem; }
.inn-kicker { color: var(--gold); text-transform: uppercase; font-size: .78rem; letter-spacing: .12em; }
.inn-muted { color: #c8ad83; }
.inn-warning { padding: 12px; border-left: 3px solid var(--gold); background: rgba(211, 160, 79, .09); }

.inn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 12px; }
.inn-card {
  padding: 14px;
  border: 1px solid rgba(211, 160, 79, .45);
  border-radius: 6px;
  background: rgba(0, 0, 0, .28);
}
.inn-card h3 { margin-top: 0; }
.inn-card--achieved { border-color: #83a868; }
.inn-card--locked { opacity: .58; }
.inn-list { display: grid; gap: 8px; margin: 10px 0 20px; }
.inn-notice {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #9d6c2e;
  border-radius: 4px;
  text-align: left;
  color: #241207;
  background: linear-gradient(#efd49b, #c89e5b);
  cursor: pointer;
}
.inn-notice:hover { filter: brightness(1.08); }
.inn-empty { padding: 14px; border: 1px dashed rgba(211, 160, 79, .45); color: #c9ad81; }

.inn-actions, .inn-tabs, .inn-chat-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.inn-button {
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid #a46d2c;
  border-radius: 5px;
  color: var(--gold-soft);
  background: linear-gradient(#693b19, #3b1d0c);
  cursor: pointer;
}
.inn-button:hover:not(:disabled), .inn-button:focus-visible { filter: brightness(1.2); }
.inn-button:disabled { opacity: .45; cursor: not-allowed; }
.inn-button--danger { border-color: #a95c50; background: linear-gradient(#6f2923, #351311); }
.inn-button--quiet { background: rgba(0, 0, 0, .28); }
.inn-tab.is-active { color: #1d1008; background: var(--paper); }

:is(.inn-bard-panel, .inn-storyteller-panel) { display: grid; gap: 14px; }
:is(.inn-bard-list, .inn-storyteller-list) { display: grid; gap: 10px; }
:is(.inn-bard-row, .inn-storyteller-row) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(211, 160, 79, .38);
  border-radius: 6px;
  background: rgba(0, 0, 0, .24);
}
:is(.inn-bard-meta, .inn-storyteller-meta) strong, :is(.inn-bard-meta, .inn-storyteller-meta) span { display: block; }
:is(.inn-bard-meta, .inn-storyteller-meta) span { color: #c8ad83; font-size: .95rem; }
:is(.inn-bard-price, .inn-storyteller-price) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-soft);
  white-space: nowrap;
}
:is(.inn-bard-price, .inn-storyteller-price) img { width: 18px; height: 18px; object-fit: contain; }
:is(.inn-bard-votes, .inn-storyteller-votes) {
  display: flex;
  align-items: center;
  gap: 7px;
}
:is(.inn-bard-vote-button, .inn-storyteller-vote-button) {
  position: relative;
  display: grid;
  grid-template-columns: 42px auto;
  align-items: center;
  gap: 4px;
  min-width: 68px;
  min-height: 48px;
  padding: 3px 8px 3px 3px;
  border: 1px solid rgba(211, 160, 79, .45);
  border-radius: 5px;
  color: var(--gold-soft);
  background: rgba(0, 0, 0, .25);
  cursor: pointer;
}
:is(.inn-bard-vote-button, .inn-storyteller-vote-button) img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}
:is(.inn-bard-vote-button, .inn-storyteller-vote-button):hover,
:is(.inn-bard-vote-button, .inn-storyteller-vote-button):focus-visible { filter: brightness(1.2); }
:is(.inn-bard-vote-button, .inn-storyteller-vote-button).is-active {
  border-color: #f0c86c;
  background: rgba(211, 160, 79, .2);
  box-shadow: 0 0 12px rgba(239, 192, 88, .42);
}
:is(.inn-bard-vote-button, .inn-storyteller-vote-button):disabled { opacity: .5; cursor: wait; }
:is(.inn-bard-public-actions, .inn-storyteller-public-actions) {
  display: grid;
  justify-items: stretch;
  width: min(330px, 100%);
  margin: 0;
}
:is(.inn-bard-public-actions, .inn-storyteller-public-actions) .inn-button {
  min-height: 44px;
  white-space: normal;
}
:is(.inn-bard-favorite-row, .inn-storyteller-favorite-row) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(211, 160, 79, .38);
  border-left: 4px solid #d3a04f;
  border-radius: 6px;
  background: rgba(0, 0, 0, .24);
}
:is(.inn-bard-favorite-row, .inn-storyteller-favorite-row) .inn-actions { margin: 0; }
:is(.inn-bard-queue, .inn-storyteller-queue) {
  padding: 12px;
  border: 1px solid rgba(211, 160, 79, .3);
  border-radius: 6px;
  background: rgba(0, 0, 0, .2);
}
:is(.inn-bard-queue, .inn-storyteller-queue) h3 { margin: 0 0 8px; }
:is(.inn-bard-queue, .inn-storyteller-queue) ol { display: grid; gap: 4px; margin: 0; padding-left: 24px; color: #c8ad83; }
:is(.inn-bard-queue, .inn-storyteller-queue) li.is-playing { color: #f0c86c; font-weight: 700; }
:is(.inn-bard-list, .inn-storyteller-list) > .inn-empty { background: rgba(0, 0, 0, .2); }
:is(.inn-bard-nowplaying, .inn-storyteller-nowplaying) {
  padding: 12px;
  border-left: 3px solid var(--gold);
  background: rgba(211, 160, 79, .09);
}
.inn-panel--bard {
  width: min(1180px, calc(100vw - 32px));
  max-height: 94dvh;
}
.inn-panel--storyteller {
  width: min(1180px, calc(100vw - 32px));
  max-height: 94dvh;
}
:is(.inn-bard-panel, .inn-storyteller-panel) > .inn-card {
  display: grid;
  gap: 12px;
}
:is(.inn-bard-panel, .inn-storyteller-panel) > .inn-card > h2 { margin: 0; }
:is(.inn-bard-upload, .inn-storyteller-upload) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}
:is(.inn-bard-upload, .inn-storyteller-upload) label:nth-child(4),
:is(.inn-bard-upload, .inn-storyteller-upload) :is(.inn-bard-consent, .inn-storyteller-consent),
:is(.inn-bard-upload, .inn-storyteller-upload) .inn-muted,
:is(.inn-bard-upload, .inn-storyteller-upload) .inn-button {
  grid-column: 1 / -1;
}
:is(.inn-bard-consent, .inn-storyteller-consent) {
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(211, 160, 79, .38);
  border-radius: 5px;
  background: rgba(0, 0, 0, .22);
  line-height: 1.45;
}
:is(.inn-bard-consent, .inn-storyteller-consent) input {
  width: auto;
  margin-top: .25rem;
}
:is(.inn-bard-submission, .inn-storyteller-submission),
:is(.inn-bard-review, .inn-storyteller-review) {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(211, 160, 79, .38);
  border-radius: 6px;
  background: rgba(0, 0, 0, .24);
}
:is(.inn-bard-submission, .inn-storyteller-submission) > div,
:is(.inn-bard-submission, .inn-storyteller-submission) > span { display: grid; gap: 3px; }
:is(.inn-bard-submission, .inn-storyteller-submission) > span { color: #d9bd8c; }
:is(.inn-bard-submission, .inn-storyteller-submission) p { margin: 0; color: #e3b0a5; }
:is(.inn-bard-status--approved, .inn-storyteller-status--approved) { border-left: 4px solid #76b58e; }
:is(.inn-bard-status--pending_review, .inn-storyteller-status--pending_review) { border-left: 4px solid #d3a04f; }
:is(.inn-bard-status--rejected, .inn-storyteller-status--rejected) { border-left: 4px solid #b9675c; }
:is(.inn-bard-status--disabled, .inn-storyteller-status--disabled) { border-left: 4px solid #80766a; opacity: .82; }
:is(.inn-bard-review, .inn-storyteller-review) {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
:is(.inn-bard-review, .inn-storyteller-review) .inn-actions { margin: 0; }
:is(.inn-bard-review--flagged, .inn-storyteller-review--flagged) { border-left: 4px solid #b9675c; }
:is(.inn-bard-reject, .inn-storyteller-reject) {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
:is(.inn-bard-reject, .inn-storyteller-reject) input {
  min-width: 0;
  padding: 10px;
  border: 1px solid #8f642f;
  border-radius: 4px;
  color: #211207;
  background: #ead1a0;
}
:is(.inn-bard-tip-dialog, .inn-storyteller-tip-dialog) {
  width: min(430px, calc(100vw - 28px));
  padding: 20px;
  border: 2px solid #a46d2c;
  border-radius: 7px;
  color: #f1dfba;
  background:
    linear-gradient(rgba(43, 22, 11, .94), rgba(18, 9, 5, .97)),
    url("/assets/posada/chat/parchment_texture.png") center / cover;
  box-shadow: 0 22px 70px #000;
}
:is(.inn-bard-tip-dialog, .inn-storyteller-tip-dialog)::backdrop { background: rgba(0, 0, 0, .72); }
:is(.inn-bard-tip-dialog, .inn-storyteller-tip-dialog) h2,
:is(.inn-bard-tip-dialog, .inn-storyteller-tip-dialog) p { margin-top: 0; }
:is(.inn-bard-tip-dialog, .inn-storyteller-tip-dialog) .inn-actions { margin-bottom: 0; }

.inn-panel--services {
  width: min(1040px, calc(100vw - 32px));
  max-height: 94dvh;
}
.inn-services-panel { display: grid; gap: 14px; }
.inn-services-error { border-left-color: var(--danger); color: #f2c0b7; }
.inn-services-list { display: grid; gap: 10px; }
.inn-service-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: 12px;
  border: 1px solid rgba(211, 160, 79, .42);
  border-radius: 6px;
  background: rgba(0, 0, 0, .28);
}
.inn-service-thumbnail {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
  object-position: center;
  filter: none;
}
.inn-service-copy { min-width: 0; }
.inn-service-copy h2 { margin: 0 0 4px; font-size: 1.08rem; }
.inn-service-copy p { margin: 2px 0; color: #d5bd91; line-height: 1.35; }
.inn-service-pending-text { font-size: .86rem; color: #c9ad81 !important; }
.inn-service-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 138px;
  white-space: nowrap;
}
.inn-service-buy img { width: 22px; height: 22px; object-fit: contain; }
.inn-service-buy:disabled {
  filter: grayscale(1);
  opacity: .48;
}
.inn-services-effects { display: grid; gap: 8px; }
.inn-services-effects h2 { margin: 0; }
.inn-services-effect-list { display: flex; flex-wrap: wrap; gap: 8px; }
.inn-services-effect {
  display: grid;
  gap: 2px;
  min-width: 165px;
  padding: 8px 10px;
  border: 1px solid rgba(211, 160, 79, .4);
  border-radius: 5px;
  color: #ead5aa;
  background: rgba(211, 160, 79, .1);
}
.inn-services-effect strong { color: var(--gold-soft); }
.inn-services-effect span { font-size: .86rem; }

.inn-form { display: grid; gap: 12px; }
.inn-form label { display: grid; gap: 5px; color: var(--gold-soft); }
.inn-form input, .inn-form select, .inn-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #8f642f;
  border-radius: 4px;
  color: #211207;
  background: #ead1a0;
}
.inn-form textarea { min-height: 110px; resize: vertical; }
.inn-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.inn-chat-log { min-height: 260px; max-height: 45dvh; overflow: auto; padding: 12px; border: 1px solid #74491f; background: rgba(0, 0, 0, .38); }
.inn-message { padding: 7px 0; border-bottom: 1px solid rgba(211, 160, 79, .15); overflow-wrap: anywhere; }
.inn-message strong { color: var(--gold-soft); }
.inn-chat-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }
.inn-chat-form input { min-width: 0; padding: 10px; border: 1px solid #8f642f; border-radius: 4px; color: #211207; background: #ead1a0; }
.inn-chat-compose { display: grid; gap: 7px; }
.inn-private-toggle { display: flex; align-items: center; gap: 7px; color: var(--gold-soft); font-size: .9rem; }
.inn-private-toggle input { width: auto; }

.inn-panel--chat {
  width: min(1500px, 98vw);
  max-height: 96dvh;
  overflow: hidden;
  padding: clamp(10px, 1.4vw, 20px);
  background: #241307 url("/assets/posada/chat/chat_frame_main.png") center / 100% 100% no-repeat;
}
.inn-panel--chat::before, .inn-panel--chat::after { display: none; }
.inn-panel--chat .inn-close { position: absolute; right: 14px; top: 14px; }
.inn-chat-app { display: grid; gap: 10px; height: min(88dvh, 850px); padding: clamp(24px, 4vw, 58px); color: #29180b; }
.inn-chat-brand { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; min-height: 76px; border-bottom: 8px solid transparent; border-image: url("/assets/posada/chat/wood_divider.png") 30 round; }
.inn-chat-brand > img { width: clamp(90px, 12vw, 175px); max-height: 72px; object-fit: contain; }
.inn-chat-brand p, .inn-chat-brand h1 { margin: 0; color: #3a210f; }
.inn-chat-brand h1 { font-size: clamp(1.2rem, 2.4vw, 2rem); }
.inn-chat-toolbar { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.inn-image-button { min-height: 42px; padding: 8px 15px; border: 0; color: #251205; background: center / 100% 100% no-repeat; font-weight: 700; cursor: pointer; }
.inn-image-button--silver { background-image: url("/assets/posada/chat/button_silver.png"); }
.inn-image-button--gold { background-image: url("/assets/posada/chat/button_gold.png"); }
.inn-chat-columns { display: grid; grid-template-columns: minmax(190px, .78fr) minmax(300px, 1.7fr) minmax(210px, .9fr); gap: 10px; min-height: 0; }
.inn-chat-column { min-height: 0; overflow: auto; padding: 14px; border: 2px solid #81501f; border-radius: 5px; background: rgba(229, 198, 137, .88) url("/assets/posada/chat/parchment_texture.png") center / cover; box-shadow: inset 0 0 18px rgba(66, 35, 11, .36); }
.inn-chat-column h2, .inn-chat-column h3 { margin: 0 0 10px; padding: 6px 3px 8px; border-bottom: 2px solid #7b491d; color: #4a270e; background: transparent; box-shadow: none; font-size: 1rem; cursor: default; }
.inn-chat-conversation { display: grid; grid-template-rows: auto 1fr auto; }
.inn-chat-log { min-height: 0; max-height: none; border-color: #835321; color: #2a170b; background: rgba(255, 239, 199, .48); }
.inn-message { border-bottom-color: rgba(77, 42, 15, .2); }
.inn-message strong { color: #6e310e; }
.inn-message small { color: #6c563c; }
.inn-message.is-private { padding-left: 7px; border-left: 3px solid #8f4d86; }
.inn-room, .inn-member { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 7px; width: 100%; margin-bottom: 7px; padding: 6px; border: 1px solid rgba(100, 57, 20, .45); border-radius: 4px; text-align: left; color: #2a170b; background: rgba(255, 240, 199, .45); cursor: pointer; }
.inn-member.is-selected { background: rgba(224, 174, 85, .62); box-shadow: inset 0 0 10px rgba(183, 112, 20, .28); }
.inn-room > img, .inn-member-status, .inn-invitation img, .inn-owner-requests img { width: 30px; height: 30px; object-fit: contain; }
.inn-room .inn-room-pending { width: 24px; height: 24px; }
.inn-room span, .inn-member span { min-width: 0; }
.inn-room strong, .inn-room small, .inn-member strong, .inn-member small { display: block; overflow-wrap: anywhere; }
.inn-room small, .inn-member small { font-size: .72rem; color: #72542f; }
.inn-member-avatar { width: 36px; height: 36px; background: rgba(67, 35, 14, .18); border-radius: 50%; }
.inn-member-avatar img { width: 100%; height: 100%; object-fit: contain; }
.inn-member-actions, .inn-invitation, .inn-owner-requests > div { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 0 0 8px 12px; padding: 6px; border-left: 2px solid #8a541f; }
.inn-asset-action, .inn-private-status { border: 0; padding: 0; background: transparent; cursor: pointer; }
.inn-asset-action img { display: block; width: min(180px, 100%); max-height: 46px; object-fit: contain; }
.inn-private-status img { display: block; width: min(170px, 100%); max-height: 48px; object-fit: contain; }
.inn-mini-button { padding: 4px 7px; border: 1px solid #82511f; border-radius: 3px; color: #2d1608; background: #d9b873; cursor: pointer; }
.inn-inline-access { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inn-inline-access input { flex: 1; min-width: 130px; padding: 8px; border: 1px solid #80501f; background: #f1d7a1; }
.inn-private-recipient { margin: 0; padding: 5px 8px; border-left: 3px solid #8f4d86; color: #50234c; background: rgba(255, 255, 255, .3); }
.inn-chat-invitations { margin-bottom: 10px; }
.inn-chat-form input { background: #f1d7a1; }

/* Chat polish: decorative headings, readable actions and undistorted selected-room glow. */
.inn-chat-column .inn-section-heading {
  position: relative;
  margin: 0 0 12px;
  padding: 5px 3px 9px;
  border: 0;
  border-bottom: 2px solid #7b491d;
  border-radius: 0;
  color: #4a270e;
  background: transparent;
  box-shadow: none;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.2;
  cursor: default;
}
.inn-chat-column .inn-section-heading::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 7px;
  background: url("/assets/posada/chat/wood_divider.png") center / 100% 100% no-repeat;
  pointer-events: none;
}
.inn-image-button {
  width: clamp(150px, 14vw, 210px);
  min-height: 58px;
  padding: 12px 20px;
  font-size: clamp(.95rem, 1.2vw, 1.15rem);
  line-height: 1.15;
  white-space: normal;
}
.inn-room {
  position: relative;
  isolation: isolate;
  min-height: 58px;
  overflow: visible;
  padding: 8px;
}
.inn-room::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -5px;
  opacity: 0;
  background: url("/assets/posada/chat/room_selected_glow.png") center / contain no-repeat;
  pointer-events: none;
}
.inn-room.is-selected {
  border-color: #bf7c20;
  background: rgba(238, 204, 137, .78);
  box-shadow: inset 0 0 10px rgba(183, 112, 20, .28);
}
.inn-room.is-selected::before { opacity: 1; }
.inn-room > * { position: relative; z-index: 1; }
.inn-room strong, .inn-room small {
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.inn-member { min-height: 72px; grid-template-columns: 58px 1fr auto; }
.inn-member-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: 50%;
  background: #5b3215;
}
.inn-member-portrait {
  position: absolute;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 25%;
  transform: scale(1.38);
}
.inn-member-initial {
  position: relative;
  z-index: 1;
  color: #f0d392;
  font-size: 1.45rem;
  font-weight: 700;
}
.inn-avatar-frame {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.inn-private-status {
  display: block;
  width: min(260px, 100%);
  margin: 0 auto 12px;
}
.inn-private-status img {
  width: 100%;
  max-height: 78px;
}
.inn-member-actions .inn-asset-action {
  display: block;
  width: min(250px, 100%);
}
.inn-member-actions .inn-asset-action img {
  width: 100%;
  max-height: 72px;
}
.inn-current-room {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.inn-current-room > div:first-child { min-width: 0; flex: 1; }
.inn-current-room p { margin: 3px 0 0; color: #71502c; }
.inn-room-management { flex: 0 0 auto; }
.inn-room-management .inn-button { min-height: 38px; padding: 7px 10px; }

.inn-toast { position: fixed; z-index: 200; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(560px, 90vw); padding: 12px 16px; border: 1px solid var(--gold); border-radius: 5px; text-align: center; color: var(--gold-soft); background: #281308; box-shadow: 0 8px 30px #000; }
.inn-toast.is-error { border-color: var(--danger); }

@media (max-aspect-ratio: 4/3) {
  .inn-stage { width: 100vw; height: auto; }
  .inn-status { max-width: 64%; }
}
@media (max-width: 700px) {
  .inn-form-row { grid-template-columns: 1fr; }
  .inn-panel { width: 96vw; max-height: 92dvh; }
  .inn-chat-form { grid-template-columns: 1fr; }
  .inn-status { display: none; }
}
@media (max-width: 980px), (max-height: 620px) {
  .inn-panel--chat { overflow: auto; }
  .inn-chat-app { height: auto; min-height: 82dvh; padding: 34px 22px; }
  .inn-chat-brand { grid-template-columns: auto 1fr; }
  .inn-chat-toolbar { grid-column: 1 / -1; justify-content: flex-start; }
  .inn-chat-columns { grid-template-columns: minmax(170px, .8fr) minmax(300px, 1.6fr); }
  .inn-chat-members { grid-column: 1 / -1; max-height: 230px; }
}
@media (max-width: 700px) {
  .inn-chat-columns { grid-template-columns: 1fr; }
  .inn-chat-rooms, .inn-chat-members { max-height: 230px; }
  .inn-chat-brand { grid-template-columns: 82px 1fr; align-items: center; overflow: visible; }
  .inn-chat-brand > img { display: block; width: 82px; max-height: 64px; }
  .inn-chat-brand p { font-size: .75rem; }
  .inn-chat-brand h1 { max-width: 100%; font-size: clamp(1rem, 5vw, 1.35rem); line-height: 1.15; overflow-wrap: anywhere; }
  .inn-chat-toolbar { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .inn-image-button { width: 100%; min-height: 52px; padding: 9px 12px; font-size: .95rem; }
  .inn-chat-app { padding: 30px 17px; overflow: visible; }
  .inn-current-room { flex-direction: column; }
  .inn-room-management { width: 100%; }
}

/* 066B: final action sizing without changing chat structure or behavior. */
.inn-image-button {
  min-height: 87px;
  padding-top: 18px;
  padding-bottom: 18px;
  line-height: 1.35;
  background-size: 100% 100%;
  background-position: center;
}
.inn-asset-action {
  display: inline-grid;
  place-items: center;
  min-width: min(280px, 100%);
  min-height: 88px;
}
.inn-asset-action img {
  width: min(320px, 100%);
  max-height: 92px;
  object-fit: contain;
}
.inn-private-status {
  width: min(420px, 100%);
  min-height: 112px;
  display: grid;
  place-items: center;
}
.inn-private-status img {
  width: 100%;
  max-height: 108px;
  object-fit: contain;
}
.inn-member-actions .inn-asset-action {
  width: min(420px, 100%);
  min-height: 112px;
}
.inn-member-actions .inn-asset-action img {
  width: 100%;
  max-height: 108px;
}
.inn-room-management .inn-button {
  min-width: 190px;
  min-height: 76px;
  padding: 16px 20px;
  line-height: 1.3;
  font-size: 1rem;
  white-space: normal;
}
.inn-room::before {
  inset: -18px -24px;
  background-size: 100% 100%;
  transform: scale(1.12);
  transform-origin: center;
  pointer-events: none;
}
.inn-room.is-selected::before { opacity: 1; }

@media (max-width: 980px), (max-height: 620px) {
  .inn-image-button { min-height: 78px; padding-top: 15px; padding-bottom: 15px; }
  .inn-asset-action, .inn-private-status, .inn-member-actions .inn-asset-action { min-height: 92px; }
  .inn-asset-action img, .inn-private-status img, .inn-member-actions .inn-asset-action img { max-height: 90px; }
  .inn-room-management .inn-button { min-height: 68px; }
}

@media (max-width: 700px) {
  .inn-chat-toolbar { grid-template-columns: 1fr; }
  .inn-image-button { min-height: 78px; padding: 15px 18px; font-size: 1rem; }
  .inn-asset-action, .inn-private-status, .inn-member-actions .inn-asset-action {
    width: 100%;
    min-width: 0;
    min-height: 88px;
  }
  .inn-asset-action img, .inn-private-status img, .inn-member-actions .inn-asset-action img {
    width: min(320px, 100%);
    max-height: 86px;
  }
  .inn-room-management .inn-button { width: 100%; min-width: 0; min-height: 68px; }
  .inn-room::before { inset: -14px -18px; transform: scale(1.08); }
}

/* 067: Maestro de los Cofres progression, stones and reward reveal. */
.inn-panel--master {
  width: min(1180px, calc(100vw - 32px));
  max-height: 94dvh;
  border-color: #c68f3e;
  background:
    linear-gradient(rgba(31, 15, 8, .82), rgba(11, 7, 5, .94)),
    url("/assets/posada/chat/button_wood.png") center / 420px auto,
    #211107;
}
.inn-master { display: grid; gap: 18px; }
.inn-master-header {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 4px 8px 18px;
  border-bottom: 2px solid rgba(211, 160, 79, .52);
}
.inn-master-header p { max-width: 760px; margin: 5px 0 0; color: #ead8b5; line-height: 1.55; }
.inn-master-focus-stone {
  width: 150px;
  height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(255, 224, 143, .72));
  animation: inn-stone-glow 2.8s ease-in-out infinite;
}
.inn-master-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.inn-challenge {
  position: relative;
  display: grid;
  align-content: start;
  gap: 11px;
  min-height: 310px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(219, 170, 88, .48);
  border-radius: 7px;
  background:
    linear-gradient(rgba(33, 18, 9, .76), rgba(15, 9, 6, .88)),
    url("/assets/posada/chat/parchment_texture.png") center / cover;
  box-shadow: inset 0 0 28px rgba(18, 8, 3, .72);
}
.inn-challenge::before {
  content: "";
  position: absolute;
  inset: 0;
  border-left: 4px solid #9c7044;
  pointer-events: none;
}
.inn-challenge--active::before { border-left-color: #e8c15d; }
.inn-challenge--completed::before { border-left-color: #7bc59b; }
.inn-challenge--claimed::before { border-left-color: #79a6d3; }
.inn-challenge-title {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
.inn-challenge-title h3 { margin: 4px 0 0; font-size: 1.12rem; line-height: 1.25; overflow-wrap: anywhere; }
.inn-challenge-stone {
  width: 90px;
  height: 90px;
  object-fit: contain;
  filter: drop-shadow(0 0 9px rgba(255, 222, 139, .55));
}
.inn-challenge-state {
  display: inline-block;
  color: #f0cf83;
  font-size: .77rem;
  font-weight: 700;
  text-transform: uppercase;
}
.inn-challenge-objective, .inn-challenge-reward { margin: 0; line-height: 1.45; }
.inn-challenge-objective { color: #f0dfbf; }
.inn-challenge-reward { color: #d7b978; }
.inn-challenge-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}
.inn-challenge-progress-bar {
  height: 13px;
  overflow: hidden;
  border: 1px solid #9b733d;
  border-radius: 3px;
  background: #160d08;
}
.inn-challenge-progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #b3534f, #e4bb54, #71a77e);
  transition: width .35s ease;
}
.inn-challenge > .inn-button { width: 100%; margin-top: auto; }
.inn-challenge--locked {
  min-height: 310px;
  place-items: center;
  align-content: center;
  border-style: dashed;
  background: rgba(4, 4, 4, .62);
}
.inn-challenge--locked::before { border-left-color: #665d58; }
.inn-challenge--locked .inn-challenge-stone {
  width: min(230px, 72%);
  height: 210px;
  opacity: .6;
  filter: grayscale(.5) drop-shadow(0 0 11px rgba(178, 183, 193, .35));
}
.inn-challenge-lock {
  color: #c8c0b4;
  font-size: .9rem;
  text-transform: uppercase;
}
.inn-reward-reveal {
  min-height: min(720px, 82dvh);
  place-items: center;
  align-content: center;
  text-align: center;
}
.inn-reward-reveal h1 { margin-right: 0; }
.inn-reward-card {
  width: min(340px, 76vw);
  max-height: min(480px, 56dvh);
  aspect-ratio: 5 / 7;
  object-fit: contain;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .72)) drop-shadow(0 0 12px rgba(242, 198, 98, .38));
}
.inn-reward-message { max-width: 680px; margin: 4px 0 0; color: #f4dfab; font-size: 1.15rem; line-height: 1.45; }
.inn-reward-gold { margin: 0; color: #80c99b; font-weight: 700; }

@keyframes inn-stone-glow {
  0%, 100% { transform: translateY(0); filter: drop-shadow(0 0 9px rgba(255, 224, 143, .52)); }
  50% { transform: translateY(-3px); filter: drop-shadow(0 0 16px rgba(255, 224, 143, .82)); }
}

@keyframes inn-bard-idle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@media (max-width: 760px) {
  .inn-panel--bard { width: calc(100vw - 24px); padding: 14px; }
  .inn-panel--storyteller { width: calc(100vw - 24px); padding: 14px; }
  :is(.inn-bard-row, .inn-storyteller-row),
  :is(.inn-bard-review, .inn-storyteller-review),
  :is(.inn-bard-favorite-row, .inn-storyteller-favorite-row) { grid-template-columns: 1fr; }
  :is(.inn-bard-votes, .inn-storyteller-votes) { justify-content: flex-start; }
  :is(.inn-bard-row, .inn-storyteller-row) .inn-actions,
  :is(.inn-bard-review, .inn-storyteller-review) .inn-actions,
  :is(.inn-bard-favorite-row, .inn-storyteller-favorite-row) .inn-actions { margin: 0; }
  :is(.inn-bard-upload, .inn-storyteller-upload) { grid-template-columns: 1fr; }
  :is(.inn-bard-upload, .inn-storyteller-upload) label:nth-child(4),
  :is(.inn-bard-upload, .inn-storyteller-upload) :is(.inn-bard-consent, .inn-storyteller-consent),
  :is(.inn-bard-upload, .inn-storyteller-upload) .inn-muted,
  :is(.inn-bard-upload, .inn-storyteller-upload) .inn-button { grid-column: auto; }
  :is(.inn-bard-reject, .inn-storyteller-reject) { grid-template-columns: 1fr; }
  .inn-panel--services { width: calc(100vw - 24px); padding: 14px; }
  .inn-service-row {
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: start;
  }
  .inn-service-thumbnail { width: 52px; height: 52px; }
  .inn-service-buy { grid-column: 1 / -1; width: 100%; }
  .inn-panel--master { width: calc(100vw - 32px); padding: 16px; }
  .inn-master-header { grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 2px 2px 14px; }
  .inn-master-focus-stone { width: 92px; height: 92px; }
  .inn-master-grid { grid-template-columns: 1fr; }
  .inn-challenge { min-height: 0; padding: 14px; }
  .inn-challenge-title { grid-template-columns: 72px minmax(0, 1fr); }
  .inn-challenge-stone { width: 72px; height: 72px; }
  .inn-challenge--locked { min-height: 230px; }
  .inn-challenge--locked .inn-challenge-stone { height: 155px; }
}

@media (prefers-reduced-motion: reduce) {
  .inn-master-focus-stone { animation: none; }
  :is(.inn-bard, .inn-storyteller) { animation: none; }
}


/* Ynnive, la Contadora de Cuentos: NPC independiente. */
.inn-storyteller {
  left: var(--inn-storyteller-left);
  top: var(--inn-storyteller-top);
  width: var(--inn-storyteller-width);
  clip-path: polygon(25% 2%, 75% 2%, 92% 20%, 96% 48%, 88% 76%, 72% 94%, 26% 96%, 8% 78%, 4% 45%, 10% 18%);
}
.inn-storyteller-tooltip {
  left: 60%;
  top: 46%;
}
