/* Shared application surfaces: /i, /a and /u. Landing retains its own layout. */
:root{--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-6:24px;--space-8:32px;--space-12:48px;--section-gap:24px;--panel-padding:24px;--page-gutter:24px}
body{isolation:isolate}
body>header,body>main,body>footer{position:relative;z-index:1}
body>header{max-width:1152px;margin-inline:auto;padding:24px 0;gap:24px;min-height:100px;flex-wrap:wrap}
body>header .brand{flex-shrink:0;gap:12px;font-size:20px;letter-spacing:3px}
body>header .brand img{width:56px;height:56px}
body>header>[data-language],body>header>.language-switch{margin-left:auto;width:auto;flex:none}
body>header>a:not(.brand){min-height:44px;display:inline-flex;align-items:center}
body>main,#admin-app{display:flex;flex-direction:column;gap:var(--section-gap);width:100%;max-width:1200px;margin-inline:auto;padding:24px var(--page-gutter) 48px;min-width:0}
body>main>*{margin-block:0!important;min-width:0}
body>main>.page-heading{margin:0!important;gap:16px;align-items:flex-start}
h1{font-size:clamp(28px,3.5vw,48px);line-height:1.15;overflow-wrap:anywhere;margin-bottom:16px}
h2{font-size:24px;line-height:1.3;margin-bottom:16px}
h3{font-size:18px;line-height:1.4;margin-bottom:12px}
p{margin-bottom:16px}
.page-heading p{max-width:70ch;line-height:1.65}
.glass,.hero{padding:var(--panel-padding);border-radius:24px;min-width:0}
.glass>:last-child{margin-bottom:0}
.glass>p+form,.glass>form+p,.glass>details+button{margin-top:16px}
.glass>h2:not(:first-child),.glass>h3:not(:first-child){margin-top:24px}
.grid,.stack,.grid.three,.plan-grid,.scales{gap:var(--section-gap)}
.grid>*{min-width:0}
.stack>.glass{margin-block:0}
.row{gap:12px}
form,.fields{gap:16px}
label{gap:8px;line-height:1.5}
input,select,textarea{font:inherit;line-height:1.5}
input,select,button{min-height:44px}
textarea{padding:12px;border:1px solid var(--line);border-radius:12px;background:#05090e9c;color:var(--ink);max-width:100%}
button:disabled{opacity:.5}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.check{align-items:flex-start;gap:12px}
.check input{min-height:20px;margin-top:2px}
.tabs{gap:8px;margin-bottom:0;align-items:center}
.divider{margin-block:24px}
details{margin-block:12px;min-width:0}
summary{cursor:pointer;min-height:44px;padding-block:10px;line-height:1.5}
details[open]>summary{margin-bottom:8px}
.table-wrap{border:1px solid var(--line);border-radius:16px;overflow:auto;overscroll-behavior-x:contain;max-width:100%;scrollbar-color:#647d8e #10151d}
.table-wrap table{margin:0}
.table-wrap th,.table-wrap td,.table-wrap th:first-child,.table-wrap td:first-child{padding:12px 16px}
.table-wrap th{background:#111923;color:#cbd5df;font-size:12px;line-height:1.4}
.table-wrap tbody tr:last-child td{border-bottom:0}
.table-wrap tbody tr:hover{background:#ffffff05}
.table-wrap tbody tr:focus-within{background:#00f0ff09}
#tarot-ai{margin-top:24px}
.tarot-grid{gap:var(--section-gap)}
.tarot-grid figure{margin:0;min-width:0}
.tarot-grid figcaption{margin-top:12px;line-height:1.5}
.tarot-grid article,.tarot-grid figure{padding:16px;border:1px solid var(--line);border-radius:16px;background:#ffffff03}
.tarot-grid details p{overflow-wrap:anywhere}
#admin-app>.glass{margin:0}
#admin-app #admin-create{grid-template-columns:repeat(2,minmax(0,1fr));align-items:end}
#admin-create>button{justify-self:start}
#admin-search{align-items:end}
#admin-search label{min-width:0}
.admin-pagination{margin-top:24px;gap:12px}
.admin-users td:first-child{white-space:normal;min-width:180px}
#admin-message:empty,#search-message:empty,.friend-actions [role=status]:empty{display:none}
#admin-message:not(:empty),#search-message:not(:empty){padding:12px 16px;border:1px solid var(--line);border-radius:12px;background:#101a23;color:var(--ink)}
#people-search{grid-template-columns:minmax(0,1fr) auto;align-items:end}
#people-results{margin-top:24px;gap:12px}
#people-results:empty{display:none}
#people-results>a{display:flex;justify-content:space-between;padding:16px;border:1px solid var(--line);border-radius:12px;overflow-wrap:anywhere;min-height:56px;background:#ffffff03}
#people-results>a:hover{background:#00f0ff09;text-decoration:none;border-color:#00f0ff55}
#people-results>a::after{content:'→';padding-left:16px;flex-shrink:0}
#public-profile{width:100%;max-width:880px;margin-inline:auto}
#public-profile .friend-actions{margin-top:24px;padding-top:24px;border-top:1px solid var(--line)}
.friend-actions>button{margin:0 8px 8px 0}
.skip-link{position:fixed;top:8px;left:16px;z-index:100;background:#111923;padding:12px 16px;border-radius:12px;transform:translateY(-180%)}
.skip-link:focus{transform:translateY(0)}
#nav{gap:4px;padding:8px;bottom:calc(12px + env(safe-area-inset-bottom));max-width:600px}
#nav button{flex:1;min-width:0;padding:10px 8px}
footer{padding-bottom:calc(24px + env(safe-area-inset-bottom))}
@media(max-width:1200px){body>header{margin-inline:var(--page-gutter)}}
@media(max-width:700px){:root{--section-gap:16px;--panel-padding:20px;--page-gutter:16px}body>header{padding:16px 0;gap:12px;min-height:80px}body>header .brand{font-size:16px;letter-spacing:2px}body>header .brand img{width:44px;height:44px}body>main,#admin-app{padding:24px var(--page-gutter) 32px}.glass{border-radius:20px}.page-heading{gap:12px}h2{font-size:22px}#admin-app h1{font-size:28px}#admin-app #admin-create{grid-template-columns:minmax(0,1fr)}#admin-create>button{justify-self:stretch}#admin-search{display:grid;grid-template-columns:minmax(0,1fr) auto}#admin-search label{width:100%}.tarot-grid{gap:12px}.tarot-grid article,.tarot-grid figure{padding:12px}.table-wrap th,.table-wrap td{padding:12px}.fields{gap:12px}}
@media(max-width:370px){#people-search,#admin-search{grid-template-columns:minmax(0,1fr)}#nav button{font-size:12px;padding-inline:4px}}
@media(prefers-reduced-motion:reduce){.glass{transition:none}html{scroll-behavior:auto}}
/* Structural panels stay still under the pointer; only controls signal actions. */
.glass:hover{transform:none;box-shadow:none;border-color:var(--color-border);background:var(--color-glass)}
.admin-sections{position:static;width:auto;max-width:none;margin:0;border:0;padding:0;background:none;box-shadow:none;backdrop-filter:none;display:flex;justify-content:flex-start;flex-wrap:wrap;gap:8px}
.admin-sections a{padding:10px 16px;border:1px solid var(--line);border-radius:12px;min-height:44px}
.admin-sections a:hover{background:#00f0ff09;text-decoration:none}
#admin-app section[id]{scroll-margin-top:24px}
.table-hint{font-size:12px;color:var(--muted);margin:12px 0}
#nav button{font-size:12px;line-height:1.35;overflow-wrap:anywhere;white-space:normal;padding-inline:4px}
.header-links{display:flex;gap:24px;align-items:center;margin-left:auto}
.header-links a{display:inline-flex;align-items:center;min-height:44px}
@media(max-width:700px){.header-links{order:3;width:100%;margin:0;gap:16px;justify-content:space-between}body>header:has(.header-links)>select{margin-left:auto}#nav button{font-size:11px}}

.brand .brand-refresh{padding:0;border:0;background:none;box-shadow:none;backdrop-filter:none;flex-shrink:0}.brand .brand-home{color:inherit;text-decoration:none;font-weight:800;letter-spacing:1px}.brand .brand-refresh:focus-visible{outline:2px solid var(--accent);outline-offset:4px}

.early-access{margin-left:auto;padding:8px 12px;font-size:12px;text-align:center;line-height:1.4;white-space:nowrap}.early-access small{display:block;font-size:10px;opacity:.7}.header-note{display:none!important}header:has(.early-access) #identity{display:none}form[data-feedback] textarea{width:100%;resize:vertical}.telegram-welcome{max-width:640px;margin:30px auto}.telegram-welcome form{display:grid;gap:16px}@media(max-width:420px){.early-access{padding:6px;font-size:10px}.early-access small{font-size:9px}}

body{padding-top:var(--tg-safe-top,0px);padding-bottom:var(--tg-safe-bottom,0px)}
