/* css/app.css: the Ondamare interface (Highframe concept no. 1), 1 Nov 2026.
   Layout and phone flow adapted from the Blu Marine app (10_BLU_MARINE/review/realism/integ/site/css/app.css, read only):
   the project card top left, the credits (i) and the compass top right with Reset view under them, the toolbar at the
   bottom, sheets above it on a phone and floating panels on a desktop. Highframe identity (PLATFORM_PLAN/brand/
   highframe_identity.html, dark tokens): ink #eef1f4, muted #98a2ac, line #29303a, brass #c8a473 on #0d1013; Sora for
   the project name, Instrument Sans for the interface; the steel blue of the Highframe mark (#bccbda) for the site pin.
   Every touch target is at least 44 px; panels never cover most of the 3D on a phone (WEB3D 4.2, 7.5). */

:root {
  --bg: #0d1013;
  --ink: #eef1f4;
  --mute: #98a2ac;
  --mute-2: #b9c1c9;
  --accent: #c8a473;
  --accent-rgb: 200, 164, 115;
  --steel: #bccbda;
  --steel-rgb: 188, 203, 218;
  --line: rgba(238, 241, 244, 0.10);
  --line-strong: rgba(238, 241, 244, 0.20);
  --glass-top: rgba(34, 40, 48, 0.58);
  --glass-bot: rgba(13, 16, 19, 0.62);
  --glass-solid: rgba(15, 18, 22, 0.90);
  --shadow: 0 14px 36px rgba(4, 6, 9, 0.30), 0 2px 6px rgba(4, 6, 9, 0.18);
  --radius: 16px;
  --r-ctl: 12px;
  --gutter: 16px;
  --tb-h: 58px;
  --tb-b: 26px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Sora", "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font: 14px/1.45 var(--font);
  -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- glass: a soft vertical sheen, a hairline, a top highlight and one quiet shadow */
.glass {
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bot));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.35); backdrop-filter: blur(18px) saturate(1.35);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass { background: var(--glass-solid); } }

.eyebrow { color: var(--mute); font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; line-height: 1.2; }
.x { flex: none; width: 44px; height: 44px; margin: -8px -8px 0 0; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: var(--mute-2); }
.x svg { width: 18px; height: 18px; }
@media (hover: hover) { .x:hover { color: var(--ink); background: rgba(255, 255, 255, 0.07); } }

/* ---- the project card (top left): the Highframe mark, the project, the concept line */
.brand { position: fixed; z-index: 12; top: calc(var(--gutter) + var(--safe-t)); left: calc(var(--gutter) + var(--safe-l)); border-radius: var(--radius); max-width: calc(100% - 2 * var(--gutter) - 124px - var(--safe-l) - var(--safe-r)); }
.brand-btn { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; margin: 0; padding: 10px 18px 10px 16px; border: 0; border-radius: inherit; background: transparent; text-align: left; }
/* (the full Highframe lockup is unreadable at card size, its wordmark about 6 px tall: the card carries the mark, and
   "by Highframe" in words; the lockup stays on the loading screen) */
