:root {
  --bg: #0d0b08;
  --bg-soft: #12100c;
  --surface: #1a1712;
  --surface-2: #211c15;
  --surface-3: #2a2318;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.17);
  --text: #fff8e9;
  --muted: #a69d8e;
  --muted-strong: #d0c5b4;
  --amber: #f5a623;
  --amber-light: #ffd873;
  --amber-dark: #c87500;
  --ice: #9cecff;
  --green: #55d6a3;
  --red: #ff7171;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius: 22px;
  --radius-small: 13px;
  --shell: 1160px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -15%, rgba(245, 166, 35, 0.10), transparent 34%),
    linear-gradient(180deg, #12100c 0%, var(--bg) 55%, #090806 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { color: var(--text); background: rgba(245, 166, 35, 0.35); }

.shell { width: min(calc(100% - 40px), var(--shell)); margin-inline: auto; }
main { min-height: calc(100vh - 158px); }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(33, 28, 21, 0.97), rgba(20, 17, 13, 0.98));
  box-shadow: var(--shadow);
}

.page-glow {
  position: fixed;
  z-index: -1;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.09;
  pointer-events: none;
}
.page-glow-one { top: -250px; right: -170px; background: var(--amber); }
.page-glow-two { bottom: -290px; left: -220px; background: #685026; }

/* Header and navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(13, 11, 8, 0.82);
  backdrop-filter: blur(22px);
}
.nav { min-height: 72px; display: flex; align-items: center; gap: 24px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.12rem;
  font-weight: 950;
  letter-spacing: 0.06em;
}
.brand img { width: 43px; height: 43px; }
.desktop-nav-links { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.nav-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border-radius: 11px;
  color: var(--muted-strong);
  font-size: 0.88rem;
  font-weight: 720;
  transition: 160ms ease;
}
.nav-link:hover, .nav-link.is-active { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-actions { display: flex; align-items: center; gap: 9px; }
.nav-user { max-width: 130px; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 0.8rem; }
.nav-actions form { margin: 0; }

.mobile-bottom-nav { display: none; }

/* Buttons */
.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 0 18px;
  color: var(--text);
  background: transparent;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-primary {
  color: #251500;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 11px 30px rgba(245, 166, 35, 0.17);
}
.button-primary:hover { box-shadow: 0 14px 36px rgba(245, 166, 35, 0.28); }
.button-ghost { border-color: var(--line); background: rgba(255, 255, 255, 0.045); }
.button-ghost:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.08); }
.button-danger { color: #ffd3d3; border-color: rgba(255, 113, 113, 0.25); background: rgba(255, 113, 113, 0.09); }
.button-danger:hover { background: rgba(255, 113, 113, 0.16); }
.button-small { min-height: 39px; padding-inline: 14px; font-size: 0.82rem; }
.button-large { min-height: 54px; padding-inline: 24px; font-size: 0.96rem; }
.button-full { width: 100%; }
.button:focus-visible, .nav-link:focus-visible, .mobile-bottom-nav a:focus-visible,
input:focus-visible, textarea:focus-visible, .segment:focus-visible, .range-control button:focus-visible {
  outline: 3px solid rgba(245, 166, 35, 0.30);
  outline-offset: 2px;
}

/* Flash messages */
.flash-region { position: relative; z-index: 60; }
.flash {
  width: min(580px, 100%);
  min-height: 48px;
  margin: 13px auto -2px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(29, 25, 18, 0.97);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.34);
  font-size: 0.9rem;
}
.flash-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--muted); }
.flash-success .flash-dot { background: var(--green); box-shadow: 0 0 0 5px rgba(85, 214, 163, 0.10); }
.flash-error .flash-dot { background: var(--red); box-shadow: 0 0 0 5px rgba(255, 113, 113, 0.10); }
.flash-info .flash-dot { background: var(--amber); box-shadow: 0 0 0 5px rgba(245, 166, 35, 0.10); }
.flash-close { margin-left: auto; border: 0; padding: 4px 7px; color: var(--muted); background: none; font-size: 1.35rem; cursor: pointer; }

