@font-face {
  font-family: "Solo Level Demo";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/SoloLevelDemo.otf") format("opentype");
}

@font-face {
  font-family: "Rajdhani";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/rajdhani-400.woff2") format("woff2");
}

@font-face {
  font-family: "Rajdhani";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/rajdhani-500.woff2") format("woff2");
}

@font-face {
  font-family: "Rajdhani";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/rajdhani-700.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #08070b;
  --panel: #100d13;
  --panel-2: #17121a;
  --panel-3: #21151e;
  --line: rgba(235, 190, 207, .12);
  --line-bright: rgba(255, 49, 88, .48);
  --text: #f7f2f5;
  --muted: #b8aeb7;
  --dim: #81717c;
  --cyan: #ff3158;
  --cyan-deep: #c90038;
  --mint: #78f0c2;
  --amber: #ffce73;
  --red: #ff5970;
  --radius: 22px;
  --shadow: 0 22px 60px rgba(0, 0, 0, .34);
  font-family: "Rajdhani", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-size: 18px;
  letter-spacing: normal;
  background:
    radial-gradient(ellipse at 78% -18%, rgba(201, 0, 56, .2), transparent 42%),
    radial-gradient(ellipse at 7% 76%, rgba(111, 32, 75, .12), transparent 38%),
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    var(--bg);
  background-attachment: fixed, fixed, fixed, fixed;
  background-size: auto, auto, 58px 58px, 58px 58px;
  color: var(--text);
}

button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: auto 0 0;
  z-index: 10;
  width: 100%;
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 49, 88, .24);
  background: rgba(10, 8, 13, .94);
  box-shadow: 0 -12px 36px rgba(0, 0, 0, .38);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 8px 48px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 111, 137, .78);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 49, 88, .3), rgba(255, 49, 88, .035));
  box-shadow: 0 0 28px rgba(255, 49, 88, .24), inset 0 0 16px rgba(255, 49, 88, .12);
  color: var(--cyan);
  font-size: 24px;
  font-weight: 800;
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 18px; letter-spacing: .16em; }
.brand small { margin-top: 3px; color: var(--muted); font: 16px "Rajdhani", sans-serif; letter-spacing: .11em; }

.main-nav { display: grid; width: min(760px, 100%); grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin: 0 auto; }
.nav-link {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 56px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 2px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  text-align: center;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.nav-icon { display: block; width: 27px; height: 27px; object-fit: contain; filter: drop-shadow(0 0 2px rgba(255,255,255,.82)) drop-shadow(0 0 7px rgba(255,49,88,.38)); transition: filter .18s ease, transform .18s ease; }
.nav-icon-health, .ui-icon-water { filter: drop-shadow(0 0 2px rgba(255,255,255,.86)) drop-shadow(0 0 8px rgba(80,197,255,.48)); }
.nav-icon-quests { filter: drop-shadow(0 0 2px rgba(255,255,255,.86)) drop-shadow(0 0 8px rgba(255,49,88,.5)); }
.nav-icon-progress, .ui-icon-progress { filter: drop-shadow(0 0 2px rgba(255,255,255,.86)) drop-shadow(0 0 8px rgba(255,190,103,.48)); }
.nav-link.active .nav-icon { transform: translateY(-1px) scale(1.05); }
.nav-link::before { position: absolute; right: 25%; bottom: 1px; left: 25%; height: 2px; transform: scaleX(.35); border-radius: 99px; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); content: ""; opacity: 0; transition: transform .18s ease, opacity .18s ease; }
.nav-link:hover { transform: translateY(-1px); background: rgba(255,255,255,.035); color: var(--text); }
.nav-link.active { border-color: rgba(255, 49, 88, .3); background: linear-gradient(100deg, rgba(255, 49, 88, .16), rgba(255, 49, 88, .035)); color: var(--cyan); box-shadow: inset 0 0 22px rgba(255, 49, 88, .035); }
.nav-link.active::before { transform: scaleX(1); opacity: 1; }