.brand-logo { display: none; flex: none; height: 20px; width: auto; }
.brand-icon { display: block; flex: none; height: 36px; width: auto; }
.brand-rule { flex: none; align-self: stretch; width: 1px; margin: 2px 0; background: var(--line-strong); }
.brand-proj { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.brand-name { font: 400 15px/1.15 var(--font-display); letter-spacing: 0.32em; text-transform: uppercase; white-space: nowrap; }
.brand-sub { color: var(--mute-2); font-size: 11.5px; letter-spacing: 0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-tag { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; margin-top: 1px; }
.brand-tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: none; }

/* ---- top right: the credits (i) and the compass; Reset view under them */
.topr { position: fixed; z-index: 12; top: calc(var(--gutter) + var(--safe-t)); right: calc(var(--gutter) + var(--safe-r)); display: flex; gap: 8px; }
.iconbtn { width: 48px; height: 48px; padding: 0; border-radius: 50%; display: grid; place-items: center; color: var(--ink); position: relative; }
.iconbtn .i { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font: italic 600 13px/1 Georgia, "Times New Roman", serif; color: var(--accent); }
.compass svg { width: 34px; height: 34px; }
.compass .needle { transform-origin: 20px 20px; transition: none; }
.compass .cn { position: absolute; top: 2px; left: 0; right: 0; text-align: center; font: 700 11px/1 var(--font); color: var(--accent); pointer-events: none; }
@media (hover: hover) { .iconbtn:hover, .resetview:hover, .toolbar button:hover { border-color: rgba(var(--accent-rgb), 0.55); } }
.tipped::after { content: attr(data-tip); position: absolute; right: 0; top: calc(100% + 8px); padding: 5px 10px; border-radius: 8px; background: var(--glass-solid); border: 1px solid var(--line); font: 500 12px/1.2 var(--font); white-space: nowrap; color: var(--ink); opacity: 0; pointer-events: none; transition: opacity .15s; }
@media (hover: hover) { .tipped:hover::after { opacity: 1; } }

.resetview { position: fixed; z-index: 12; top: calc(var(--gutter) + var(--safe-t) + 58px); right: calc(var(--gutter) + var(--safe-r)); display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px 0 12px; border-radius: 999px; color: var(--ink); font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.resetview svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
.resetview kbd { font: 500 11px/1 var(--font); color: var(--mute); border: 1px solid var(--line-strong); border-radius: 4px; padding: 2px 4px; margin-left: 2px; letter-spacing: 0.04em; }
@media (pointer: coarse) { .resetview kbd { display: none; } }

/* ---- the toolbar (bottom centre): Views, Area, Light (its label is the time of day) */
.toolbar { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: calc(var(--tb-b) + var(--safe-b)); display: flex; gap: 4px; padding: 5px; border-radius: 22px; }
.toolbar button { position: relative; width: 92px; height: var(--tb-h); border: 1px solid transparent; border-radius: 17px; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--mute-2); font-size: 11.5px; font-weight: 500; letter-spacing: 0.04em; transition: background .18s, color .18s; }
.toolbar button svg { width: 21px; height: 21px; }
.toolbar button.on { color: var(--ink); background: rgba(var(--accent-rgb), 0.16); border-color: rgba(var(--accent-rgb), 0.38); }
.toolbar button.on svg { color: var(--accent); }
.toolbar .tb-time { font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }
.toolbar .tb-ic { display: grid; place-items: center; width: 21px; height: 21px; color: var(--accent); }

/* the always-on honesty line (WEB3D O.3): under the toolbar */
.honesty { position: fixed; z-index: 11; left: 0; right: 0; bottom: calc(6px + var(--safe-b)); text-align: center; font-size: 11px; line-height: 14px; color: rgba(238, 241, 244, 0.80); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75); pointer-events: none; padding: 0 12px; }

