/* ──────────────────────────────────────────────────────────────────────── */
/*  Inn generator — ecosystem-native, self-contained                         */
/* ──────────────────────────────────────────────────────────────────────── */

.inn-page {
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Header bar ── */
.inn-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.inn-head-kicker {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  border: 1px solid rgba(214,178,87,.25);
  background: rgba(214,178,87,.07);
  color: var(--gold);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: .5rem;
}
.inn-head-kicker i { font-size: .7rem; }
.inn-head-title h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 10%, #e5daff 55%, #f0cf7d 95%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.inn-head-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.inn-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.05rem;
  border-radius: 10px;
  font-size: .86rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all .16s ease;
  white-space: nowrap;
  border: 1px solid transparent;
  text-decoration: none;
}
.inn-btn-primary {
  background: linear-gradient(135deg, #a589ff 0%, var(--violet) 55%, #6a4df4 100%);
  color: #fff;
  border-color: rgba(139,112,255,.55);
  box-shadow: 0 3px 14px rgba(139,112,255,.3);
}
.inn-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(139,112,255,.45); }
.inn-btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}
.inn-btn-ghost:hover { color: var(--text); border-color: var(--gold); background: rgba(214,178,87,.06); }
.inn-btn-ghost-sm {
  padding: .4rem .75rem;
  font-size: .76rem;
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}
.inn-btn-ghost-sm:hover { color: var(--text); border-color: var(--gold); background: rgba(214,178,87,.06); }
.inn-btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

/* ── Export dropdown ── */
.inn-export-wrap { position: relative; }
.inn-export-menu {
  display: none;
  position: absolute;
  top: calc(100% + .4rem);
  right: 0;
  background: linear-gradient(180deg, var(--panel-top), var(--panel));
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 220px;
  box-shadow: 0 14px 40px rgba(0,0,0,.55);
  z-index: 50;
  overflow: hidden;
  padding: .25rem;
}
.inn-export-menu.open { display: block; }
.inn-export-menu button {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem .75rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: .82rem;
  font-family: inherit;
  cursor: pointer;
  border-radius: 8px;
  width: 100%;
  text-align: left;
  transition: background .12s, color .12s;
}
.inn-export-menu button:hover { background: rgba(139,112,255,.08); color: var(--text); }
.inn-export-menu button i { color: var(--faint); width: 14px; text-align: center; }
.inn-export-menu .inn-export-divider { border-top: 1px solid var(--border); margin: .25rem 0; }

/* ── Toggle switches ── */
.inn-toggle {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  cursor: pointer;
  user-select: none;
}
.inn-toggle input { display: none; }
.inn-toggle-track {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  border: 1px solid var(--border);
  position: relative;
  transition: background .18s, border-color .18s;
  flex-shrink: 0;
}
.inn-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: all .18s ease;
}
.inn-toggle input:checked + .inn-toggle-track {
  background: rgba(214,178,87,.25);
  border-color: rgba(214,178,87,.6);
}
.inn-toggle input:checked + .inn-toggle-track .inn-toggle-thumb {
  left: 20px;
  background: var(--gold-hi);
  box-shadow: 0 0 10px rgba(214,178,87,.6);
}
.inn-toggle-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.inn-toggle-sm .inn-toggle-track { width: 32px; height: 18px; }
.inn-toggle-sm .inn-toggle-thumb { width: 12px; height: 12px; }
.inn-toggle-sm input:checked + .inn-toggle-track .inn-toggle-thumb { left: 16px; }
.inn-toggle-sm .inn-toggle-label { font-size: .7rem; }

