/* Dronkoard – stijl F (teal, oranje, bijna-zwart) */
@font-face { font-family: 'Archivo Black'; src: url(../fonts/archivo-black.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url(../fonts/archivo-500.woff2) format('woff2'); font-weight: 500 600; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url(../fonts/archivo-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url(../fonts/archivo-800.woff2) format('woff2'); font-weight: 800 900; font-display: swap; }

:root {
  --teal: #49C1B7; --teal-dark: #2F8F87; --groove: #26877E; --tick: #1A5A53;
  --ink: #26262A; --muted: #1F3F3C; --white: #FFFFFF; --mist: #E6F4F2;
  --orange: #F08A3C; --orange-soft: #F7A766; --gold: #F5B335; --red: #C8402F; --red-soft: #E9A79C;
  --line: 2.5px solid var(--ink);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--teal); color: var(--ink); font-family: 'Archivo', system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
body { overscroll-behavior: none; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

#app { max-width: 480px; margin: 0 auto; min-height: 100%; position: relative; }
.screen { min-height: 100dvh; display: flex; flex-direction: column; gap: 18px; padding: calc(24px + var(--safe-t)) 24px calc(28px + var(--safe-b)); }
.screen.home { padding: calc(20px + var(--safe-t)) 20px calc(104px + var(--safe-b)); gap: 0; position: relative; overflow: hidden; isolation: isolate; }

/* Typography */
.fr { font-family: 'Archivo Black', system-ui, sans-serif; font-weight: 400; letter-spacing: -.005em; }
h1.fr { margin: 0; font-size: 30px; line-height: 1.05; }
.lead { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.h { font: 800 14px 'Archivo', sans-serif; color: var(--muted); margin: 0; }
.muted { color: var(--muted); }

/* Components */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 58px; padding: 0 18px; border-radius: 18px; border: var(--line); background: var(--orange); color: var(--ink); font: 400 18px 'Archivo Black', sans-serif; text-decoration: none; cursor: pointer; width: 100%; }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn2 { display: flex; align-items: center; justify-content: center; min-height: 52px; border-radius: 18px; border: var(--line); background: var(--white); font: 700 16px 'Archivo', sans-serif; text-decoration: none; cursor: pointer; width: 100%; }
.card { background: var(--white); border: var(--line); border-radius: 22px; }
.chalk { background: var(--ink); color: var(--white); border: var(--line); border-radius: 22px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: var(--line); background: var(--white); font: 700 15px 'Archivo', sans-serif; cursor: pointer; }
.chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--ink); color: var(--white); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.icon { width: 44px; height: 44px; flex: none; border-radius: 14px; border: var(--line); background: var(--white); display: flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; padding: 0; }
.icon.plain { border: 0; background: transparent; margin: -6px -10px 0 0; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--teal-dark); border: var(--line); }
.seg > * { flex: 1; min-height: 42px; border: 0; border-radius: 12px; background: transparent; color: var(--white); font: 700 15px 'Archivo', sans-serif; display: flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; padding: 0 8px; }
.seg > [aria-pressed="true"], .seg > [aria-current="page"] { background: var(--white); color: var(--ink); }
.step { width: 44px; height: 44px; border-radius: 14px; border: var(--line); background: var(--teal); font: 700 22px 'Archivo', sans-serif; cursor: pointer; flex: none; }
.tube { height: 14px; border-radius: 7px; background: var(--mist); border: 2px solid var(--ink); overflow: hidden; }
.tube > div { height: 100%; background: var(--orange); }
.topbar { display: flex; align-items: center; gap: 14px; }
.topbar .tube { flex: 1; }
.spacer { flex: 1; }

/* Avatar stage */
.avatar-disc { position: relative; border-radius: 50%; background: var(--orange-soft); border: 3px solid var(--ink); overflow: hidden; }
.avatar-disc .stage { position: absolute; inset: 0; }
.avatar-disc .fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 64px; }

/* Wheel picker */
.wheel { position: relative; width: 92px; height: 108px; }
.wheel::before { content: ''; position: absolute; left: 0; right: 0; top: 36px; height: 36px; border-radius: 10px; background: var(--white); border: 2px solid var(--ink); }
.wheel ol { position: relative; list-style: none; margin: 0; padding: 36px 0; height: 108px; box-sizing: border-box; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); }
.wheel ol::-webkit-scrollbar { display: none; }
.wheel li { height: 36px; display: flex; align-items: center; justify-content: center; scroll-snap-align: center; font: 700 17px 'Archivo', sans-serif; color: var(--muted); }
.wheel li[aria-selected="true"] { font: 400 22px 'Archivo Black', sans-serif; color: var(--ink); }