/* Shared headings */
.page-section { padding-top: 52px; }
.page-heading { margin-bottom: 30px; }
.page-heading h1, .profile-heading h1 {
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.065em;
}
.heading-with-action, .profile-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.compact-heading { margin-bottom: 24px; }
.compact-heading .back-link { margin-bottom: 18px; }
.eyebrow, .mini-label {
  display: block;
  margin: 0 0 9px;
  color: var(--amber-light);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.back-link { display: inline-flex; color: var(--muted-strong); font-size: 0.86rem; font-weight: 700; }
.back-link:hover { color: var(--text); }
.text-link { color: var(--muted-strong); font-size: 0.88rem; font-weight: 760; }
.text-link:hover { color: var(--amber-light); }
.count-pill, .chart-status {
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.74rem;
  font-weight: 750;
  white-space: nowrap;
}
.card-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.card-toolbar h2 { margin: 0; font-size: 1.45rem; letter-spacing: -0.04em; }
.section-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.section-heading-row h2 { margin: 0; font-size: 1.8rem; letter-spacing: -0.045em; }

/* Landing */
.landing-hero {
  min-height: calc(100vh - 160px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.7fr);
  align-items: center;
  gap: 70px;
  padding-block: 70px;
}
.landing-copy h1 {
  margin: 0;
  font-size: clamp(3.8rem, 7vw, 7.4rem);
  line-height: 0.88;
  letter-spacing: -0.08em;
}
.landing-copy h1 span { color: var(--amber); }
.landing-copy > p { margin: 24px 0 0; color: var(--muted-strong); font-size: 1.12rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 31px; }
.landing-logo-card {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 50% 35%, rgba(156, 236, 255, 0.12), transparent 35%),
    radial-gradient(circle at 50% 70%, rgba(245, 166, 35, 0.18), transparent 38%),
    var(--surface);
}
.landing-logo-card::before, .landing-logo-card::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(156, 236, 255, 0.18);
  border-radius: 50%;
}
.landing-logo-card::before { width: 300px; height: 300px; }
.landing-logo-card::after { width: 355px; height: 355px; opacity: 0.5; }
.landing-logo-card img { width: 185px; height: 185px; position: relative; z-index: 1; }
.landing-logo-card strong { position: relative; z-index: 1; margin-top: 18px; font-size: 2.1rem; letter-spacing: 0.13em; }
.landing-logo-card span { position: relative; z-index: 1; margin-top: 4px; color: var(--muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.13em; }

/* Authentication */
.auth-page main { display: grid; align-items: center; }
.auth-shell { width: min(calc(100% - 40px), 500px); min-height: calc(100vh - 158px); display: grid; align-items: center; padding-block: 50px; }
.auth-card { padding: 34px; }
.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 32px; font-weight: 950; letter-spacing: 0.08em; }
.auth-logo img { width: 48px; height: 48px; }
.card-heading { margin-bottom: 27px; }
.card-heading h1 { margin: 0; font-size: 2.6rem; letter-spacing: -0.055em; }
.card-heading p { margin: 7px 0 0; color: var(--muted); }
.auth-switch { margin: 21px 0 0; text-align: center; color: var(--muted); font-size: 0.84rem; }
.auth-switch a { color: var(--amber-light); font-weight: 800; }

/* Inputs and forms */
.field-group { margin-bottom: 19px; }
.field-label { display: block; margin-bottom: 7px; color: var(--muted-strong); font-size: 0.84rem; font-weight: 780; }
.input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.24);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.input:hover { border-color: var(--line-strong); }
.input:focus { border-color: rgba(245, 166, 35, 0.60); box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.08); outline: none; }
.input::placeholder { color: #716a5e; }
.textarea { min-height: 105px; resize: vertical; }
.field-hint { margin: 6px 0 0; color: var(--muted); font-size: 0.74rem; }
.field-errors { margin: 7px 0 0; padding: 0; list-style: none; color: #ff9c9c; font-size: 0.79rem; }
.form-shell { --shell: 820px; }
.beer-form, .milestone-form { overflow: hidden; }
.form-block { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 19px; padding: 29px; border-bottom: 1px solid var(--line); }
.form-block-last { border-bottom: 0; }
.form-step { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: #2a1800; background: var(--amber); font-weight: 900; }
.form-block-content { min-width: 0; }
.form-fields-grid { display: grid; grid-template-columns: 1fr; }
.upload-zone {
  position: relative;
  min-height: 310px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(156, 236, 255, 0.32);
  border-radius: 18px;
  background: radial-gradient(circle at 50% 45%, rgba(156, 236, 255, 0.08), transparent 35%), rgba(0, 0, 0, 0.20);
  cursor: pointer;
}
.upload-zone:hover { border-color: rgba(245, 166, 35, 0.55); }
.upload-zone:focus-within { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.18); }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-placeholder { display: grid; justify-items: center; gap: 7px; padding: 24px; text-align: center; }
.upload-placeholder small { color: var(--muted); }
.camera-icon { width: 63px; height: 63px; display: grid; place-items: center; margin-bottom: 7px; border-radius: 20px; color: var(--ice); background: rgba(156, 236, 255, 0.09); font-size: 2rem; }
.upload-preview { width: 100%; height: 100%; min-height: 310px; object-fit: cover; }
.upload-filename { position: absolute; right: 12px; bottom: 12px; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 7px 10px; border-radius: 9px; color: var(--text); background: rgba(0, 0, 0, 0.72); font-size: 0.72rem; }
.quantity-stepper { width: min(100%, 340px); display: grid; grid-template-columns: 70px minmax(100px, 1fr) 70px; align-items: center; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 17px; background: rgba(0, 0, 0, 0.22); }
.quantity-stepper button { min-height: 70px; border: 0; color: var(--amber-light); background: rgba(255, 255, 255, 0.035); font-size: 1.8rem; font-weight: 600; cursor: pointer; }
.quantity-stepper button:active { background: rgba(245, 166, 35, 0.14); }
.quantity-input { width: 100%; min-height: 70px; border: 0; color: var(--text); background: transparent; text-align: center; font-size: 2rem; font-weight: 900; -moz-appearance: textfield; }
.quantity-input::-webkit-outer-spin-button, .quantity-input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.quantity-input:focus { outline: none; }
.form-submit-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 21px 29px 27px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, 0.12); }
.form-submit-row > span { color: var(--muted); font-size: 0.78rem; }