/* ── Narrative + sign ── */
.inn-narrative-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  align-items: start;
}
.inn-narrative {
  font-size: 1rem;
  line-height: 1.7;
  color: #cfc6ea;
}
.inn-narrative p { margin: 0 0 .9rem; }
.inn-narrative p:last-child { margin-bottom: 0; }
.inn-narrative .inn-empty {
  padding: 1.5rem;
  border: 1px dashed var(--border);
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
  font-size: .92rem;
}
.inn-narrative-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}
.inn-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .65rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.inn-badge i { font-size: .55rem; }
.inn-badge-wealth { color: var(--gold); background: rgba(214,178,87,.1); border: 1px solid rgba(214,178,87,.35); }
.inn-badge-diet   { color: #9b7eff; background: rgba(139,112,255,.12); border: 1px solid rgba(139,112,255,.35); }

/* ── Inn sign ── */
.inn-sign-wrap {
  text-align: center;
}
.inn-sign {
  padding: 1.5rem 1rem;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(64,42,26,.8), rgba(38,24,15,.9)),
    radial-gradient(ellipse at top, rgba(201,162,39,.2), transparent 70%);
  border: 2px solid rgba(214,178,87,.4);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 -8px 18px rgba(0,0,0,.35),
    0 8px 24px rgba(0,0,0,.45);
  position: relative;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.inn-sign::before, .inn-sign::after {
  content: '';
  position: absolute;
  top: -10px;
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, #8b6a2c, #4a3817);
  border-radius: 2px;
  box-shadow: inset -1px 0 0 rgba(0,0,0,.4);
}
.inn-sign::before { left: 20%; }
.inn-sign::after  { right: 20%; }
.inn-sign-icon {
  font-size: 2.2rem;
  color: var(--gold-hi);
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.inn-sign-name {
  font-family: var(--display);
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--gold-hi);
  text-shadow: 0 2px 4px rgba(0,0,0,.7), 0 0 14px rgba(214,178,87,.3);
}
.inn-sign-caption {
  margin-top: .6rem;
  font-size: .75rem;
  color: var(--faint);
  font-style: italic;
}

/* ── Cards ── */
.inn-card {
  background: linear-gradient(180deg, var(--panel-top), var(--panel));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.inn-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .95rem 1.15rem;
  border-bottom: 1px solid var(--border-soft);
  flex-wrap: wrap;
}
.inn-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--display);
  letter-spacing: .015em;
}
.inn-card-title i { color: var(--gold); font-size: .9rem; }
.inn-card-actions { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.inn-card-body { padding: 1.1rem 1.15rem; }
.inn-card-body.inn-empty { padding: 1.5rem; text-align: center; color: var(--faint); font-style: italic; }

/* ── Menu sections (collapsible) ── */
.inn-menu-sections {
  padding: .6rem .75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.inn-section {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0,0,0,.2);
}
.inn-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .65rem .85rem;
  background: rgba(255,255,255,.02);
  border: none;
  width: 100%;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  transition: background .12s;
}
.inn-section-head:hover { background: rgba(255,255,255,.04); }
.inn-section-title {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .88rem;
  font-weight: 700;
}
.inn-section-title i { color: var(--gold); width: 18px; text-align: center; }
.inn-section-chev {
  color: var(--muted);
  transition: transform .2s ease;
  font-size: .8rem;
}
.inn-section[data-collapsed="true"] .inn-section-chev { transform: rotate(-90deg); }
.inn-section-body {
  padding: .7rem .95rem 1rem;
  border-top: 1px solid var(--border-soft);
  font-size: .85rem;
}
.inn-section[data-collapsed="true"] .inn-section-body { display: none; }
.inn-section-body .inn-loading {
  color: var(--faint);
  font-style: italic;
  padding: .4rem 0;
}
.inn-section[data-empty="true"] { display: none; }

/* ── Menu items ── */
.menu-item {
  padding: .55rem 0;
  border-bottom: 1px dashed rgba(255,255,255,.05);
}
.menu-item:last-child { border-bottom: 0; }
.menu-item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: .2rem;
}
.menu-item-name { font-weight: 700; color: var(--text); }
.menu-item-price {
  font-family: 'Faculty Glyphic', serif;
  color: var(--gold);
  white-space: nowrap;
  font-size: .86rem;
}
.menu-item-desc {
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.55;
}

/* Tags (wealth + diet chips next to menu header) */
.inn-tags { display: flex; flex-wrap: wrap; gap: .4rem; flex: 1; justify-content: center; }

