@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/bricolage.woff2') format('woff2');
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f2f2f7;
  --card: #ffffff;
  --fill: rgba(118, 118, 128, 0.12);
  --fill2: rgba(118, 118, 128, 0.08);
  --label: #000000;
  --label2: rgba(60, 60, 67, 0.6);
  --label3: rgba(60, 60, 67, 0.3);
  --sep: rgba(60, 60, 67, 0.18);
  --blue: #007aff;
  --green: #34c759;
  --green-d: #248a3d;
  --orange: #ff9500;
  --orange-d: #c93400;
  --red: #ff3b30;
  --yellow: #ffcc00;
  --display: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, 'Segoe UI', Roboto, sans-serif;
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --sl: env(safe-area-inset-left, 0px);
  --sr: env(safe-area-inset-right, 0px);
  --tabbar: calc(56px + var(--sb));
}

* { box-sizing: border-box; }
html, body { overscroll-behavior-y: none; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--label);
  font: 17px/1.35 var(--text); letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a { color: var(--blue); text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
:focus-visible { outline: 3px solid rgba(0, 122, 255, 0.5); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- pantalla ---------- */
#app { transition: transform .38s cubic-bezier(.2, .8, .2, 1), border-radius .38s, filter .38s; transform-origin: 50% 0; min-height: 100dvh; background: var(--bg); }
html.sheet-open { background: #000; }
html.sheet-open #app { transform: scale(0.93) translateY(calc(var(--st) + 10px)); border-radius: 14px; overflow: hidden; filter: brightness(.92); }

.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  padding: calc(var(--st) + 4px) calc(16px + var(--sr)) 4px calc(16px + var(--sl));
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: calc(var(--st) + 52px);
  transition: background .2s, box-shadow .2s;
}
.scrolled .navbar { background: rgba(249, 249, 249, 0.82); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 .5px 0 var(--sep); }
.navbar .small-title { font-weight: 600; font-size: 17px; opacity: 0; transition: opacity .2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56vw; text-align: center; }
.scrolled .navbar .small-title { opacity: 1; }
.navbar .left { justify-self: start; }
.navbar .right { justify-self: end; }
.nav-btn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--blue); font-size: 17px; padding: 6px 0; min-height: 44px; }
.nav-btn svg { width: 22px; height: 22px; }
.me-btn { border: 0; background: none; padding: 0; min-height: 44px; display: flex; align-items: center; }

.view { padding: calc(var(--st) + 54px) calc(16px + var(--sr)) calc(var(--tabbar) + 32px) calc(16px + var(--sl)); max-width: 720px; margin: 0 auto; }
.view.no-tabs { padding-bottom: calc(var(--sb) + 40px); }
.view.enter { animation: viewIn .32s cubic-bezier(.2, .8, .2, 1); }
.view.enter.from-left { animation-name: viewInL; }
@keyframes viewIn { from { opacity: 0; transform: translateX(26px); } }
@keyframes viewInL { from { opacity: 0; transform: translateX(-26px); } }
.large-title { font-size: 36px; margin: 2px 0 4px; word-break: break-word; }
.subtitle { color: var(--label2); font-size: 15px; margin-bottom: 18px; }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 4px 8px; }
.section-head h2 { font-size: 22px; }
.section-head .note, .footnote { color: var(--label2); font-size: 13px; }
.footnote { margin: 8px 16px 0; line-height: 1.4; }

/* ---------- tarjetas y listas ---------- */
.card { background: var(--card); border-radius: 18px; padding: 16px; }
.card + .card { margin-top: 12px; }
.card.hero { padding: 20px; }
.card.tap { cursor: pointer; transition: transform .15s; }
.card.tap:active { transform: scale(.98); }
.list { background: var(--card); border-radius: 14px; overflow: hidden; }
.row-item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 10px 16px;
  background: none; border: 0; text-align: left; position: relative; color: var(--label); font-size: 17px;
}
.row-item + .row-item::before { content: ''; position: absolute; top: 0; right: 0; left: var(--inset, 16px); height: .5px; background: var(--sep); }
.row-item.with-avatar { --inset: 62px; }
.row-item.with-icon { --inset: 58px; }
button.row-item:active, a.row-item:active { background: var(--fill2); }
.row-item .grow { flex: 1; min-width: 0; }
.row-item .sub { color: var(--label2); font-size: 14px; margin-top: 1px; }
.row-item .trail { color: var(--label2); font-size: 16px; display: flex; align-items: center; gap: 6px; flex: none; }
.chev { width: 8px; height: 14px; color: var(--label3); flex: none; }
.icon-sq { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: none; }
.icon-sq svg { width: 19px; height: 19px; }
.row-item.destructive { color: var(--red); justify-content: center; }
.row-item.link-row { color: var(--blue); }

