:root { --app-top:16px;--app-bottom:16px;--app-height:100vh; }
.startup { width:100%;max-width:560px;margin:auto;padding:48px 24px;min-height:100vh;color:#fff;background:#050407; }
.startup h1 { color:#ff2daa; }
.startup p { line-height:1.5; }
.shell { min-height:100vh;min-height:var(--app-height); }
html { scroll-padding-top:var(--app-top);scroll-padding-bottom:calc(100px + var(--app-bottom)); }
.shell { padding-top:max(var(--app-top),env(safe-area-inset-top));padding-bottom:calc(100px + var(--app-bottom)); }
#tabs { bottom:max(var(--app-bottom),env(safe-area-inset-bottom));padding-bottom:10px; }
.card-stage,.profile-card { height:clamp(240px,calc(var(--app-height) - 345px - var(--app-top) - var(--app-bottom)),560px);min-height:0; }
#notice { bottom:calc(94px + var(--app-bottom)); }
.conversation-open #content { height:calc(var(--app-height) - 186px - var(--app-top) - var(--app-bottom));min-height:220px; }
.photo-viewer { padding-top:var(--app-top);padding-bottom:var(--app-bottom); }
.photo-viewer .viewer-close,.photo-viewer .gallery-count { top:var(--app-top); }
.onboarding-intro { padding:22px 4px; }
.onboarding-intro h1 { font-size:40px;color:var(--pink); }
.onboarding-intro p,.signup-form details p { white-space:pre-line; }
.onboarding-intro select,.signup-form input:not([type=checkbox]),.signup-form select,.signup-form textarea { width:100%;padding:12px;background:#17101d;color:#fff;border:1px solid #75436b;border-radius:8px;font-size:16px; }
.signup-form { display:grid;gap:16px;padding-top:16px; }
.signup-form>label:not(.consent) { display:grid;gap:8px; }
.location-field { display:grid;gap:8px;min-width:0; }
.location-field [hidden] { display:none; }
.location-status { margin:0;color:var(--muted);font-size:14px; }
.location-status:empty { display:none; }
.location-attribution { color:var(--muted);font-size:11px;justify-self:start; }
.location-field select { text-overflow:ellipsis; }
.location-pagination { display:flex;align-items:center;justify-content:space-between;gap:12px; }
.location-geolocate { display:flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:10px;border:1px solid #75436b;border-radius:8px;background:#17101d;color:#fff; }
.signup-form textarea { min-height:100px; }
.signup-form .consent { display:flex;align-items:flex-start;gap:10px;font-size:14px;line-height:1.5; }
.consent input { width:22px;height:22px;flex-shrink:0;accent-color:var(--pink); }
.consent a { display:inline;color:#f591d0;text-decoration:underline; }
.privacy-copy { white-space:pre-line;line-height:1.6; }
.local-photo-preview { position:relative;aspect-ratio:3/4;overflow:hidden;border-radius:8px;background:#211625; }
.local-photo-preview img { width:100%;height:100%;object-fit:cover; }
.local-photo-fallback { height:100%;padding:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;overflow-wrap:anywhere; }
.local-photo-fallback small { max-width:100%; }
.local-photo-preview [hidden] { display:none; }
.signup-preview { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px; }
.signup-preview img { width:100%;aspect-ratio:3/4;object-fit:cover;border-radius:8px; }
.file-field { position:relative;cursor:pointer; }
.file-field input[type=file] { position:absolute;inset:0;opacity:0;cursor:pointer; }
.file-trigger { display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;border:1px solid #75436b;border-radius:8px;background:#17101d; }
.file-field:focus-within .file-trigger { outline:2px solid var(--pink); }
.signup-status { overflow-wrap:anywhere; }
.form-validation { margin:0;color:#ffb9dc;font-size:14px;line-height:1.5;overflow-wrap:anywhere;flex:0 0 100%; }
[aria-invalid=true] { outline:2px solid #ff8ec8;outline-offset:2px; }
details { margin:16px 0;font-size:14px;color:#cfc0d2; }
nav button { font-size:10px; }
.view-tabs { display:block;border:0;background:none;margin-bottom:18px;padding:10px 0;color:var(--muted); }
.swipe-stamp { max-width:80%;font-size:18px;overflow-wrap:anywhere; }
.settings-group~select { width:100%;padding:12px;background:#17101d;color:white;border:1px solid #75436b;border-radius:8px; }
[dir=rtl] .card-copy { text-align:right; }
@media(max-height:620px) { .conversation-open #content { min-height:180px; }.conversation-open #topbar { display:none; }.conversation-open #content { height:calc(var(--app-height) - 110px - var(--app-top) - var(--app-bottom)); } }
#tabs { bottom:calc(max(var(--app-bottom),env(safe-area-inset-bottom)) + var(--viewport-bottom,0px)); }
#notice { bottom:calc(94px + var(--app-bottom) + var(--viewport-bottom,0px)); }
.photo-viewer,.match-overlay { top:var(--viewport-top,0px);bottom:var(--viewport-bottom,0px); }
.compact-viewport .conversation-open #topbar { display:none; }
.compact-viewport .conversation-open #content { height:calc(var(--app-height) - 94px - var(--app-top) - var(--app-bottom));min-height:0;gap:6px; }
.compact-viewport .message-log { min-height:0; }
.compact-viewport .message-form textarea { height:46px;min-height:46px; }
.compact-viewport .chat-attachment-preview img { width:32px;height:32px; }
.very-compact-viewport .conversation-open #tabs { display:none; }
.very-compact-viewport .conversation-open #content { height:calc(var(--app-height) - var(--app-top) - var(--app-bottom) - 12px);gap:4px; }
.very-compact-viewport .conversation-open .message-log { padding:0; }
.keyboard-open #tabs { display:none; }
.keyboard-open .conversation-open #topbar { display:none; }
.keyboard-open .conversation-open #content { height:calc(var(--app-height) - var(--app-top) - var(--app-bottom) - 16px);min-height:0; }
.keyboard-open .shell { padding-top:calc(var(--app-top) + var(--viewport-top,0px));padding-bottom:calc(16px + var(--app-bottom)); }