/* ── Status text ── */
.inn-status {
  padding: .55rem 1.15rem;
  font-size: .76rem;
  color: var(--faint);
  font-style: italic;
}

/* ── Innkeeper block ── */
.inn-keeper {
  display: grid;
  grid-template-columns: 1fr;
  gap: .65rem;
}
.inn-keeper-title {
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--gold-hi);
  margin: 0 0 .1rem;
  letter-spacing: .02em;
}
.inn-keeper-sub {
  color: var(--muted);
  font-size: .82rem;
  margin-bottom: .5rem;
}
.inn-keeper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .75rem;
}
.inn-keeper-field {
  padding: .65rem .8rem;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgba(0,0,0,.18);
}
.inn-keeper-field-label {
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gold);
  margin-bottom: .22rem;
}
.inn-keeper-field-value {
  font-size: .87rem;
  color: var(--text);
  line-height: 1.45;
}

/* ── Notable NPCs ── */
.inn-npcs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: .8rem;
}
.inn-npc-card {
  padding: .8rem .95rem;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgba(0,0,0,.18);
}
.inn-npc-cat {
  font-size: .62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gold);
  margin-bottom: .35rem;
}
.inn-npc-desc {
  font-size: .85rem;
  color: var(--text);
  line-height: 1.55;
}

/* ── Event ── */
.inn-event-type {
  display: inline-block;
  font-size: .66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--violet);
  background: rgba(139,112,255,.12);
  border: 1px solid rgba(139,112,255,.35);
  padding: .2rem .55rem;
  border-radius: 999px;
  margin-bottom: .55rem;
}
.inn-event-desc {
  font-size: .95rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: .75rem;
}
.inn-event-outcomes-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gold);
  margin-bottom: .3rem;
}
.inn-event-outcomes { color: var(--muted); font-size: .85rem; line-height: 1.55; }
.inn-event-outcomes ul { margin: .25rem 0 0; padding-left: 1.25rem; }
.inn-event-outcomes li { margin-bottom: .25rem; }

/* ── Merchant ── */
.inn-merchant-name {
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--gold-hi);
  margin: 0 0 .4rem;
}
.inn-merchant-desc {
  color: var(--text);
  font-size: .92rem;
  line-height: 1.6;
  margin-bottom: .7rem;
}
.inn-merchant-price {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .7rem;
  border-radius: 8px;
  background: rgba(214,178,87,.1);
  border: 1px solid rgba(214,178,87,.3);
  color: var(--gold);
  font-size: .82rem;
  font-weight: 700;
  font-family: var(--display);
}

/* ── Rumors ── */
.inn-subheader {
  margin: 0 0 .7rem;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: .45rem;
}
.inn-subheader::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}
.inn-rumors-short { margin: 0; padding: 0; list-style: none; }
.inn-rumors-short .rumor-short {
  padding: .65rem .85rem;
  border-left: 3px solid rgba(214,178,87,.4);
  background: rgba(0,0,0,.15);
  border-radius: 0 8px 8px 0;
  margin-bottom: .5rem;
}
.inn-rumors-short .rumor-text { color: var(--text); font-size: .88rem; line-height: 1.55; }
.inn-rumors-short .rumor-meta { color: var(--faint); font-size: .74rem; margin-top: .25rem; font-style: italic; }

