﻿/* Assets: a cartographer's museum catalogue, in parchment and sepia ink. */
:root {
  --bg: #f1e6c8;
  --bg-2: #e7d7ae;
  --surface: rgba(90, 60, 20, .06);
  --surface-2: rgba(90, 60, 20, .11);
  --border: rgba(90, 60, 20, .24);
  --text: #2b1d0e;
  --muted: #6b5638;
  --accent: #9b3d1f;
  --accent-2: #b8862b;
  --accent-ink: #fff4dc;
  --glow: rgba(155, 61, 31, .3);
  --font-display: "Fraunces", Georgia, serif;
  color-scheme: light;
}
body {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 250, 230, .8), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.8' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .1 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E"),
    var(--bg);
}
h1, h2 { font-weight: 900; letter-spacing: -.02em; }
h1 em, h2 em { font-style: italic; color: var(--accent); }
.nav { background: color-mix(in srgb, var(--bg) 82%, transparent); }
.btn { color: var(--accent-ink); }
.btn.btn--ghost { color: var(--text); }
.small { font-size: .85rem; }

.assets-hero .hero-shade { background: radial-gradient(ellipse at 30% 50%, rgba(241, 230, 200, .96) 0%, rgba(241, 230, 200, .78) 45%, rgba(241, 230, 200, .25) 80%), linear-gradient(180deg, transparent 60%, var(--bg)); }
.map-bg img { filter: sepia(.45) saturate(.8) contrast(.95); }
.compass { position: absolute; right: 6%; top: 18%; width: clamp(140px, 18vw, 240px); color: #5a3d17; opacity: .85; animation: spin 90s linear infinite; z-index: -1; }
@keyframes spin { to { transform: rotate(360deg); } }
.ledger { display: flex; flex-wrap: wrap; gap: 0; margin-top: 36px; border-top: 2px solid var(--text); border-bottom: 1px solid var(--text); max-width: 780px; }
.ledger div { flex: 1 1 150px; padding: 14px 18px 14px 0; display: grid; gap: 2px; }
.ledger div + div { padding-left: 18px; border-left: 1px solid var(--border); }
.ledger b { font: 700 1.6rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.ledger span { font: 500 .72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }

.bgs .marquee img { height: 220px; width: auto; border-radius: 6px; border: 6px solid #fff8e6; box-shadow: 0 10px 24px rgba(60, 35, 10, .25); transform: rotate(-1deg); }
.bgs .marquee img:nth-child(even) { transform: rotate(1.2deg); }

.cast { background: linear-gradient(180deg, transparent, #2a1c0e 12%, #1a120a 88%, transparent); color: #f6ead0; }
.cast .lead { color: #cdb48a; }
.cast .eyebrow { color: #e3a65a; }
.stage-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 16px; align-items: end; }
.stage-row + .stage-row { margin-top: 28px; }
.stage-row figure { margin: 0; display: grid; justify-items: center; gap: 10px; padding: 18px 8px 14px; border-radius: 12px; background: radial-gradient(ellipse at 50% 92%, rgba(227, 166, 90, .35), transparent 60%); transition: transform .3s; }
.stage-row figure:hover { transform: translateY(-6px) scale(1.06); }
.stage-row img { height: 170px; width: auto; max-width: 100%; object-fit: contain; filter: drop-shadow(0 8px 6px rgba(0, 0, 0, .5)); }
.enemies img { height: 200px; }
.stage-row figcaption { font: 600 .78rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .12em; color: #e3c48f; }
.spin { margin: 40px auto 0; display: grid; justify-items: center; gap: 10px; }
.spin img { height: 220px; width: auto; }
.spin figcaption { color: #cdb48a; font-size: .9rem; }

.victory { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; margin: 24px 0 8px; }
.victory img { width: 100%; height: auto; background: #fff8e6; border: 3px solid #fff8e6; border-radius: 6px; box-shadow: 0 6px 14px rgba(60, 35, 10, .25); transition: transform .25s; }
.victory img:hover { transform: translateY(-6px) rotate(-3deg) scale(1.15); z-index: 1; }
.wall { padding: 14px; border-radius: 10px; background: #fff8e6; box-shadow: 0 30px 60px -20px rgba(60, 35, 10, .45); transform: rotate(1.2deg); overflow: hidden; }
.wall img { width: 100%; height: auto; transition: transform 1.2s; }
.wall:hover img { transform: scale(1.12); }

.map-slide { border: 8px solid #fff8e6; box-shadow: 0 20px 40px -15px rgba(60, 35, 10, .45); }
.maps .carousel { --slide: min(86%, 900px); }
.map-slide img { aspect-ratio: 16 / 10; }

.type-lab { background: rgba(90, 60, 20, .06); }
.line-input { width: 100%; margin-top: 18px; padding: 14px 16px; border-radius: 10px; border: 2px solid var(--border); background: #fffaf0; font: 500 1.05rem/1.3 var(--font-body); color: var(--text); }
.line-input:focus { outline: none; border-color: var(--accent); }
.font-picker { display: flex; gap: 8px; margin-top: 12px; }
.font-picker button { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--border); background: transparent; cursor: pointer; font: 600 .82rem/1 var(--font-mono); }
.font-picker button[aria-checked="true"] { background: var(--text); color: var(--bg); }
.dialogue-box { min-height: 150px; padding: 22px 28px 30px; }
.dialogue-box p { margin: 0; color: #fff; word-break: break-word; }
.next-arrow { position: absolute; right: 18px; bottom: 8px; color: #ffd84d; animation: bob 1s steps(2) infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }

.drawers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.drawer { position: relative; display: grid; gap: 4px; padding: 18px 20px 18px 64px; border-radius: 8px; background: linear-gradient(180deg, #fbf3dd, #efe0b8); border: 1px solid var(--border); box-shadow: inset 0 -3px 0 rgba(90, 60, 20, .12); transition: transform .25s, box-shadow .25s; }
.drawer:hover { transform: translateY(-3px); box-shadow: inset 0 -3px 0 rgba(90, 60, 20, .12), 0 14px 26px -12px rgba(60, 35, 10, .4); }
.drawer i { position: absolute; left: 18px; top: 18px; font: 700 .85rem/1 var(--font-mono); font-style: normal; color: var(--accent); padding: 6px 7px; border: 1px solid var(--accent); border-radius: 5px; }
.drawer b { font: 700 1.05rem/1.2 var(--font-display); }
.drawer span { color: var(--muted); font-size: .86rem; line-height: 1.4; }
.drawer em { font: 600 .74rem/1 var(--font-mono); font-style: normal; color: var(--accent-2); margin-top: 6px; }
.relic { margin: 56px auto 40px; display: grid; place-items: center; }
.relic img { width: min(100%, 640px); height: auto; filter: drop-shadow(0 16px 20px rgba(60, 35, 10, .35)); }

.next-row { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; flex-wrap: wrap; }
.next-row a { display: grid; gap: 4px; padding: 18px 24px; border-radius: 10px; border: 1px solid var(--border); text-decoration: none; transition: background .2s; flex: 1; min-width: 220px; background: rgba(255, 250, 235, .5); }
.next-row a:last-child { text-align: right; }
.next-row a:hover { background: var(--surface-2); }
.next-row small { color: var(--muted); font: 500 .75rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .14em; }
.next-row b { font: 700 1.25rem/1.2 var(--font-display); }
.footer { background: #e7d7ae; }

/* ---- Browse & download: packs, the explorer and the item dialog */
.drawer { text-decoration: none; color: inherit; cursor: pointer; }
.pack { position: relative; display: grid; gap: 4px; padding: 18px 20px 18px 66px; border-radius: 10px; text-decoration: none; color: inherit;
  background: linear-gradient(180deg, #fbf3dd, #efe0b8); border: 1px solid var(--border); box-shadow: inset 0 -3px 0 rgba(90, 60, 20, .12); transition: transform .25s, box-shadow .25s; }
.pack:hover { transform: translateY(-3px); box-shadow: inset 0 -3px 0 rgba(90, 60, 20, .12), 0 14px 26px -12px rgba(60, 35, 10, .4); }
.pack i { position: absolute; left: 18px; top: 18px; width: 32px; height: 32px; display: grid; place-items: center; font: 700 .95rem/1 var(--font-mono); font-style: normal;
  color: var(--accent); border: 1px solid var(--accent); border-radius: 7px; }
.pack b { font: 700 1.1rem/1.2 var(--font-display); }
.pack span { color: var(--muted); font-size: .88rem; line-height: 1.4; }
.pack em { font: 600 .74rem/1 var(--font-mono); font-style: normal; color: var(--accent-2); margin-top: 6px; }
.pack--all { background: linear-gradient(135deg, #3a2610, #1e140a); color: #f6ead0; border-color: #1e140a; padding: 24px 26px 24px 80px; margin-bottom: 14px; }
.pack--all i { left: 24px; top: 24px; width: 40px; height: 40px; font-size: 1.3rem; color: #ffd36b; border-color: #ffd36b; }
.pack--all b { font-size: 1.45rem; }
.pack--all span { color: #cdb48a; }
.pack--all em { color: #ffd36b; }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }

.explorer { margin-top: 48px; padding: clamp(16px, 3vw, 28px); border-radius: 14px; background: #fff8e6; border: 1px solid var(--border); box-shadow: 0 30px 60px -30px rgba(60, 35, 10, .45); }
.ex-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.ex-search { flex: 1 1 280px; margin: 0; }
.ex-bar--filters { margin-top: 12px; }
.ex-field { flex: 1 1 200px; min-width: 0; display: grid; gap: 4px; }
.ex-field[hidden] { display: none; }
.ex-field > span { font: 500 .68rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.ex-field select { width: 100%; min-width: 0; padding: 11px 12px; border-radius: 10px; border: 2px solid var(--border); background: #fffaf0; color: var(--text); font: 500 .92rem/1.2 var(--font-body); }
.ex-field select:focus { outline: none; border-color: var(--accent); }
.ex-types, .ex-has, .ex-views { flex-wrap: wrap; }
.font-picker button { color: var(--text); }
.font-picker button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.ex-has small { font-weight: 500; opacity: .7; margin-left: 4px; }
.ex-status { display: flex; align-items: center; gap: 14px; margin: 14px 0 12px; }
.ex-count { margin: 0; }
.ex-reset { border: 0; background: none; padding: 0; cursor: pointer; color: var(--accent); font: 600 .82rem/1 var(--font-body); text-decoration: underline; text-underline-offset: 3px; }
.ex-reset[hidden] { display: none; }
.ex-empty { grid-column: 1 / -1; padding: 30px 0; text-align: center; color: var(--muted); }
.ex-thumb { position: relative; }
.ex-sheet { position: absolute; inset: 0; background-size: 900% 1400%; background-repeat: no-repeat; }
.ex-bigcell { position: relative; width: min(100%, 640px); aspect-ratio: 8 / 5; }
.ex-bigcell .ex-sheet { image-rendering: pixelated; }
.ex-demo { margin: 0 0 16px; }
.pack--off { opacity: .6; cursor: default; }
.pack--off:hover { transform: none; }
.ex-flag { position: absolute; right: 6px; top: 6px; padding: 3px 6px; border-radius: 5px; background: rgba(26, 18, 10, .78); color: #ffd36b;
  font: 700 .66rem/1 var(--font-mono); letter-spacing: .06em; }
.ex-link { cursor: pointer; }
img.ex-link:focus-visible, figure .ex-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.bgs .marquee img.ex-link:hover { transform: rotate(0) scale(1.04); transition: transform .25s; }
.ex-fontlinks { margin-top: 14px; font-size: .9rem; }
.ex-fontlinks a { color: var(--accent); font-weight: 600; }
.cast { width: 100%; display: grid; gap: 10px; }
.cast-stage { width: 100%; height: min(58vh, 56vw); min-height: 220px; border-radius: 8px; overflow: hidden; background: #120c07; display: grid; place-items: center; }
.cast-stage canvas { width: 100% !important; height: 100% !important; display: block; touch-action: none; }
.cast-bar { display: flex; align-items: center; gap: 12px; }
.cast-play { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; background: var(--text); color: var(--bg); font-size: .85rem; }
.cast-time { flex: 1; min-width: 0; accent-color: var(--accent); }
.cast-clock { flex: none; font: 600 .78rem/1 var(--font-mono); color: var(--muted); min-width: 120px; text-align: right; }
.cast-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: .86rem; }
.cast-opts label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.cast-opts select { padding: 4px 6px; border-radius: 6px; border: 1px solid var(--border); background: #fffaf0; color: var(--text); }
@media (max-width: 600px) { .cast-clock { min-width: 0; } }
.ex-views { padding: 12px clamp(18px, 3vw, 28px) 0; }
.ex-views:empty { display: none; }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr)); gap: 12px; }
.ex-card { display: grid; gap: 4px; align-content: start; padding: 8px 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: #fbf3dd;
  text-align: left; cursor: pointer; color: inherit; font: inherit; transition: transform .2s, box-shadow .2s; min-width: 0; }
.ex-card:hover, .ex-card:focus-visible { transform: translateY(-3px); box-shadow: 0 12px 22px -12px rgba(60, 35, 10, .45); outline: none; border-color: var(--accent); }
.ex-card b { font: 600 .86rem/1.25 var(--font-body); overflow-wrap: anywhere; }
.ex-card small { color: var(--muted); font-size: .74rem; line-height: 1.3; overflow-wrap: anywhere; }
.ex-card code, .ex-title code { font: 600 .72rem/1 var(--font-mono); color: var(--accent); background: rgba(155, 61, 31, .08); padding: 2px 5px; border-radius: 4px; margin-right: 6px; }
.ex-thumb { display: grid; place-items: center; aspect-ratio: 8 / 5; border-radius: 7px; overflow: hidden; margin-bottom: 4px;
  background: repeating-conic-gradient(#efe3c4 0 25%, #f8efd8 0 50%) 0 0 / 16px 16px; }
.ex-thumb img { max-width: 100%; max-height: 100%; width: auto; height: auto; image-rendering: pixelated; }
.ex-thumb--full img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.ex-none { font: 500 .72rem/1 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.ex-more { display: flex; margin: 20px auto 0; }

.ex-item { width: min(960px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0; border: 0; border-radius: 14px; background: #fff8e6; color: var(--text);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .6); overflow: auto; }
.ex-item::backdrop { background: rgba(26, 18, 10, .72); backdrop-filter: blur(3px); }
.ex-close { position: absolute; right: 10px; top: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(26, 18, 10, .7); color: #fff; font-size: 1rem; }
.ex-media { display: grid; place-items: center; gap: 10px; padding: 18px; min-height: 200px;
  background: repeating-conic-gradient(#e9dcb9 0 25%, #f4ead0 0 50%) 0 0 / 20px 20px; }
.ex-media img { max-width: 100%; max-height: 60vh; width: auto; height: auto; }
.ex-media img.pixel { image-rendering: pixelated; }
.ex-media video { width: 100%; max-height: 60vh; background: #000; border-radius: 8px; }
.ex-media model-viewer { border-radius: 8px; }
.ex-info { padding: 20px clamp(18px, 3vw, 28px) 26px; }
.ex-title { font: 700 1.5rem/1.2 var(--font-display); margin: 0 0 12px; }
.ex-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0 0 18px; }
.ex-meta dt { font: 500 .7rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 4px; }
.ex-meta dd { margin: 0; font-size: .95rem; }
.ex-downloads { display: flex; flex-wrap: wrap; gap: 10px; }
.ex-downloads small { font: 500 .75rem/1 var(--font-mono); opacity: .8; margin-left: 4px; }

@media (max-width: 760px) {
  .ex-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pack--all { padding-left: 74px; }
  .victory { grid-template-columns: repeat(4, 1fr); }
  .bgs .marquee img { height: 150px; }
  .compass { top: auto; bottom: 8%; opacity: .4; }
}

.ex-3d-error { color: #ffb4a0 !important; }

/* the type lab's battle looks: a battle window with the menu's gold lettering, and the small 8 px font */
.dialogue-box.battle-box { background: linear-gradient(180deg, #1d2f7a, #0c1748); border-color: #c9d6ff; }
.dialogue-box.battle-box p { color: #ffe27a; text-shadow: 2px 2px 0 #2a1d00; }
.dialogue-box.battle-box--small p { color: #fff; text-shadow: 2px 2px 0 #00104a; }
