/* Sorom Web. A field passport: cream paper, teal ink, terracotta stamps, mono
   labels. Fraunces for voice, Outfit for reading, JetBrains Mono for data. */

@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 300 900; font-display: swap; src: url(/assets/fonts/fraunces-normal-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 300 900; font-display: swap; src: url(/assets/fonts/fraunces-italic-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/assets/fonts/outfit-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url(/assets/fonts/jetbrains-mono-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
    --paper: #FAF7F2;
    --paper-2: #F2ECE2;
    --paper-3: #E9E1D3;
    --card: #FFFDF9;
    --ink: #1C1C1E;
    --ink-2: #3B3D42;
    --muted: #6B6B6B;
    --muted-2: #9A958D;
    --line: rgba(28, 28, 30, 0.12);
    --line-2: rgba(28, 28, 30, 0.22);
    --teal: #1A3A3A;
    --teal-2: #24504E;
    --teal-ink: #0F2626;
    --terracotta: #E85D04;
    --terracotta-ink: #BF4D03;
    --terracotta-soft: rgba(232, 93, 4, 0.10);
    --golden: #F9A825;
    --golden-soft: rgba(249, 168, 37, 0.16);
    --moss: #0F766E;
    --moss-ink: var(--moss);
    --moss-soft: rgba(15, 118, 110, 0.12);
    --rose: #B3261E;
    --rose-soft: rgba(179, 38, 30, 0.10);
    --display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --body: 'Outfit', 'Avenir Next', 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
    --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-pill: 999px;
    --ease: cubic-bezier(.2, .7, .2, 1);
    --spring: cubic-bezier(.2, .9, .3, 1.25);
    --shadow-1: 0 1px 0 rgba(28, 28, 30, .05), 0 14px 36px -24px rgba(26, 58, 58, .45);
    --shadow-2: 0 2px 0 rgba(28, 28, 30, .05), 0 28px 60px -30px rgba(26, 58, 58, .55);
    --rail-w: 236px;
    --topbar-h: 68px;
    --tab-h: 64px;
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}
/* Paper grain: a fixed turbulence overlay, multiply-blended, barely there. */
body::before {
    content: "";
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    opacity: .05; mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
a { color: var(--terracotta-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; letter-spacing: -0.015em; line-height: 1.15; margin: 0; }
p { margin: 0 0 .75rem; }
p:last-child { margin-bottom: 0; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: .5rem .75rem; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { left: 8px; }
.noscript { padding: 2rem; text-align: center; }
:focus-visible { outline: 2px solid var(--golden); outline-offset: 3px; border-radius: 4px; }

/* ---------- Shell ---------- */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; }
.rail {
    position: sticky; top: 0; height: 100vh;
    background: linear-gradient(180deg, var(--teal) 0%, var(--teal-ink) 100%);
    color: rgba(250, 247, 242, .82);
    display: flex; flex-direction: column; padding: 26px 18px 20px;
    border-right: 1px solid rgba(255, 255, 255, .06);
}
.rail::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 30% at 20% 0%, rgba(249, 168, 37, .12), transparent 70%); }
.rail-brand { display: flex; flex-direction: column; gap: 2px; color: #FAF7F2; padding: 0 10px 22px; text-decoration: none; }
.rail-brand:hover { text-decoration: none; }
.rail-wordmark { font-family: var(--display); font-style: italic; font-weight: 500; font-size: 1.85rem; letter-spacing: -0.02em; line-height: 1; }
.rail-tag { font-family: var(--mono); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--golden); }
.rail-nav { display: flex; flex-direction: column; gap: 4px; position: relative; z-index: 1; }
.rail-item {
    display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 8px;
    padding: 10px 10px; border-radius: 10px; color: inherit; text-decoration: none;
    transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.rail-item:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; transform: translateX(2px); }
.rail-item[aria-current="page"] { background: rgba(250, 247, 242, .12); color: #fff; box-shadow: inset 2px 0 0 var(--golden); }
.rail-idx { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; color: rgba(250, 247, 242, .5); }
.rail-item[aria-current="page"] .rail-idx { color: var(--golden); }
.rail-label { font-weight: 500; font-size: .95rem; }
.rail-badge { font-family: var(--mono); font-size: .62rem; padding: 2px 6px; border-radius: 6px; background: rgba(249, 168, 37, .18); color: var(--golden); }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .08); position: relative; z-index: 1; }
.rail-link { background: none; border: 0; text-align: left; cursor: pointer; color: rgba(250, 247, 242, .6); font-size: .82rem; padding: 6px 10px; border-radius: 8px; }
.rail-link:hover { color: #fff; background: rgba(255, 255, 255, .06); text-decoration: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 20; height: var(--topbar-h);
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 0 clamp(16px, 4vw, 40px);
    background: rgba(250, 247, 242, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.topbar-title { font-size: 1.25rem; font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.kicker { font-family: var(--mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--terracotta-ink); display: inline-flex; align-items: center; gap: 6px; }
.kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.view { padding: clamp(18px, 3vw, 36px) clamp(16px, 4vw, 40px) 120px; max-width: 1180px; width: 100%; margin: 0 auto; }
.view > * { animation: rise .55s var(--ease) both; }
.view > *:nth-child(2) { animation-delay: .06s; }
.view > *:nth-child(3) { animation-delay: .12s; }
.view > *:nth-child(4) { animation-delay: .18s; }
.view > *:nth-child(5) { animation-delay: .24s; }
.view > *:nth-child(n+6) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view > * { animation: none; } * { transition: none !important; } }

.tabbar { display: none; }
/* Signed-out: no rail, no tab bar, the landing owns the width. */
.shell[data-state="out"], .shell[data-state="loading"] { grid-template-columns: 1fr; }
.shell[data-state="out"] .rail, .shell[data-state="loading"] .rail { display: none; }
.shell[data-state="out"] .tabbar, .shell[data-state="loading"] .tabbar { display: none !important; }
.shell[data-state="out"] .view { padding-bottom: 60px; }

@media (max-width: 900px) {
    .shell { grid-template-columns: 1fr; }
    .rail { display: none; }
    .tabbar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--tab-h) + env(safe-area-inset-bottom));
        display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding-bottom: env(safe-area-inset-bottom);
        background: var(--teal-ink); color: rgba(250, 247, 242, .7); border-top: 1px solid rgba(255, 255, 255, .08);
    }
    .tab-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: inherit; text-decoration: none; font-size: .68rem; font-weight: 500; letter-spacing: .02em; }
    .tab-item[aria-current="page"] { color: var(--golden); }
    .tab-item .tab-glyph { font-family: var(--mono); font-size: 1rem; line-height: 1; }
    .view { padding-bottom: calc(var(--tab-h) + 40px); }
}

