/* Shell */
#view { max-width: 640px; margin: 0 auto; padding-bottom: 32px; min-height: 100dvh; }
.has-tabs #view { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
.tabbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 10; display: flex; justify-content: center; gap: min(18vw, 120px); padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); border-top: .5px solid var(--divider); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 64px; font-size: 11px; font-weight: 500; color: var(--text-2); }
.tab[aria-current="page"] { color: var(--accent); }
.tab__icon { position: relative; line-height: 0; }
.tab__badge { position: absolute; top: -4px; inset-inline-start: 62%; min-width: 17px; padding: 0 5px; height: 17px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 17px; text-align: center; }
.toast { position: fixed; inset-inline: 0; bottom: 96px; margin-inline: auto; width: max-content; max-width: 90%; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: var(--r-btn); font-size: 15px; z-index: 30; } .toast:empty { display: none; }

/* Home */
.hero { position: relative; display: flex; align-items: center; gap: 16px; margin: 24px var(--screen) 0; padding: 18px; border-radius: 22px; overflow: hidden; background: var(--tint); animation: rise .45s var(--spring) both; }
.hero > * { position: relative; } .hero > .art { position: absolute; }
.hero__n { display: flex; flex-direction: column; align-items: center; min-width: 72px; } .hero__n b { font-size: 48px; line-height: 52px; } .hero__n small { font-size: 13px; color: var(--text-2); }
.hero__kicker { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-2); }
.hero h2 { font-size: 22px; font-weight: 600; line-height: 1.2; margin-top: 2px; } .hero p { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.section { animation: rise .45s var(--spring) both; } .section:nth-of-type(2) { animation-delay: .08s; } .section:nth-of-type(3) { animation-delay: .15s; }
.tiles { display: flex; gap: 12px; overflow-x: auto; padding: 0 var(--screen); scroll-snap-type: x proximity; scrollbar-width: none; }
.inst { flex: none; width: 148px; height: 148px; padding: 14px; border-radius: 22px; background: var(--surface); display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; text-align: start; scroll-snap-align: start; transition: transform .2s var(--spring); }
.inst:active { transform: scale(.96); } .inst b { display: block; font-size: 16px; line-height: 19px; font-weight: 600; } .inst small { display: block; font-size: 13px; color: var(--text-2); margin-top: 2px; }
.weekend { margin: 0 var(--screen); background: var(--surface); border: 1px solid var(--divider); border-radius: 18px; }
.day { display: flex; } .day + .day { border-top: .5px solid var(--divider); }
.day__label { width: 70px; padding: 12px; font-size: 13px; color: var(--text-2); border-inline-end: .5px solid var(--divider); flex: none; }
.day__body { flex: 1; min-width: 0; padding: 10px 12px; } .day__body a { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.center { text-align: center; } .section + .center { margin-top: 24px; }

/* Discover */
.offline { text-align: center; color: var(--text-2); font-size: 13px; padding-top: 8px; }
.deck-wrap { max-width: 440px; margin: 16px auto 20px; padding: 0 var(--screen); height: clamp(430px, calc(100dvh - 340px), 580px); }
.deck { position: relative; height: 100%; touch-action: pan-y; user-select: none; -webkit-user-select: none; outline-offset: 6px; border-radius: var(--r-card); --p: 0; }
.layer { position: absolute; inset: 0; transform-origin: 50% 100%; }
.layer:not(.layer--top) { transform: translateY(calc(14px * (1 - var(--p)))) scale(calc(.95 + .05 * var(--p))); pointer-events: none; }
.layer--top { cursor: grab; touch-action: pan-y; } .layer--top:active { cursor: grabbing; }
.layer--enter { animation: fly-in .45s var(--spring) both; }
.stamp { position: absolute; top: 28px; padding: 4px 12px; border: 2px solid; border-radius: 10px; background: var(--surface); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; pointer-events: none; }
.stamp--save { inset-inline-start: 20px; color: var(--accent); border-color: var(--accent); opacity: var(--save, 0); }
.stamp--skip { inset-inline-end: 20px; color: var(--text-2); border-color: var(--text-2); opacity: var(--skip, 0); }
.actions { display: flex; justify-content: center; align-items: center; gap: 24px; padding-bottom: 16px; }
.round { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--divider); transition: transform .2s var(--spring); }
.round:active:not(:disabled) { transform: scale(.88); } .round:disabled { color: var(--divider); }
.round--big { width: 64px; height: 64px; } .round--accent { background: var(--accent); border: 0; color: #fff; }
.deck-skeleton { max-width: 400px; height: 420px; margin: 24px auto; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--divider); }
.flight { position: fixed; z-index: 40; inset-inline-start: calc(50% - 22px); top: 38%; font-size: 44px; color: var(--accent); pointer-events: none; animation: flight .52s cubic-bezier(.5, 0, .9, .6) forwards; }

/* The card */
.card { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r-card); }
.card > :not(.art) { position: relative; } .card .art { background: transparent; }
.card__glyph { position: absolute !important; inset-inline-end: 14px; top: 62px; line-height: 0; color: color-mix(in srgb, var(--text) 6%, transparent); }
.card__head { flex: none; }
.card__top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-2); }
.card__kind { text-transform: uppercase; letter-spacing: 1px; font-weight: 700; } .card__rel { font-weight: 600; }
.card__hero { margin-top: 16px; } .card__hero-label { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; color: var(--text-2); margin-bottom: 2px; }
.card__hero-row { display: flex; align-items: center; gap: 10px; }
.card__day { font-size: 64px; line-height: 68px; font-weight: 700; letter-spacing: -1px; }
.card__month { display: block; font-size: 20px; text-transform: uppercase; letter-spacing: 1px; } .card__weekday { display: block; font-size: 16px; color: var(--text-2); }
.card__title { margin-top: 16px; font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: .2px; display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card--big .card__title { font-size: 38px; line-height: 44px; }
.card__org { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 16px; color: var(--text-2); } .card__org span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__recap { flex: 1 1 0; min-height: 0; overflow: hidden; padding-top: 14px; } .card__recap .hl { font-size: 15px; line-height: 21px; }
.card--no-recap .card__recap { visibility: hidden; }
.card__foot { flex: none; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.card__foot .facts { background: var(--bg); border-radius: 14px; padding: 0 12px; } .card__foot .info + .info { border-top: .5px solid var(--divider); }

/* Detail */
.bar { display: flex; align-items: center; gap: 24px; padding: 14px var(--screen) 8px; }
.detail { padding: 8px var(--screen) 140px; }
.cover { position: relative; height: 190px; border-radius: var(--r-card); overflow: hidden; background: var(--tint); margin-bottom: 16px; } .cover img { width: 100%; height: 100%; object-fit: cover; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-2); }
.detail h1 { font-size: 34px; line-height: 40px; font-weight: 700; letter-spacing: .2px; margin: 8px 0; }
.org { display: flex; align-items: center; gap: 10px; color: var(--text-2); } .closes { margin-top: 16px; font-weight: 600; color: var(--accent); }
.panel { margin-top: 24px; padding: 0 16px; background: var(--surface); border: 1px solid var(--divider); border-radius: 16px; } .panel .info + .info { border-top: .5px solid var(--divider); }
.again { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding: 16px; background: var(--surface); border: 1px solid var(--divider); border-radius: 16px; }
.again small { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; color: var(--text-2); } .again b { font-weight: 600; }
.detail section { margin-top: 24px; } .detail section > p { margin-top: 4px; }
.h { font-size: 17px; font-weight: 600; } .h--big { font-size: 24px; }
.detail .chips { margin-top: 8px; } .fact { margin-top: 8px; } .fact small { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; color: var(--text-2); }
.footer-bar { position: fixed; inset-inline: 0; bottom: 0; z-index: 10; padding: 16px var(--screen) calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
.footer-bar > * { max-width: 600px; margin: 0 auto; }

/* Filters sheet */
dialog { border: 0; padding: 0; width: min(520px, 100%); max-height: min(88dvh, 760px); margin: auto; background: var(--bg); color: var(--text); border-radius: 24px; overflow: hidden; }
dialog[open] { display: flex; } dialog::backdrop { background: rgb(0 0 0 / .4); }
@media (max-width: 560px) { dialog { margin: auto 0 0; border-radius: 24px 24px 0 0; } }
.sheet { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 8px; } .sheet__head h2 { font-size: 28px; font-weight: 600; }
.sheet__body { flex: 1; overflow: auto; padding: 0 20px 24px; } .sheet__foot { padding: 20px; }
.label { margin: 24px 0 8px; font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-2); }
.switch-row { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; } .switch-row + .switch-row { margin-top: 16px; }
.switch { width: 51px; height: 31px; border-radius: 16px; background: var(--divider); position: relative; transition: background .2s; }
.switch i { position: absolute; top: 2px; inset-inline-start: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; transition: transform .25s var(--spring); box-shadow: 0 1px 3px rgb(0 0 0 / .3); }
.switch[aria-checked="true"] { background: var(--accent); } .switch[aria-checked="true"] i { transform: translateX(20px); } [dir="rtl"] .switch[aria-checked="true"] i { transform: translateX(-20px); }

/* Onboarding */
.onboarding { min-height: 100dvh; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; padding: 24px var(--screen); }
.onboarding__lang { display: flex; justify-content: flex-end; }
.onboarding__main { flex: 1; padding-top: 40px; animation: rise .35s ease both; } .onboarding h1 { font-size: 34px; line-height: 40px; font-weight: 700; margin-top: 8px; } .lead { margin: 8px 0 24px; }
.onboarding__foot { padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fly-in { from { transform: translateX(calc(var(--from) * 120%)) rotate(calc(var(--from) * 11deg)); } to { transform: none; } }
@keyframes flight { 0% { transform: scale(1.3); opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(58vh) scale(.5); opacity: 0; } }

.foot { text-align: center; margin: 32px var(--screen) 0; } .foot a { text-decoration: underline; }

/* Login + account */
.login .onboarding__main { padding-top: 56px; }
.login__form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-2); }
.field input { font: inherit; font-size: 17px; letter-spacing: 0; text-transform: none; font-weight: 400; color: var(--text); background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r-btn); padding: 15px 16px; width: 100%; }
.field input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.field__error { color: var(--accent); font-size: 15px; font-weight: 600; }
.primary-btn:disabled { opacity: .6; }
.login__or { display: flex; align-items: center; gap: 12px; margin: 20px 0; font-size: 15px; } .login__or::before, .login__or::after { content: ""; flex: 1; height: .5px; background: var(--divider); }
.login__social { display: flex; flex-direction: column; gap: 12px; }
.social-btn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 52px; border-radius: var(--r-btn); border: 1px solid var(--divider); background: var(--surface); font-size: 17px; font-weight: 600; }
.social-btn--apple { background: #000; border-color: #000; color: #fff; }
@media (prefers-color-scheme: dark) { .social-btn--apple { background: #fff; border-color: #fff; color: #000; } }
.sheet__foot--stack { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.danger-btn { width: 100%; height: 56px; border-radius: var(--r-btn); background: var(--accent); color: #fff; font-size: 18px; font-weight: 700; }
.text-btn.danger { color: var(--accent); }
.code-input { font-size: 30px !important; letter-spacing: 10px !important; text-align: center; font-variant-numeric: tabular-nums; }