.inn-rumors-detailed {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.rumor-detailed {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0,0,0,.18);
}
.rumor-detailed-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .65rem .85rem;
  gap: .75rem;
  cursor: pointer;
  background: rgba(255,255,255,.02);
  border: none;
  width: 100%;
  font-family: inherit;
  color: var(--text);
  text-align: left;
  transition: background .12s;
}
.rumor-detailed-head:hover { background: rgba(255,255,255,.04); }
.rumor-detailed-title {
  font-weight: 700;
  font-size: .88rem;
  flex: 1;
}
.rumor-detailed-badges {
  display: flex;
  gap: .3rem;
  flex-wrap: wrap;
}
.rumor-badge {
  display: inline-block;
  font-size: .6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .15rem .5rem;
  border-radius: 999px;
}
.rumor-badge-danger-low    { color: #6fa84a; background: rgba(111,168,74,.12); border: 1px solid rgba(111,168,74,.3); }
.rumor-badge-danger-medium { color: #e8a050; background: rgba(232,160,80,.12); border: 1px solid rgba(232,160,80,.3); }
.rumor-badge-danger-high   { color: #e94560; background: rgba(233,69,96,.12); border: 1px solid rgba(233,69,96,.3); }
.rumor-badge-truth { color: var(--muted); background: rgba(255,255,255,.04); border: 1px solid var(--border); }
.rumor-detailed-body {
  padding: .8rem .95rem 1rem;
  border-top: 1px solid var(--border-soft);
  font-size: .86rem;
  line-height: 1.6;
  color: var(--text);
}
.rumor-detailed[data-collapsed="true"] .rumor-detailed-body { display: none; }
.rumor-detailed[data-collapsed="true"] .rumor-detailed-chev { transform: rotate(-90deg); }
.rumor-detailed-chev {
  color: var(--muted);
  transition: transform .2s ease;
  font-size: .78rem;
}
.rumor-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .55rem;
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px dashed rgba(255,255,255,.06);
}
.rumor-meta-item {
  font-size: .78rem;
}
.rumor-meta-label {
  color: var(--faint);
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
  margin-bottom: .15rem;
}
.rumor-meta-value { color: var(--muted); }
.rumor-reward {
  margin-top: .7rem;
  padding: .55rem .7rem;
  background: rgba(214,178,87,.08);
  border: 1px solid rgba(214,178,87,.25);
  border-radius: 8px;
  font-size: .8rem;
  color: var(--gold);
}
.rumor-reward i { margin-right: .4rem; }
.rumor-leads { margin-top: .6rem; }
.rumor-leads-label {
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gold);
  margin-bottom: .3rem;
}
.rumor-leads ul { margin: 0; padding-left: 1.1rem; }
.rumor-leads li { font-size: .8rem; color: var(--muted); margin-bottom: .2rem; }
.rumor-tags { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .55rem; }
.rumor-tag {
  font-size: .65rem;
  color: var(--muted);
  padding: .12rem .5rem;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
}

/* ── Toast (non-blocking notifications) ── */
.inn-toast-host {
  position: fixed;
  top: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}
.inn-toast {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem 1.05rem;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(26,26,45,.97), rgba(19,19,33,.97));
  border: 1px solid var(--border);
  color: var(--text);
  font-size: .86rem;
  line-height: 1.4;
  box-shadow: 0 10px 28px rgba(0,0,0,.5);
  pointer-events: auto;
  animation: inn-toast-in .22s ease-out;
  max-width: 440px;
}
.inn-toast i { font-size: .9rem; flex-shrink: 0; }
.inn-toast.is-info  i { color: var(--violet); }
.inn-toast.is-warn  { border-color: rgba(232,160,80,.5); }
.inn-toast.is-warn  i { color: #e8a050; }
.inn-toast.is-error { border-color: rgba(233,69,96,.55); }
.inn-toast.is-error i { color: #e94560; }
.inn-toast.is-out { opacity: 0; transform: translateY(-6px); transition: all .2s ease-in; }
@keyframes inn-toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 860px) {
  .inn-head { align-items: stretch; }
  .inn-head-actions { justify-content: space-between; }
  .inn-narrative-row { grid-template-columns: 1fr; }
  .inn-sign-wrap { max-width: 320px; margin: 0 auto; }
  .inn-card-head { padding: .75rem .9rem; }
  .inn-card-actions { gap: .4rem; }
  .inn-btn { padding: .55rem .85rem; font-size: .82rem; }
}
@media (max-width: 520px) {
  .inn-head-actions { flex-direction: column; align-items: stretch; }
  .inn-export-wrap, .inn-export-wrap > .inn-btn { width: 100%; }
  .inn-export-menu { left: 0; right: 0; }
}