.loading-mark { display: flex; gap: 8px; justify-content: center; padding: 80px 0; }
.loading-mark span { width: 8px; height: 8px; border-radius: 50%; background: var(--terracotta); animation: pulse 1.2s infinite ease-in-out; }
.loading-mark span:nth-child(2) { animation-delay: .15s; } .loading-mark span:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%, 80%, 100% { transform: scale(.6); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

/* ---------- Type ---------- */
.h-display { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.02; letter-spacing: -0.025em; font-weight: 500; }
.h-display em { font-style: italic; color: var(--terracotta-ink); }
.lede { font-size: 1.1rem; color: var(--ink-2); max-width: 58ch; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .78rem; letter-spacing: .04em; }
.small { font-size: .86rem; }

/* ---------- Layout helpers ---------- */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 22px; align-items: start; }
@media (max-width: 1000px) { .split { grid-template-columns: 1fr; } }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row-between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 6px 0 14px; }
.section-head h2 { font-size: 1.45rem; }

/* ---------- Document card ---------- */
.doc {
    position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
    box-shadow: var(--shadow-1); overflow: hidden;
}
.doc::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--terracotta), var(--golden)); opacity: .9; }
.doc-plain::before { display: none; }
.doc-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 18px 20px 0; }
.doc-title { font-size: 1.3rem; margin-top: 4px; }
.doc-sub { color: var(--muted); margin: 4px 0 0; font-size: .95rem; }
.doc-body { padding: 16px 20px 20px; }
.doc-foot { padding: 14px 20px; border-top: 1px dashed var(--line-2); background: var(--paper-2); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.doc-ink { background: var(--teal); color: #FAF7F2; border-color: transparent; }
.doc-ink .doc-sub, .doc-ink .muted { color: rgba(250, 247, 242, .7); }
.doc-ink .kicker { color: var(--golden); }
.doc-ink::before { background: var(--golden); }

/* Stamps */
.stamp {
    display: inline-block; font-family: var(--mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase;
    color: var(--terracotta-ink); border: 1.5px solid currentColor; border-radius: 6px; padding: .3rem .5rem; line-height: 1;
    transform: rotate(-3deg); white-space: nowrap; background: rgba(255, 255, 255, .5);
}
.stamp-golden { color: #8A5A00; border-color: var(--golden); background: var(--golden-soft); }
.stamp-moss { color: var(--moss-ink); background: var(--moss-soft); }
.stamp-ink { color: var(--teal); }
.stamp-rose { color: var(--rose); background: var(--rose-soft); }
.stamp-flat { transform: none; }

/* Pills, tags */
.tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; background: var(--paper-2); color: var(--ink-2); border: 1px solid var(--line); }
.tag-terracotta { background: var(--terracotta-soft); color: var(--terracotta-ink); border-color: transparent; }
.tag-moss { background: var(--moss-soft); color: var(--moss-ink); border-color: transparent; }
.tag-golden { background: var(--golden-soft); color: #8A5A00; border-color: transparent; }
.tag-rose { background: var(--rose-soft); color: var(--rose); border-color: transparent; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: .8rem 1.4rem; border-radius: var(--r-pill); border: 1.5px solid transparent;
    font-weight: 500; font-size: .95rem; line-height: 1; cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: transform .18s var(--spring), box-shadow .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn.is-busy { opacity: .6; cursor: progress; transform: none; }
.btn-primary { background: var(--terracotta); color: #fff; box-shadow: 0 8px 20px -10px rgba(232, 93, 4, .7); }
.btn-primary:hover { background: var(--terracotta-ink); }
.btn-ink { background: var(--teal); color: #FAF7F2; }
.btn-ink:hover { background: var(--teal-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: rgba(28, 28, 30, .04); }
.btn-paper { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-danger { background: var(--rose-soft); color: var(--rose); }
.btn-link { background: none; color: var(--terracotta-ink); padding: .4rem .2rem; }
.btn-sm { padding: .55rem 1rem; font-size: .84rem; }
.btn-lg { padding: 1rem 1.8rem; font-size: 1.02rem; }
.btn-block { width: 100%; }
.doc-ink .btn-ghost { color: #FAF7F2; border-color: rgba(255, 255, 255, .35); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 14px; }
.form-2 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field-hint { font-size: .8rem; color: var(--muted); }
.input {
    width: 100%; font: inherit; color: var(--ink); background: var(--card);
    border: 1.5px solid var(--line-2); border-radius: 10px; padding: .72rem .9rem;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.input:focus { outline: none; border-color: var(--terracotta); box-shadow: 0 0 0 4px var(--terracotta-soft); }
.input-area { resize: vertical; min-height: 96px; }
.input[aria-invalid="true"] { border-color: var(--rose); }
.form-error { color: var(--rose); font-size: .88rem; background: var(--rose-soft); padding: .6rem .8rem; border-radius: 8px; }
.form-ok { color: var(--moss-ink); font-size: .88rem; background: var(--moss-soft); padding: .6rem .8rem; border-radius: 8px; }
.code-input { font-family: var(--mono); font-size: 1.6rem; letter-spacing: .5em; text-align: center; padding: .9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    border: 1.5px solid var(--line-2); background: var(--card); color: var(--ink-2); border-radius: var(--r-pill);
    padding: .45rem .85rem; font-size: .86rem; cursor: pointer; transition: all .18s var(--ease);
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--teal); color: #FAF7F2; border-color: var(--teal); }
.seg { display: inline-flex; background: var(--paper-2); border-radius: var(--r-pill); padding: 3px; border: 1px solid var(--line); }
.seg .chip { border: 0; background: transparent; padding: .4rem .9rem; }
.seg .chip[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow-1); }

/* ---------- Data bits ---------- */
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; background: var(--paper-3); }
.avatar-sm { width: 32px; height: 32px; }
.avatar-lg { width: 84px; height: 84px; }
.avatar-xl { width: 120px; height: 120px; }
.avatar-fallback { display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-style: italic; color: var(--teal); background: var(--golden-soft); font-size: .95rem; }
.avatar-lg.avatar-fallback { font-size: 1.6rem; } .avatar-xl.avatar-fallback { font-size: 2.2rem; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-value { font-family: var(--display); font-size: 1.6rem; line-height: 1; }
.stat-label { font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stats { display: flex; gap: 26px; flex-wrap: wrap; }
.meter { height: 8px; border-radius: 6px; background: var(--paper-3); overflow: hidden; }
.meter-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--terracotta), var(--golden)); border-radius: 6px; transition: width .6s var(--ease); }
.list { display: flex; flex-direction: column; gap: 10px; }
.item {
    display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
    padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
    color: inherit; text-decoration: none; transition: transform .18s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
a.item:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); border-color: var(--line-2); text-decoration: none; }
.item-title { font-weight: 500; }
.item-sub { color: var(--muted); font-size: .88rem; }
.item-side { text-align: right; font-family: var(--mono); font-size: .72rem; color: var(--muted); letter-spacing: .04em; }
.thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--paper-3); flex: none; }
.thumb-lg { width: 100%; aspect-ratio: 16 / 10; height: auto; border-radius: 12px; }
.thumb-fallback { display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: .62rem; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: .92rem; }
.dl dt { font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.dl dd { margin: 0; }

/* Timeline (trip day view) */
.day { margin-bottom: 22px; }
.day-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.day-num { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--terracotta-ink); }
.day-date { font-family: var(--display); font-size: 1.15rem; }
.tl { display: flex; flex-direction: column; gap: 8px; border-left: 1.5px dashed var(--line-2); margin-left: 8px; padding-left: 18px; }
.tl-item { position: relative; display: grid; grid-template-columns: 62px 1fr; gap: 12px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.tl-item::before { content: ""; position: absolute; left: -24px; top: 18px; width: 9px; height: 9px; border-radius: 50%; background: var(--terracotta); box-shadow: 0 0 0 3px var(--paper); }
.tl-time { font-family: var(--mono); font-size: .74rem; color: var(--muted); padding-top: 2px; }
.tl-kind { font-family: var(--mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--terracotta-ink); }
.tl-title { font-weight: 500; }
.tl-sub { color: var(--muted); font-size: .86rem; }

/* Places */
.map { height: 460px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--paper-2); }
.map-marker { width: 14px; height: 14px; border-radius: 50% 50% 50% 0; background: var(--terracotta); border: 2px solid #fff; transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); cursor: pointer; }
.map-marker.is-gem { background: var(--golden); }
.place-card { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; transition: transform .18s var(--ease), box-shadow .2s var(--ease); }
.place-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); text-decoration: none; }
.place-card .thumb { width: 96px; height: 96px; }
.place-title { font-family: var(--display); font-size: 1.1rem; }
.place-meta { display: flex; gap: 10px; flex-wrap: wrap; font-family: var(--mono); font-size: .68rem; color: var(--muted); letter-spacing: .04em; margin-top: 4px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }

/* ConneXions cards read as passport pages */
.pp { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; position: relative; overflow: hidden; }
.pp::after { content: attr(data-mrz); position: absolute; left: 16px; right: 16px; bottom: 8px; font-family: var(--mono); font-size: .6rem; letter-spacing: .22em; color: var(--muted-2); white-space: nowrap; overflow: hidden; }
.pp-body { padding-bottom: 18px; }
.pp-name { font-family: var(--display); font-size: 1.25rem; }
.pp-score { position: absolute; top: 14px; right: 14px; font-family: var(--mono); font-size: .72rem; color: var(--moss-ink); background: var(--moss-soft); padding: 4px 8px; border-radius: 6px; }
.pp-bio { color: var(--ink-2); font-size: .92rem; margin: 6px 0 8px; }
.quiz-q { font-family: var(--display); font-size: clamp(1.3rem, 2.6vw, 1.8rem); line-height: 1.25; margin: 8px 0 18px; }
.likert { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.likert .chip { padding: .8rem .4rem; font-size: .8rem; text-align: center; border-radius: 10px; }
.trait-row { display: grid; grid-template-columns: 150px 1fr 50px; align-items: center; gap: 12px; }
.trait-name { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.trait-val { font-family: var(--mono); font-size: .78rem; text-align: right; }

/* Boarding pass CTA */
.pass {
    display: grid; grid-template-columns: minmax(0, 1fr) 150px; position: relative; overflow: hidden;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-1);
}
.pass-main { padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.pass-title { font-size: 1.3rem; }
.pass-body { color: var(--ink-2); font-size: .94rem; max-width: 52ch; }
.pass-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
.store-badge img { height: 40px; width: auto; }
.pass-stub {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
    background: var(--paper-2); border-left: 1.5px dashed var(--line-2); padding: 16px 10px;
}
.pass-stub::before, .pass-stub::after { content: ""; position: absolute; left: -9px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); }
.pass-stub::before { top: -9px; } .pass-stub::after { bottom: -9px; }
.pass-stub-label { font-family: var(--mono); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); max-width: 90px; }
.pass-stub-code { font-family: var(--mono); font-size: .58rem; letter-spacing: .18em; color: var(--muted-2); }
.pass-compact { grid-template-columns: minmax(0, 1fr) 110px; }
.pass-compact .pass-main { padding: 14px 16px; }
.pass-compact .pass-title { font-size: 1.05rem; }
@media (max-width: 560px) { .pass { grid-template-columns: 1fr; } .pass-stub { border-left: 0; border-top: 1.5px dashed var(--line-2); flex-direction: row; } .pass-stub::before, .pass-stub::after { display: none; } }

/* Landing (signed out) */
.landing { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 420px); gap: 36px; align-items: start; }
@media (max-width: 960px) { .landing { grid-template-columns: 1fr; } }
.landing-hero { padding-top: 12px; }
.landing-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.landing-list li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.landing-list .idx { font-family: var(--mono); font-size: .68rem; color: var(--terracotta-ink); letter-spacing: .12em; padding-top: 6px; }
.landing-list strong { font-weight: 500; display: block; }
.landing-list span { color: var(--muted); font-size: .92rem; }
.auth-card { position: sticky; top: calc(var(--topbar-h) + 18px); }
.auth-switch { text-align: center; font-size: .9rem; color: var(--muted); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted-2); font-family: var(--mono); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px dashed var(--line-2); }

/* Home */
.hero-card { background: linear-gradient(135deg, var(--teal) 0%, var(--teal-ink) 70%); color: #FAF7F2; border-radius: var(--r-lg); padding: clamp(22px, 4vw, 40px); position: relative; overflow: hidden; }
.hero-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; border: 1.5px dashed rgba(249, 168, 37, .35); }
.hero-card .kicker { color: var(--golden); }
.hero-card h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.05; margin: 8px 0 10px; }
.hero-card h2 em { font-style: italic; color: var(--golden); }
.hero-card p { color: rgba(250, 247, 242, .78); max-width: 56ch; }
.hero-card .btn-ghost { color: #FAF7F2; border-color: rgba(250, 247, 242, .4); }
.hero-card .btn-ghost:hover { background: rgba(250, 247, 242, .1); }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.quick a { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; transition: transform .18s var(--ease), box-shadow .2s var(--ease); }
.quick a:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); text-decoration: none; }
.quick .glyph { font-family: var(--mono); font-size: 1.1rem; color: var(--terracotta-ink); }
.quick strong { font-weight: 500; }
.quick span { color: var(--muted); font-size: .84rem; }