/* Metrics */
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 19px; }
.metric-card { min-height: 138px; display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, 0.027); }
.metric-card-total { border-color: rgba(245, 166, 35, 0.22); background: radial-gradient(circle at 90% 0%, rgba(245, 166, 35, 0.19), transparent 52%), rgba(255, 255, 255, 0.03); }
.metric-label { margin-bottom: auto; color: var(--muted); font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.09em; }
.metric-card > strong { font-size: 2.5rem; line-height: 0.95; letter-spacing: -0.055em; }
.metric-card small { margin-top: 7px; color: var(--muted); }

/* Dashboard */
.milestone-alert {
  min-height: 70px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid rgba(245, 166, 35, 0.30);
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(245, 166, 35, 0.14), rgba(156, 236, 255, 0.05));
}
.milestone-alert-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: #251500; background: var(--amber); font-size: 1.25rem; }
.milestone-alert > span:nth-child(2) { display: grid; }
.milestone-alert small { color: var(--muted-strong); }
.milestone-alert b { color: var(--amber-light); font-size: 0.82rem; }
.dashboard-top-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
.leaderboard-card { padding: 24px; }
.leaderboard-list { display: grid; }
.leader-row { min-height: 76px; display: grid; grid-template-columns: 40px 44px minmax(0, 1fr) 68px; align-items: center; gap: 12px; padding: 9px 8px; border-top: 1px solid rgba(255, 255, 255, 0.055); border-radius: 12px; transition: background 150ms ease; }
.leader-row:hover { background: rgba(255, 255, 255, 0.035); }
.leader-row.is-me { background: linear-gradient(90deg, rgba(245, 166, 35, 0.09), transparent); }
.rank { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--muted); background: rgba(255, 255, 255, 0.045); font-size: 0.78rem; font-weight: 900; }
.rank-1 { color: #382000; background: linear-gradient(135deg, #ffe8a7, #f5a623); }
.rank-2 { color: #242424; background: linear-gradient(135deg, #f5f5f5, #a3a9b2); }
.rank-3 { color: #32190b; background: linear-gradient(135deg, #e9ae75, #a65a2d); }
.avatar { width: 43px; height: 43px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 14px; color: #271700; background: linear-gradient(135deg, #ffe39f, #dc8a0a); font-weight: 950; }
.avatar-small { width: 36px; height: 36px; border-radius: 11px; font-size: 0.8rem; }
.avatar-profile { width: 78px; height: 78px; border-radius: 23px; font-size: 1.7rem; }
.leader-person { min-width: 0; display: grid; }
.leader-person strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leader-person em { margin-left: 7px; padding: 2px 6px; border-radius: 999px; color: var(--amber-light); background: rgba(245, 166, 35, 0.10); font-size: 0.62rem; font-style: normal; text-transform: uppercase; }
.leader-person small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 0.72rem; }
.leader-score { display: grid; justify-items: end; }
.leader-score strong { font-size: 1.25rem; line-height: 1; }
.leader-score small { color: var(--muted); font-size: 0.66rem; }
.milestone-progress-card { min-height: 320px; display: flex; flex-direction: column; padding: 25px; background: radial-gradient(circle at 80% 0%, rgba(156, 236, 255, 0.12), transparent 36%), radial-gradient(circle at 10% 90%, rgba(245, 166, 35, 0.16), transparent 42%), var(--surface); }
.progress-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; color: var(--muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; }
.progress-title strong { color: var(--amber-light); font-size: 1rem; }
.big-remaining { margin-top: auto; font-size: clamp(4.2rem, 7vw, 6rem); line-height: 0.9; letter-spacing: -0.08em; font-weight: 950; }
.milestone-progress-card > p { margin: 5px 0 22px; color: var(--muted); }
.progress-track { width: 100%; height: 9px; overflow: hidden; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.07); appearance: none; }
.progress-track::-webkit-progress-bar { border-radius: inherit; background: rgba(255, 255, 255, 0.07); }
.progress-track::-webkit-progress-value { border-radius: inherit; background: linear-gradient(90deg, var(--amber-dark), var(--amber-light)); }
.progress-track::-moz-progress-bar { border-radius: inherit; background: linear-gradient(90deg, var(--amber-dark), var(--amber-light)); }
.milestone-progress-card .text-link { margin-top: 18px; }
.milestone-spotlight { min-height: 330px; display: grid; grid-template-columns: minmax(270px, 0.9fr) minmax(0, 1.1fr); margin-top: 18px; overflow: hidden; }
.milestone-spotlight-media { min-height: 330px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle, rgba(245, 166, 35, 0.18), transparent 60%), #12100d; }
.milestone-spotlight-media > img:not(.milestone-placeholder-logo) { width: 100%; height: 100%; min-height: 330px; object-fit: cover; }
.milestone-placeholder-logo { width: 150px; height: 150px; opacity: 0.72; }
.milestone-spotlight-copy { display: flex; flex-direction: column; justify-content: center; padding: 34px; }
.milestone-number { font-size: clamp(4.4rem, 10vw, 8rem); line-height: 0.78; letter-spacing: -0.085em; color: var(--amber); }
.milestone-spotlight blockquote { margin: 29px 0 7px; font-size: clamp(1.2rem, 2.5vw, 1.85rem); line-height: 1.25; letter-spacing: -0.025em; }
.milestone-spotlight-copy > p { margin: 0 0 21px; color: var(--muted); }
.milestone-spotlight-copy .button { align-self: flex-start; }
.activity-section { margin-top: 54px; }
.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.proof-card { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, 0.025); transition: transform 160ms ease, border-color 160ms ease; }
.proof-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.proof-image-wrap { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #080705; }
.proof-image-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 250ms ease; }
.proof-card:hover .proof-image-wrap img { transform: scale(1.025); }
.proof-id, .quantity-badge { position: absolute; top: 10px; padding: 6px 9px; border-radius: 9px; background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(8px); font-size: 0.69rem; font-weight: 850; }
.proof-id { left: 10px; }
.quantity-badge { right: 10px; color: #251500; background: var(--amber); font-size: 0.83rem; }
.proof-meta { min-height: 69px; display: flex; align-items: center; gap: 10px; padding: 12px; }
.proof-meta > span:nth-child(2) { min-width: 0; display: grid; }
.proof-meta strong, .proof-meta small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proof-meta small { color: var(--muted); font-size: 0.7rem; }
.empty-state { min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; padding: 30px; text-align: center; }
.empty-state.compact { min-height: 150px; }
.empty-state h3 { margin: 0; }

/* Detail */
.detail-shell { --shell: 960px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.75fr); gap: 19px; margin-top: 19px; }
.proof-detail-image { position: relative; min-height: 560px; overflow: hidden; }
.proof-detail-image img { width: 100%; height: 100%; min-height: 560px; object-fit: cover; }
.proof-detail-badge { position: absolute; left: 15px; bottom: 15px; padding: 8px 12px; border-radius: 10px; color: #251500; background: var(--amber); font-weight: 900; }
.detail-card { padding: 30px; }
.detail-card h1 { margin: 45px 0 27px; color: var(--amber); font-size: clamp(2.6rem, 5vw, 4.8rem); line-height: 0.95; letter-spacing: -0.07em; }
.detail-list { margin: 0; }
.detail-list > div { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 0; border-top: 1px solid var(--line); }
.detail-list dt { color: var(--muted); font-size: 0.8rem; }
.detail-list dd { margin: 0; text-align: right; font-weight: 780; }
.detail-list a { color: var(--amber-light); }
.detail-note { margin-top: 22px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, 0.025); }
.detail-note span { color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 800; }
.detail-note p { margin: 6px 0 0; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 27px; }
.detail-actions form { margin: 0; }

/* Profile and charts */
.profile-heading { margin-bottom: 27px; }
.profile-identity { display: flex; align-items: center; gap: 18px; }
.profile-identity .eyebrow { margin-bottom: 5px; }
.chart-card { padding: 24px; }
.profile-chart-card { margin-top: 19px; }
.chart-wrap { position: relative; height: 280px; }
.chart-wrap-large { height: 430px; }
.history-section { margin-top: 48px; }
.history-list { padding: 6px 18px; }
.history-row { min-height: 86px; display: grid; grid-template-columns: 58px minmax(0, 1fr) 130px; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.history-row:last-child { border-bottom: 0; }
.history-row img { width: 58px; height: 58px; object-fit: cover; border-radius: 12px; background: #080705; }
.history-main, .history-date { min-width: 0; display: grid; }
.history-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.history-date { text-align: right; }
.history-date small { color: var(--muted); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 17px; margin-top: 18px; color: var(--muted); font-size: 0.8rem; }

/* Analytics */
.analytics-toolbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 9px; margin-bottom: 17px; }
.segmented-control, .range-control { display: flex; align-items: center; gap: 4px; }
.segment, .range-control button { min-height: 43px; border: 0; border-radius: 10px; padding: 0 15px; color: var(--muted); background: transparent; cursor: pointer; font-weight: 780; font-size: 0.82rem; }
.segment:hover, .range-control button:hover { color: var(--text); }
.segment.is-active, .range-control button.is-active { color: var(--text); background: rgba(255, 255, 255, 0.075); }
.range-control { padding: 3px; border: 1px solid var(--line); border-radius: 12px; }
.range-control button { min-height: 35px; padding-inline: 11px; }
.range-control button.is-active { color: #281700; background: var(--amber); }
.analytics-grid { display: grid; grid-template-columns: minmax(0, 1fr) 305px; gap: 18px; }
.analytics-chart-card { min-width: 0; }
.chart-help { margin: 12px 0 0; color: var(--muted); font-size: 0.74rem; }
.day-panel { padding: 24px; }
.day-panel h2 { margin: 0; font-size: 1.55rem; letter-spacing: -0.04em; }
.selected-total { display: flex; align-items: flex-end; gap: 9px; padding: 27px 0 21px; border-bottom: 1px solid var(--line); }
.selected-total strong { color: var(--amber); font-size: 3.1rem; line-height: 0.8; letter-spacing: -0.065em; }
.selected-total span { color: var(--muted); font-size: 0.76rem; }
.day-ranking { display: grid; gap: 3px; margin-top: 14px; }
.day-rank-row { min-height: 54px; display: grid; grid-template-columns: 30px 35px minmax(0, 1fr) auto; align-items: center; gap: 9px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.day-rank-row > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.82rem; }
.day-rank-row > span:last-child { color: var(--muted); font-size: 0.72rem; }
.empty-copy { color: var(--muted); font-size: 0.82rem; }

/* Milestones */
.milestone-summary { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 18px; overflow: hidden; }
.milestone-summary > div { min-height: 120px; display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; border-right: 1px solid var(--line); }
.milestone-summary > div:last-child { border-right: 0; }
.milestone-summary span { margin-bottom: auto; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; }
.milestone-summary strong { font-size: 2.25rem; letter-spacing: -0.05em; }
.milestone-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 17px; }
.milestone-card { overflow: hidden; }
.milestone-card-media { position: relative; min-height: 330px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle, rgba(245, 166, 35, 0.17), transparent 55%), #11100c; }
.milestone-card-media > img:not(.milestone-placeholder-logo) { width: 100%; height: 100%; min-height: 330px; object-fit: cover; }
.milestone-card-media .milestone-placeholder-logo { width: 135px; height: 135px; opacity: 0.65; }
.milestone-card-media > span { position: absolute; bottom: 20px; color: var(--muted); font-size: 0.76rem; }
.milestone-card-media > b { position: absolute; left: 17px; top: 13px; color: var(--amber); font-size: clamp(3.6rem, 8vw, 6.7rem); line-height: 1; letter-spacing: -0.08em; text-shadow: 0 4px 20px rgba(0, 0, 0, 0.65); }
.milestone-card-copy { min-height: 170px; display: flex; flex-direction: column; align-items: flex-start; padding: 23px; }
.milestone-card-copy blockquote { margin: 0 0 11px; font-size: 1.2rem; line-height: 1.3; letter-spacing: -0.02em; }
.milestone-card-copy p { margin: 0 0 11px; color: var(--muted-strong); }
.milestone-card-copy small { margin-bottom: 18px; color: var(--muted); }
.milestone-card-copy .button { margin-top: auto; }
.milestone-form { padding: 29px; position: relative; }
.milestone-edit-number { position: absolute; right: 25px; top: 16px; color: rgba(245, 166, 35, 0.12); font-size: 5rem; line-height: 1; font-weight: 950; letter-spacing: -0.08em; pointer-events: none; }
.milestone-upload { min-height: 360px; }
.milestone-upload .upload-preview { min-height: 360px; }

/* Errors and footer */
.error-page { min-height: 65vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.error-page > span { color: rgba(245, 166, 35, 0.24); font-size: clamp(7rem, 20vw, 15rem); font-weight: 950; line-height: 0.75; letter-spacing: -0.09em; }
.error-page h1 { margin: 30px 0 8px; font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -0.06em; }
.error-page p { margin: 0 0 24px; color: var(--muted); }
.site-footer { margin-top: 75px; border-top: 1px solid rgba(255, 255, 255, 0.055); color: var(--muted); font-size: 0.8rem; }
.footer-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }

@media (max-width: 1000px) {
  .landing-hero { gap: 35px; }
  .dashboard-top-grid { grid-template-columns: minmax(0, 1fr) 260px; }
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .proof-detail-image, .proof-detail-image img { min-height: 480px; }
  .analytics-grid { grid-template-columns: 1fr; }
  .day-panel { min-height: 260px; }
}

@media (max-width: 820px) {
  body.has-mobile-nav { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  .site-header { top: 0; }
  .nav { min-height: 62px; gap: 10px; }
  .brand img { width: 40px; height: 40px; }
  .brand { font-size: 1rem; }
  .desktop-nav-links, .desktop-add, .nav-user { display: none; }
  .nav-actions { margin-left: auto; }
  .nav-actions .button-ghost { min-height: 37px; }
  .mobile-bottom-nav {
    position: fixed;
    z-index: 80;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: calc(69px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: end;
    padding: 7px 6px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(15, 13, 10, 0.95);
    backdrop-filter: blur(22px);
  }
  .mobile-bottom-nav a { min-width: 0; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 13px; color: var(--muted); }
  .mobile-bottom-nav a > span { font-size: 1.08rem; line-height: 1; }
  .mobile-bottom-nav small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 0.61rem; font-weight: 720; }
  .mobile-bottom-nav a.is-active { color: var(--amber-light); }
  .mobile-bottom-nav .mobile-add { min-height: 62px; margin-top: -22px; color: #251500; background: linear-gradient(135deg, var(--amber-light), var(--amber)); box-shadow: 0 10px 28px rgba(245, 166, 35, 0.29); }
  .mobile-bottom-nav .mobile-add > span { font-size: 1.6rem; font-weight: 800; }
  .mobile-bottom-nav .mobile-add small { color: #251500; }
  .heading-with-action, .profile-heading { align-items: flex-start; }
  .page-add-button { display: none; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-top-grid { grid-template-columns: 1fr; }
  .milestone-progress-card { min-height: 245px; }
  .milestone-spotlight { grid-template-columns: 1fr; }
  .milestone-spotlight-media { min-height: 300px; }
  .milestone-spotlight-media > img:not(.milestone-placeholder-logo) { min-height: 300px; }
  .analytics-toolbar { align-items: stretch; flex-direction: column; }
  .segmented-control .segment, .range-control button { flex: 1; }
  .site-footer { margin-top: 55px; }
}

@media (max-width: 620px) {
  .shell { width: min(calc(100% - 24px), var(--shell)); }
  main { min-height: calc(100vh - 130px); }
  .page-section { padding-top: 35px; }
  .page-heading { margin-bottom: 23px; }
  .page-heading h1, .profile-heading h1 { font-size: 2.75rem; }
  .landing-hero { min-height: auto; grid-template-columns: 1fr; gap: 34px; padding-block: 53px 35px; }
  .landing-copy h1 { font-size: clamp(3.35rem, 16vw, 5.2rem); }
  .landing-logo-card { min-height: 330px; }
  .landing-logo-card img { width: 145px; height: 145px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .button { width: 100%; }
  .auth-shell { width: min(calc(100% - 24px), 500px); min-height: auto; padding-block: 34px; }
  .auth-card { padding: 25px 20px; }
  .card-heading h1 { font-size: 2.25rem; }
  .metric-grid { gap: 9px; }
  .metric-card { min-height: 120px; padding: 15px; }
  .metric-card > strong { font-size: 2.05rem; }
  .metric-card small { font-size: 0.72rem; }
  .milestone-alert { grid-template-columns: 40px minmax(0, 1fr); }
  .milestone-alert b { display: none; }
  .leaderboard-card { padding: 15px 8px; }
  .card-toolbar { padding-inline: 7px; }
  .leader-row { grid-template-columns: 34px 40px minmax(0, 1fr) 55px; gap: 8px; padding-inline: 5px; }
  .leader-person small { max-width: 150px; }
  .milestone-progress-card { padding: 21px; }
  .milestone-spotlight-media { min-height: 260px; }
  .milestone-spotlight-media > img:not(.milestone-placeholder-logo) { min-height: 260px; }
  .milestone-spotlight-copy { padding: 25px 21px; }
  .milestone-number { font-size: 5.3rem; }
  .milestone-spotlight blockquote { margin-top: 22px; }
  .proof-grid { grid-template-columns: 1fr; }
  .activity-section { margin-top: 43px; }
  .form-block { grid-template-columns: 1fr; gap: 13px; padding: 21px 17px; }
  .form-step { width: 34px; height: 34px; }
  .upload-zone { min-height: 285px; }
  .upload-preview { min-height: 285px; }
  .quantity-stepper { width: 100%; grid-template-columns: 72px 1fr 72px; }
  .form-submit-row { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 5; display: grid; padding: 13px 17px; background: rgba(25, 21, 16, 0.96); backdrop-filter: blur(18px); }
  .form-submit-row > span { display: none; }
  .form-submit-row .button { width: 100%; }
  .detail-grid { display: block; }
  .proof-detail-image { min-height: 360px; margin-bottom: 14px; }
  .proof-detail-image img { min-height: 360px; }
  .detail-card { padding: 23px 20px; }
  .detail-card h1 { margin-top: 35px; }
  .detail-actions { display: grid; }
  .detail-actions .button { width: 100%; }
  .profile-heading { gap: 15px; }
  .profile-identity { align-items: flex-start; }
  .avatar-profile { width: 62px; height: 62px; border-radius: 18px; font-size: 1.35rem; }
  .chart-card { padding: 17px 8px; }
  .chart-wrap { height: 245px; }
  .chart-wrap-large { height: 345px; }
  .history-list { padding-inline: 9px; }
  .history-row { grid-template-columns: 52px minmax(0, 1fr) 82px; gap: 9px; }
  .history-row img { width: 52px; height: 52px; }
  .history-main small { max-width: 150px; }
  .history-date strong { font-size: 0.72rem; }
  .analytics-toolbar { padding: 8px; }
  .segment, .range-control button { padding-inline: 8px; }
  .day-panel { padding: 20px; }
  .milestone-summary { grid-template-columns: 1fr 1fr; }
  .milestone-summary > div { min-height: 105px; padding: 15px; }
  .milestone-summary > div:nth-child(2) { border-right: 0; }
  .milestone-summary > div:last-child { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .milestone-gallery { grid-template-columns: 1fr; }
  .milestone-card-media { min-height: 300px; }
  .milestone-card-media > img:not(.milestone-placeholder-logo) { min-height: 300px; }
  .milestone-form { padding: 21px 17px; }
  .milestone-edit-number { font-size: 4rem; }
  .milestone-upload, .milestone-upload .upload-preview { min-height: 300px; }
  .footer-inner { min-height: 68px; }
}

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

/* Profile editing and real avatars */
.avatar-image { object-fit: cover; color: transparent; background: var(--surface-3); }
.profile-heading-actions { display: flex; align-items: center; gap: 10px; }
.profile-social-link { display: inline-flex; margin-top: 8px; color: var(--ice); font-size: 0.86rem; font-weight: 760; }
.profile-social-link:hover { color: var(--text); }
.profile-edit-form, .admin-form-card { padding: 29px; }
.profile-edit-avatar-row { display: flex; align-items: center; gap: 18px; margin-bottom: 27px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.profile-edit-avatar-row strong { display: block; margin-bottom: 4px; }
.profile-edit-avatar-row p { margin: 0; color: var(--muted); font-size: 0.82rem; }
.avatar-profile-large { width: 92px; height: 92px; border-radius: 26px; }
.two-field-grid { display: grid; grid-template-columns: 1fr 1.45fr; gap: 15px; }
.check-row { display: flex; align-items: center; gap: 10px; margin-top: 11px; color: var(--muted-strong); font-size: 0.84rem; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--amber); }
.profile-privacy-note { margin: -5px 0 19px; }
.mobile-admin-button { display: none; }

/* Admin */
.admin-page { --shell: 1240px; }
.admin-tabs { display: flex; gap: 7px; margin: -9px 0 24px; padding: 7px; overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; background: rgba(255, 255, 255, 0.025); scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs a { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; padding: 0 15px; border-radius: 10px; color: var(--muted-strong); font-size: 0.82rem; font-weight: 800; }
.admin-tabs a:hover, .admin-tabs a.is-active { color: #271700; background: var(--amber); }
.admin-metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 18px; }
.admin-dashboard-grid { display: grid; grid-template-columns: minmax(300px, .72fr) minmax(0, 1.28fr); gap: 18px; align-items: start; }
.admin-settings-card, .admin-list-card, .admin-audit-card { padding: 24px; }
.admin-audit-card { margin-top: 18px; }
.admin-compact-list { display: grid; }
.admin-compact-list > a { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 9px 3px; border-bottom: 1px solid var(--line); }
.admin-compact-list > a:last-child { border-bottom: 0; }
.admin-compact-list span { min-width: 0; display: grid; }
.admin-compact-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 0.75rem; }
.admin-compact-list b { color: var(--amber-light); }
.audit-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 25px; }
.audit-list > div { min-width: 0; padding: 15px 2px; border-bottom: 1px solid var(--line); }
.audit-action { color: var(--amber-light); font-size: 0.69rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.audit-list p { margin: 5px 0; color: var(--muted-strong); overflow-wrap: anywhere; }
.audit-list small { color: var(--muted); font-size: .72rem; }
.admin-table-card { overflow: hidden; }
.admin-table-wrap { width: 100%; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 800px; }
.admin-table th, .admin-table td { padding: 15px 17px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.admin-table th { color: var(--muted); background: rgba(255, 255, 255, .025); font-size: .69rem; letter-spacing: .08em; text-transform: uppercase; }
.admin-table td { color: var(--muted-strong); font-size: .84rem; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: rgba(255, 255, 255, .018); }
.admin-note-cell { max-width: 290px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.table-actions form { margin: 0; }
.admin-user-cell { display: flex; align-items: center; gap: 10px; color: var(--text); }
.admin-badge, .status-good, .status-warn { display: inline-flex; align-items: center; min-height: 27px; padding: 0 9px; border-radius: 999px; font-size: .7rem; font-weight: 850; }
.admin-badge { color: #271700; background: var(--amber); }
.status-good { color: #bfffe5; background: rgba(85, 214, 163, .12); }
.status-warn { color: #ffe3a1; background: rgba(245, 166, 35, .11); }
.admin-form-card { margin-top: 0; }
.admin-form-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: -4px 0 24px; padding: 15px; border: 1px solid rgba(245, 166, 35, .18); border-radius: 13px; background: rgba(245, 166, 35, .065); }
.admin-form-banner strong { color: var(--amber-light); font-size: 1.2rem; }
.admin-form-banner span { color: var(--muted); font-size: .77rem; text-align: right; }
.admin-check { margin: 0 0 22px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, .16); }

@media (max-width: 900px) {
  .admin-metric-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-dashboard-grid { grid-template-columns: 1fr; }
  .audit-list { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .mobile-admin-button { display: inline-flex; }
  .profile-heading-actions { align-items: stretch; flex-direction: column; }
  .profile-heading-actions .button { min-height: 40px; }
}

@media (max-width: 620px) {
  .two-field-grid { grid-template-columns: 1fr; gap: 0; }
  .profile-edit-form, .admin-form-card { padding: 21px 17px; }
  .profile-heading { flex-direction: column; }
  .profile-heading-actions { width: 100%; flex-direction: row; }
  .profile-heading-actions .button { flex: 1; }
  .profile-edit-avatar-row { align-items: flex-start; }
  .avatar-profile-large { width: 76px; height: 76px; }
  .admin-tabs { margin-top: -4px; }
  .admin-metric-grid { gap: 9px; }
  .admin-settings-card, .admin-list-card, .admin-audit-card { padding: 18px 15px; }
  .admin-form-banner { align-items: flex-start; flex-direction: column; }
  .admin-form-banner span { text-align: left; }
  .admin-table th, .admin-table td { padding: 12px; }
}

/* Admin site switches */
.admin-toggle-row { display: flex; align-items: flex-start; gap: 12px; margin: 4px 0 22px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, .16); cursor: pointer; }
.admin-toggle-row .switch-input { width: 20px; height: 20px; margin-top: 1px; flex: 0 0 auto; accent-color: var(--amber); }
.admin-toggle-row span { display: grid; gap: 3px; }
.admin-toggle-row strong { color: var(--text); font-size: .84rem; }
.admin-toggle-row small { color: var(--muted); font-size: .75rem; line-height: 1.4; }
.button.is-disabled { opacity: .52; cursor: not-allowed; pointer-events: none; }
