/* VÉRINE — hand-built app. Marfil / Veille + iOS 26 Liquid Glass + wine chip. */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #F2EFEA; --bg2: #FDFDF9; --ink: #262622; --ink2: #5A5A50; --ink3: #6E7668;
  --olive: #5C6B4C; --olive-quiet: #6E7668; --line: rgba(38,38,34,.12);
  /* WINE — Oxblood #58111A, chosen by Benny (2026-11-13). Change ONLY --wine-base;
     every wine surface in the app derives from it. */
  --wine-base: #58111A;
  --wine: var(--wine-base);
  --wine-glass: color-mix(in srgb, var(--wine) 88%, transparent);
  --glass: rgba(255,255,255,.42); --glass-border: rgba(255,255,255,.65);
  --glass-bg: var(--glass); --glass-brd: var(--glass-border);
  --muted: var(--ink2); --card: var(--bg2);
  --glass-dark: rgba(28,30,24,.38); --glass-dark-border: rgba(255,255,255,.35);
  --shadow: 0 18px 38px rgba(35,40,25,.28), 0 3px 8px rgba(35,40,25,.16);
  --serif: Georgia, 'Times New Roman', serif;
}
body.veille {
  --bg: #40513B; --bg2: #4A5C44; --ink: #F2EFEA; --ink2: #C9CFC0; --ink3: #A9B39B;
  --olive: #B9C8A6; --olive-quiet: #9AA98C; --line: rgba(242,239,234,.16);
  --wine: color-mix(in srgb, var(--wine-base) 72%, #F2EFEA);
  --glass: rgba(242,239,234,.16); --glass-border: rgba(242,239,234,.35);
  --glass-dark: rgba(20,26,16,.42); --glass-dark-border: rgba(242,239,234,.3);
  --shadow: 0 18px 38px rgba(0,0,0,.35), 0 3px 8px rgba(0,0,0,.25);
}
html, body { height: 100%; }
body {
  background: #E7E4DC; font-family: var(--serif); color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
body.veille { background: #2C3827; }
#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; background: var(--bg); position: relative; overflow: hidden; box-shadow: 0 0 60px rgba(0,0,0,.18); }
button { font-family: var(--serif); cursor: pointer; }
img { user-select: none; }
a { color: inherit; }

/* ---------- entrance (subtle: opacity + slight scale + short spring, no bounce) ---------- */
@keyframes pop-in {
  0% { opacity: 0; transform: scale(.97) translateY(6px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.pop { animation: pop-in .45s cubic-bezier(.22,.9,.32,1) both; }
.pop-1 { animation-delay: .08s; } .pop-2 { animation-delay: .16s; } .pop-3 { animation-delay: .24s; }
.fade { animation: fade-in .4s ease both; }
.rise { animation: rise .5s ease both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  .pop, .fade, .rise { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ---------- glass ---------- */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(20,25,15,.14), inset 0 1px 0 rgba(255,255,255,.55);
}
.glass-dark {
  background: var(--glass-dark);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--glass-dark-border);
  box-shadow: 0 10px 30px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.22);
}
.wine-chip {
  background: var(--wine-glass, rgba(110,43,58,.74));
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 10px 26px rgba(60,10,20,.35), inset 0 1px 0 rgba(255,255,255,.28);
  color: #F2EFEA; border-radius: 22px;
}
.pill {
  display: inline-block; background: var(--olive); color: #FDFDF9;
  font-size: 12px; letter-spacing: .14em; padding: 9px 20px; border-radius: 999px;
  text-transform: uppercase; box-shadow: 0 6px 16px rgba(92,107,76,.4); border: none;
}
.pill.ghost { background: transparent; color: var(--ink); box-shadow: none; border: 1px solid var(--line); }
.btn-quiet { background: none; border: none; color: var(--olive); font-size: 15px; letter-spacing: .06em; }

/* ---------- generic screen ---------- */
.screen { min-height: 100dvh; padding: 24px 22px 120px; position: relative; }
.wordmark { font-size: 26px; letter-spacing: .34em; text-align: center; color: var(--ink); }
.tagline { font-size: 11px; letter-spacing: .3em; color: var(--ink3); text-align: center; margin-top: 6px; text-transform: uppercase; }
.kicker { font-size: 11px; letter-spacing: .3em; color: var(--ink3); text-transform: uppercase; }
.h1 { font-size: 30px; font-weight: normal; line-height: 1.2; margin-top: 6px; }
.lede { font-size: 15px; color: var(--ink2); font-style: italic; margin-top: 8px; line-height: 1.5; }
.back-link { background: none; border: none; font-size: 22px; color: var(--ink); padding: 4px 8px 4px 0; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.muted { color: var(--ink2); font-size: 13px; }
.small-caps { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--ink3); }
.divider { height: 1px; background: var(--line); margin: 22px 0; }

/* ---------- splash ---------- */
.splash { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px; text-align: center; position: relative; }
.splash img.logo { width: 210px; max-width: 70%; margin-bottom: 26px; }
.splash .word { font-size: 44px; letter-spacing: .3em; margin-left: .3em; }
.splash .slogan { margin-top: 18px; font-size: 17px; letter-spacing: .14em; color: var(--ink2); }
.splash .slogan span { display: inline-block; animation: rise .8s ease both; }
.splash .free { margin-top: 34px; font-size: 13.5px; line-height: 1.6; color: var(--ink2); max-width: 320px; }
.splash .enter { margin-top: 30px; }
.splash .copy { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; font-size: 11px; color: var(--ink3); font-family: -apple-system, sans-serif; }

/* ---------- home ---------- */
.tile { position: relative; border-radius: 30px; overflow: hidden; margin-top: 20px; box-shadow: var(--shadow); cursor: pointer; border: none; display: block; width: 100%; padding: 0; text-align: left; background: var(--bg2); }
.tile img { display: block; width: 100%; object-fit: cover; }
.tile.hero img { height: 330px; }
.tile.small img { height: 140px; }
.tile .chip { position: absolute; left: 14px; right: 14px; bottom: 14px; border-radius: 22px; padding: 14px 16px 13px; color: var(--ink); }
.tile .chip .t { font-size: 19px; }
.tile .chip .s { font-size: 11px; letter-spacing: .12em; color: var(--ink2); margin-top: 3px; text-transform: uppercase; }
.tile .chip .row2 { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.tile .chip .mins { font-size: 13px; color: var(--ink2); }
.tile .tag { position: absolute; top: 14px; left: 14px; border-radius: 999px; padding: 7px 14px; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: #FDFDF9; background: rgba(28,30,24,.45); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.35); }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; width: min(448px, calc(100% - 32px));
  height: 66px; border-radius: 34px; display: flex; align-items: center; justify-content: space-around;
  padding: 0 10px; z-index: 40;
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; letter-spacing: .06em; color: var(--ink2); background: none; border: none; min-width: 64px; }
.tab.active { color: var(--olive); font-weight: bold; }
.tab .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--olive); }

/* ---------- ritual detail ---------- */
.detail-cover { border-radius: 28px; overflow: hidden; margin-top: 18px; box-shadow: var(--shadow); position: relative; }
.detail-cover img { display: block; width: 100%; height: 300px; object-fit: cover; }
.detail-cover .wine-chip { position: absolute; left: 14px; right: 14px; bottom: 14px; padding: 14px 16px; }
.detail-cover .wine-chip .t { font-size: 21px; }
.detail-cover .wine-chip .s { font-size: 12px; letter-spacing: .14em; margin-top: 3px; opacity: .92; text-transform: uppercase; }
.fact-row { display: flex; gap: 18px; margin-top: 16px; font-size: 13px; color: var(--ink2); }
.fact-row b { color: var(--ink); font-weight: normal; }
.credit { font-size: 11.5px; color: var(--ink3); margin-top: 14px; line-height: 1.5; }

/* ---------- player: immersive — artwork ~90% of the screen, framed, zoomable ---------- */
.player { position: fixed; inset: 0; max-width: 480px; margin: 0 auto; background: var(--bg); z-index: 60; overflow: hidden; display: flex; flex-direction: column; }
.player .art-wrap { position: relative; flex: 1; min-height: 0; margin: 6px 14px 18px; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); touch-action: pinch-zoom; }
.player img.full { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: fade-in .9s ease both; }
.player .top { position: relative; z-index: 5; display: flex; align-items: center; gap: 12px; padding: calc(14px + env(safe-area-inset-top)) 16px 4px; color: var(--ink); }
.player .back { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--ink); font-size: 20px; border: none; flex-shrink: 0; }
.player .ritual-name { color: var(--muted); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player .caption { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 5; }
.player .caption .wine-chip { padding: 18px 20px 16px; }
.player .caption .wine-chip .work { font-size: 25px; line-height: 1.15; }
.player .caption .wine-chip .artist { font-size: 14px; margin-top: 4px; opacity: .94; font-style: italic; }
.player .caption .micro { margin-top: 12px; color: #fff; font-size: 14px; text-shadow: 0 1px 8px rgba(0,0,0,.6); font-style: italic; }
.player .progress { margin-top: 16px; }
.player .progress .track { height: 5px; border-radius: 3px; background: rgba(255,255,255,.35); overflow: hidden; }
.player .progress .fill { height: 100%; border-radius: 3px; background: #F2EFEA; transition: width .5s linear; }
.player .progress .lbl { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .14em; margin-top: 7px; color: rgba(255,255,255,.92); text-transform: uppercase; }
.player .next { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); z-index: 6; width: 44px; height: 44px; border-radius: 50%; color: #fff; font-size: 22px; border: none; }
.player .pause-page { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg); color: var(--ink); text-align: center; padding: 40px; animation: fade-in .9s ease both; }
.player .pause-page .big { font-size: 30px; font-style: italic; }
.player .pause-page .sub { margin-top: 12px; font-size: 14px; color: var(--ink2); }
.player .pause-page .dawn-word { font-size: 40px; letter-spacing: .22em; margin-left: .22em; }
.player .pause-page .dot-only { font-size: 30px; color: var(--ink3); }

/* ---------- closing / state card ---------- */
.state-card { margin-top: 18px; width: 100%; background: var(--bg2); border-radius: 8px; padding: 22px 22px 18px; text-align: center; box-shadow: var(--shadow); }
.state-card img { width: 100%; height: 218px; object-fit: cover; display: block; border-radius: 3px; }
.state-card .headline { font-size: 34px; margin-top: 18px; }
.state-card .after { font-size: 13px; color: var(--ink2); margin-top: 8px; font-style: italic; }
.state-card .level { font-size: 11px; letter-spacing: .3em; color: var(--olive); margin-top: 12px; text-transform: uppercase; }
.state-card .close-line { font-size: 12.5px; color: var(--ink3); margin-top: 14px; font-style: italic; }
.glass-strip { margin-top: 18px; width: 100%; border-radius: 22px; padding: 13px 8px; display: flex; justify-content: space-around; text-align: center; }
.glass-strip .v { font-size: 16px; }
.glass-strip .k { font-size: 9.5px; letter-spacing: .2em; color: var(--ink2); text-transform: uppercase; margin-top: 2px; }
.share-row { display: flex; gap: 14px; margin-top: 20px; justify-content: center; }
.share-btn { width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10.5px; color: var(--ink); text-align: center; line-height: 1.15; border: none; padding: 4px; }
.card-preview { border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); margin-top: 16px; }
.card-preview img { display: block; width: 100%; }

/* ---------- list rows (Me / Entradas / settings) ---------- */
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: 22px; padding: 16px 18px; margin-top: 12px; }
.row-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 2px; border-bottom: 1px solid var(--line); cursor: pointer; background: none; border-top: none; border-left: none; border-right: none; width: 100%; text-align: left; font-size: 15.5px; color: var(--ink); }
.row-item:last-child { border-bottom: none; }
.row-item .sub { font-size: 12.5px; color: var(--ink2); margin-top: 2px; }
.row-item .chev { color: var(--ink3); font-size: 18px; }
.seg { display: flex; gap: 8px; margin-top: 12px; }
.seg button { flex: 1; padding: 11px 0; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 14px; }
.seg button.on { background: var(--olive); color: #FDFDF9; border-color: var(--olive); }
.track-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.track-row:last-child { border-bottom: none; }
.track-row .tt { font-size: 14.5px; }
.track-row .ta { font-size: 12px; color: var(--ink2); margin-top: 2px; }
.track-row .pick { font-size: 12px; letter-spacing: .1em; color: var(--olive); text-transform: uppercase; }
input[type=email], input[type=text], input[type=tel] {
  width: 100%; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--bg2); color: var(--ink); font-family: var(--serif); font-size: 15px; margin-top: 10px;
}
.switch { position: relative; width: 52px; height: 30px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .sl { position: absolute; inset: 0; border-radius: 999px; background: rgba(38,38,34,.25); transition: .25s; cursor: pointer; }
.switch .sl:before { content: ""; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; border-radius: 50%; background: #FDFDF9; transition: .25s; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.switch input:checked + .sl { background: var(--olive); }
.switch input:checked + .sl:before { transform: translateX(22px); }
.notice { margin-top: 14px; padding: 13px 15px; border-radius: 16px; background: var(--bg2); border: 1px solid var(--line); font-size: 13.5px; line-height: 1.55; color: var(--ink2); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 104px; z-index: 90; background: rgba(28,30,24,.85); color: #F2EFEA; padding: 11px 20px; border-radius: 999px; font-size: 13.5px; animation: rise .3s ease both; max-width: 86%; text-align: center; }
.hidden { display: none !important; }
.center { text-align: center; }
.mt16 { margin-top: 16px; } .mt22 { margin-top: 22px; } .mt28 { margin-top: 28px; }
.w100 { width: 100%; }

/* ---------- glass fallbacks (solid surfaces when backdrop-filter is missing) ---------- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(253,253,249,.96); }
  .glass-dark { background: rgba(20,25,15,.82); }
  .wine-chip { background: var(--wine); }
  body.veille .glass { background: rgba(64,81,59,.97); }
  body.veille .glass-dark { background: rgba(20,26,16,.88); }
}

/* ---------- player: immersive (confirmed) — only a thin progress line, no text ---------- */
.progress-line { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.22); z-index: 6; }
.progress-line .fill { height: 100%; background: #F2EFEA; transition: width .5s linear; }

/* ---------- share screen: icon + label actions, invite block ---------- */
.share-row { display: flex; justify-content: space-between; gap: 6px; margin-top: 22px; }
.share-act { display: flex; flex-direction: column; align-items: center; gap: 8px; background: none; border: none; padding: 0; cursor: pointer; font-family: var(--serif); color: var(--ink); flex: 1; }
.share-act .ic {
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--glass-bg); border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
}
.share-act .ic svg { width: 26px; height: 26px; stroke: var(--ink); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.share-act .lb { font-size: 12.5px; letter-spacing: .03em; text-align: center; line-height: 1.25; }
.share-act.accent .ic { background: var(--wine-glass, rgba(88,17,26,.88)); border-color: rgba(255,255,255,.28); }
.share-act.accent .ic svg { stroke: #F2EFEA; }
.share-act.accent .lb { color: var(--wine); font-weight: 600; }
.invite-card { margin-top: 22px; padding: 18px 20px; border-radius: 22px; display: flex; gap: 14px; align-items: flex-start; text-align: left; }
.invite-card .t { font-size: 20px; color: var(--wine); line-height: 1.25; }
.invite-card .s { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin-top: 4px; }
.invite-card .chev { margin-left: auto; font-size: 22px; color: var(--muted); align-self: center; }

/* ---------- oxblood primary action ---------- */
.pill.wine { background: var(--wine); }

/* ---------- pending artwork (rights not yet cleared) ---------- */
.pending-art { position: absolute; inset: 0; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; gap: 10px; }
.pending-art .pt { font-size: 26px; line-height: 1.25; }
.pending-art .pa { font-size: 14px; font-style: italic; color: var(--muted); }
.pending-art .pn { font-size: 12px; letter-spacing: .08em; color: var(--olive); text-transform: uppercase; margin-top: 12px; }
