/* CourtHeat: shoe locker & rotation tracker */

:root {
  --orange: #ff5b14;
  --orange-hi: #ff7a2e;
  --orange-lo: #e84d09;
  --orange-ink: #c2410c;
  --orange-tint: #fff1e8;
  --orange-tint-2: #ffe2d1;
  --ink: #0b0b0f;
  --ink-2: #3a3a44;
  --muted: #676774;
  --line: #ebebf0;
  --line-2: #e0e0e7;
  --bg: #f6f6f8;
  --card: #ffffff;
  --soft: #f3f3f6;
  --danger: #dc2626;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(16, 16, 24, 0.04), 0 8px 24px rgba(16, 16, 24, 0.06);
  --shadow-lg: 0 2px 6px rgba(16, 16, 24, 0.06), 0 18px 44px rgba(16, 16, 24, 0.12);
  --ease: cubic-bezier(0.2, 0.85, 0.25, 1);
  --tabbar-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.modal-open, html.modal-open body { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, p { margin: 0; }
img { max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
svg { display: block; }

:focus-visible { outline: 3px solid rgba(255, 91, 20, 0.55); outline-offset: 2px; border-radius: 10px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------------- Wordmark ---------------- */

.wordmark {
  position: relative;
  display: inline-flex;
  font-weight: 900;
  font-style: italic;
  font-size: 24px;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  line-height: 1;
  padding-top: 7px;
  padding-right: 2px;
}
.wordmark span:first-child { color: var(--ink); }
.wordmark span:last-child { color: var(--orange); }
.wordmark::before {
  content: "";
  position: absolute;
  top: 0;
  left: 38%;
  width: 52%;
  height: 12px;
  border-top: 3px solid var(--orange);
  border-radius: 60% 60% 0 0 / 100% 100% 0 0;
  transform: rotate(-4deg);
}
.wordmark--lg { font-size: 40px; padding-top: 11px; }
.wordmark--lg::before { height: 18px; border-top-width: 4px; }

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s var(--ease), box-shadow 0.2s, background-color 0.2s, opacity 0.2s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn [data-icon] { display: contents; }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.6; cursor: default; }

.btn--primary {
  color: #fff;
  background: linear-gradient(180deg, var(--orange-hi), var(--orange-lo));
  box-shadow: 0 8px 20px rgba(232, 77, 9, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn--primary:hover:not(:disabled) { box-shadow: 0 10px 26px rgba(232, 77, 9, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn--soft { background: var(--soft); color: var(--ink); }
.btn--soft:hover:not(:disabled) { background: #eaeaef; }
.btn--ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line-2); }
.btn--ghost:hover:not(:disabled) { background: var(--soft); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--google { background: #fff; color: var(--ink); border: 1.5px solid #dadce0; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.btn--google:hover:not(:disabled) { background: #fafafa; }
.btn--google svg { width: 22px; height: 22px; }
.btn--xl { min-height: 58px; font-size: 18px; border-radius: 18px; padding: 0 22px; }
.btn--xl svg { width: 22px; height: 22px; }
.btn--block { width: 100%; }
.btn--icon-danger { color: var(--danger); width: 58px; min-height: 58px; padding: 0; border-radius: 18px; flex: none; }

.link-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 8px 4px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--orange-ink);
}
.link-btn svg { width: 18px; height: 18px; }
.link-btn--danger { color: var(--danger); margin: 8px auto 0; }

.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 999px; border: 0;
  background: var(--soft); color: var(--ink); cursor: pointer;
  transition: background-color 0.2s, transform 0.15s;
}
.icon-btn:hover { background: #e9e9ee; }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 20px; height: 20px; }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.45); border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; font-style: normal; letter-spacing: 0; text-transform: none;
  vertical-align: middle;
}
.pill--tie { background: var(--orange-tint); color: var(--orange-ink); }
.pill--muted { background: var(--soft); color: var(--muted); }

.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; display: block; background: var(--soft); }
.avatar--ph { display: grid; place-items: center; background: var(--orange); color: #fff; font-weight: 800; font-size: 15px; }
.avatar--lg { width: 56px; height: 56px; font-size: 22px; }

/* ---------------- Boot & sign in ---------------- */

.boot { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 28px; background: #fff; z-index: 50; }
.boot__ball {
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff9a5c, var(--orange) 60%, var(--orange-lo));
  animation: bounce 0.7s cubic-bezier(0.5, 0, 0.5, 1) infinite alternate;
}
@keyframes bounce { from { transform: translateY(-18px); } to { transform: translateY(6px) scaleY(0.88); } }

.signin {
  min-height: 100dvh;
  display: grid; place-items: center;
  padding: 28px 20px calc(28px + var(--safe-b));
  background: radial-gradient(120% 60% at 85% -10%, #ffe1cc 0%, rgba(255, 225, 204, 0) 60%), #fff;
}
.signin__card { width: 100%; max-width: 420px; text-align: center; animation: rise 0.5s var(--ease) both; }
.signin__logo { width: 210px; height: auto; margin: 0 auto 8px; display: block; }
.signin__title { font-size: 36px; line-height: 1.04; font-weight: 900; letter-spacing: -0.035em; }
.signin__title em { color: var(--orange); font-style: italic; }
.signin__sub { margin: 12px auto 22px; color: var(--ink-2); font-size: 16px; max-width: 34ch; }
.signin__steps {
  display: grid; gap: 12px; text-align: left; margin-bottom: 24px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
}
.signin__steps li { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 15px; }
.signin__steps li span { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 12px; background: var(--orange-tint); color: var(--orange); }
.signin__steps li span svg { width: 20px; height: 20px; }
.signin__legal { margin-top: 14px; font-size: 13px; color: var(--muted); }
.signin__links, .account__links { display: flex; justify-content: center; gap: 18px; margin-top: 16px; font-size: 13px; }
.signin__links a, .account__links a { color: var(--muted); text-decoration: none; }
.signin__links a:hover, .account__links a:hover { color: var(--ink); text-decoration: underline; }

/* ---------------- App shell ---------------- */

.app { min-height: 100dvh; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  height: calc(58px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 16px 0;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid rgba(235, 235, 240, 0.8);
}
.topbar__brand { text-decoration: none; }
.topbar__account { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 50%; }

.banner { background: #fef2f2; color: #991b1b; padding: 10px 16px; font-size: 14px; text-align: center; }

.main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 16px calc(var(--tabbar-h) + 28px + var(--safe-b));
  outline: none;
}

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding: 0 6px var(--safe-b);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar > a, .tabbar > button:not(.tabbar__log) {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: 100%; background: none; border: 0; cursor: pointer;
  text-decoration: none; color: #8a8a96; font-size: 11px; font-weight: 700;
  transition: color 0.2s;
}
.tabbar [data-icon] svg { width: 24px; height: 24px; }
.tabbar a.is-active { color: var(--orange); }
.tabbar__avatar .avatar { width: 26px; height: 26px; font-size: 12px; }
.tabbar__log {
  justify-self: center;
  display: grid; place-items: center;
  width: 58px; height: 58px; margin-top: -26px;
  border: 4px solid #fff; border-radius: 50%;
  color: #fff; cursor: pointer;
  background: linear-gradient(180deg, var(--orange-hi), var(--orange-lo));
  box-shadow: 0 10px 24px rgba(232, 77, 9, 0.4);
  transition: transform 0.15s var(--ease);
}
.tabbar__log svg { width: 28px; height: 28px; }
.tabbar__log:active { transform: scale(0.92); }

.sidenav { display: none; }

@media (min-width: 960px) {
  .app { display: grid; grid-template-columns: 252px minmax(0, 1fr); }
  .topbar, .tabbar { display: none; }
  .banner { grid-column: 2; }
  .main { grid-column: 2; width: 100%; padding: 32px 40px 48px; }
  .sidenav {
    grid-row: 1 / span 3;
    position: sticky; top: 0; height: 100dvh;
    display: flex; flex-direction: column; gap: 22px;
    padding: 28px 18px 20px;
    background: #fff; border-right: 1px solid var(--line);
  }
  .sidenav__brand { text-decoration: none; padding: 0 10px 6px; }
  .sidenav > .btn--xl { font-size: 16px; white-space: nowrap; padding: 0 16px; }
  .sidenav__links { display: grid; gap: 4px; }
  .sidenav__links a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: 14px;
    text-decoration: none; font-weight: 700; color: var(--ink-2);
    transition: background-color 0.2s, color 0.2s;
  }
  .sidenav__links a svg { width: 22px; height: 22px; }
  .sidenav__links a:hover { background: var(--soft); }
  .sidenav__links a.is-active { background: var(--orange-tint); color: var(--orange-ink); }
  .sidenav__account {
    margin-top: auto;
    display: flex; align-items: center; gap: 10px;
    padding: 10px; border-radius: 14px; border: 1px solid var(--line);
    background: #fff; cursor: pointer; text-align: left;
  }
  .sidenav__account:hover { background: var(--soft); }
  .sidenav__name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---------------- Views ---------------- */

.view { display: grid; gap: 14px; animation: rise 0.35s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 6px 2px 4px; }
.page-title { font-size: 30px; font-weight: 900; letter-spacing: -0.035em; line-height: 1.05; }
.page-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card__title { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.card__hint { font-size: 12px; color: var(--muted); font-weight: 600; text-align: right; }
.card__empty { font-size: 14px; text-align: center; margin-top: 4px; }
.section-title { font-size: 15px; font-weight: 800; margin-bottom: 8px; }

/* ---------------- Shoe photos ---------------- */

.shoe-img { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--soft); }
.shoe-ph {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #fff6f0, var(--orange-tint-2));
  color: #ffb48c;
}
.shoe-ph svg { width: 58%; max-width: 160px; height: auto; }
.shoe-ph--sm svg { width: 70%; }

/* ---------------- Home ---------------- */

.view--home { grid-template-columns: minmax(0, 1fr); }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  width: 100%;
  min-height: 172px;
  padding: 0;
  text-align: left;
  background: linear-gradient(110deg, #fff 45%, #fff8f3);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
button.hero:hover { box-shadow: var(--shadow-lg); }
button.hero:active { transform: scale(0.99); }
.hero--empty { cursor: default; }
.hero--swap { animation: heroSwap 0.55s var(--ease) both; }
@keyframes heroSwap { 0% { opacity: 0; transform: scale(0.97); } 100% { opacity: 1; transform: none; } }

.hero__text { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; padding: 18px 4px 18px 18px; min-width: 0; }
.hero__label { font-size: 17px; font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; }
.hero__crown { display: inline-block; vertical-align: -3px; color: var(--orange); }
.hero__crown svg { width: 24px; height: 24px; }
.hero__name {
  font-size: clamp(28px, 8.4vw, 46px);
  font-weight: 900; font-style: italic;
  line-height: 0.98; letter-spacing: -0.035em;
  margin-top: 4px;
  overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero__name--sm { font-size: clamp(22px, 6.4vw, 32px); }
.hero__meta { font-size: 14px; color: var(--ink-2); font-weight: 500; }
.hero__meta i { font-style: normal; color: var(--muted); padding: 0 2px; }
.hero__actions { margin-top: 8px; }
.hero__actions .btn { min-height: 40px; font-size: 14px; padding: 0 14px; white-space: nowrap; }
.hero__actions .btn svg { width: 18px; height: 18px; }

.hero__media { position: relative; min-height: 172px; }
.hero__media::before, .hero__stripes {
  content: "";
  position: absolute; inset: 0;
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 4% 100%);
}
.hero__media::before { background: linear-gradient(140deg, #ff9a52 0%, var(--orange) 50%, var(--orange-lo) 100%); }
.hero__stripes {
  background:
    repeating-linear-gradient(-62deg, rgba(255, 255, 255, 0.2) 0 5px, transparent 5px 17px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.35), transparent 30%);
}
.hero__photo {
  position: absolute;
  top: 16px; bottom: 16px; right: 14px; left: 10%;
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 14px 32px rgba(120, 36, 0, 0.32);
  transform: rotate(-3deg);
  transition: transform 0.35s var(--ease);
}
button.hero:hover .hero__photo { transform: rotate(-1.5deg) scale(1.02); }
.hero__logo { position: absolute; inset: 10px 8px 10px 14%; width: calc(86% - 8px); height: calc(100% - 20px); object-fit: contain; filter: drop-shadow(0 6px 14px rgba(120, 36, 0, 0.25)); background: rgba(255, 255, 255, 0.92); border-radius: 16px; transform: rotate(-3deg); }

.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.qstat {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  min-width: 0;
}
.qstat__icon { color: var(--orange); flex: none; }
.qstat__icon svg { width: 26px; height: 26px; }
.qstat div { min-width: 0; display: flex; flex-direction: column; }
.qstat strong { font-size: 26px; font-weight: 900; line-height: 1; letter-spacing: -0.03em; display: inline-block; transform-origin: left center; }
.qstat span:not(.qstat__icon) { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 4px; line-height: 1.2; }
.bump { animation: bump 0.45s var(--ease); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.22); color: var(--orange); } 100% { transform: scale(1); } }

@media (max-width: 380px) {
  .qstat { flex-direction: column; align-items: flex-start; gap: 6px; }
}

.cta-slot { position: relative; }

/* Donut */
.donut { display: grid; grid-template-columns: minmax(130px, 190px) minmax(0, 1fr); align-items: center; gap: 18px; }
.donut__chart { position: relative; width: 100%; aspect-ratio: 1; }
.donut__chart svg { width: 100%; height: 100%; overflow: visible; }
.donut__track { fill: none; stroke: #f1f1f4; stroke-width: 16; }
.donut__seg {
  fill: none; stroke-width: 16; cursor: pointer;
  transition: stroke-dasharray 0.9s var(--ease), stroke-dashoffset 0.9s var(--ease), opacity 0.25s, stroke-width 0.25s;
}
.donut.has-focus .donut__seg:not(.is-focus) { opacity: 0.28; }
.donut__seg.is-focus { stroke-width: 19; }
.donut__center {
  position: absolute; inset: 24%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: transparent; cursor: pointer; padding: 0 4px;
}
.donut__value { font-size: clamp(26px, 7vw, 36px); font-weight: 900; line-height: 1; letter-spacing: -0.04em; }
.donut__label { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 3px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut__legend { display: grid; gap: 2px; min-width: 0; }
.legend-row {
  display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  width: 100%; padding: 8px 8px; border: 0; border-radius: 10px; background: none; cursor: pointer; text-align: left;
  transition: background-color 0.2s;
}
.legend-row:hover { background: var(--soft); }
.is-focus > .legend-row { background: var(--orange-tint); }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.legend-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-pct { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.donut.is-empty .donut__legend { display: none; }
.donut.is-empty { grid-template-columns: minmax(130px, 170px); justify-content: center; }
.donut.is-empty .donut__center, .donut:not(.has-focus) .donut__center { cursor: default; }
.donut__center:disabled { color: inherit; }

@media (max-width: 400px) {
  .donut { grid-template-columns: 132px minmax(0, 1fr); gap: 10px; }
  .legend-row { gap: 8px; padding: 7px 6px; }
}

/* Rotation list */
.rot-list { display: grid; gap: 2px; }
.rot-row__btn, .usage-row__btn {
  display: grid; align-items: center; gap: 12px;
  grid-template-columns: 30px 52px minmax(0, 1fr) minmax(64px, 30%) 42px;
  width: 100%; padding: 8px 6px; margin: 0 -6px; width: calc(100% + 12px);
  border: 0; border-radius: 14px; background: none; text-align: left; cursor: pointer;
  transition: background-color 0.2s;
}
.rot-row + .rot-row .rot-row__btn { border-top: 1px solid var(--line); border-radius: 0; }
.rot-row__btn:hover, .usage-row__btn:hover { background: #fafafb; }
.rot-row__btn:disabled { cursor: default; }
.rot-rank {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: var(--soft); font-weight: 800; font-size: 14px; color: var(--ink-2);
}
.rot-thumb { width: 52px; height: 52px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); flex: none; background: var(--soft); }
.rot-info { display: flex; flex-direction: column; min-width: 0; }
.rot-info strong { font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.01em; }
.rot-info span { font-size: 13px; color: var(--muted); }
.rot-bar, .usage-bar, .mini-bar { display: block; height: 10px; border-radius: 999px; background: #eef0f3; overflow: hidden; }
.rot-bar span, .usage-bar span, .mini-bar span { display: block; height: 100%; border-radius: inherit; transition: width 0.9s var(--ease); }
.rot-pct { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; font-size: 15px; }

@media (max-width: 400px) {
  .rot-row__btn { grid-template-columns: 26px 44px minmax(0, 1fr) 56px 38px; gap: 9px; }
  .rot-rank { width: 26px; height: 26px; font-size: 13px; }
  .rot-thumb { width: 44px; height: 44px; }
}

.select { position: relative; display: inline-flex; align-items: center; }
.select select {
  appearance: none; -webkit-appearance: none;
  height: 36px; padding: 0 34px 0 14px;
  border: 1.5px solid var(--line-2); border-radius: 999px; background: #fff;
  font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); cursor: pointer;
}
.select svg { position: absolute; right: 10px; width: 16px; height: 16px; pointer-events: none; }

@media (min-width: 960px) {
  .view--home {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    grid-template-areas:
      "hero hero"
      "quick quick"
      "breakdown rotation"
      "cta rotation";
    align-items: start;
    gap: 18px;
  }
  .hero-slot { grid-area: hero; }
  .quick { grid-area: quick; gap: 18px; }
  .card--breakdown { grid-area: breakdown; }
  .card--rotation { grid-area: rotation; }
  .cta-slot { grid-area: cta; }
  .hero { min-height: 230px; }
  .hero__media { min-height: 230px; }
  .hero__text { padding: 28px 8px 28px 32px; }
  .hero__label { font-size: 20px; }
  .hero__name { font-size: 56px; }
  .hero__meta { font-size: 16px; }
  .qstat { padding: 18px 20px; gap: 14px; }
  .qstat strong { font-size: 32px; }
  .qstat span:not(.qstat__icon) { font-size: 13px; }
  .card { padding: 22px; }
  .donut { grid-template-columns: 1fr; justify-items: center; }
  .donut__chart { max-width: 230px; }
  .donut__legend { width: 100%; }
}

/* ---------------- Locker ---------------- */

.locker-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .locker-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1180px) { .locker-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.shoe-card {
  display: flex; flex-direction: column;
  padding: 0; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; min-width: 0;
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
  animation: rise 0.4s var(--ease) both;
}
.shoe-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.shoe-card:active { transform: scale(0.98); }
.shoe-card__media { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: var(--soft); }
.shoe-card__media .shoe-img { transition: transform 0.5s var(--ease); }
.shoe-card:hover .shoe-card__media .shoe-img { transform: scale(1.04); }
.shoe-card__badge {
  position: absolute; top: 10px; left: 10px;
  display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.94); color: var(--ink);
  font-size: 13px; font-weight: 800; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.shoe-card__badge--crown { background: var(--orange); color: #fff; padding: 0; width: 32px; height: 32px; }
.shoe-card__badge--crown svg { width: 18px; height: 18px; }
.shoe-card__body { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 14px; }
.shoe-card__model {
  font-size: 16px; font-weight: 800; letter-spacing: -0.015em; line-height: 1.2;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.shoe-card__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin: 4px 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.shoe-card__pct { font-weight: 800; color: var(--ink); }
.mini-bar { height: 6px; }

.shoe-card--add {
  align-items: center; justify-content: center; gap: 6px; text-align: center;
  min-height: 220px; padding: 20px 12px;
  background: #fffaf6; border: 2px dashed #ffc6a6; box-shadow: none;
}
.shoe-card--add:hover { background: var(--orange-tint); box-shadow: none; }
.shoe-card__add-icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  color: #fff; background: linear-gradient(180deg, var(--orange-hi), var(--orange-lo));
  box-shadow: 0 8px 18px rgba(232, 77, 9, 0.3); margin-bottom: 6px;
}
.shoe-card__add-icon svg { width: 26px; height: 26px; }

.retired { display: grid; gap: 12px; margin-top: 8px; }
.retired__toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 14px 16px; border-radius: 16px;
  border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 700; color: var(--ink-2);
}
.retired__toggle > span { display: flex; align-items: center; gap: 10px; }
.retired__toggle svg { width: 20px; height: 20px; }
.retired__toggle > svg { transition: transform 0.25s var(--ease); }
.retired__toggle.is-open > svg { transform: rotate(90deg); }
.locker-grid--retired .shoe-card { filter: grayscale(0.55); opacity: 0.88; }

/* ---------------- Stats ---------------- */

.seg { display: inline-flex; justify-self: start; padding: 4px; gap: 2px; border-radius: 999px; background: #ececf0; }
.seg__btn {
  min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent;
  font-size: 14px; font-weight: 700; color: var(--ink-2); cursor: pointer;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.seg__btn.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }

.stats-body { display: grid; gap: 14px; }
.summary { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 12px; }
.sum { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.sum__label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 700; }
.sum__label svg { width: 16px; height: 16px; color: var(--orange); }
.sum__value { font-size: 42px; font-weight: 900; line-height: 1; letter-spacing: -0.04em; }
.sum__sub { font-size: 13px; color: var(--muted); }
.sum--top { font: inherit; cursor: pointer; transition: box-shadow 0.2s; }
.sum--top:hover:not(:disabled) { box-shadow: var(--shadow-lg); }
.sum--top:disabled { cursor: default; color: inherit; opacity: 1; }
.sum__top { display: flex; align-items: center; gap: 10px; margin-top: 4px; min-width: 0; }
.sum__top-text { display: flex; flex-direction: column; min-width: 0; }
.sum__top-text strong { font-size: 18px; font-weight: 900; font-style: italic; letter-spacing: -0.02em; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sum__top-text span { font-size: 13px; color: var(--muted); }

.stats-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .card--wide { grid-column: 1 / -1; }
  .stats-body, .summary { gap: 18px; }
}

.usage-list { display: grid; gap: 4px; }
.usage-row__btn { grid-template-columns: 30px 44px minmax(0, 1fr); }
.usage-row__btn .rot-thumb { width: 44px; height: 44px; }
.usage-row__main { display: grid; gap: 7px; min-width: 0; }
.usage-row__top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.usage-row__top strong { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usage-row__count { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.usage-row__count b { color: var(--ink); font-weight: 800; }

.activity__plot { display: flex; align-items: stretch; gap: 8px; height: 200px; }
.activity.is-dense .activity__plot { gap: 3px; }
.bar {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 4px;
  padding: 0; border: 0; background: none; cursor: pointer; transition: opacity 0.2s;
}
.bar__count { height: 16px; font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; }
.activity.is-dense .bar__count { visibility: hidden; }
.bar__track {
  flex: 1; display: flex; align-items: flex-end; justify-content: center;
  background: linear-gradient(#ececf0, #ececf0) bottom / 100% 3px no-repeat;
  border-radius: 4px;
}
.bar__stack {
  display: flex; flex-direction: column-reverse;
  width: 100%; max-width: 38px; border-radius: 8px 8px 4px 4px; overflow: hidden;
  transition: height 0.8s var(--ease);
}
.activity.is-dense .bar__stack { border-radius: 3px; }
.bar__stack span { display: block; min-height: 2px; }
.bar__stack span + span { border-bottom: 1.5px solid #fff; }
.bar__label { height: 16px; font-size: 11px; font-weight: 600; color: var(--muted); text-align: center; white-space: nowrap; overflow: visible; }
.bar__label.is-hidden { visibility: hidden; }
.activity__plot:has(.is-focus) .bar:not(.is-focus) { opacity: 0.4; }
.bar.is-focus .bar__label { color: var(--ink); font-weight: 800; }
.activity__info { margin-top: 12px; font-size: 13px; color: var(--muted); min-height: 1.4em; }

/* History */
.history-list { display: grid; gap: 2px; }
.history-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 8px; border: 0; border-radius: 14px; background: none; cursor: pointer; text-align: left;
  transition: background-color 0.2s;
}
.history-row:hover:not(:disabled) { background: var(--soft); }
.history-row:disabled { cursor: default; opacity: 0.7; }
.history-list--full .rot-thumb { width: 44px; height: 44px; }
.history-row__icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--orange-tint); color: var(--orange); }
.history-row__icon svg { width: 22px; height: 22px; }
.history-row__text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.history-row__text strong { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-row__text span { font-size: 13px; color: var(--muted); }
.history-row__edit { color: #a1a1ab; flex: none; }
.history-row__edit svg { width: 18px; height: 18px; }
.history-list + .btn { margin-top: 10px; }

/* ---------------- Empty & loading ---------------- */

.empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 40px 20px; }
.empty--compact { padding: 22px 8px; }
.empty h2, .empty h3 { font-size: 21px; font-weight: 900; letter-spacing: -0.025em; }
.empty p { color: var(--muted); max-width: 34ch; font-size: 15px; margin-bottom: 8px; }
.empty__art { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 22px; background: var(--orange-tint); color: var(--orange); margin-bottom: 4px; }
.empty__art svg { width: 32px; height: 32px; }
.empty__art--lg { width: 92px; height: 92px; border-radius: 30px; }
.empty__art--lg svg { width: 44px; height: 44px; }
.stats-empty .empty, [data-empty] .empty { background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }

.skeleton { gap: 14px; }
.sk-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sk {
  border-radius: 20px;
  background: linear-gradient(90deg, #eeeef2 0%, #f7f7f9 40%, #eeeef2 80%) 0 0 / 300% 100%;
  animation: shimmer 1.3s linear infinite;
}
.sk--hero { height: 172px; border-radius: 24px; }
.sk--stat { height: 74px; border-radius: 18px; }
.sk--card { height: 220px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }

/* ---------------- Sheets & dialogs ---------------- */

.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(12, 12, 16, 0);
  transition: background-color 0.3s;
}
.overlay.is-open { background: rgba(12, 12, 16, 0.48); }

.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column;
  max-height: calc(100dvh - 28px);
  background: #fff;
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(102%);
  transition: transform 0.34s var(--ease);
  padding-bottom: var(--safe-b);
}
.overlay.is-open .sheet { transform: none; }
.sheet__grab { width: 40px; height: 5px; border-radius: 99px; background: #d9d9e0; margin: 8px auto 0; flex: none; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px 12px; flex: none; }
.sheet__head--floating { position: absolute; top: 14px; right: 14px; z-index: 5; padding: 0; }
.sheet__head--floating .sheet__close { background: rgba(255, 255, 255, 0.92); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15); backdrop-filter: blur(6px); }
.sheet__title { font-size: 21px; font-weight: 900; letter-spacing: -0.025em; }
.sheet__body { overflow-y: auto; overscroll-behavior: contain; padding: 0 18px 20px; -webkit-overflow-scrolling: touch; }
.sheet--detail .sheet__body { padding-top: 12px; }

.dialog {
  position: absolute; left: 50%; top: 50%;
  width: min(400px, calc(100vw - 32px));
  background: #fff; border-radius: 24px;
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, -46%) scale(0.97); opacity: 0;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.overlay.is-open .dialog { transform: translate(-50%, -50%); opacity: 1; }
.dialog .sheet__head { padding-top: 18px; }
.dialog .sheet__close { display: none; }
.dialog__msg { color: var(--ink-2); font-size: 15px; }
.dialog__msg strong { color: var(--ink); }
.dialog__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }

@media (min-width: 640px) {
  .sheet {
    left: 50%; right: auto; bottom: auto; top: 50%;
    width: min(560px, calc(100vw - 48px));
    max-height: min(860px, calc(100dvh - 48px));
    border-radius: 26px;
    transform: translate(-50%, -46%) scale(0.98); opacity: 0;
    transition: transform 0.3s var(--ease), opacity 0.22s;
    padding-bottom: 0;
  }
  .overlay.is-open .sheet { transform: translate(-50%, -50%); opacity: 1; }
  .sheet__grab { display: none; }
  .sheet__head { padding-top: 18px; }
  .sheet__body { padding: 0 24px 24px; }
}

/* Log sheet */
.log { display: grid; gap: 18px; }
.log__label { font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 42px; padding: 0 16px;
  border: 1.5px solid var(--line-2); border-radius: 999px; background: #fff;
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.chip svg { width: 18px; height: 18px; }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip__input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; margin: 0; font-size: 16px; }
.chip__input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

.pick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 480px) { .pick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pick { display: flex; flex-direction: column; gap: 2px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; min-width: 0; }
.pick__media {
  position: relative; display: block; aspect-ratio: 1; border-radius: 16px; overflow: hidden;
  margin-bottom: 6px; border: 1px solid var(--line);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.pick:active .pick__media { transform: scale(0.96); }
.pick.is-on .pick__media { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--orange); }
.pick__check {
  position: absolute; top: 7px; right: 7px;
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--orange); color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transform: scale(0); transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.pick__check svg { width: 16px; height: 16px; }
.pick.is-on .pick__check { transform: scale(1); }
.pick__name { font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.01em; }
.pick__brand { font-size: 12px; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.log__footer {
  position: sticky; bottom: -20px; z-index: 2;
  display: flex; gap: 10px;
  margin: 0 -18px -20px; padding: 12px 18px 20px;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff 22%);
}
@media (min-width: 640px) { .log__footer { margin: 0 -24px -24px; padding: 12px 24px 24px; bottom: -24px; } }
.log__submit span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.form-error { color: var(--danger); font-size: 14px; font-weight: 600; min-height: 0; }
.form-error:empty { display: none; }

/* Success */
.success { position: relative; display: grid; justify-items: center; text-align: center; padding: 26px 0 34px; }
.success__ring {
  display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%;
  color: #fff; background: linear-gradient(180deg, var(--orange-hi), var(--orange-lo));
  box-shadow: 0 16px 34px rgba(232, 77, 9, 0.38);
  animation: pop 0.55s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}
.success__ring svg { width: 50px; height: 50px; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw 0.4s 0.25s var(--ease) forwards; }
.success__ring svg path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw 0.45s 0.25s var(--ease) forwards; }
.success__title { margin-top: 18px; font-size: 30px; font-weight: 900; font-style: italic; letter-spacing: -0.03em; animation: rise 0.4s 0.15s var(--ease) both; }
.success__msg { margin-top: 4px; color: var(--ink-2); font-size: 16px; animation: rise 0.4s 0.22s var(--ease) both; }
.success__date { margin-top: 2px; color: var(--muted); font-size: 14px; animation: rise 0.4s 0.28s var(--ease) both; }
.success__burst { position: absolute; top: 74px; left: 50%; width: 0; height: 0; }
.success__burst i {
  position: absolute; width: 8px; height: 8px; margin: -4px; border-radius: 50%;
  background: var(--orange);
  transform: rotate(calc(var(--i) * 36deg)) translateY(0);
  animation: burst 0.7s 0.12s var(--ease) both;
}
.success__burst i:nth-child(even) { background: var(--ink); width: 6px; height: 6px; margin: -3px; }
@keyframes pop { 0% { transform: scale(0.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes burst {
  0% { transform: rotate(calc(var(--i) * 36deg)) translateY(0); opacity: 1; }
  100% { transform: rotate(calc(var(--i) * 36deg)) translateY(-78px); opacity: 0; }
}

/* Shoe form */
.shoe-form { display: grid; gap: 16px; }
.photo-pick { display: grid; gap: 10px; justify-items: center; }
.photo-pick__preview {
  width: 100%; aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden;
  background: repeating-linear-gradient(-45deg, #fff8f3 0 12px, #fff2ea 12px 24px);
  border: 2px dashed #ffc6a6;
}
.photo-pick__preview img, .photo-pick__preview .shoe-img, .photo-pick__preview .shoe-ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-pick__preview:has(img) { border-style: solid; border-color: var(--line); }
.photo-pick__empty { height: 100%; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--orange-ink); font-weight: 700; font-size: 15px; }
.photo-pick__empty svg { width: 40px; height: 40px; color: var(--orange); }
.photo-pick__actions { display: flex; gap: 10px; width: 100%; }
.photo-pick__actions .btn { flex: 1; position: relative; }
.photo-pick__actions .btn:focus-within { outline: 3px solid rgba(255, 91, 20, 0.55); outline-offset: 2px; }
.photo-pick__note { font-size: 13px; color: var(--muted); text-align: center; }
.photo-pick__remove { padding: 2px 4px; color: var(--muted); }

.field { display: grid; gap: 6px; }
.field__label { font-size: 13px; font-weight: 800; color: var(--ink-2); }
.field input {
  height: 52px; padding: 0 16px;
  border: 1.5px solid var(--line-2); border-radius: 14px; background: #fff;
  font: inherit; font-size: 16px; font-weight: 600; color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input::placeholder { color: #a6a6b0; font-weight: 500; }
.field input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255, 91, 20, 0.15); }

.upload-progress { height: 6px; border-radius: 99px; background: #f0f0f3; overflow: hidden; }
.upload-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--orange-hi), var(--orange-lo)); transition: width 0.3s var(--ease); }

/* Detail */
.detail { display: grid; gap: 16px; }
.detail__photo { position: relative; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; background: var(--soft); }
.badge {
  position: absolute; left: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(17, 17, 20, 0.82); color: #fff; font-size: 13px; font-weight: 800;
  backdrop-filter: blur(6px);
}
.badge svg { width: 16px; height: 16px; }
.badge--crown { background: var(--orange); }
.detail__head { display: grid; gap: 2px; }
.detail__head .eyebrow { display: flex; align-items: center; gap: 8px; }
.detail__name { font-size: 32px; font-weight: 900; font-style: italic; letter-spacing: -0.035em; line-height: 1.02; overflow-wrap: anywhere; }
.detail__sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.detail__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.detail__stats div { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 16px; background: var(--soft); min-width: 0; }
.detail__stats strong { font-size: clamp(15px, 4.3vw, 20px); font-weight: 900; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail__stats span { font-size: 12px; color: var(--muted); font-weight: 600; }
.detail__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail__history { padding-top: 4px; }

/* Account */
.account { display: grid; gap: 18px; }
.account__who { display: flex; align-items: center; gap: 14px; }
.account__who div { display: flex; flex-direction: column; min-width: 0; }
.account__who strong { font-size: 17px; font-weight: 800; }
.account__who span { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.account__links { margin-top: 0; }

/* ---------------- Toasts ---------------- */

.toasts {
  position: fixed; left: 0; right: 0; z-index: 200;
  bottom: calc(var(--tabbar-h) + 16px + var(--safe-b));
  display: grid; justify-items: center; gap: 8px;
  padding: 0 16px; pointer-events: none;
}
@media (min-width: 960px) { .toasts { bottom: 28px; left: 252px; } }
.toast {
  display: flex; align-items: center; gap: 10px;
  max-width: min(460px, calc(100vw - 32px)); width: max-content;
  padding: 12px 14px 12px 12px; border-radius: 16px;
  background: #141418; color: #fff; font-size: 15px; font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  transform: translateY(14px) scale(0.98); opacity: 0;
  transition: transform 0.3s var(--ease), opacity 0.25s;
  pointer-events: auto;
}
.toast.is-in { transform: none; opacity: 1; }
.toast__icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--orange); flex: none; font-weight: 900; font-size: 14px; }
.toast__icon svg { width: 15px; height: 15px; }
.toast--error .toast__icon { background: var(--danger); }
.toast__msg { min-width: 0; }
.toast__action { margin-left: 6px; padding: 6px 8px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, 0.1); color: #ffa06b; font-weight: 800; cursor: pointer; white-space: nowrap; }
.toast__action:hover { background: rgba(255, 255, 255, 0.18); }

/* ---------------- Motion preferences ---------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
