/* ===========================================================
   IRAN NFT Metaverse — interface, second book
   -----------------------------------------------------------
   The bag's load and the hour in Iran, the herald's scroll,
   riding, building on your land, the sage, the stable, and
   the potter's and tile painter's studios. Same manuscript
   language as metaverse.css, which this file follows.
   =========================================================== */

/* the load of the bag, under the purse */
.load { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 11px; color: #c9cfe6; }
.load .ic { width: 16px; height: 16px; display: inline-flex; color: var(--gold-light); }
.load .ic svg { width: 16px; height: 16px; }
.load .bar { width: 70px; height: 5px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.load .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--turq-deep), var(--turq-light)); transition: width 0.3s; }
.load.near .bar i { background: linear-gradient(90deg, #a87a1a, var(--gold-light)); }
.load.full .bar i { background: linear-gradient(90deg, #7a2a24, #e06a5a); }
.load.full { color: #f0a49a; }

/* the hour in Iran, under the astrolabe */
.clock {
  position: absolute;
  top: calc(184px + var(--safe-t));
  right: 22px;
  width: 148px;
  text-align: center;
  padding: 4px 10px 5px;
  border-radius: 99px;
  background: rgba(11, 18, 48, 0.78);
  box-shadow: inset 0 0 0 1px var(--gold-dark);
  pointer-events: none;
}
.clock b { font-size: 16px; color: var(--gold-light); letter-spacing: 0.04em; margin-inline-end: 6px; }
.clock span { font-size: 11.5px; color: #c9cfe6; }

/* action bar states */
.act.on { box-shadow: inset 0 0 0 2px var(--turq-light), 0 0 16px rgba(127, 214, 207, 0.45); }

/* the herald's scroll */
.herald {
  position: absolute;
  top: calc(96px + var(--safe-t));
  left: 50%;
  width: min(620px, calc(100vw - 32px));
  transform: translate(-50%, -16px) scaleX(0.2);
  opacity: 0;
  transition: transform 0.7s cubic-bezier(.2, .9, .2, 1), opacity 0.5s;
  pointer-events: none;
  z-index: 3;
}
.herald.show { opacity: 1; transform: translate(-50%, 0) scaleX(1); }
.herald .scroll {
  position: relative;
  margin: 0 14px;
  padding: 12px 26px 12px;
  color: var(--ink);
  background: linear-gradient(180deg, #f3e6c6, #e2cfa0);
  box-shadow: inset 0 0 0 1px var(--gold-dark), inset 0 0 0 4px #f3e6c6, inset 0 0 0 5px rgba(155, 44, 44, 0.45), 0 10px 26px rgba(0, 0, 0, 0.45);
  text-align: center;
}
.herald .roll { position: absolute; top: -4px; bottom: -4px; width: 20px; border-radius: 10px; background: linear-gradient(90deg, #8a5a2a, #d9b07a 45%, #6b4422); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); z-index: 1; }
.herald .roll.l { left: 0; }
.herald .roll.r { right: 0; }
.herald .who { font-family: var(--serif); letter-spacing: 0.1em; font-size: 12px; text-transform: uppercase; color: var(--madder); }
.herald .who .fa { margin-left: 8px; color: var(--ink-faint); font-size: 12px; }
.herald p { margin: 5px 0 0; font-size: 16px; line-height: 1.5; unicode-bidi: plaintext; }
.herald.official .scroll { background: linear-gradient(180deg, #1b2a63, #121c45); color: var(--ivory); box-shadow: inset 0 0 0 1px var(--gold), inset 0 0 0 4px #121c45, inset 0 0 0 5px var(--gold-dark), 0 10px 26px rgba(0, 0, 0, 0.5); }
.herald.official .who { color: var(--gold-light); }

/* building on your land */
.buildbar {
  position: absolute;
  left: 50%;
  bottom: calc(92px + var(--safe-b));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18, 28, 69, 0.94), rgba(11, 18, 48, 0.94));
  box-shadow: inset 0 0 0 1px var(--gold-dark), 0 8px 22px rgba(0, 0, 0, 0.4);
  flex-wrap: wrap;
  justify-content: center;
  max-width: calc(100vw - 24px);
}
.buildbar b { font-family: var(--serif); font-weight: 400; letter-spacing: 0.06em; color: var(--gold-light); }
.buildbar .fa { color: var(--turq-light); font-size: 12px; margin-inline-end: 6px; }
.buildbar .btn-ghost { color: var(--ivory); }

/* panels: the bag */
.loadbar { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; background: rgba(255, 252, 240, 0.45); box-shadow: inset 0 0 0 1px rgba(138, 106, 38, 0.3); margin-bottom: 12px; }
.loadbar .ic { width: 40px; height: 40px; color: var(--gold-dark); }
.loadbar b { font-family: var(--serif); font-weight: 400; font-size: 15px; }
.loadbar .fa { color: var(--madder); font-size: 13px; }
.loadbar .track { height: 7px; border-radius: 6px; background: rgba(90, 60, 20, 0.15); margin: 6px 0 4px; overflow: hidden; }
.loadbar .fill { height: 100%; background: linear-gradient(90deg, var(--turq-deep), var(--turq)); }
.loadbar.near .fill { background: linear-gradient(90deg, #a87a1a, #e2b84a); }
.loadbar.full .fill { background: linear-gradient(90deg, #7a2a24, #c0503f); }

.works { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.work { position: relative; aspect-ratio: 1; border: 0; padding: 6px; border-radius: 10px; background: radial-gradient(circle at 50% 30%, #fffaf0, #e8d8b0); box-shadow: inset 0 0 0 1.5px var(--qc, var(--q0)), inset 0 0 0 4px #f4e9cf, 0 2px 0 rgba(90, 60, 20, 0.25); display: grid; place-items: center; }
.work.sel { box-shadow: inset 0 0 0 2.5px var(--turq), inset 0 0 0 5px #f4e9cf, 0 0 0 3px rgba(42, 166, 161, 0.35); }
.work .badge { position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%); }
.badge { font-size: 10.5px; padding: 1px 7px; border-radius: 99px; background: rgba(38, 64, 143, 0.85); color: var(--ivory); white-space: nowrap; }
.badge.on { background: var(--turq-deep); }
.wthumb { width: 100%; height: 100%; object-fit: contain; display: block; }
span.wthumb svg { width: 100%; height: 100%; }
.work-detail { grid-template-columns: 200px 1fr; }
.work-detail .wthumb { width: 200px; height: 200px; border-radius: 10px; background: radial-gradient(circle at 50% 35%, #fffaf0, #e2cfa5); }
.mrow .ic .wthumb { width: 46px; height: 46px; }
.work-view { display: grid; justify-items: center; gap: 10px; }
.work-view .wthumb { width: 260px; height: 260px; border-radius: 12px; background: radial-gradient(circle at 50% 35%, #fffaf0, #e2cfa5); }
.toast .ic img { width: 34px; height: 34px; object-fit: contain; }

.horses { display: grid; gap: 10px; }
.horse-card { padding: 10px 12px; border-radius: 10px; background: rgba(255, 252, 240, 0.5); box-shadow: inset 0 0 0 1px rgba(138, 106, 38, 0.3); }
.horse-card.on { box-shadow: inset 0 0 0 2px var(--turq), 0 0 0 3px rgba(42, 166, 161, 0.2); }
.hc-top { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; }
.hc-top b { font-family: var(--serif); font-weight: 400; font-size: 16px; }
.hc-top .sub { font-size: 12px; color: var(--ink-faint); }
.coatdot { display: inline-block; width: 26px; height: 26px; border-radius: 50%; border: 3px solid; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); }
.coats { display: flex; gap: 6px; }
.coats .coatdot { width: 18px; height: 18px; border-width: 2px; }
.tack { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; margin-top: 10px; }
.tslot { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 8px; background: rgba(255, 252, 240, 0.55); font-size: 12.5px; flex-wrap: wrap; }
.tslot .sname { font-family: var(--serif); text-transform: uppercase; letter-spacing: 0.1em; font-size: 10.5px; color: var(--ink-faint); min-width: 92px; }
.tslot .sname .fa { margin-left: 5px; letter-spacing: 0; text-transform: none; font-size: 11px; }
.tslot .fitted { display: inline-flex; align-items: center; gap: 4px; }
.tslot select { height: 28px; padding: 0 6px; font-size: 12px; width: auto; }
.tslot .btn { min-height: 26px; padding: 3px 8px; font-size: 12px; }

.breeds { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.breed { display: grid; gap: 6px; align-content: start; padding: 12px; border-radius: 10px; background: rgba(255, 252, 240, 0.5); box-shadow: inset 0 0 0 1px rgba(138, 106, 38, 0.3); }
.breed h4 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 17px; }
.breed h4 .fa { display: block; color: var(--madder); font-size: 13px; }
.breed p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); font-style: italic; }
.breed .input { height: 34px; }

.seg.filter { margin: 0 0 12px; display: flex; flex-wrap: wrap; border-radius: 12px; }
.seg.filter button { flex: 1 1 auto; }
.market-list.compact .mrow { grid-template-columns: 42px 1fr auto; padding: 6px 8px; }
.market-list.compact .mrow .ic { width: 42px; height: 42px; }
.mrow.pick { border: 0; text-align: start; grid-template-columns: 42px 1fr; cursor: pointer; }
.mrow.pick.sel { box-shadow: inset 0 0 0 2px var(--turq); background: rgba(42, 166, 161, 0.12); }
.mrow .ic > span svg { width: 30px; height: 30px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lede { font-size: 14px; line-height: 1.65; color: var(--ink-soft); margin: 0 0 12px; }
.lede.lore { font-size: 15px; font-style: italic; }

.build-list { display: grid; gap: 8px; }
.build { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; background: rgba(255, 252, 240, 0.5); box-shadow: inset 0 0 0 1px rgba(138, 106, 38, 0.25); }
.build h4 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 16px; }
.build h4 .fa { color: var(--madder); font-size: 13px; margin-left: 8px; }
.build .meta { font-size: 12px; color: var(--ink-faint); margin-top: 4px; }
.build select { margin-top: 6px; height: 32px; }

/* the sage */
.sage-log { display: grid; gap: 10px; max-height: 300px; overflow-y: auto; padding: 4px; margin-bottom: 10px; scrollbar-width: thin; }
.sage-log .q { justify-self: end; max-width: 80%; padding: 8px 12px; border-radius: 12px 12px 2px 12px; background: linear-gradient(180deg, var(--lapis), var(--lapis-700)); color: var(--ivory); font-size: 14px; unicode-bidi: plaintext; }
.sage-log .a { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; max-width: 92%; }
.sage-log .a .ic { width: 34px; height: 34px; color: var(--lapis-700); padding: 4px; border-radius: 50%; background: rgba(255, 252, 240, 0.7); box-shadow: inset 0 0 0 1px var(--gold-dark); }
.sage-log .a > div { padding: 10px 14px; border-radius: 2px 12px 12px 12px; background: rgba(255, 252, 240, 0.65); box-shadow: inset 0 0 0 1px rgba(138, 106, 38, 0.35); }
.sage-log .a b { font-family: var(--serif); font-weight: 400; letter-spacing: 0.05em; color: var(--madder); display: block; margin-bottom: 4px; unicode-bidi: plaintext; }
.sage-log .a p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--ink); }
.sage-log .a p.alt { margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(138, 106, 38, 0.35); font-size: 12.5px; color: var(--ink-faint); }
.fa-p { font-family: var(--sans); text-align: right; }
.topics { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.topics .more { font-style: italic; }
.chip { border: 0; padding: 5px 10px; border-radius: 99px; font-size: 12px; background: rgba(255, 252, 240, 0.55); box-shadow: inset 0 0 0 1px rgba(138, 106, 38, 0.35); color: var(--ink-soft); }
.chip:hover { background: rgba(42, 166, 161, 0.15); }
.chip .fa { margin-left: 6px; color: var(--ink-faint); font-size: 11.5px; }
.sage-ask { display: flex; gap: 8px; }
.sage-ask .input { flex: 1; }
.proclamations { display: grid; gap: 8px; }
.procl { padding: 8px 12px; border-radius: 8px; background: rgba(255, 252, 240, 0.5); box-shadow: inset 0 0 0 1px rgba(138, 106, 38, 0.25); }
.procl b { font-family: var(--serif); font-weight: 400; margin-inline-end: 8px; }
.procl p { margin: 4px 0 0; font-size: 14px; unicode-bidi: plaintext; }
.procl.official { background: rgba(38, 64, 143, 0.12); box-shadow: inset 0 0 0 1px var(--gold-dark); }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }

/* ---------------------------------------------------------------- studios */
section.studio {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-rows: auto 1fr;
  background: radial-gradient(ellipse at 30% 40%, #2a1a10, #0e0906 75%);
  opacity: 0;
  transition: opacity 0.35s;
}
section.studio.show { opacity: 1; }
.studio-head { display: flex; align-items: center; justify-content: center; padding: calc(10px + var(--safe-t)) 60px 8px; position: relative; }
.studio-head .sarlowh { color: var(--ivory); }
.studio-head .close { position: absolute; right: 14px; top: calc(10px + var(--safe-t)); width: 40px; min-height: 40px; border-radius: 50%; background: rgba(255, 252, 240, 0.85); color: var(--ink); }
.studio-head .close svg { width: 16px; height: 16px; }
.studio-body { display: grid; grid-template-columns: 1fr 360px; gap: 14px; padding: 0 14px calc(14px + var(--safe-b)); min-height: 0; }
.studio-stage { position: relative; min-height: 0; border-radius: 14px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--gold-dark), 0 10px 30px rgba(0, 0, 0, 0.5); }
.studio-canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.studio-canvas:active { cursor: grabbing; }
.studio-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 6px 14px; border-radius: 99px; background: rgba(11, 18, 48, 0.78); color: var(--ivory); font-size: 13px; pointer-events: none; white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis; }
.studio-side { overflow-y: auto; padding: 18px 20px; border-radius: 14px; scrollbar-width: thin; }
.studio-side .row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.studio-side .btn-wide { margin-top: 12px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.step { border: 0; padding: 8px 6px; border-radius: 10px; font-family: var(--serif); font-size: 13px; letter-spacing: 0.05em; color: var(--ink-soft); background: rgba(255, 252, 240, 0.45); box-shadow: inset 0 0 0 1px rgba(138, 106, 38, 0.35); }
.step .fa { display: block; font-size: 11.5px; }
.step.on { color: var(--ivory); background: linear-gradient(180deg, var(--lapis), var(--lapis-700)); box-shadow: inset 0 0 0 1px var(--gold); }
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.tool { border: 0; display: grid; justify-items: center; gap: 2px; padding: 8px 6px; border-radius: 10px; background: rgba(255, 252, 240, 0.5); box-shadow: inset 0 0 0 1px rgba(138, 106, 38, 0.3); color: var(--ink); }
.tool .ti { width: 26px; height: 26px; color: var(--lapis-700); }
.tool .ti svg { width: 26px; height: 26px; }
.tool b { font-family: var(--serif); font-weight: 400; font-size: 13px; }
.tool .fa { font-size: 11px; color: var(--ink-faint); }
.tool.on { box-shadow: inset 0 0 0 2px var(--turq); background: rgba(42, 166, 161, 0.15); }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.presets .btn .fa { margin-left: 6px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatches .swatch { display: inline-block; margin: 0; border: 0; padding: 0; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35), 0 0 0 1px rgba(42, 29, 18, 0.45); }
.swatches .swatch.on { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6), 0 0 0 2px var(--paper), 0 0 0 4px var(--turq); }
.bands { display: grid; gap: 6px; margin-bottom: 8px; }
.band { padding: 6px 8px; border-radius: 8px; background: rgba(255, 252, 240, 0.45); box-shadow: inset 0 0 0 1px rgba(138, 106, 38, 0.3); cursor: pointer; }
.band.on { box-shadow: inset 0 0 0 2px var(--turq); }
.band-top { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.band-top b { font-family: var(--serif); font-weight: 400; font-size: 13px; }
.band-top select { height: 30px; font-size: 12px; padding: 0 6px; }
.band-top .btn-icon { width: 28px; min-height: 28px; }
.band-top .btn-icon svg { width: 12px; height: 12px; }
.band-body { display: grid; gap: 4px; margin-top: 6px; }
.band-body label { font-family: var(--serif); text-transform: uppercase; letter-spacing: 0.1em; font-size: 10.5px; color: var(--ink-faint); }
.band-body .row input { flex: 1; }
.khayyam { margin: 18px 0 2px; text-align: center; font-size: 15px; color: var(--madder); font-weight: 600; }
.tile-stage { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; justify-items: center; padding: 14px; background: radial-gradient(ellipse at center, #3a2414, #160d08); }
.tile-board { width: min(100%, 70vh); aspect-ratio: 1; padding: 14px; border-radius: 6px; background: linear-gradient(135deg, #6b4a2a, #3a2414); box-shadow: inset 0 0 0 2px var(--gold-dark), 0 10px 30px rgba(0, 0, 0, 0.5); }
.tile-canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4); }
.tile-preview { display: grid; justify-items: center; gap: 4px; width: 200px; }
.tile-preview .section-title { color: var(--gold-light); width: 100%; }
.tile-wall { width: 200px; height: 200px; border-radius: 4px; box-shadow: 0 0 0 3px #3a2414, 0 0 0 4px var(--gold-dark); }

@media (max-width: 900px) {
  .studio-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(0, 46vh); }
  .tile-stage { grid-template-columns: 1fr; }
  .tile-preview { display: none; }
  .tile-board { width: min(100%, 40vh); }
}
@media (max-width: 760px) {
  .clock { top: calc(124px + var(--safe-t)); right: 8px; width: 112px; padding: 3px 6px; }
  .clock b { font-size: 13px; }
  .clock span { display: none; }
  .load .bar { width: 52px; }
  .herald { top: calc(150px + var(--safe-t)); }
  .herald p { font-size: 14px; }
  .work-detail { grid-template-columns: 1fr; justify-items: center; }
  .two-col { grid-template-columns: 1fr; }
  .buildbar { bottom: calc(70px + var(--safe-b)); }
  .studio-side { padding: 14px; }
}

/* English and Persian side by side in segmented buttons and tools */
.seg button .fa, .tab .fa { margin-left: 6px; }

/* With riding and building the action bar has nine buttons: on a phone it
   scrolls sideways, and the two greetings step aside on the narrowest. */
@media (max-width: 760px) {
  .actionbar { left: 10px; right: 10px; max-width: none; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  .actionbar::-webkit-scrollbar { display: none; }
  .actionbar .act { flex: none; }
  /* the side with more buttons fades out, with a chevron (hud.js sets the classes) */
  .actionbar.more-right { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 46px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 46px), transparent); }
  .actionbar.more-left { -webkit-mask-image: linear-gradient(90deg, transparent, #000 46px); mask-image: linear-gradient(90deg, transparent, #000 46px); }
  .actionbar.more-left.more-right { -webkit-mask-image: linear-gradient(90deg, transparent, #000 46px, #000 calc(100% - 46px), transparent); mask-image: linear-gradient(90deg, transparent, #000 46px, #000 calc(100% - 46px), transparent); }
  .hud:has(.actionbar.more-right)::after, .hud:has(.actionbar.more-left)::before {
    position: absolute; bottom: calc(24px + var(--safe-b)); z-index: 6; pointer-events: none;
    font: 700 22px/1 var(--serif); color: var(--gold-light); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  }
  .hud:has(.actionbar.more-right)::after { content: '›'; right: 16px; }
  .hud:has(.actionbar.more-left)::before { content: '‹'; left: 16px; }
}
@media (max-width: 420px) {
  .actionbar .act[aria-label="Wave"], .actionbar .act[aria-label="Bow, hand on heart"] { display: none; }
  .actionbar { justify-content: space-between; }
}

/* the cinematic behind the gate */
.cine-fade { position: absolute; inset: 0; background: #070b1f; opacity: 0; transition: opacity 0.6s ease; pointer-events: none !important; }
.cine-fade.show { opacity: 1; }
.cine-caption {
  position: absolute; left: 34px; bottom: calc(30px + var(--safe-b)); pointer-events: none !important;
  opacity: 0; transform: translateY(8px); transition: opacity 1.2s ease, transform 1.2s ease;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}
.cine-caption.show { opacity: 1; transform: none; }
.cine-caption b { display: block; font-family: var(--serif); font-weight: 400; font-size: 24px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ivory); }
.cine-caption .fa { display: block; font-size: 18px; color: var(--gold-light); margin-top: 2px; }
.cine-caption span:last-child { display: block; font-size: 13px; color: #c9cfe6; margin-top: 4px; letter-spacing: 0.04em; }
@media (max-width: 760px) { .cine-caption { left: 16px; bottom: calc(14px + var(--safe-b)); } .cine-caption b { font-size: 17px; } }

/* the mission tracker */
.quest-track {
  position: absolute; top: calc(222px + var(--safe-t)); right: 14px; width: 240px; text-align: start;
  display: grid; gap: 3px; padding: 9px 12px; border: 0; border-radius: 12px; color: var(--ivory);
  background: linear-gradient(180deg, rgba(18, 28, 69, 0.9), rgba(11, 18, 48, 0.9));
  box-shadow: inset 0 0 0 1px var(--gold-dark), 0 6px 18px rgba(0, 0, 0, 0.35);
}
.quest-track .qt b { font-family: var(--serif); font-weight: 400; font-size: 13px; letter-spacing: 0.06em; color: var(--gold-light); }
.quest-track .qt .fa { margin-left: 6px; font-size: 11.5px; color: var(--turq-light); }
.quest-track .qs { display: flex; gap: 6px; align-items: center; font-size: 12.5px; line-height: 1.35; }
.quest-track .qa { flex: none; width: 14px; height: 14px; color: var(--turq-light); display: inline-flex; transition: transform 0.15s linear; }
.quest-track .qw { font-size: 11.5px; color: #c9cfe6; }
.quest-track .qd { font-size: 11.5px; color: var(--gold-light); justify-self: end; }
@media (max-width: 760px) { .quest-track { top: calc(160px + var(--safe-t)); right: 8px; width: 200px; padding: 7px 10px; } }

/* the sage's greeting, tales and missions */
.sage-say { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; padding: 12px 14px; border-radius: 12px; background: rgba(255, 252, 240, 0.6); box-shadow: inset 0 0 0 1px rgba(138, 106, 38, 0.35); margin-bottom: 12px; }
.sage-say .ic { width: 40px; height: 40px; color: var(--lapis-700); }
.sage-say p { margin: 0 0 6px; font-size: 14px; line-height: 1.65; }
.sage-say.small { grid-template-columns: 28px 1fr; padding: 8px 10px; }
.sage-say.small .ic { width: 28px; height: 28px; }
.sage-say.small p { font-size: 13px; }
.sage-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sage-choice { border: 0; display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; text-align: start; padding: 12px; border-radius: 12px; background: linear-gradient(180deg, #fffaf0, #efe2c2); box-shadow: inset 0 0 0 1px rgba(138, 106, 38, 0.4), 0 2px 0 rgba(90, 60, 20, 0.2); color: var(--ink); }
.sage-choice:hover { box-shadow: inset 0 0 0 2px var(--turq), 0 2px 0 rgba(90, 60, 20, 0.2); }
.sage-choice .ic { width: 34px; height: 34px; color: var(--madder); }
.sage-choice b { display: block; font-family: var(--serif); font-weight: 400; font-size: 14.5px; }
.sage-choice .fa { display: block; font-size: 12.5px; color: var(--madder); }
.sage-choice small { display: block; font-size: 11.5px; color: var(--ink-faint); margin-top: 2px; }
.tales { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.tale { border: 0; text-align: start; padding: 12px; border-radius: 10px; background: rgba(255, 252, 240, 0.55); box-shadow: inset 0 0 0 1px rgba(138, 106, 38, 0.35); color: var(--ink); }
.tale:hover { box-shadow: inset 0 0 0 2px var(--turq); }
.tale b { display: block; font-family: var(--serif); font-weight: 400; font-size: 15px; }
.tale .fa { display: block; color: var(--madder); font-size: 13px; }
.tale small { color: var(--ink-faint); font-size: 11.5px; }
.tale-read h3 { margin: 10px 0 0; font-family: var(--serif); font-weight: 400; font-size: 20px; }
.tale-read .tale-fa { display: block; color: var(--madder); font-size: 15px; margin-bottom: 10px; }
.tale-read p { font-size: 15px; line-height: 1.85; margin: 0 0 12px; }
.tale-read .tale-en { font-size: 14px; color: var(--ink-soft); font-style: italic; line-height: 1.7; }
.tale-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.quests { display: grid; gap: 10px; }
.quest { padding: 12px 14px; border-radius: 12px; background: rgba(255, 252, 240, 0.55); box-shadow: inset 0 0 0 1px rgba(138, 106, 38, 0.3); }
.quest.active { box-shadow: inset 0 0 0 2px var(--turq); }
.quest.locked { opacity: 0.6; }
.quest.done { opacity: 0.8; }
.quest p { font-size: 13.5px; line-height: 1.6; margin: 8px 0; }
.q-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.q-top b { font-family: var(--serif); font-weight: 400; font-size: 16px; }
.q-top .fa { color: var(--madder); font-size: 13px; }
.q-top .badge { margin-left: auto; }
.q-steps { margin: 8px 0; padding-left: 20px; font-size: 13px; line-height: 1.7; color: var(--ink-faint); }
.q-steps .did { text-decoration: line-through; }
.q-steps .now { color: var(--ink); font-weight: 600; }
.q-question { display: grid; gap: 6px; margin: 8px 0; }
.q-question .fa { color: var(--madder); }
.q-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.q-choices .fa { margin-left: 6px; }
.rewards { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 8px 0; font-size: 12.5px; }
.rewards b { font-family: var(--serif); font-weight: 400; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.rewards .rw { display: inline-flex; align-items: center; gap: 4px; color: var(--gold-dark); font-weight: 700; }
@media (max-width: 760px) { .sage-choices { grid-template-columns: 1fr; } }