/* ---- small pop panels above the toolbar: Views and Light */
.pop { position: fixed; z-index: 19; left: 50%; transform: translateX(-50%); bottom: calc(var(--tb-b) + var(--tb-h) + 10px + 12px + var(--safe-b)); width: min(440px, calc(100% - 24px)); border-radius: var(--radius); padding: 14px 16px 16px; animation: popIn .22s var(--ease); }
@keyframes popIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.pop-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.pop-head .now { font-size: 15px; font-weight: 600; margin-top: 3px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.chipbtn { min-height: 44px; padding: 8px 10px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--ink); font-size: 13px; font-weight: 500; line-height: 1.2; display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; transition: background .15s, border-color .15s; }
@media (hover: hover) { .chipbtn:hover { background: rgba(255, 255, 255, 0.08); } }
.chipbtn.on { border-color: rgba(var(--accent-rgb), 0.70); background: rgba(var(--accent-rgb), 0.16); }
.moodbtn { flex-direction: column; gap: 3px; min-height: 64px; }
.moodbtn svg { width: 20px; height: 20px; color: var(--accent); }
.moodbtn small { color: var(--mute); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.pop .hint { margin: 10px 0 0; color: var(--mute); font-size: 11.5px; line-height: 1.45; }

/* ---- panels: the Area sheet (left on a desktop) and About and credits (right on a desktop); bottom sheets on a phone */
.panel { position: fixed; z-index: 15; border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; overscroll-behavior: contain; }
.panel-head { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 18px 8px; }
.panel-head h2 { margin: 4px 0 0; font: 500 18px/1.2 var(--font-display); letter-spacing: 0.01em; }
.panel-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 18px 16px; touch-action: pan-y; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.18) transparent; }
.panel.side { left: calc(var(--gutter) + var(--safe-l)); top: calc(var(--gutter) + var(--safe-t) + 92px); max-height: calc(100% - 92px - 2 * var(--gutter) - var(--safe-t) - var(--safe-b)); width: 372px; animation: sideIn .26s var(--ease); }
.panel.right { right: calc(var(--gutter) + var(--safe-r)); top: calc(var(--gutter) + var(--safe-t) + 112px); max-height: calc(100% - 112px - 2 * var(--gutter) - var(--tb-h) - var(--tb-b) - 10px - var(--safe-t) - var(--safe-b)); width: 400px; animation: sideIn .26s var(--ease); }
@keyframes sideIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* (a desktop narrower than the toolbar plus the side panel: the side panel ends above the toolbar) */
@media (max-width: 1180px) { .panel.side { max-height: calc(100% - 92px - var(--gutter) - var(--tb-b) - var(--tb-h) - 22px - var(--safe-t) - var(--safe-b)); } }

/* About and credits */
.about p { margin: 0 0 10px; font-size: 13.5px; color: var(--mute-2); }
.about p.lead { color: var(--ink); font-size: 14px; }
.about .honest { padding: 10px 12px; border-radius: var(--r-ctl); border: 1px solid rgba(var(--accent-rgb), 0.35); background: rgba(var(--accent-rgb), 0.08); color: var(--ink); }
.about h3 { margin: 14px 0 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); }
.about ul { margin: 0; padding: 0 0 0 16px; color: var(--mute-2); font-size: 12.5px; }
.about li { margin: 0 0 6px; }

/* ---- phones (portrait) and narrow windows: sheets at the bottom, a compact card, a compact toolbar */
@media (max-width: 599px) {
  :root { --gutter: 12px; --tb-h: 54px; --tb-b: 24px; }
  .brand { max-width: calc(100% - 2 * var(--gutter) - 112px - var(--safe-l) - var(--safe-r)); }
  .brand-btn { gap: 10px; min-height: 52px; padding: 8px 12px 8px 10px; }
  .brand-rule { display: none; }
  .brand-icon { height: 28px; }
  .brand-name { font-size: 13.5px; letter-spacing: 0.26em; }
  .brand-sub { font-size: 11px; }
  .brand-tag { font-size: 11px; letter-spacing: 0.01em; text-transform: none; font-weight: 600; }
  .iconbtn { width: 46px; height: 46px; }
  .topr { gap: 6px; }
  .resetview { top: calc(var(--gutter) + var(--safe-t) + 54px); padding: 0 12px 0 10px; font-size: 11px; }
  .toolbar { gap: 2px; padding: 4px; border-radius: 20px; }
  .toolbar button { width: 96px; font-size: 11px; border-radius: 16px; }
  .honesty { font-size: 11px; bottom: calc(5px + var(--safe-b)); }
  .panel.side, .panel.right { left: calc(10px + var(--safe-l)); right: calc(10px + var(--safe-r)); top: auto; width: auto; bottom: calc(var(--tb-b) + var(--tb-h) + 10px + 8px + var(--safe-b)); max-height: 42vh; border-radius: 18px; animation: sheetUp .26s var(--ease); }
  .panel.right { max-height: 50vh; }
  .panel-head { padding: 14px 16px 6px; }
  .panel-head h2 { font-size: 16.5px; }
  .panel-body { padding: 2px 16px 14px; }
  .pop { bottom: calc(var(--tb-b) + var(--tb-h) + 10px + 8px + var(--safe-b)); padding: 12px 14px 14px; }
}
@keyframes sheetUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
/* phone held sideways: the sheets beside the toolbar on the left, never over most of the view */
@media (orientation: landscape) and (max-height: 500px) {
  :root { --gutter: 10px; --tb-h: 48px; --tb-b: 18px; }
  .brand-sub { display: none; }
  .panel.side, .panel.right { left: auto; right: calc(10px + var(--safe-r)); top: calc(10px + var(--safe-t) + 104px); bottom: calc(10px + var(--safe-b)); width: min(340px, 42vw); max-height: none; }
  .panel.side { left: calc(10px + var(--safe-l)); right: auto; top: calc(10px + var(--safe-t) + 66px); }
}