.avatar { --c: #8e8e93; width: 34px; height: 34px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; font: 700 13px/1 var(--display); color: #fff; background: var(--c); background-image: linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, 0)); }
.avatar.lg { width: 44px; height: 44px; font-size: 16px; }
.avatars { display: inline-flex; align-items: center; }
.avatars .avatar { width: 26px; height: 26px; font-size: 10.5px; margin-left: -7px; box-shadow: 0 0 0 2px var(--card); }
.avatars .avatar:first-child { margin-left: 0; }
.avatar.more { background: #d1d1d6; color: #3a3a3c; }
.avatar.ring { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--green); }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--fill); color: var(--label2); }
.pill.green { background: rgba(52, 199, 89, .15); color: var(--green-d); }
.pill.orange { background: rgba(255, 149, 0, .16); color: var(--orange-d); }
.pill.red { background: rgba(255, 59, 48, .13); color: #d70015; }
.pill.blue { background: rgba(0, 122, 255, .12); color: var(--blue); }
.pill.dark { background: #1c1c1e; color: #fff; }
.pill.gray { background: var(--fill); color: var(--label2); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.muted { color: var(--label2); }
.small { font-size: 14px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.big-num { font: 800 34px/1 var(--display); letter-spacing: -0.03em; }
.mid-num { font: 800 24px/1 var(--display); letter-spacing: -0.02em; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 20px;
  border: 0; border-radius: 14px; background: var(--blue); color: #fff; font-size: 17px; font-weight: 600;
  transition: transform .12s, opacity .12s; text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(.97); opacity: .85; }
.btn.block { width: 100%; }
.btn.tinted { background: rgba(0, 122, 255, .12); color: var(--blue); }
.btn.gray { background: var(--fill); color: var(--label); }
.btn.green { background: var(--green); }
.btn.danger { background: rgba(255, 59, 48, .12); color: var(--red); }
.btn.small { min-height: 36px; padding: 7px 14px; font-size: 15px; border-radius: 99px; }
.btn svg { width: 20px; height: 20px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }
.btns > .btn { flex: 1 1 auto; }

/* ---------- formularios ---------- */
.form-list { background: var(--card); border-radius: 14px; overflow: hidden; }
.form-list + .footnote + .form-list, .form-list + .form-list { margin-top: 22px; }
.field { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 4px 16px; position: relative; }
.field + .field::before { content: ''; position: absolute; top: 0; right: 0; left: 16px; height: .5px; background: var(--sep); }
.field > span { flex: none; width: 40%; max-width: 170px; font-size: 16px; }
.field input, .field select, .field textarea { flex: 1; min-width: 0; border: 0; background: none; font-size: 17px; padding: 10px 0; text-align: right; outline: none; }
.field input::placeholder, .field textarea::placeholder { color: var(--label3); }
.field.stacked { flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 16px; }
.field.stacked > span { width: auto; max-width: none; color: var(--label2); font-size: 13px; }
.field.stacked input, .field.stacked textarea { text-align: left; padding: 4px 0; }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.4; }
.field input[type=date] { -webkit-appearance: none; appearance: none; min-height: 36px; color: var(--blue); }
.field select { -webkit-appearance: none; appearance: none; color: var(--blue); text-align-last: right; }
.switch { position: relative; width: 51px; height: 31px; flex: none; margin-left: auto; }
.switch input { opacity: 0; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: #e9e9eb; transition: background .2s; }
.switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .16); transition: transform .2s; }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(20px); }
.flight-row { display: grid; grid-template-columns: 58px 1fr 1.25fr 30px; gap: 8px; align-items: center; padding: 8px 12px 8px 16px; position: relative; }
.flight-row + .flight-row::before { content: ''; position: absolute; top: 0; right: 0; left: 16px; height: .5px; background: var(--sep); }
.flight-row input, .flight-row select { border: 0; background: var(--fill2); border-radius: 8px; padding: 9px 8px; font-size: 16px; min-width: 0; width: 100%; -webkit-appearance: none; appearance: none; }
.months-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; padding: 10px 12px 12px; }
.months-pick .chip { padding: 8px 0; text-align: center; background: var(--fill2); }
.months-pick .chip.on { background: var(--blue); color: #fff; }

/* ---------- control segmentado ---------- */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--fill); border-radius: 10px; padding: 2px; }
.seg button { border: 0; background: none; padding: 7px 8px; border-radius: 8px; font-size: 14px; font-weight: 500; min-height: 34px; transition: background .2s, box-shadow .2s; }
.seg button.on { background: #fff; font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); }

/* ---------- barra de pestañas ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: var(--tabbar);
  display: flex; justify-content: center; padding: 0 var(--sr) var(--sb) var(--sl);
  background: rgba(249, 249, 249, .86); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 -.5px 0 var(--sep);
}
.tabbar button { flex: 1; max-width: 160px; border: 0; background: none; color: #8e8e93; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10.5px; font-weight: 500; position: relative; padding-top: 2px; }
.tabbar button svg { width: 27px; height: 27px; }
.tabbar button.on { color: var(--blue); }
.tabbar .badge { position: absolute; top: 3px; left: calc(50% + 7px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--red); color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center; padding: 0 5px; }

/* ---------- calendario ---------- */
.cal { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.brushes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.brush { border: 0; border-radius: 14px; background: var(--card); padding: 10px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--label2); transition: transform .12s, box-shadow .12s; min-height: 64px; }
.brush i { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-style: normal; font-size: 14px; font-weight: 700; color: #fff; }
.brush.on { box-shadow: 0 0 0 2.5px var(--blue); color: var(--label); }
.brush:active { transform: scale(.95); }
.hscroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.hscroll::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 0; background: var(--card); border-radius: 99px; padding: 8px 14px; font-size: 14px; font-weight: 500; min-height: 36px; }
.chip:active { background: #e5e5ea; }
.chip.on { background: var(--blue); color: #fff; }
.hint { font-size: 13.5px; color: var(--label2); margin: 10px 4px 0; line-height: 1.4; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--label2); margin: 10px 4px 0; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.legend i.dot { width: 7px; height: 7px; border-radius: 50%; }

.month { margin-top: 22px; }
.month h3 { font-size: 21px; margin: 0 4px 8px; text-transform: capitalize; }
.wk, .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.wk span { text-align: center; font-size: 12px; font-weight: 600; color: var(--label2); padding-bottom: 2px; }
.d {
  aspect-ratio: 1; border-radius: 12px; border: 0; background: var(--card); padding: 0; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font: 600 16px/1 var(--text); color: var(--label); transition: transform .1s;
}
.d:active { transform: scale(.92); }
.d.off { background: none; color: var(--label3); font-weight: 400; }
.d.blank { visibility: hidden; }
.d.we { background: #f9f9fb; color: #48484a; }
.d.fest { color: var(--red); }
.d.today::before { content: ''; position: absolute; top: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--blue); }
.d .mk { position: absolute; bottom: 4px; display: flex; gap: 2px; }
.d .mk b { width: 5px; height: 5px; border-radius: 50%; background: var(--red); }
.d .mk b.p { background: var(--orange); }
.d .mk b.t { background: transparent; box-shadow: inset 0 0 0 1px var(--red); }
.d.s1 { background: rgba(52, 199, 89, .24); color: var(--green-d); }
.d.s3 { background: var(--green); color: #fff; }
.d.s3::after { content: '★'; position: absolute; top: 3px; right: 4px; font-size: 9px; }
.d.s2 { background: rgba(255, 204, 0, .35); color: #7a5800; }
.d.s3 .mk b { background: #fff; }
.d.anchor { box-shadow: 0 0 0 2.5px var(--blue); }
.d.fixed { box-shadow: inset 0 0 0 2.5px var(--blue); }
.d.hl { box-shadow: inset 0 0 0 2.5px var(--orange); }
.d .n { font-size: 10px; font-weight: 600; opacity: .9; }
.d.hot { color: #fff; }

.window { display: flex; gap: 12px; align-items: flex-start; }
.rank-badge { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 800 15px/1 var(--display); background: var(--fill); flex: none; }
.rank-badge.gold { background: #ffd60a; color: #5c4400; }
.bar { height: 6px; border-radius: 99px; background: var(--fill); overflow: hidden; display: flex; margin: 7px 0 5px; }
.bar i { height: 100%; }
.bar .b1 { background: var(--green); }
.bar .b2 { background: var(--yellow); }

/* ---------- destinos ---------- */
.dest-card { background: var(--card); border-radius: 20px; overflow: hidden; }
.dest-card + .dest-card { margin-top: 14px; }
.dest-top { padding: 18px 18px 14px; cursor: pointer; }
.dest-top h2 { font-size: 27px; }
.dest-card.winner { box-shadow: 0 0 0 3px var(--blue); }
.vote-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 12px 12px; }
.vote-bar button { border: 0; border-radius: 12px; background: var(--fill2); padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 12.5px; font-weight: 600; color: var(--label2); min-height: 54px; transition: transform .12s; }
.vote-bar button:active { transform: scale(.95); }
.vote-bar button b { font: 800 18px/1.1 var(--display); color: var(--label); }
.vote-bar button.on[data-v="2"] { background: rgba(255, 45, 85, .14); color: #d30f45; }
.vote-bar button.on[data-v="1"] { background: rgba(52, 199, 89, .16); color: var(--green-d); }
.vote-bar button.on[data-v="-1"] { background: rgba(60, 60, 67, .16); color: var(--label); }
.vote-bar button[disabled] { opacity: .6; cursor: default; }
ol.itin { list-style: none; padding: 0; margin: 0; counter-reset: d; }
ol.itin li { counter-increment: d; display: flex; align-items: center; gap: 12px; padding: 10px 16px; position: relative; font-size: 16px; }
ol.itin li + li::before { content: ''; position: absolute; top: 0; right: 0; left: 62px; height: .5px; background: var(--sep); }
ol.itin li::after { content: counter(d); order: -1; flex: none; width: 34px; height: 34px; border-radius: 10px; background: rgba(0, 122, 255, .1); color: var(--blue); display: grid; place-items: center; font: 800 15px/1 var(--display); }

/* votar deslizando */
.swipe-deck { position: relative; height: min(58dvh, 520px); margin-top: 8px; }
.swipe-card { position: absolute; inset: 0; background: var(--card); border-radius: 26px; padding: 22px; box-shadow: 0 12px 40px rgba(0, 0, 0, .12); display: flex; flex-direction: column; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; overflow: hidden; }
.swipe-card:nth-last-child(2) { transform: scale(.95) translateY(14px); opacity: .7; }
.swipe-card:nth-last-child(n+3) { opacity: 0; }
.swipe-card h2 { font-size: 36px; }
.swipe-card .itin-mini { color: var(--label2); font-size: 15px; line-height: 1.45; margin-top: 14px; flex: 1; overflow: hidden; }
.stamp { position: absolute; top: 26px; padding: 6px 14px; border: 4px solid; border-radius: 12px; font: 800 24px/1 var(--display); text-transform: uppercase; opacity: 0; transition: opacity .1s; transform: rotate(-12deg); background: rgba(255, 255, 255, .85); }
.stamp.love { left: 18px; color: #ff2d55; }
.stamp.pass { right: 18px; color: #8e8e93; transform: rotate(12deg); }
.stamp.ok { left: 50%; top: auto; bottom: 26px; transform: translateX(-50%); color: var(--green); }
.stamp.show { opacity: 1; }
.swipe-actions { display: flex; justify-content: center; align-items: center; gap: 22px; margin-top: 22px; }
.round { width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--card); box-shadow: 0 6px 20px rgba(0, 0, 0, .1); display: grid; place-items: center; font-size: 26px; transition: transform .12s; }
.round.sm { width: 52px; height: 52px; font-size: 20px; }
.round:active { transform: scale(.9); }
.round svg { width: 28px; height: 28px; }

/* ---------- PIN ---------- */
.pin-dots { display: flex; justify-content: center; gap: 16px; margin: 22px 0 26px; min-height: 16px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--label); transition: background .1s; }
.pin-dots i.on { background: var(--label); }
.pin-dots.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px 24px; justify-content: center; }
.keypad button { width: 76px; height: 76px; border-radius: 50%; border: 0; background: var(--card); font: 400 32px/1 var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.keypad button:active { background: #d1d1d6; }
.keypad button.txt { background: none; font-size: 17px; color: var(--blue); }

/* ---------- hojas y diálogos ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-wrap .dim { position: absolute; inset: 0; background: rgba(0, 0, 0, .25); animation: fade .3s; transition: opacity .25s; }
.sheet-wrap.closing .dim { opacity: 0; }
.sheet {
  position: relative; width: 100%; max-width: 720px; max-height: calc(100dvh - var(--st) - 12px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); border-radius: 14px 14px 0 0; padding: 0 calc(16px + var(--sr)) calc(var(--sb) + 28px) calc(16px + var(--sl));
  animation: sheetUp .42s cubic-bezier(.2, .9, .25, 1); transition: transform .3s cubic-bezier(.2, .9, .25, 1);
}
.sheet.full { height: calc(100dvh - var(--st) - 12px); }
.sheet-wrap.closing .sheet { transform: translateY(105%) !important; }
.sheet-top { position: sticky; top: 0; z-index: 3; margin: 0 -16px 6px; padding: 6px 16px 8px; background: var(--bg); }
.grabber { width: 36px; height: 5px; border-radius: 3px; background: #c7c7cc; margin: 0 auto 8px; }
.sheet-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 36px; gap: 8px; }
.sheet-head h2 { font: 600 17px/1.2 var(--text); letter-spacing: -0.01em; text-align: center; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-head .l { justify-self: start; }
.sheet-head .r { justify-self: end; }
.close-x { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--fill); color: var(--label2); display: grid; place-items: center; }
.close-x svg { width: 12px; height: 12px; }
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

.action-sheet { position: relative; width: 100%; max-width: 520px; padding: 0 10px calc(var(--sb) + 10px); animation: sheetUp .35s cubic-bezier(.2, .9, .25, 1); transition: transform .25s; }
.sheet-wrap.closing .action-sheet { transform: translateY(110%); }
.action-sheet .group { background: rgba(249, 249, 249, .94); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-radius: 14px; overflow: hidden; }
.action-sheet .msg { padding: 14px 16px; text-align: center; font-size: 13px; color: var(--label2); }
.action-sheet .msg b { display: block; font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.action-sheet button { display: block; width: 100%; border: 0; background: none; min-height: 57px; font-size: 20px; color: var(--blue); border-top: .5px solid var(--sep); }
.action-sheet .msg + button, .action-sheet .group > button:first-child { border-top: .5px solid var(--sep); }
.action-sheet .group > button:first-child:not(.after-msg) { border-top: 0; }
.action-sheet button.destructive { color: var(--red); }
.action-sheet button.cancel { margin-top: 8px; background: #fff; border-radius: 14px; font-weight: 600; border: 0; }
.action-sheet button:active { background: rgba(0, 0, 0, .06); }

.hud {
  position: fixed; left: 50%; top: calc(var(--st) + 10px); z-index: 120; transform: translateX(-50%);
  background: rgba(28, 28, 30, .94); color: #fff; padding: 11px 18px; border-radius: 99px; font-size: 15px; font-weight: 500;
  display: flex; align-items: center; gap: 12px; max-width: calc(100% - 24px); box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
  animation: hudIn .45s cubic-bezier(.2, .9, .25, 1.2);
}
.hud.err { background: rgba(215, 0, 21, .94); }
.hud button { border: 0; background: rgba(255, 255, 255, .2); color: #fff; border-radius: 99px; padding: 5px 12px; font-weight: 600; font-size: 14px; }
@keyframes hudIn { from { transform: translate(-50%, -30px) scale(.9); opacity: 0; } }
.ptr { position: fixed; top: calc(var(--st) + 14px); left: 50%; z-index: 40; width: 28px; height: 28px; transform: translate(-50%, 0); opacity: 0; color: var(--label2); pointer-events: none; }
.ptr.spin { opacity: 1 !important; animation: spin .8s linear infinite; }
@keyframes spin { from { transform: translate(-50%, 50px) rotate(0); } to { transform: translate(-50%, 50px) rotate(360deg); } }
.offline-pill { position: fixed; top: calc(var(--st) + 54px); left: 50%; transform: translateX(-50%); z-index: 35; }

.empty { text-align: center; padding: 36px 20px; color: var(--label2); }
.empty .big { font-size: 44px; margin-bottom: 6px; }
.share-url { font: 500 14px/1.3 ui-monospace, Menlo, monospace; color: var(--label2); word-break: break-all; background: var(--fill2); padding: 10px 12px; border-radius: 10px; }
.todo { display: flex; align-items: center; gap: 12px; }
.todo .check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--label3); flex: none; display: grid; place-items: center; color: #fff; }
.todo .check svg { width: 14px; height: 14px; }
.todo.done .check { background: var(--green); border-color: var(--green); }
.todo.done .t { color: var(--label2); text-decoration: line-through; }

/* ---------- cinemática ---------- */
html.intro-on, html.intro-on body { overflow: hidden; }
html.intro-on #app, html.intro-on .tabbar { visibility: hidden; }
html.intro-reveal #app { animation: reveal .7s cubic-bezier(.2, .8, .2, 1); }
@keyframes reveal { from { opacity: 0; transform: scale(1.05); } }
.intro { position: fixed; inset: 0; z-index: 100; background: #0b2a47; overflow: hidden; cursor: pointer; transition: opacity .6s ease, transform .6s ease; }
.intro.out { opacity: 0; transform: scale(1.08); pointer-events: none; }
.intro canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro-plane { position: absolute; left: 50%; top: 50%; width: min(66vw, 330px); aspect-ratio: 200 / 210; transform: translate(-50%, 50vh); will-change: transform; }
.intro-plane > div { position: absolute; inset: 0; }
.intro-plane svg { width: 100%; height: 100%; display: block; overflow: visible; }
.plane { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25)); }
.plane-shadow { transform: translate(14%, 20%) scale(.92); filter: brightness(0) blur(5px); opacity: .28; }
.plane-shadow .nav-l, .plane-shadow .nav-r, .plane-shadow .strobe, .plane-shadow .beacon { display: none; }
.plane .strobe { opacity: 0; animation: strobe 1.1s infinite; }
.plane .beacon { opacity: 0; animation: strobe 1.1s .55s infinite; }
@keyframes strobe { 0%, 8% { opacity: 1; } 12%, 100% { opacity: 0; } }
.intro-text { position: absolute; left: 0; right: 0; bottom: calc(var(--sb) + 10vh); padding: 0 22px; text-align: center; color: #fff; pointer-events: none; }
.intro-text h1 { font: 800 clamp(42px, 13vw, 100px)/0.92 var(--display); letter-spacing: -0.04em; text-shadow: 0 4px 30px rgba(0, 40, 80, .5); text-wrap: balance; }
.intro-text h1 span { display: inline-block; opacity: 0; transform: translateY(30px) scale(.8); filter: blur(8px); }
.intro.text-in .intro-text h1 span { animation: word .55s cubic-bezier(.2, .9, .25, 1.25) forwards; animation-delay: calc(var(--i) * 85ms); }
@keyframes word { to { opacity: 1; transform: none; filter: none; } }
.intro-text p { margin-top: 16px; font: 700 13px/1.2 var(--text); letter-spacing: .16em; text-transform: uppercase; opacity: 0; transition: opacity .6s .8s; }
.intro.text-in .intro-text p { opacity: .85; }
.intro-skip { position: absolute; top: calc(var(--st) + 12px); right: 14px; border: 0; background: rgba(0, 0, 0, .25); color: #fff; border-radius: 99px; padding: 7px 14px; font-size: 14px; font-weight: 600; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.intro.static { background: linear-gradient(180deg, #4aa3df, #0b4f8a); }
.intro.static .intro-plane { transform: translate(-50%, -70%); }

@media (min-width: 760px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 18px; max-height: 86vh; }
  .sheet.full { height: 86vh; }
  html.sheet-open #app { transform: none; border-radius: 0; filter: brightness(.9); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.avatar.xl { width: 76px; height: 76px; font-size: 28px; }
#app { overflow-x: clip; }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