.sidebar-bottom { display: grid; gap: 10px; margin-top: auto; padding: 15px 8px 0; }
.offline-state { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--muted); font-size: 18px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px rgba(120,240,194,.65); }
.text-button { width: fit-content; padding: 4px 0; border: 0; background: none; color: #81969e; cursor: pointer; font-size: 19px; text-align: left; }
.text-button:hover, .small-link:hover { color: var(--cyan); }
.import-label { cursor: pointer; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }

.main-column { width: 100%; min-width: 0; margin-left: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(22px, 5vw, 64px);
  border-bottom: 1px solid rgba(255, 49, 88, .16);
  background: rgba(9, 8, 12, .78);
  backdrop-filter: blur(18px);
}
.topbar-heading { display: flex; align-items: center; gap: 12px; }
.topbar-brand-name { display: none; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar h1 { margin: 4px 0 0; font-size: 30px; font-weight: 700; }
.topbar-user { display: flex; align-items: center; gap: 11px; }
.topbar-user strong, .topbar-user small { display: block; }
.topbar-user strong { max-width: 150px; overflow: hidden; font-size: 19px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-user small { margin-top: 3px; color: var(--muted); font-size: 17px; }
.avatar { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line-bright); border-radius: 50%; background: radial-gradient(circle at 35% 25%, rgba(255, 49, 88,.22), var(--panel-2) 68%); box-shadow: 0 0 20px rgba(255, 49, 88,.12), inset 0 0 12px rgba(255, 49, 88,.08); color: var(--cyan); font-weight: 800; }
.account-menu { position: relative; }
.account-menu-toggle { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); color: var(--muted); cursor: pointer; font-size: 23px; line-height: 1; list-style: none; }
.account-menu-toggle::-webkit-details-marker { display: none; }
.account-menu[open] .account-menu-toggle, .account-menu-toggle:hover { border-color: var(--line-bright); color: var(--cyan); }
.account-menu-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 30; display: grid; min-width: 190px; gap: 10px; padding: 14px; border: 1px solid var(--line-bright); border-radius: 14px; background: linear-gradient(145deg, #1a1018, #0d0a10); box-shadow: var(--shadow); }
.account-menu-panel .offline-state { margin: 0 0 2px; white-space: nowrap; }
.account-menu-panel .text-button { width: 100%; }

main { width: min(1320px, 100%); margin: 0 auto; padding: 38px clamp(22px, 5vw, 68px) 120px; }
.view { display: none; animation: appear .24s ease; }
.view.active { display: block; }
.view[hidden] { display: none !important; }
#view-overview { width: min(820px, 100%); margin: 0 auto; }
@keyframes appear { from { opacity: .3; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.eyebrow { margin: 0; color: var(--cyan); font: 17px "Rajdhani", sans-serif; letter-spacing: .15em; }
.system-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.system-heading .button { min-height: 36px; border-radius: 9px; font-size: 16px; letter-spacing: .08em; }
.welcome-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 0 25px; }
h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3, h4, h5, h6 { font-family: "Solo Level Demo", sans-serif; letter-spacing: calc(.08em + 1px); }
.welcome-row h2 { margin: 7px 0 5px; font-size: clamp(29px, calc(3vw + 5px), 39px); letter-spacing: calc(.08em + 1px); }
.welcome-row .muted { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 18px; }

.card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(25, 18, 27, .94), rgba(13, 10, 15, .96));
  box-shadow: var(--shadow), inset 0 1px rgba(255,255,255,.035);
  backdrop-filter: blur(12px);
}
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 16px; }
.level-card { position: relative; isolation: isolate; overflow: hidden; min-height: 0; border-color: rgba(255, 49, 88,.42); background: radial-gradient(ellipse at 50% 43%, rgba(255, 49, 88,.12), transparent 48%), linear-gradient(135deg, rgba(34, 15, 25, .98), rgba(13, 10, 15, .99) 66%); }
.level-card::before { position: absolute; inset: 0 12% auto; z-index: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 105, 132,.8), transparent); content: ""; }
.level-card::after { position: absolute; right: -95px; bottom: -180px; z-index: 0; width: 360px; height: 360px; border: 1px solid rgba(255, 49, 88, .14); border-radius: 50%; box-shadow: 0 0 0 20px rgba(255, 49, 88, .035), 0 0 0 45px rgba(255, 49, 88, .02), 0 0 80px rgba(255, 49, 88,.07); content: ""; pointer-events: none; }
.level-card > * { position: relative; z-index: 1; }
.card-heading, .between, .level-line, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.status-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.player-status { display: grid; grid-template-columns: 128px minmax(0,1fr); align-items: stretch; gap: 18px; margin: 14px 0 0; }
.identity-label { display: block; color: var(--dim); font: 16px "Rajdhani", sans-serif; letter-spacing: .16em; }
.player-identity { min-width: 0; text-align: left; }
.player-identity > strong { display: block; overflow: hidden; margin-top: 4px; color: var(--text); font-size: 19px; text-overflow: ellipsis; white-space: nowrap; }
.rank-details { display: grid; min-width: 0; align-content: center; justify-items: center; }
.rank-crest { --rank-glow: rgba(195,155,123,.42); display: block; width: 116px; height: 124px; object-fit: contain; filter: drop-shadow(0 0 2px rgba(255,255,255,.72)) drop-shadow(0 0 9px var(--rank-glow)); }
.rank-crest[data-rank="D"] { --rank-glow: rgba(61,205,163,.46); }
.rank-crest[data-rank="C"] { --rank-glow: rgba(89,139,255,.46); }
.rank-crest[data-rank="B"] { --rank-glow: rgba(167,93,240,.48); }
.rank-crest[data-rank="A"] { --rank-glow: rgba(250,50,78,.48); }
.rank-crest[data-rank="S"] { --rank-glow: rgba(255,194,61,.5); }
.rank-pill, .mini-tag { padding: 7px 11px; border: 1px solid rgba(255, 49, 88, .34); border-radius: 999px; background: linear-gradient(135deg, rgba(255, 49, 88, .14), rgba(255, 49, 88, .045)); box-shadow: inset 0 0 12px rgba(255, 49, 88,.05); color: var(--cyan); font: 16px "Rajdhani", sans-serif; letter-spacing: .08em; white-space: nowrap; }
.status-details { display: grid; min-width: 0; align-content: center; gap: 8px; }
.status-identity-row { display: flex; align-items: end; justify-content: space-between; gap: 14px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.07); }
.streak-chip { display: flex; align-items: baseline; gap: 7px; color: var(--muted); }
.streak-chip strong { color: var(--amber); font: 700 19px "Rajdhani", sans-serif; }
.streak-chip span { font: 16px "Rajdhani", sans-serif; letter-spacing: .08em; }
.status-details .level-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0; padding-top: 2px; color: var(--muted); }
.status-details .level-line > span { font: 16px "Rajdhani", sans-serif; letter-spacing: .12em; }
.status-details .level-line strong { color: var(--text); font: 700 20px "Rajdhani", sans-serif; }
.status-details .level-line b { color: #ff8296; font: inherit; }
.xp-section { margin-top: 0; }
.xp-caption { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 8px; color: var(--muted); font: 16px "Rajdhani", sans-serif; letter-spacing: .1em; }
.xp-caption > span:last-child { display: flex; align-items: center; gap: 10px; color: #f0d7df; letter-spacing: .02em; }
.xp-caption strong { font: inherit; }
.xp-caption b { color: #ff8296; font-size: 17px; }
.progress-track { position: relative; height: 13px; overflow: hidden; padding: 2px; border: 1px solid rgba(255,255,255,.07); border-radius: 999px; background: #0a080d; box-shadow: inset 0 2px 6px rgba(0,0,0,.78), 0 0 0 1px rgba(255, 49, 88,.035); }
.progress-track > span { position: relative; display: block; width: 0; height: 100%; overflow: hidden; border-radius: inherit; background: linear-gradient(90deg, #a70d35, #ff3158 68%, #ff8497); box-shadow: 0 0 14px rgba(255, 49, 88,.52); transition: width .45s cubic-bezier(.2,.8,.2,1); }
.progress-track > span::after { position: absolute; inset: 0; border-radius: inherit; background: repeating-linear-gradient(135deg, transparent 0 8px, rgba(255,255,255,.18) 8px 11px); content: ""; }
.level-card .progress-track { height: 17px; }
.between { margin-top: 8px; color: var(--muted); font: 16px "Rajdhani", sans-serif; letter-spacing: .04em; }
.challenge-banner { position: relative; display: grid; grid-template-columns: 58px minmax(0,1fr) auto; align-items: center; gap: 12px; overflow: hidden; padding: 12px 18px; border-color: rgba(255,49,88,.3); background: radial-gradient(ellipse at 0 50%, rgba(255,49,88,.1), transparent 55%), linear-gradient(145deg, rgba(24,16,26,.98), rgba(13,10,15,.99)); }
.challenge-banner::before { position: absolute; top: 0; left: 18px; width: 54px; height: 2px; background: var(--cyan); box-shadow: 0 0 16px var(--cyan); content: ""; }
.challenge-emblem { display: grid; width: 54px; height: 60px; place-items: center; filter: drop-shadow(0 0 2px rgba(255,255,255,.72)) drop-shadow(0 0 12px rgba(255,49,88,.38)); }
.challenge-emblem img { display: block; width: 100%; height: 100%; object-fit: contain; }
.challenge-copy { display: grid; min-width: 0; gap: 3px; }
.challenge-copy > strong { color: var(--text); font-size: 18px; }
.challenge-copy > small { overflow: hidden; color: var(--muted); font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.challenge-copy .progress-track { height: 6px; margin-top: 2px; }
.challenge-metric { display: grid; justify-items: end; gap: 2px; }
.challenge-metric > strong { color: var(--text); font: 700 27px "Rajdhani", sans-serif; text-shadow: 0 0 18px rgba(255,49,88,.25); }
.challenge-metric > span { color: var(--muted); font: 16px "Rajdhani", sans-serif; letter-spacing: .05em; }
.challenge-metric .button { min-height: 27px; padding: 0 9px; font-size: 16px; }

.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 7px; padding: 0 16px; border: 1px solid transparent; border-radius: 14px; cursor: pointer; font-size: 19px; font-weight: 700; letter-spacing: .01em; transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.button-primary { border-color: rgba(255, 157, 175,.42); background: linear-gradient(135deg, #ff476a, #e31748 75%); box-shadow: 0 8px 22px rgba(227, 23, 72,.19), inset 0 1px rgba(255,255,255,.22); color: #21070d; }
.button-primary:hover { background: linear-gradient(135deg, #ff6a84, #f22655 75%); box-shadow: 0 10px 26px rgba(227, 23, 72,.28), inset 0 1px rgba(255,255,255,.28); }
.button-secondary { border-color: var(--line-bright); background: linear-gradient(135deg, rgba(255, 49, 88, .12), rgba(255, 49, 88, .045)); box-shadow: inset 0 1px rgba(255,255,255,.035); color: var(--cyan); }
.button-secondary:hover { border-color: var(--cyan); background: rgba(255, 49, 88, .16); box-shadow: 0 0 18px rgba(255, 49, 88,.12); }
.button-wide { width: 100%; }
.align-end { align-self: end; }

.section-heading { margin: 29px 0 14px; }
.section-heading h2, .section-heading h3 { margin: 5px 0 0; font-size: 30px; letter-spacing: calc(.08em + 1px); }
.section-heading.compact { margin: 0 0 17px; }
.section-heading.compact h2, .section-heading.compact h3 { font-size: 28px; }
.topbar h1, .welcome-row h2, .section-heading h2, .section-heading h3, .modal h2 { font-family: "Solo Level Demo", sans-serif; letter-spacing: calc(.08em + 1px); }
.small-link { padding: 4px 0; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 18px; }

.overview-dashboard { display: grid; gap: 14px; }
.rank-path-card { position: relative; overflow: hidden; padding: 18px 22px 15px; border-color: rgba(255, 49, 88,.3); background: radial-gradient(ellipse at 50% 50%, rgba(255, 49, 88,.07), transparent 65%), linear-gradient(145deg, rgba(25,16,26,.98), rgba(13,10,15,.99)); }
.rank-path-card::before, .rank-path-card::after { position: absolute; width: 36px; height: 36px; border-color: rgba(255, 49, 88,.55); border-style: solid; content: ""; pointer-events: none; }
.rank-path-card::before { top: 7px; left: 7px; border-width: 1px 0 0 1px; }
.rank-path-card::after { right: 7px; bottom: 7px; border-width: 0 1px 1px 0; }
.map-heading { margin: 0 0 13px; }
.map-heading h2 { margin: 5px 0 0; font-size: 30px; letter-spacing: calc(.08em + 1px); }
.rank-path-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font: 16px "Rajdhani", sans-serif; letter-spacing: .08em; }
.rank-path-caption strong { color: var(--text); font: 16px "Rajdhani", sans-serif; letter-spacing: 0; }
.rank-map-stage { position: relative; height: 340px; margin-top: 4px; }
.rank-route-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rank-route-lines path { fill: none; stroke: rgba(255,91,120,.5); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 5px rgba(255,49,88,.48)); }
.rank-map-milestone { position: absolute; top: 50%; left: 50%; z-index: 2; display: grid; width: 220px; height: 250px; place-items: center; transform: translate(-50%,-50%); }
.rank-map-medallion { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 3px rgba(255,255,255,.62)) drop-shadow(0 0 19px rgba(255,49,88,.42)); }
.rank-map-milestone-copy { position: relative; z-index: 1; display: grid; width: 48%; justify-items: center; gap: 3px; padding: 7px 4px; border: 1px solid rgba(226,205,190,.22); border-radius: 12px; background: rgba(17,10,13,.97); box-shadow: inset 0 0 9px rgba(255,255,255,.055), 0 0 12px rgba(0,0,0,.72); text-align: center; }
.rank-map-milestone span { color: #d7c6ba; font: 16px "Rajdhani", sans-serif; letter-spacing: .08em; }
.rank-map-milestone strong { color: #fff4e8; font: 700 18px "Rajdhani", sans-serif; text-shadow: 0 0 8px rgba(255,255,255,.48), 0 0 13px rgba(255,49,88,.38); }
.rank-map-milestone small { color: #efb9a2; font: 16px "Rajdhani", sans-serif; }
.attribute-path { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.attribute-map-node { position: absolute; z-index: 1; display: grid; width: 88px; justify-items: center; gap: 2px; transform: translate(-50%,-50%); text-align: center; }
.attribute-map-glyph { --attribute-accent: #ff7189; --attribute-glow: rgba(255,91,120,.5); display: grid; width: 78px; height: 82px; place-items: center; background: radial-gradient(ellipse, var(--attribute-glow), transparent 70%); color: #fff; filter: drop-shadow(0 0 3px rgba(255,255,255,.76)) drop-shadow(0 0 10px var(--attribute-glow)); transition: background .2s ease, filter .2s ease, transform .2s ease; }
.attribute-map-glyph[data-attribute="strength"], .attribute-icon[data-attribute="strength"] { --attribute-accent: #ff7189; --attribute-glow: rgba(255,91,120,.55); }
.attribute-map-glyph[data-attribute="endurance"], .attribute-icon[data-attribute="endurance"] { --attribute-accent: #77dcff; --attribute-glow: rgba(85,201,255,.55); }
.attribute-map-glyph[data-attribute="agility"], .attribute-icon[data-attribute="agility"] { --attribute-accent: #9af4c5; --attribute-glow: rgba(100,255,184,.5); }
.attribute-map-glyph[data-attribute="vitality"], .attribute-icon[data-attribute="vitality"] { --attribute-accent: #ff83b0; --attribute-glow: rgba(255,88,157,.55); }
.attribute-map-glyph[data-attribute="magic"], .attribute-icon[data-attribute="magic"] { --attribute-accent: #c5a0ff; --attribute-glow: rgba(163,107,255,.58); }
.attribute-map-glyph[data-attribute="virility"], .attribute-icon[data-attribute="virility"] { --attribute-accent: #ffd17a; --attribute-glow: rgba(255,174,70,.55); }
.attribute-map-glyph .attribute-symbol { width: 72px; height: 72px; }
.attribute-map-node.trained .attribute-map-glyph { filter: drop-shadow(0 0 5px rgba(255,255,255,.9)) drop-shadow(0 0 14px var(--attribute-glow)); transform: translateY(-2px); }
.attribute-symbol { display: block; overflow: visible; object-fit: contain; color: #fff; filter: drop-shadow(0 0 2px rgba(255,255,255,.96)) drop-shadow(0 0 7px var(--attribute-glow, rgba(255,255,255,.4))); }
.attribute-map-node > strong { color: var(--text); font: 700 16px "Rajdhani", sans-serif; }
.attribute-map-node > small { max-width: 100%; overflow: hidden; color: var(--muted); font: 16px "Rajdhani", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.attribute-panel { padding: 18px; border-color: rgba(255,49,88,.28); background: linear-gradient(145deg, rgba(25,16,26,.98), rgba(13,10,15,.99)); }
#view-overview .attributes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 12px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.attribute-card { min-width: 0; padding: 9px 10px; border: 1px solid rgba(255,255,255,.075); border-radius: 11px; background: linear-gradient(135deg, rgba(255,255,255,.035), rgba(255,255,255,.01)); transition: border-color .18s ease, background .18s ease; }
.attribute-card:hover { transform: none; border-color: rgba(255,49,88,.3); background: rgba(255,49,88,.04); }
.attribute-card .attr-top { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 7px; }
.attribute-card .attr-top small { overflow: hidden; margin: 0; color: #e2d5dc; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.attribute-card .attr-top strong { margin: 0; color: #ff8296; font: 700 17px "Rajdhani", sans-serif; }
.attribute-icon { --attribute-accent: #ff7189; --attribute-glow: rgba(255,91,120,.55); display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: radial-gradient(ellipse, var(--attribute-glow), transparent 72%); color: #fff; }
.attribute-icon .attribute-symbol { width: 32px; height: 32px; }
.attribute-card .mini-track { height: 5px; margin-top: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,.06); border-radius: 999px; background: #09070b; box-shadow: inset 0 1px 3px rgba(0,0,0,.7); }
.attribute-card .mini-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #b6123d, #ff4d70); box-shadow: 0 0 10px rgba(255,49,88,.42); }
.milestone-section { display: grid; gap: 11px; }
.milestone-section .section-heading { margin: 0; }
.milestone-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; }
.milestone-item { display: flex; min-width: 0; align-items: center; gap: 12px; min-height: 92px; padding: 13px; border: 1px solid rgba(255,49,88,.22); border-radius: 14px; background: radial-gradient(ellipse at 20% 30%, rgba(255,49,88,.09), transparent 65%), linear-gradient(145deg, rgba(25,16,26,.98), rgba(13,10,15,.99)); }
.milestone-item > span:last-child { display: grid; min-width: 0; gap: 4px; }
.milestone-item small { color: var(--muted); font: 16px "Rajdhani", sans-serif; letter-spacing: .04em; }
.milestone-item strong { overflow: hidden; color: var(--text); font: 700 17px "Rajdhani", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.milestone-glyph { display: grid; width: 48px; height: 54px; flex: 0 0 48px; place-items: center; }
.milestone-glyph > img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 2px rgba(255,255,255,.72)) drop-shadow(0 0 9px rgba(255,49,88,.36)); }
.level-glyph > img { filter: drop-shadow(0 0 2px rgba(255,255,255,.78)) drop-shadow(0 0 9px rgba(255,190,103,.48)); }
.health-snapshot { padding: 16px 18px; }
.health-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.health-summary > div { display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px solid rgba(255,255,255,.045); border-radius: 15px; background: linear-gradient(135deg, rgba(255,255,255,.035), rgba(255,255,255,.012)); }
.summary-icon { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border: 1px solid rgba(255, 49, 88,.24); border-radius: 13px; background: radial-gradient(ellipse, rgba(255,49,88,.11), rgba(255,49,88,.025) 72%); box-shadow: inset 0 0 12px rgba(255, 49, 88,.06); }
.summary-icon-water { border-color: rgba(121,213,255,.28); background: radial-gradient(ellipse, rgba(57,163,224,.15), rgba(22,79,115,.025) 72%); }
.summary-icon-calories { border-color: rgba(255,166,96,.3); background: radial-gradient(ellipse, rgba(242,94,69,.15), rgba(125,29,53,.025) 72%); }
.ui-icon { display: block; width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 0 2px rgba(255,255,255,.86)) drop-shadow(0 0 8px rgba(255,49,88,.42)); }
.ui-icon-water { filter: drop-shadow(0 0 2px rgba(255,255,255,.9)) drop-shadow(0 0 8px rgba(80,197,255,.58)); }
.ui-icon-calories { filter: drop-shadow(0 0 2px rgba(255,255,255,.9)) drop-shadow(0 0 8px rgba(255,132,68,.58)); }
.health-summary small, .health-summary strong { display: block; }
.health-summary small { color: var(--muted); font-size: 16px; }
.health-summary strong { margin-top: 3px; font-size: 18px; }
.milestone-card { min-width: 0; }
.milestone-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.milestone-item { display: flex; min-width: 0; align-items: center; gap: 11px; padding: 12px; border: 1px solid rgba(255,255,255,.055); border-radius: 15px; background: linear-gradient(135deg, rgba(255, 49, 88,.075), rgba(255,255,255,.012)); }
.milestone-item > span:last-child { display: grid; min-width: 0; gap: 3px; }
.milestone-item small { color: var(--muted); font: 16px "Rajdhani", sans-serif; letter-spacing: .04em; }
.milestone-item strong { overflow: hidden; color: var(--text); font: 700 18px "Rajdhani", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.milestone-glyph { width: 42px; height: 46px; flex-basis: 42px; }
.milestone-rank-icon { --next-rank-glow: rgba(195,155,123,.4); filter: drop-shadow(0 0 2px rgba(255,255,255,.72)) drop-shadow(0 0 8px var(--next-rank-glow)); }
.milestone-rank-icon[data-rank="D"] { --next-rank-glow: rgba(61,205,163,.46); }
.milestone-rank-icon[data-rank="C"] { --next-rank-glow: rgba(89,139,255,.46); }
.milestone-rank-icon[data-rank="B"] { --next-rank-glow: rgba(167,93,240,.48); }
.milestone-rank-icon[data-rank="A"] { --next-rank-glow: rgba(250,50,78,.48); }
.milestone-rank-icon[data-rank="S"] { --next-rank-glow: rgba(255,194,61,.5); }

.notice { margin-bottom: 18px; padding: 13px 15px; border: 1px solid rgba(255,206,115,.19); border-radius: 12px; background: rgba(255,206,115,.045); color: #c8b996; font-size: 18px; line-height: 1.6; }
.notice strong { color: var(--amber); }
.quest-list { display: grid; gap: 11px; }
.quest-card { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.2fr) auto; align-items: center; gap: 18px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 19px; background: linear-gradient(125deg, rgba(22, 17, 25,.96), rgba(13, 10, 15,.96)); box-shadow: inset 0 1px rgba(255,255,255,.025); transition: border-color .18s ease, transform .18s ease; }
.quest-card:hover { transform: translateY(-1px); border-color: rgba(255, 49, 88,.26); }
.quest-card.completed { border-color: rgba(120,240,194,.32); background: linear-gradient(100deg, rgba(120,240,194,.075), rgba(14,17,17,.96)); }
.quest-name { display: flex; align-items: center; gap: 11px; min-width: 0; }
.quest-icon-wrap { position: relative; display: grid; width: 46px; height: 46px; flex: 0 0 46px; place-items: center; filter: drop-shadow(0 0 2px rgba(255,255,255,.82)) drop-shadow(0 0 8px rgba(255,49,88,.36)); }
.quest-mission-icon { display: block; width: 100%; height: 100%; object-fit: contain; }
.completed .quest-icon-wrap { filter: drop-shadow(0 0 2px rgba(255,255,255,.8)) drop-shadow(0 0 8px rgba(120,240,194,.5)); }
.quest-complete-mark { position: absolute; right: -3px; bottom: -3px; display: grid; width: 18px; height: 18px; place-items: center; border: 1px solid rgba(120,240,194,.8); border-radius: 50%; background: #12221c; box-shadow: 0 0 9px rgba(120,240,194,.45); color: var(--mint); font: 700 12px "Rajdhani", sans-serif; line-height: 1; }
.quest-name strong { display: block; overflow: hidden; font-size: 19px; text-overflow: ellipsis; }
.quest-name small { display: block; margin-top: 4px; color: var(--muted); font-size: 16px; }
.quest-progress-wrap { min-width: 0; }
.quest-progress-label { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 7px; color: var(--muted); font: 17px "Rajdhani", sans-serif; }
.quest-progress-label strong { color: var(--text); font-weight: 500; }
.quest-actions { display: flex; align-items: center; gap: 8px; }
.quest-increment { width: 92px; min-height: 40px; padding: 0 11px; border: 1px solid var(--line-bright); border-radius: 13px; background: #100a0e; box-shadow: inset 0 1px 5px rgba(0,0,0,.35); color: var(--text); font: 19px "Rajdhani", sans-serif; }
.check-action { display: flex; align-items: center; gap: 8px; color: var(--cyan); cursor: pointer; font-size: 18px; }
.check-action input { display: grid; width: 19px; height: 19px; place-content: center; appearance: none; border: 1px solid var(--line-bright); border-radius: 7px; background: rgba(255, 49, 88,.045); cursor: pointer; transition: background .16s ease, box-shadow .16s ease; }
.check-action input:checked { border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 12px rgba(255, 49, 88,.32); }
.check-action input:checked::after { width: 8px; height: 4px; transform: translateY(-1px) rotate(-45deg); border-bottom: 2px solid #21070d; border-left: 2px solid #21070d; content: ""; }
.check-action input:disabled { cursor: default; }
#quest-target-field[hidden] { display: none; }
.icon-button { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); color: var(--muted); cursor: pointer; font-size: 23px; transition: border-color .16s ease, color .16s ease, background .16s ease; }
.icon-button:hover { border-color: var(--red); color: var(--red); }
.empty-state { padding: 55px 20px; border: 1px dashed var(--line-bright); border-radius: var(--radius); text-align: center; }
.empty-symbol { color: var(--cyan); font-size: 30px; }
.empty-state h3 { margin: 13px 0 5px; font-size: 27px; }
.empty-state p { margin: 0 auto 18px; color: var(--muted); font-size: 19px; }

.health-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }
.card-heading h3 { margin: 5px 0 0; font-size: 24px; }
.water-number, .calorie-number { display: flex; align-items: baseline; gap: 8px; margin: 19px 0 12px; }
.water-number strong, .calorie-number strong { font: 700 32px "Rajdhani", sans-serif; letter-spacing: .02em; }
.water-number span, .calorie-number span { color: var(--muted); font-size: 18px; }
.inline-form, .food-search-form { display: flex; align-items: end; gap: 9px; margin-top: 14px; }
.target-form { margin-top: 9px; }
.field { display: grid; min-width: 0; gap: 6px; color: #c2aeb3; font-size: 17px; }
.field > span { line-height: 1.3; }
.field input, .field select {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(145deg, #130e14, #0d0a10);
  box-shadow: inset 0 1px 5px rgba(0,0,0,.3);
  color: var(--text);
  font-size: 19px;
}
.field input:hover, .field select:hover { border-color: rgba(255, 49, 88,.3); }
.field input:focus, .field select:focus { border-color: rgba(255, 49, 88,.68); box-shadow: 0 0 0 3px rgba(255, 49, 88,.09), inset 0 1px 5px rgba(0,0,0,.3); }
.field input::placeholder { color: #80656e; }
.grow { flex: 1; }
.macro-list { display: grid; gap: 11px; margin-top: 19px; }
.macro-list > div { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; color: var(--muted); font-size: 17px; }
.macro-list strong { color: var(--text); font: 18px "Rajdhani", sans-serif; }
.macro-track { grid-column: 1 / -1; height: 6px; overflow: hidden; border: 1px solid rgba(255,255,255,.055); border-radius: 999px; background: #09070b; }
.macro-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--mint); }
.food-card { margin-top: 15px; }
.food-search-form { margin-top: 0; }
.amount-field { width: 115px; flex: 0 0 115px; }
.meal-field { width: 150px; flex: 0 0 150px; }
.food-results { display: grid; max-height: 230px; gap: 5px; overflow-y: auto; margin: 10px 0 0; }
.food-result { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; border: 1px solid rgba(255,255,255,.045); border-radius: 13px; background: linear-gradient(135deg, rgba(255,255,255,.035), rgba(255,255,255,.012)); color: var(--text); cursor: pointer; text-align: left; transition: border-color .16s ease, background .16s ease; }
.food-result:hover, .food-result.selected { border-color: var(--line-bright); background: rgba(255, 49, 88,.08); }
.food-result span:first-child { overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.food-result small { flex: 0 0 auto; color: var(--muted); font: 16px "Rajdhani", sans-serif; }
.food-selected { margin: 10px 0; }
.meal-log { display: grid; gap: 7px; margin-top: 14px; }
.meal-entry { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid rgba(255,255,255,.045); border-radius: 14px; background: rgba(255,255,255,.025); }
.meal-entry strong { display: block; overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.meal-entry small { display: block; margin-top: 3px; color: var(--muted); font-size: 16px; }
.meal-entry .meal-kcal { color: var(--cyan); font: 17px "Rajdhani", sans-serif; white-space: nowrap; }
.meal-entry button { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.meal-entry button:hover { color: var(--red); }
.source-note { margin: 15px 0 0; color: var(--dim); font-size: 16px; line-height: 1.55; }

.progress-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 15px; }
.rank-badge-gallery-card { max-width: 860px; margin-bottom: 15px; }
.rank-badge-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.rank-badge-option { --badge-glow: rgba(195,155,123,.3); --badge-halo: rgba(195,155,123,.12); display: grid; min-width: 0; justify-items: center; gap: 5px; padding: 11px 8px 12px; border: 1px solid rgba(255,255,255,.06); border-radius: 16px; background: linear-gradient(160deg, rgba(255,255,255,.025), rgba(255,255,255,.008)); text-align: center; transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease; }
.rank-badge-option[data-rank="D"] { --badge-glow: rgba(61,205,163,.32); --badge-halo: rgba(61,205,163,.13); }
.rank-badge-option[data-rank="C"] { --badge-glow: rgba(89,139,255,.34); --badge-halo: rgba(89,139,255,.14); }
.rank-badge-option[data-rank="B"] { --badge-glow: rgba(167,93,240,.36); --badge-halo: rgba(167,93,240,.14); }
.rank-badge-option[data-rank="A"] { --badge-glow: rgba(250,50,78,.36); --badge-halo: rgba(250,50,78,.14); }
.rank-badge-option[data-rank="S"] { --badge-glow: rgba(255,194,61,.38); --badge-halo: rgba(255,194,61,.15); }
.rank-badge-option.current { border-color: rgba(255,49,88,.42); background: linear-gradient(160deg, rgba(255,49,88,.07), rgba(255,255,255,.012)); box-shadow: inset 0 0 18px rgba(255,49,88,.05), 0 5px 20px rgba(0,0,0,.14); }
.rank-badge-icon-frame { display: grid; width: 100%; height: 138px; place-items: center; border-radius: 12px; background: radial-gradient(ellipse at 50% 62%, var(--badge-halo), transparent 70%); }
.rank-badge-art { display: block; width: 124px; height: 132px; object-fit: contain; filter: drop-shadow(0 8px 12px var(--badge-glow)); transition: transform .2s ease; }
.rank-badge-option:hover .rank-badge-art { transform: translateY(-2px) scale(1.025); }
.rank-badge-option > strong { color: var(--text); font: 700 16px "Rajdhani", sans-serif; letter-spacing: .08em; }
.rank-badge-option > small { color: var(--muted); font: 16px "Rajdhani", sans-serif; letter-spacing: .08em; }
.stack-form { display: grid; gap: 12px; }
.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.measurement-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-hint { margin: 0; color: var(--dim); font-size: 16px; line-height: 1.55; }
.divider { height: 1px; margin: 17px 0; background: var(--line); }
.timeline { display: grid; max-height: 470px; gap: 9px; overflow: auto; }
.timeline-item { position: relative; padding: 13px 13px 13px 18px; border: 1px solid rgba(255,255,255,.045); border-left: 2px solid var(--line-bright); border-radius: 0 14px 14px 0; background: linear-gradient(100deg, rgba(255, 49, 88,.045), rgba(255,255,255,.012)); }
.timeline-item::before { position: absolute; top: 16px; left: -4px; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); content: ""; }
.timeline-item .timeline-date { color: var(--cyan); font: 16px "Rajdhani", sans-serif; }
.timeline-item p { margin: 6px 0 0; color: var(--muted); font-size: 17px; line-height: 1.5; }
.timeline-item strong { color: var(--text); }
.empty-inline { padding: 20px 0; color: var(--muted); font-size: 18px; text-align: center; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 15px; }
.photo-card { position: relative; overflow: hidden; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow); }
.photo-card img { width: 100%; height: 100%; object-fit: cover; }
.photo-card span { position: absolute; inset: auto 0 0; padding: 20px 8px 8px; background: linear-gradient(transparent, rgba(0,0,0,.8)); color: white; font: 16px "Rajdhani", sans-serif; }
.photo-card button { position: absolute; top: 6px; right: 6px; width: 27px; height: 27px; border: 0; border-radius: 50%; background: rgba(0,0,0,.65); color: white; cursor: pointer; }
.photo-card button:hover { color: var(--red); }

.app-footer { display: flex; justify-content: space-between; gap: 12px; padding: 16px clamp(22px, 5vw, 64px) 90px; border-top: 1px solid rgba(255, 49, 88,.12); color: #80646c; font: 16px "Rajdhani", sans-serif; letter-spacing: .06em; }

.modal { width: min(570px, calc(100% - 28px)); max-height: min(90vh, 850px); overflow: auto; padding: 28px; border: 1px solid var(--line-bright); border-radius: 24px; background: linear-gradient(145deg, #1a1018, #0d0a10); color: var(--text); box-shadow: 0 24px 80px rgba(0,0,0,.65), 0 0 50px rgba(255, 49, 88,.1); }
.modal::backdrop { background: rgba(5, 3, 7, .82); backdrop-filter: blur(7px); }
.modal h2 { margin: 7px 0; font-size: 30px; letter-spacing: calc(.08em + 1px); }
.modal > .muted { margin: 0 0 18px; font-size: 18px; line-height: 1.55; }
.modal-close-form { position: sticky; top: 0; z-index: 1; display: flex; justify-content: end; height: 0; margin: -13px -13px 13px 0; }
.modal-close-form .icon-button { width: 30px; height: 30px; border: 0; font-size: 22px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 20; max-width: min(360px, calc(100% - 44px)); padding: 13px 17px; transform: translateY(18px); border: 1px solid var(--line-bright); border-radius: 15px; background: linear-gradient(135deg, #20131e, #110d14); box-shadow: var(--shadow), 0 0 24px rgba(255, 49, 88,.08); color: var(--text); font-size: 18px; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.visible { transform: translateY(0); opacity: 1; }

@media (max-width: 1050px) {
  .attributes-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quest-card { grid-template-columns: 1fr 1fr; }
  .quest-actions { grid-column: 1 / -1; justify-content: end; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }

  .sidebar { position: fixed; inset: auto 0 0; z-index: 10; width: 100%; height: auto; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid rgba(255, 49, 88,.24); background: rgba(10, 8, 13,.94); box-shadow: 0 -12px 36px rgba(0,0,0,.38); backdrop-filter: blur(18px); }
  .brand { display: none; }
  .main-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; overflow: visible; }
  .nav-link { min-width: 0; min-height: 56px; flex-direction: column; justify-content: center; gap: 3px; padding: 5px 2px; border-radius: 12px; font-size: 16px; text-align: center; white-space: nowrap; }
  .nav-icon { width: 26px; height: 26px; }
  .nav-link::before { top: auto; right: 25%; bottom: 1px; left: 25%; width: auto; height: 2px; transform: scaleX(.35); }
  .nav-link.active::before { transform: scaleX(1); }
  .sidebar-bottom { display: none; }
  .main-column { width: 100%; margin-left: 0; }
  .topbar { display: flex; min-height: 56px; gap: 8px; padding: 8px 14px; }
  .topbar-heading { gap: 8px; }
  .topbar-brand-name { display: block; color: var(--text); font-size: 16px; font-weight: 800; letter-spacing: .1em; }
  .topbar-page, .topbar-user { display: none; }
  .topbar .brand-mark { width: 34px; height: 34px; border-radius: 11px; font-size: 19px; }
  .topbar-actions { margin-left: auto; }
  .account-menu-toggle { width: 34px; height: 34px; }
  main { padding: 22px 17px 122px; }
  .hero-grid, .health-grid, .progress-grid, .dashboard-bottom { grid-template-columns: 1fr; }
  .rank-badge-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #view-overview { width: 100%; }
  .welcome-row { align-items: start; }
  .welcome-row > .button { flex: 0 0 auto; padding: 0 11px; font-size: 17px; }
  .welcome-row h2 { font-size: 29px; }
  .overview-dashboard { gap: 5px; }
  .level-card { padding: 14px; }
  .player-status { grid-template-columns: 72px minmax(0,1fr); gap: 10px; margin-top: 10px; }
  .rank-details { justify-items: center; }
  .rank-crest { width: 70px; height: 76px; }
  .status-details { gap: 5px; }
  .status-identity-row { padding-bottom: 5px; }
  .identity-label { font-size: 16px; }
  .player-identity > strong { margin-top: 2px; font-size: 17px; }
  .streak-chip strong { font-size: 17px; }
  .streak-chip { gap: 5px; }
  .streak-chip span { font-size: 16px; }
  .xp-section { margin-top: 2px; }
  .status-card .xp-caption { margin-bottom: 3px; font-size: 16px; }
  .status-card .xp-caption b { font-size: 16px; }
  .status-card .progress-track { height: 7px; }
  .status-card .between { margin-top: 3px; font-size: 16px; }
  .challenge-banner { grid-template-columns: 36px minmax(0,1fr) auto; gap: 6px; padding: 7px 10px; }
  .challenge-emblem { width: 34px; height: 39px; font-size: 18px; }
  .challenge-copy { gap: 2px; }
  .challenge-copy .eyebrow { font-size: 16px; }
  .challenge-copy > strong { font-size: 17px; }
  .challenge-copy > small { font-size: 16px; }
  .challenge-copy .progress-track { height: 4px; }
  .challenge-metric { gap: 1px; }
  .challenge-metric > strong { font-size: 22px; }
  .challenge-metric > span { font-size: 16px; }
  .challenge-metric .button { min-height: 22px; padding: 0 6px; font-size: 16px; }
  .rank-path-card { padding: 14px 12px 11px; }
  .map-heading { margin-bottom: 4px; }
  .map-heading h2 { font-size: 28px; }
  .map-heading .mini-tag { padding: 5px 7px; font-size: 16px; }
  .rank-path-caption { display: none; }
  .rank-map-stage { height: 165px; margin-top: 0; }
  .rank-map-milestone { width: 106px; height: 120px; }
  .rank-map-milestone-copy { width: 52%; gap: 2px; padding: 5px 2px; border-radius: 8px; }
  .rank-map-milestone span { font-size: 16px; }
  .rank-map-milestone strong { font-size: 16px; }
  .rank-map-milestone small { font-size: 16px; }
  .attribute-map-node { width: 50px; }
  .attribute-map-glyph { width: 46px; height: 48px; }
  .attribute-map-glyph .attribute-symbol { width: 46px; height: 46px; }
  .attribute-map-node > strong { position: absolute; top: calc(100% - 1px); font-size: 16px; }
  .attribute-map-node > small { display: none; }
  .attribute-panel { padding: 9px; }
  .attribute-panel .section-heading.compact { margin-bottom: 7px; }
  .attribute-panel .section-heading h2 { font-size: 28px; }
  .attribute-panel .mini-tag { padding: 5px 7px; font-size: 16px; }
  .attribute-card:last-child:nth-child(odd) { grid-column: auto; }
  .milestone-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .milestone-item { min-height: 60px; gap: 6px; padding: 7px; }
  .milestone-glyph { width: 30px; height: 35px; flex-basis: 30px; font-size: 19px; }
  .health-snapshot { padding: 14px; }
  .quest-card { grid-template-columns: 1fr; gap: 13px; }
  .quest-actions { grid-column: auto; justify-content: start; }
  .food-search-form { flex-wrap: wrap; }
  .food-search-form .grow { flex: 1 1 100%; }
  .amount-field, .meal-field { flex: 1 1 120px; }
  .food-search-form > .button { flex: 1 1 100%; }
  .app-footer { flex-direction: column; padding: 14px 18px 100px; }
  .toast { right: 12px; bottom: 82px; }
}

@media (max-width: 440px) {
  .welcome-row { flex-direction: column; }
  .welcome-row > .button { width: 100%; }
  .form-two { grid-template-columns: 1fr; }
  .health-summary { grid-template-columns: 1fr; }
  .card { padding: 17px; }
  .level-card { padding: 9px; }
  #view-overview .challenge-banner { padding: 7px 10px; }
  #view-overview .attribute-panel { padding: 9px; }
  .status-card-heading .eyebrow { font-size: 16px; }
  .status-card-heading .rank-pill { padding: 6px 8px; font-size: 16px; }
  .status-identity-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
  .streak-chip { min-width: 0; gap: 4px; }
  .streak-chip span { letter-spacing: .04em; }
  .rank-crest { width: 70px; height: 76px; }
  .status-card .xp-caption { display: grid; gap: 2px; }
  .status-card .xp-caption > span:last-child { justify-content: space-between; }
  .status-card .between { display: grid; gap: 3px; }
  .rank-map-stage { height: 145px; }
  .rank-map-milestone { width: 96px; height: 108px; }
  .attribute-panel .section-heading.compact { margin-bottom: 5px; }
  #view-overview .attributes-grid { gap: 4px 6px; }
  #view-overview .attribute-card { padding: 5px 6px; }
  #view-overview .attribute-card .attr-top { grid-template-columns: 27px minmax(0,1fr) auto; gap: 4px; }
  #view-overview .attribute-icon { width: 25px; height: 25px; }
  #view-overview .attribute-icon .attribute-symbol { width: 24px; height: 24px; }
  #view-overview .attribute-card .attr-top small { font-size: 16px; }
  #view-overview .attribute-card .mini-track { height: 3px; margin-top: 4px; }
  .milestone-item { min-height: 56px; padding: 6px; }
  .milestone-glyph { width: 26px; height: 30px; flex-basis: 26px; }
  .milestone-item small { font-size: 16px; }
  .milestone-item strong { font-size: 17px; }
  .rank-path-caption { gap: 5px; }
  .health-summary { gap: 8px; }
  .rank-path-card { padding: 14px 12px 11px; }
  .modal { padding: 22px 18px; }
  .rank-path-caption { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (max-width: 380px) {
  .player-status { grid-template-columns: 64px minmax(0,1fr); gap: 8px; }
  .status-identity-row { grid-template-columns: 1fr; gap: 5px; }
  .streak-chip { justify-content: flex-start; }
  .rank-crest { width: 64px; height: 70px; }
  .rank-map-stage { height: 140px; }
  .rank-map-milestone { width: 92px; height: 104px; }
  .attribute-map-node { width: 46px; }
  .attribute-map-glyph { width: 42px; height: 44px; }
  .attribute-map-glyph .attribute-symbol { width: 42px; height: 42px; }
  #view-overview .attributes-grid { gap: 5px; }
  .attribute-card { padding: 4px 5px; }
  .attribute-card .attr-top { grid-template-columns: 27px minmax(0,1fr) auto; gap: 4px; }
  .attribute-icon { width: 25px; height: 25px; }
  .attribute-icon .attribute-symbol { width: 24px; height: 24px; }
  .attribute-card .attr-top small { font-size: 16px; }
  .attribute-card .attr-top strong { font-size: 16px; }
  .attribute-card .mini-track { height: 3px; margin-top: 4px; }
  .milestone-grid { gap: 5px; }
  .milestone-item { gap: 5px; padding: 6px; }
  .milestone-glyph { width: 26px; height: 31px; flex-basis: 26px; }
  .milestone-item small { font-size: 16px; }
  .milestone-item strong { font-size: 17px; }
}

@media (hover: none) {
  .nav-link:hover, .attribute-card:hover, .quest-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