/* clean frames for ads (?ui=0): the project card stays (as before the interface), everything else goes */
body.noui .topr, body.noui .resetview, body.noui .toolbar, body.noui .honesty, body.noui .pop, body.noui .panel, body.noui .ar-layer { display: none !important; }
/* ([EXP round 3] the old "prefers-reduced-motion: no panel animation" rule is gone: his PC reports reduce (WEB3D 2.26);
   ?motion=0 turns the panel animations off instead) */
body.nomotion .pop, body.nomotion .panel { animation: none; }

/* ======================================================================== EXPERIENCE round 3 (2 Nov 2026) */
/* ---- U3 the Sun Path in the Light panel (js/sunpath.js; .sp is set only when the feature is on) */
.sp-scrub { position: relative; height: 44px; margin: 2px 0 0; }
.sp-track { position: absolute; left: 14px; right: 14px; top: 17px; height: 10px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10); }
.sp-ticks { position: absolute; inset: 0; pointer-events: none; }
.sp-ticks b { position: absolute; top: -5px; width: 2px; height: 20px; margin-left: -1px; border-radius: 1px; background: rgba(238, 241, 244, 0.85); box-shadow: 0 0 0 1px rgba(13, 16, 19, 0.35); }
.sp-range { position: absolute; inset: 0; width: 100%; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; touch-action: none; cursor: pointer; }
.sp-range::-webkit-slider-runnable-track { height: 44px; background: transparent; }
.sp-range::-moz-range-track { height: 44px; background: transparent; }
.sp-range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: 8px; border-radius: 50%; background: #fff3dc; border: 3px solid var(--accent); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45); }
.sp-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff3dc; border: 3px solid var(--accent); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45); }
.sp-range:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
.sp-scale { display: flex; justify-content: space-between; padding: 0 4px; margin: 0 0 10px; color: var(--mute); font-size: 11px; font-variant-numeric: tabular-nums; }
.pop.sp .moods .moodbtn { min-height: 50px; gap: 1px; }
.pop.sp .moods .moodbtn svg { width: 18px; height: 18px; }
.sp-row { display: flex; gap: 6px; margin-top: 6px; }
.sp-seasons { flex: 1 1 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.sp-seasons .chipbtn { padding: 8px 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sp-play { flex: none; padding: 8px 12px; gap: 6px; white-space: nowrap; }
.sp-play svg { width: 16px; height: 16px; color: var(--accent); }
.sp-play .sp-sm { display: none; }
.sp-play[aria-pressed="true"] { border-color: rgba(var(--accent-rgb), 0.70); background: rgba(var(--accent-rgb), 0.16); }
/* the sun's arc of the day in the compass (it turns with the needle) */
.compass .sunarc-path { fill: none; stroke: #e8c58a; stroke-opacity: .8; stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 1.2 1.6; }
.compass .sunarc-sun { fill: #ffd98f; stroke: rgba(13, 16, 19, 0.6); stroke-width: .6; }
.compass .sunarc-sun.down { fill: #7c86a8; }
@media (max-width: 599px) {
  .pop.sp .moods .moodbtn svg { display: none; }
  .sp-play .sp-lg { display: none; }
  .sp-play .sp-sm { display: inline; }
  .sp-play { min-width: 52px; justify-content: center; padding: 8px 10px; }
  .pop.sp .hint { font-size: 11px; margin-top: 8px; }
}

/* ---- U4 One Link: the Share button, the toast, the QR in About (js/onelink.js) */
.toolbar button[data-tb="share"][hidden] { display: none !important; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: calc(var(--tb-b) + var(--tb-h) + 26px + var(--safe-b)); transform: translateX(-50%); max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink); opacity: 0; pointer-events: none; transition: opacity .2s; text-align: center; }
.toast.on { opacity: 1; }
.about .qr { display: flex; gap: 14px; align-items: center; margin: 4px 0 10px; padding: 10px 12px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); }
.about .qr svg { flex: none; width: 124px; height: 124px; border-radius: 6px; background: #fff; }
.about .qr p { margin: 0; font-size: 12.5px; }
.about .qr-copy { margin-top: 8px; min-height: 44px; padding: 0 14px; border-radius: var(--r-ctl); border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.05); color: var(--ink); font-weight: 600; font-size: 13px; }
@media (max-width: 599px), (orientation: landscape) and (max-height: 500px) { .about .qr-wrap { display: none; } }

/* ---- U1 phone feel (js/phonefit.js sets body.pf; ?f.phonefit=0 = the layout before). One hand: on a phone every
   control the thumb needs sits in the lower part of the screen (the toolbar, Reset view, the compass); the project
   card and the credits (i) stay at the top (read, not used). Safe areas: every edge control keeps the notch, the
   rounded corners and the home bar clear (env(safe-area-inset-*)) */
body.pf .honesty { padding-left: calc(12px + var(--safe-l)); padding-right: calc(12px + var(--safe-r)); }
@media (max-width: 599px) {
  body.pf .toolbar button { width: 80px; }
  body.pf #compass, body.pf .resetview { position: fixed; z-index: 13; right: calc(var(--gutter) + var(--safe-r)); top: auto; }
  body.pf .resetview { bottom: calc(var(--tb-b) + var(--tb-h) + 10px + 12px + var(--safe-b)); width: 46px; height: 46px; min-height: 46px; padding: 0; justify-content: center; border-radius: 50%; }
  body.pf .resetview span, body.pf .resetview kbd { display: none; }
  body.pf .resetview svg { width: 20px; height: 20px; }
  body.pf #compass { bottom: calc(var(--tb-b) + var(--tb-h) + 10px + 12px + 46px + 8px + var(--safe-b)); }
  body.pf.layer-open #compass, body.pf.layer-open .resetview { opacity: 0; visibility: hidden; pointer-events: none; }
}
@media (orientation: landscape) and (max-height: 500px) {
  body.pf #compass, body.pf .resetview { position: fixed; z-index: 13; top: auto; bottom: calc(var(--tb-b) + 6px + var(--safe-b)); }
  body.pf #compass { right: calc(var(--gutter) + var(--safe-r)); }
  body.pf .resetview { right: calc(var(--gutter) + var(--safe-r) + 54px); width: 46px; height: 46px; min-height: 46px; padding: 0; justify-content: center; border-radius: 50%; }
  body.pf .resetview span, body.pf .resetview kbd { display: none; }
  body.pf.layer-open #compass, body.pf.layer-open .resetview { opacity: 0; visibility: hidden; pointer-events: none; }
}
