@font-face {
  font-family: Manrope;
  src: url('../../assets/fonts/Manrope.ttf') format('truetype');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
body { font-family: Manrope, system-ui, sans-serif; font-size: 14px; color: var(--ink); background: var(--panel); }
button, input, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .4; cursor: default; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#luna-demo { display: flex; flex-direction: column; height: 100%; }
#luna-chrome { flex: none; padding: 10px 18px 0; background: var(--body); border-bottom: 1px solid var(--line); }
.demo-tabbar { display: flex; align-items: center; gap: 12px; }
.demo-traffic { display: flex; flex: none; gap: 6px; padding-right: 10px; }
.demo-traffic i { width: 9px; height: 9px; border-radius: 50%; background: var(--mute); opacity: .3; }
#demo-tabs { display: flex; align-items: end; gap: 5px; min-width: 0; height: 38px; overflow-x: auto; scrollbar-width: none; }
.demo-tab-wrap { display: flex; align-items: center; flex: 0 0 auto; max-width: 210px; padding-right: 6px; border-radius: 12px 12px 0 0; background: var(--tab); }
.demo-tab-wrap:has([aria-selected="true"]) { background: var(--input); }
.demo-tab { display: flex; align-items: center; gap: 8px; min-width: 90px; max-width: 175px; height: 36px; padding: 0 12px 0 15px; border: 0; border-radius: 12px 0 0 0; background: transparent; color: var(--mute2); }
.demo-tab[aria-selected="true"], .demo-tab.is-active { color: var(--ink); }
.demo-tab > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.demo-tab-close { display: grid; place-items: center; flex: none; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--mute2); font-size: 18px; }
.demo-tab-close:hover { background: var(--hover); color: var(--ink); }
#demo-tab-new { flex: none; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; font-size: 22px; color: var(--mute2); }
#demo-tab-new:hover { background: var(--hover); }
#demo-toolbar { display: flex; align-items: center; gap: 8px; padding: 8px 0 12px; }
#demo-toolbar > button { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 40px; border: 0; border-radius: 11px; background: transparent; color: var(--mute2); }
#demo-toolbar > button:hover { color: var(--ink); background: var(--hover); }
#demo-toolbar svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#demo-url-form { flex: 1; min-width: 0; display: flex; align-items: center; border: 1px solid var(--line3); border-radius: 13px; background: var(--input); }
#demo-url-form:focus-within { border-color: var(--acc); }
.demo-address-icon { display: flex; align-items: center; flex: none; margin-left: 14px; color: var(--mute2); }
.demo-address-icon svg { width: 17px !important; height: 17px !important; }
#demo-address { width: 100%; min-width: 0; height: 42px; padding: 0 12px; border: 0; outline: 0; background: transparent; border-radius: inherit; font-size: 14px; }
#demo-address::placeholder { color: var(--mute2); }
#demo-page { flex: 1; min-height: 0; position: relative; overflow: hidden; background: var(--panel); }
#demo-background { position: absolute; inset: 0; pointer-events: none; }
#demo-view { position: relative; z-index: 1; height: 100%; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line3) transparent; }
.demo-start { min-height: 100%; padding: 36px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }
.demo-start .st-logo { display: block; width: 72px; height: 72px; border-radius: 18px; filter: drop-shadow(0 12px 20px #0002); }
.luna-wordmark { display: block; width: min(74vw, 420px); height: auto; color: var(--ink); }
.demo-time { font-size: clamp(44px, 10vh, 82px); font-weight: 500; line-height: 1; letter-spacing: -.065em; font-variant-numeric: tabular-nums; }
.demo-greeting { font-size: clamp(18px, 3vh, 24px); line-height: 1.4; font-weight: 500; }
.demo-date { font-size: 14px; color: var(--mute2); }
.demo-hint { margin: 0; color: var(--mute2); font-size: 14px; line-height: 1.6; text-wrap: balance; }
.demo-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 8px; }
.demo-actions button, .demo-action, .demo-gesture-pad button, .demo-external a {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  min-height: 42px; padding: 10px 18px; border: 1px solid var(--line3); border-radius: 999px;
  color: var(--ink); background: color-mix(in srgb, var(--card) 55%, transparent); text-decoration: none;
  backdrop-filter: blur(18px); font-size: 14px; line-height: 1.4;
}
.demo-actions button:hover, .demo-action:hover { background: var(--hover); }
.demo-actions svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
#demo-panel { width: min(680px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 26px; border: 1px solid var(--line3); border-radius: 24px; background: var(--menu); color: var(--ink); box-shadow: 0 24px 90px #0005; overflow: auto; }
#demo-panel::backdrop { background: #080b1559; backdrop-filter: blur(8px); }
#demo-panel > header, .demo-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
#demo-panel h2 { margin: 0; font-size: 24px; font-weight: 550; letter-spacing: -.035em; }
#demo-panel button[data-close], .demo-panel-close { width: 36px; height: 36px; flex: none; border: 1px solid var(--line3); border-radius: 50%; background: transparent; font-size: 20px; }
.demo-modes { display: flex; gap: 4px; padding: 4px; margin: 22px 0; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); }
.demo-modes button { flex: 1; min-height: 38px; padding: 7px 12px; border: 0; border-radius: 999px; background: transparent; font-size: 14px; }
.demo-modes button[aria-pressed="true"] { color: var(--pri-fg); background: var(--pri); }
#demo-panel .palette-heading { display: none; }
.color-themes { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.color-theme { border-width: 1px; border-radius: 12px; }
.palette-preview { height: 68px; }
.palette-name { font-size: 13px; line-height: 1.3; font-weight: 550; overflow-wrap: anywhere; }
.demo-note-text { display: block; width: 100%; min-height: 210px; margin-top: 18px; padding: 18px; border: 1px solid var(--line3); border-radius: 14px; background: var(--input); resize: vertical; font-size: 16px; line-height: 1.7; }
.demo-note-hint, .demo-note-status { color: var(--mute2); font-size: 13px; line-height: 1.6; }
.demo-gesture-pad { position: relative; width: calc(100% - 48px); min-height: 250px; height: calc(100% - 48px); margin: 24px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 18px; padding: 24px; border: 1px dashed var(--line3); border-radius: 22px; text-align: center; user-select: none; }
.demo-gesture-pad > svg { flex: none; }
.demo-gesture-pad h1, .demo-gesture-pad h2 { margin: 0; font-weight: 500; font-size: clamp(24px, 5vw, 44px); letter-spacing: -.045em; }
.demo-gesture-pad p { max-width: 42ch; margin: 0; color: var(--mute2); line-height: 1.6; }
.demo-gesture-result { min-height: 24px; color: var(--ink); }
.demo-external { min-height: 100%; padding: 32px; display: flex; flex-direction: column; gap: 20px; align-items: center; justify-content: center; text-align: center; }
#demo-view > .fm { width: min(calc(100% - 48px), 900px); margin: 36px auto; }
@media (max-width: 600px) {
  #luna-chrome { padding: 8px 10px 0; }
  .demo-tabbar { gap: 4px; }
  .demo-traffic { display: none; }
  #demo-toolbar { gap: 4px; flex-wrap: wrap; }
  #demo-toolbar > button { width: 32px; height: 36px; }
  #demo-url-form { flex-basis: calc(100% - 42px); }
  #demo-address { height: 38px; padding-inline: 12px; font-size: 16px; }
  #demo-toolbar > #demo-theme, #demo-toolbar > #demo-gesture, #demo-toolbar > #demo-note { flex: 1; margin-top: 2px; }
  .demo-start { gap: 14px; padding: 22px 16px; }
  .demo-time { font-size: clamp(40px, 9vh, 66px); }
  .demo-start .st-logo { width: 54px; height: 54px; border-radius: 14px; }
  .demo-actions { gap: 7px; }
  .demo-actions button { padding: 9px 13px; font-size: 13px; }
  #demo-panel { padding: 18px; border-radius: 18px; }
  #demo-panel h2 { font-size: 21px; }
  .color-themes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .palette-preview { height: 58px; padding-inline: 6px; }
  .palette-name { font-size: 12px; }
  .demo-modes button { padding-inline: 8px; }
  .demo-gesture-pad { width: calc(100% - 28px); height: calc(100% - 28px); margin: 14px; padding: 18px; }
  #demo-view > .fm { width: calc(100% - 24px); margin: 20px 12px; padding: 16px 10px; border-radius: 18px; }
  .fm-head { flex-wrap: wrap; gap: 5px; }
  .fm-bezel { padding: 8px; }
}
@media (max-height: 520px) {
  .demo-start { gap: 10px; padding-block: 16px; }
  .demo-start .st-logo { display: none; }
  .demo-time { font-size: 44px; }
  .demo-start .luna-wordmark { width: 260px; }
  .demo-gesture-pad { gap: 10px; padding-block: 16px; }
}
@media (max-width: 360px) {
  .color-themes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