/* Home */
.greet { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ring-wrap { position: relative; width: 290px; height: 290px; margin: 26px auto 0; }
.ring-wrap svg.ring { position: absolute; inset: 0; overflow: visible; }
.ring-wrap .avatar-disc { position: absolute; left: 37px; top: 37px; width: 216px; height: 216px; }
.readout { text-align: center; margin-top: 4px; }
.readout .num { font-family: 'Archivo Black', sans-serif; font-size: 76px; line-height: 1; letter-spacing: -.02em; }
.readout .num small { font: 800 26px 'Archivo', sans-serif; margin-left: 2px; }
.readout.over .num { color: var(--red); }
.readout p { margin: 4px 0 0; font-size: 15px; color: var(--muted); }
.glasses { display: flex; justify-content: center; gap: 8px; margin-top: 14px; min-height: 38px; flex-wrap: wrap; }
.glass { width: 38px; height: 38px; border-radius: 50%; border: var(--line); background: var(--white); display: flex; align-items: center; justify-content: center; }
.glass svg > path:first-child { fill: var(--gold); }
.glass:last-child.new { animation: drop .6s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes drop { from { transform: translateY(-30px); opacity: 0; } }
.weekcard { display: flex; align-items: flex-end; gap: 12px; margin-top: 16px; padding: 10px 14px; border-radius: 20px; background: var(--white); border: var(--line); text-decoration: none; }
.alert { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 14px; border-radius: 16px; background: var(--red); color: #FFF6F2; border: var(--line); font: 400 17px/1.2 'Archivo Black', sans-serif; }
.alert .ic { width: 46px; height: 46px; flex: none; border-radius: 50%; background: #FFF6F2; border: var(--line); color: var(--red); display: flex; align-items: center; justify-content: center; }
.bubbles { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bubbles span { position: absolute; bottom: -16px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.45); background: rgba(255,255,255,.12); animation: bubble linear infinite; }
@keyframes bubble { 0% { transform: translate(0,0); } 50% { transform: translate(6px,-50vh); } 100% { transform: translate(-4px,-105vh); } }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; height: calc(84px + var(--safe-b)); padding-bottom: var(--safe-b); display: flex; align-items: center; justify-content: space-around; background: var(--teal); z-index: 5; }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font: 700 12px 'Archivo', sans-serif; text-decoration: none; min-width: 64px; }
.fab { width: 76px; height: 76px; margin-top: -26px; border-radius: 50%; background: var(--orange); border: 3px solid var(--ink); display: flex; align-items: center; justify-content: center; }

/* Logging */
.drinks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.drink { aspect-ratio: 1; border-radius: 50%; border: var(--line); background: var(--white); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer; padding: 6px; text-align: center; }
.drink[aria-pressed="true"] { background: var(--orange); transform: rotate(-4deg); }
.drink .n { font: 400 16px/1.05 'Archivo Black', sans-serif; }
.drink .s { font-size: 11px; font-weight: 600; }
.drink .u { font: 400 13px 'Archivo Black', sans-serif; margin-top: 2px; }

/* History */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 170px; position: relative; padding-top: 18px; }
.bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; font-size: 12px; font-weight: 700; }
.bars .bar { width: 100%; border-radius: 8px 8px 3px 3px; background: var(--orange); border: 2px solid var(--ink); }
.bars .bar.over { background: var(--red); }
.bars .dry { width: 100%; height: 14px; border-radius: 4px; border: 2px dashed var(--ink); }
.bars .lim { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--red); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal span { aspect-ratio: 1; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.cal .d0 { background: var(--teal); border: 2px solid var(--ink); }
.cal .d1 { background: #FCD9BE; border: 2px solid var(--ink); }
.cal .d2 { background: var(--orange); border: 2px solid var(--ink); }
.cal .d3 { background: var(--red); color: #fff; border: 2px solid var(--ink); }
.cal .fut { border: 2px dashed var(--ink); }
.cal .today { outline: 3px solid var(--ink); outline-offset: 1px; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; font-weight: 700; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 2px solid var(--ink); margin-right: 4px; vertical-align: -2px; }

/* Goals */
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.days { display: flex; gap: 6px; }
.days button { width: 40px; height: 40px; border-radius: 50%; border: var(--line); background: var(--white); font-weight: 700; cursor: pointer; padding: 0; }
.days button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; font-size: 12px; font-weight: 700; }
.badge { width: 74px; height: 74px; margin: 0 auto 6px; border-radius: 50%; border: var(--line); background: var(--mist); display: flex; align-items: center; justify-content: center; }
.badge.got { background: var(--orange); }
.toast { position: fixed; left: 50%; bottom: calc(110px + var(--safe-b)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 700; z-index: 20; animation: drop .4s both; max-width: 90vw; }