/* Empty / error / skeleton / toast / modal */
.empty { text-align: center; padding: 40px 20px; border: 1.5px dashed var(--line-2); border-radius: var(--r-md); background: rgba(255, 253, 249, .6); }
.empty-mark { font-family: var(--mono); font-size: 1.6rem; color: var(--muted-2); }
.empty-title { font-size: 1.25rem; margin: 6px 0; }
.empty-body { color: var(--muted); max-width: 46ch; margin: 0 auto 14px; }
.error-box { padding: 14px 16px; background: var(--rose-soft); color: var(--rose); border-radius: 10px; display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.skel-list { display: grid; gap: 10px; }
.skel { height: 72px; border-radius: 12px; background: linear-gradient(90deg, var(--paper-2) 25%, var(--paper-3) 37%, var(--paper-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.toast-host { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
@media (max-width: 900px) { .toast-host { bottom: calc(var(--tab-h) + 16px); } }
.toast { background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: var(--r-pill); font-size: .9rem; opacity: 0; transform: translateY(8px); transition: all .25s var(--ease); box-shadow: var(--shadow-2); max-width: min(92vw, 520px); }
.toast.is-in { opacity: 1; transform: none; }
.toast-error { background: var(--rose); } .toast-success { background: var(--moss); }
.modal { border: 0; padding: 0; background: transparent; max-width: min(92vw, 560px); width: 100%; }
.modal::backdrop { background: rgba(26, 58, 58, .45); backdrop-filter: blur(3px); }
.modal-card { background: var(--card); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-2); }
.modal-wide { max-height: 86vh; overflow: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-title { font-size: 1.3rem; }
.modal-body { color: var(--ink-2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.modal-close { background: none; border: 0; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted); }

/* Topbar user chip */
.user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: var(--r-pill); background: var(--card); border: 1px solid var(--line); color: inherit; text-decoration: none; font-size: .86rem; }
.user-chip:hover { text-decoration: none; border-color: var(--line-2); }
.points-chip { font-family: var(--mono); font-size: .72rem; color: #8A5A00; background: var(--golden-soft); padding: 5px 9px; border-radius: 6px; }

/* Print: a trip prints as a document */
@media print { .rail, .topbar, .tabbar, .pass, .btn { display: none !important; } .shell { display: block; } body::before { display: none; } }

/* ---------- Lean web additions (2026-09-05) ---------- */
/* Full-bleed views (the map) */
.view.view-full { padding: 0; max-width: none; min-height: calc(100vh - var(--topbar-h)); }
.view.view-full > * { animation: none; }
@media (max-width: 900px) { .view.view-full { min-height: calc(100vh - var(--topbar-h) - var(--tab-h)); padding-bottom: 0; } }

/* Rail status: guest / unverified prompt */
.rail-status { position: relative; z-index: 1; margin-top: 14px; }
.rail-pass { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 10px; border-radius: 10px; border: 1px dashed rgba(250, 247, 242, .35); background: rgba(250, 247, 242, .06); color: rgba(250, 247, 242, .85); font-size: .82rem; cursor: pointer; text-align: left; transition: background .2s var(--ease); }
.rail-pass:hover { background: rgba(250, 247, 242, .12); }
.rail-pass .stamp { font-size: .58rem; }

/* Passport sheet */
.sheet-passport { position: relative; }
.sheet-stamp { position: absolute; right: 0; top: -54px; }
.sheet-stamp .stamp { font-size: .8rem; padding: .45rem .7rem; transform: rotate(6deg); }
.form-ok { color: var(--moss-ink); }

/* File picker */
.file-picker { display: inline-flex; }

/* Toggle switch (label wrapping a checkbox) */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.switch strong { font-weight: 500; display: block; }
.switch span.small { color: var(--muted); }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 999px; background: var(--paper-3); position: relative; flex: none; cursor: pointer; transition: background .2s var(--ease); margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s var(--spring); }
.switch input:checked { background: var(--moss); }
.switch input:checked::after { transform: translateX(18px); }

/* Setting rows (Me, Safety) */
.rows { display: flex; flex-direction: column; gap: 8px; }
.row-item { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; text-align: left; font: inherit; cursor: pointer; transition: transform .18s var(--ease), box-shadow .2s var(--ease); }
.row-item:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); text-decoration: none; }
.row-item .glyph { font-family: var(--mono); color: var(--terracotta-ink); font-size: 1rem; text-align: center; }
.row-item strong { font-weight: 500; display: block; }
.row-item span.small { color: var(--muted); }
.row-item .chev { font-family: var(--mono); color: var(--muted-2); }
.row-item.is-app .chev::before { content: "app "; font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; color: var(--terracotta-ink); }

/* Photo tiles in composers */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.tile { position: relative; border-radius: 12px; overflow: hidden; background: var(--paper-3); aspect-ratio: 1; }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .tile-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 4px; padding: 6px; background: linear-gradient(0deg, rgba(0, 0, 0, .55), transparent); }
.tile .tile-bar button { background: rgba(255, 255, 255, .9); border: 0; border-radius: 6px; padding: 3px 7px; font-size: .74rem; cursor: pointer; }
.tile-num { position: absolute; top: 6px; left: 6px; font-family: var(--mono); font-size: .62rem; background: rgba(0, 0, 0, .55); color: #fff; padding: 2px 6px; border-radius: 6px; }

/* Progress line used by uploads */
.progress-line { font-family: var(--mono); font-size: .72rem; color: var(--muted); letter-spacing: .06em; }

/* Notice bands */
.notice { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px; background: var(--golden-soft); color: #5F3D00; border: 1px solid rgba(249, 168, 37, .35); }
.notice-moss { background: var(--moss-soft); color: var(--moss-ink); border-color: rgba(15, 118, 110, .3); }
.notice-rose { background: var(--rose-soft); color: var(--rose); border-color: rgba(179, 38, 30, .25); }

/* Cards that are app-only read slightly dimmed with a stamp */
.app-only { position: relative; }
.app-only::after { content: "In the app"; position: absolute; top: 12px; right: 12px; font-family: var(--mono); font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--terracotta-ink); border: 1.5px solid currentColor; border-radius: 6px; padding: .25rem .45rem; transform: rotate(4deg); background: rgba(255, 255, 255, .7); }

/* Dashed "more in the app" pass wrapper */
.more-pass { margin-top: 14px; }

/* Modal on small screens becomes a bottom sheet */
@media (max-width: 640px) {
    .modal { max-width: 100vw; width: 100vw; margin: auto 0 0; }
    .modal-card { border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); }
}
