/* The adventurer's hall (the account home) and the character sheet. Tokens live in site.css. */

.hall { position: relative; isolation: isolate; padding: 128px 0 clamp(80px, 10vw, 120px); min-height: 90svh; overflow: hidden; }
.hall-sky { position: absolute; inset: 0 0 auto; height: 560px; z-index: -1; }
.hall-sky img { width: 100%; height: 100%; object-fit: cover; opacity: 0.32; filter: blur(4px) saturate(1.2); mask-image: linear-gradient(#000 30%, transparent); -webkit-mask-image: linear-gradient(#000 30%, transparent); }
.hall-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; margin-bottom: 28px; }
.hall-hello { display: grid; gap: 12px; }
.hall-name { font-size: clamp(2.6rem, 7vw, 5.5rem); }
.hall-clock { padding: 16px 20px; display: grid; gap: 6px; min-width: 260px; }
.hall-clock .clock-day { margin: 0; }
.hall-clock .clock-day .mono { margin-left: auto; font-size: 1.4rem; }
.hall-blood { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; color: #ffd2c8; }
.hall-blood .eyebrow { color: #ff9b8a; }
@media (max-width: 760px) { .hall-head { grid-template-columns: 1fr; } }

.hall-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 40px; border: 1px solid var(--ash-20); border-radius: 16px; background: rgb(27 21 51 / 0.55); overflow: hidden; }
.hall-totals > div { padding: 18px 22px; display: grid; gap: 4px; }
.hall-totals > div + div { border-left: 1px solid var(--ash-15); }
.hall-totals dt { color: var(--ash); font-size: 0.8125rem; }
.hall-totals dd { margin: 0; font-size: clamp(1.4rem, 2.6vw, 2rem); color: var(--mist); }
@media (max-width: 760px) {
  .hall-totals { grid-template-columns: 1fr 1fr; }
  .hall-totals > div:nth-child(3) { border-left: 0; }
  .hall-totals > div:nth-child(n+3) { border-top: 1px solid var(--ash-15); }
}
.hall-section { margin-bottom: 18px; }
.hall-cards { margin-top: 40px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* A character as a tall portrait card, like choosing them at the title screen. */
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.hero-card {
  --tint: var(--lilac);
  position: relative; isolation: isolate; display: grid; align-items: end; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: 18px; border: 1px solid var(--ash-20); text-decoration: none; color: var(--mist); background: var(--panel-solid);
  box-shadow: 0 24px 50px -26px rgb(0 0 0 / 0.9);
  transition: translate 220ms var(--ease-out), border-color 220ms, box-shadow 220ms;
}
.hero-card[data-nation="sandoria"] { --tint: #e0566e; }
.hero-card[data-nation="bastok"] { --tint: #6f9be0; }
.hero-card[data-nation="windurst"] { --tint: #5fc48f; }
.hero-card:hover, .hero-card:focus-visible { translate: 0 -4px; border-color: color-mix(in srgb, var(--tint) 60%, transparent); box-shadow: 0 30px 60px -24px color-mix(in srgb, var(--tint) 45%, #000); color: var(--mist); }
.hero-card-portrait { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; transition: scale 900ms var(--ease-out); }
.hero-card:hover .hero-card-portrait { scale: 1.05; }
.hero-card-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(15 11 30 / 0) 35%, rgb(15 11 30 / 0.92) 82%), linear-gradient(0deg, color-mix(in srgb, var(--tint) 22%, transparent), transparent 50%); }
.hero-card-crest { position: absolute; top: 12px; right: 12px; width: 48px; height: 48px; filter: drop-shadow(0 4px 10px rgb(0 0 0 / 0.6)); }
.hero-card-online { position: absolute; top: 16px; left: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; background: rgb(15 11 30 / 0.7); font-size: 0.75rem; font-weight: 600; backdrop-filter: blur(6px); }
.hero-card-body { display: grid; gap: 3px; padding: 18px 18px 20px; }
.hero-card-name { font-size: 1.85rem; line-height: 1.05; }
.hero-card-job { color: var(--crystal); font-size: 0.9375rem; }
.hero-card-meta { color: var(--mist-80); font-size: 0.8125rem; line-height: 1.4; }

/* ---------- Character sheet ---------- */

.sheet { --tint: var(--lilac); padding-bottom: clamp(80px, 10vw, 120px); }
.sheet[data-nation="sandoria"] { --tint: #e0566e; }
.sheet[data-nation="bastok"] { --tint: #6f9be0; }
.sheet[data-nation="windurst"] { --tint: #5fc48f; }
.sheet-banner { position: relative; isolation: isolate; padding: 120px 0 48px; overflow: hidden; }
.sheet-banner-glow { position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 80% at 18% 40%, color-mix(in srgb, var(--tint) 30%, transparent), transparent 70%), radial-gradient(60% 70% at 80% 0%, rgb(183 163 240 / 0.14), transparent 70%); }
.sheet-banner-inner { display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: clamp(24px, 5vw, 56px); align-items: end; }
.sheet-portrait { position: relative; margin: 0; }
.sheet-portrait > img:first-child { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--tint) 45%, transparent); box-shadow: 0 30px 70px -30px color-mix(in srgb, var(--tint) 70%, #000), 0 0 0 6px rgb(15 11 30 / 0.6); }
.sheet-crest { position: absolute; right: -14px; bottom: -14px; width: 72px; height: 72px; filter: drop-shadow(0 6px 14px rgb(0 0 0 / 0.7)); }
.sheet-id { display: grid; gap: 10px; padding-bottom: 6px; }
.sheet-id .eyebrow a { color: inherit; text-decoration: none; }
.sheet-name { font-size: clamp(3rem, 8vw, 6.4rem); }
.sheet-title { color: var(--mist); }
.sheet-jobs { font-size: clamp(1.4rem, 2.6vw, 2rem); color: var(--crystal); }
.sheet-line { color: var(--mist-80); }
.sheet-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; color: var(--mist-80); font-size: 0.9375rem; }
.sheet-sep { color: var(--ash); }
.sheet-actions { margin-top: 8px; }
@media (max-width: 720px) {
  .sheet-banner-inner { grid-template-columns: 1fr; }
  .sheet-portrait { max-width: 260px; }
}

.sheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.sheet-wide { grid-column: 1 / -1; }
.sheet-panel { padding: 24px; display: grid; gap: 14px; }
.sheet-h { font-family: var(--font-inscription); font-size: 1.5rem; line-height: 1.2; }
.sheet-h3 { font: 600 0.75rem/1.3 var(--font-ui); letter-spacing: 0.18em; text-transform: uppercase; color: var(--petal); margin: 6px 0 4px; }
@media (max-width: 860px) { .sheet-grid { grid-template-columns: 1fr; } }

.sheet-zone { font: 600 1.125rem/1.3 var(--font-ui); }
.zone-map { position: relative; margin: 0; border-radius: 14px; overflow: hidden; background: radial-gradient(circle at 50% 50%, #12163a, #070816 75%); border: 1px solid var(--ash-20); }
.zone-map img { width: 100%; height: auto; }
.zone-map-empty { min-height: 160px; display: grid; place-items: center; }
.zone-marker { position: absolute; left: var(--x, 50%); top: var(--y, 50%); width: 16px; height: 16px; translate: -50% -50%; border-radius: 999px; background: var(--crystal); box-shadow: 0 0 0 4px rgb(243 199 106 / 0.25), 0 0 18px 4px rgb(243 199 106 / 0.8); }
.zone-marker::after { content: ""; position: absolute; inset: -14px; border-radius: 999px; border: 2px solid rgb(243 199 106 / 0.7); animation: marker-ping 2.4s ease-out infinite; }
@keyframes marker-ping { from { scale: 0.4; opacity: 1; } to { scale: 1.6; opacity: 0; } }

.sheet-gil { font-size: 1.1rem; color: var(--mist-80); }
.sheet-gil .mono { font-size: 1.8rem; color: var(--crystal); margin-right: 6px; }
.fame-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.fame { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: center; }
.fame-text { display: grid; gap: 6px; }
.fame-sandoria { --bar: #e0566e; }
.fame-bastok { --bar: #6f9be0; }
.fame-windurst { --bar: #5fc48f; }

.bar { display: block; height: 6px; border-radius: 999px; background: rgb(142 134 174 / 0.18); overflow: hidden; }
.bar > span { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--bar, var(--lilac)), color-mix(in srgb, var(--bar, var(--lilac)) 60%, #fff)); transition: width 1.1s var(--ease-out); }

.job-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.job { position: relative; display: grid; gap: 6px; padding: 12px 12px 10px; border-radius: 12px; border: 1px solid var(--ash-15); background: rgb(37 29 69 / 0.4); }
.job-code { font-size: 0.8125rem; color: var(--ash); letter-spacing: 0.06em; }
.job-level { font-size: 1.5rem; line-height: 1; color: var(--mist); }
.job-bar { display: block; height: 3px; border-radius: 999px; background: rgb(142 134 174 / 0.18); overflow: hidden; }
.job-bar > span { display: block; height: 100%; width: var(--w, 0%); background: var(--lilac); transition: width 1.1s var(--ease-out); }
.job.is-main { border-color: rgb(243 199 106 / 0.6); background: linear-gradient(160deg, rgb(243 199 106 / 0.16), rgb(37 29 69 / 0.4)); }
.job.is-main .job-code { color: var(--crystal); }
.job.is-main .job-bar > span { background: var(--crystal); }
.job.is-sub { border-color: rgb(183 163 240 / 0.55); }
.job.is-sub .job-code { color: var(--lilac); }
.job.is-locked { opacity: 0.4; }

.equip-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.equip { display: grid; gap: 4px; align-content: start; min-height: 74px; padding: 10px; border-radius: 10px; border: 1px solid var(--ash-20); background: linear-gradient(160deg, rgb(37 29 69 / 0.7), rgb(15 11 30 / 0.6)); }
.equip-slot { font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ash); }
.equip-item { font-size: 0.875rem; line-height: 1.3; color: var(--mist); overflow-wrap: break-word; hyphens: auto; }
.equip.is-empty .equip-item { color: rgb(142 134 174 / 0.6); }
/* The panel, not the window, decides: four columns only when each cell can hold a word like Haubergeon. */
.sheet-panel { container-type: inline-size; }
@container (max-width: 520px) { .equip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.skill-levels { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.skill-levels li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.pips { display: inline-flex; gap: 4px; }
.pip { width: 10px; height: 14px; clip-path: polygon(50% 0, 100% 35%, 50% 100%, 0 35%); background: rgb(142 134 174 / 0.3); }
.pip.is-on { background: var(--crystal); }
.tool-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tool-list .muted { display: inline-block; min-width: 100px; }

.skill-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.skill-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.skill-list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 0.9375rem; }
.skill-list .bar { grid-column: 1 / -1; height: 4px; }
.skill-value { color: var(--mist); }
@media (max-width: 860px) { .skill-columns { grid-template-columns: 1fr; } }

.sheet-chronicle { margin-top: 28px; display: grid; gap: 18px; }
.chronicle { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ash-20); }
.chronicle > div { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--ash-15); display: grid; gap: 4px; }
.chronicle dt { color: var(--ash); font-size: 0.8125rem; }
.chronicle dd { margin: 0; font-size: clamp(1.3rem, 2.4vw, 1.8rem); color: var(--mist); }
@media (max-width: 860px) { .chronicle { grid-template-columns: 1fr 1fr; } }

.milestones { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.milestone { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 2px; align-items: center; padding: 14px 16px; border-radius: 14px; border: 1px solid rgb(243 199 106 / 0.35); background: linear-gradient(135deg, rgb(243 199 106 / 0.1), rgb(27 21 51 / 0.6)); }
.milestone .crystal-glyph { grid-row: span 2; width: 16px; height: 24px; --element: var(--crystal); }
