/* UMKM Catat — enamel toko sign + thermal struk.
   See DESIGN_SYSTEM.md. Offline CSS only. No CDN fonts.
*/

@font-face {
  font-family: Outfit;
  src: url("/fonts/outfit-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --shop: #e4e7ec;
  --tape: #ffffff;
  --enamel: #1c2430;
  --enamel-deep: #11161d;
  --struk: #e8f25a;
  --ink: #14171a;
  --ink-soft: #2c333a;
  --muted: #5a616c;
  --hair: #d5d8de;
  --tile: #dce0e6;
  --ok: #1f6b45;
  --warn: #9a6b1e;
  --danger: #c4472a;
  --radius: 24px;
  --radius-sm: 16px;
  --nav-h: 72px;
  --tap: 48px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --liquid: cubic-bezier(0.32, 0.72, 0, 1);
  --press-ms: 480ms;
  --shadow: 0 8px 28px rgba(17, 22, 29, 0.07);
  --font-display: "Avenir Next", Outfit, "Segoe UI", system-ui, sans-serif;
  --font-body: "Avenir Next", Outfit, "Segoe UI", system-ui, sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --spark: #3d7cff;
  --night: #1c1f24;
  --forest: var(--enamel);
  --forest-deep: var(--enamel-deep);
  --paper: var(--tape);
  --surface: var(--tape);
  --line: var(--hair);
  --line-strong: #c4c9c2;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: auto;
  font-synthesis: none;
  background: var(--shop);
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y;
}

body {
  position: fixed;
  inset: 0;
  width: 100%;
  padding-bottom: 0;
}

/* iOS: keep grayscale AA. Android Chrome thins stems if this is global. */
@supports (-webkit-touch-callout: none) {
  html,
  body { -webkit-font-smoothing: antialiased; }

  /* iOS 26: appearance:auto forces content-box, so width:100% + padding
     overflows a 1fr column. none restores border-box. */
  input[type="time"] {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    padding-inline-start: 12px;
    -webkit-min-logical-width: 0;
  }
}

a {
  color: var(--enamel);
  text-decoration: none;
  font-weight: 700;
}

a:hover { text-decoration: underline; text-underline-offset: 3px; }

a.btn:hover { text-decoration: none; }

.nav,
.topbar,
.ptr,
.glance-go,
.icon-btn,
.btn,
.pick-btn,
.glance-period {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

input, textarea, select {
  -webkit-user-select: text;
  user-select: text;
  touch-action: auto;
}

.app-shell {
  max-width: 440px;
  height: 100%;
  margin: 0 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 16px 18px calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 20px);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.app-shell::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.band {
  min-height: 100%;
  transform-origin: center top;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.ptr {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top, 0px));
  left: 50%;
  z-index: 12;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.72);
  transition: opacity 0.42s var(--liquid), transform 0.42s var(--liquid);
}

.ptr.is-out {
  opacity: 1;
  transform: none;
}

.ptr-knob {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--tape);
  color: var(--enamel);
  box-shadow: var(--shadow);
}

.ptr.is-armed .ptr-knob {
  background: var(--struk);
  color: var(--enamel);
}

.ptr-knob .icon {
  width: 20px;
  height: 20px;
}

.ptr.is-busy .ptr-knob .icon {
  animation: ptr-spin 0.95s linear infinite;
}

.sheet {
  background: transparent;
  padding: 0;
  min-height: 0;
  border-radius: 0;
  box-shadow: none;
}

.sheet::before { display: none; }

.rule { display: none; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 4px 0 0;
  border-bottom: none;
}

.brand-block { min-width: 0; flex: 1; }

.brand {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0;
  line-height: 1.2;
  color: var(--ink);
  text-transform: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform-origin: left center;
  transition: transform var(--press-ms) var(--liquid);
}

a.brand {
  font-weight: 800;
  color: var(--ink);
}

a.brand:hover { text-decoration: none; color: var(--ink); }
a.brand:active { transform: scale(0.98); }
a.brand:focus-visible { outline: 2px solid var(--enamel); outline-offset: 2px; }

.topbar .icon-btn { flex-shrink: 0; }

#app > section { animation: none; }

#app.route-enter > section {
  animation: page-in 0.52s var(--liquid) both;
}

.page-eyebrow {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  margin: 0 0 2px;
}

h1, h2 {
  font-family: var(--font-display);
  letter-spacing: -0.04em;
  margin: 0;
  font-weight: 800;
  color: var(--ink);
}

h1 { font-size: clamp(1.2rem, 5vw, 1.45rem); line-height: 1.15; }
h2 { font-size: 1rem; line-height: 1.2; }

.lede {
  color: var(--muted);
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.page-head { display: grid; gap: 2px; }

.page-status {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--night);
  color: #fff;
  border-radius: 28px;
  padding: 16px 18px;
}

.page-status > div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding-left: 18px;
}

.page-status-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.62);
}

.page-status-value {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.page-status-value.is-warn { color: #f0c36a; }

.page-kicker {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

#app > section {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 14px;
  font-size: 0.84rem;
  color: var(--muted);
}

.meta-row a { padding: 4px 0; }

.stack { display: grid; gap: 12px; min-width: 0; }

.metrics { display: grid; gap: 12px; }

.metrics-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.metric {
  position: relative;
  background: var(--tape);
  border: none;
  border-radius: 28px;
  padding: 16px 18px 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.metric.tight { margin-top: 0; }
.metric::after { display: none; }

.metric--hero {
  padding: 18px;
  background: var(--night);
  border: none;
  border-radius: 28px;
  color: #fff;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-shadow: none;
}

.metric--hero::before { display: none; }

.metric.metric--hero .label,
.metric.metric--hero .hint { color: rgba(255, 255, 255, 0.62); }

.metric.metric--hero .value {
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 7vw, 2.15rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin: 6px 0 0;
  font-variant-numeric: tabular-nums;
}

.metric.metric--hero .value.pos { color: #8ee0b0; }
.metric.metric--hero .value.neg { color: #ffb4a4; }

.metric.metric--hero.tight {
  min-height: 0;
  padding: 18px;
}

.metric.metric--hero.tight .value {
  color: #fff;
  font-size: clamp(1.4rem, 6vw, 1.85rem);
  margin: 4px 0 0;
}

.metric .label {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

.metric .value {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  margin-top: 6px;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.metric .hint {
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 6px;
  line-height: 1.35;
}

.metric .value.neg { color: var(--danger); }
.metric .value.pos { color: var(--ok); }
.metric .value-sm { font-size: 0.95rem; }

.field { display: grid; gap: 6px; min-width: 0; }

.field label {
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-weight: 700;
}

input, select, textarea, button { font: inherit; }

input, select, textarea {
  width: 100%;
  min-height: var(--tap);
  background: var(--tape);
  color: var(--ink);
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  outline: none;
  box-shadow: var(--shadow);
  transition: box-shadow var(--press-ms) var(--liquid);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--enamel);
  box-shadow: 0 0 0 2px rgba(22, 58, 95, 0.18);
}

.row-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  overflow-x: clip;
}

/* iOS Safari: native time control min-content is wider than half a 390px sheet.
   iOS 26 also paints appearance:auto as content-box, ignoring the global reset. */
input[type="time"] {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding-inline-end: 36px;
  -webkit-min-logical-width: 0;
}

input[type="time"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit-fields-wrapper,
input[type="time"]::-webkit-datetime-edit-hour-field,
input[type="time"]::-webkit-datetime-edit-minute-field,
input[type="time"]::-webkit-datetime-edit-meridiem-field,
input[type="time"]::-webkit-datetime-edit-ampm-field {
  min-width: 0;
  padding: 0;
}

input[type="time"]::-webkit-date-and-time-value {
  text-align: left;
}

input[type="time"]::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 12px;
  width: 1em;
  height: 1em;
  margin: 0;
  padding: 0;
}

.icon {
  width: 1em;
  height: 1em;
  display: block;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  border: none;
  border-radius: 999px;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0;
  transition: transform var(--press-ms) var(--liquid),
    background var(--press-ms) var(--liquid),
    box-shadow var(--press-ms) var(--liquid),
    color var(--press-ms) var(--liquid),
    opacity var(--press-ms) var(--liquid);
}

.btn:active:not(:disabled) { transform: scale(0.96); }
.btn:focus-visible { outline: 2px solid var(--enamel); outline-offset: 2px; }

.btn-primary {
  background: var(--enamel);
  color: #f4f7fa;
  box-shadow: var(--shadow);
}

.btn-primary:hover:not(:disabled) { background: var(--enamel-deep); }

.btn-ghost {
  background: var(--tape);
  color: var(--enamel);
  border: none;
  box-shadow: var(--shadow);
}

.btn-ghost:hover:not(:disabled) {
  background: #f8f9fb;
}

.btn-danger {
  background: #fdecea;
  color: var(--danger);
  border: none;
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-block { width: 100%; margin-top: 0; }

.btn svg.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-icon {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
}

.btn-icon svg.icon {
  width: 20px;
  height: 20px;
}

.btn-cta {
  width: 100%;
  min-height: 54px;
  margin: 0;
  font-size: 1.02rem;
  background: var(--struk);
  color: var(--enamel);
  box-shadow: none;
}

.btn-cta:hover:not(:disabled) {
  background: #dce84a;
}

.btn-cta svg.icon { color: var(--enamel); }

.checkout-bar {
  display: grid;
  gap: 12px;
  margin-top: 0;
}

.checkout-bar .banner { margin-bottom: 0; }

.toolbar {
  display: grid;
  gap: 12px;
}

.list {
  display: grid;
  gap: 0;
  background: var(--tape);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.list-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 14px 16px;
  min-height: 72px;
  box-shadow: none;
}

.list-item + .list-item { border-top: 1px solid var(--hair); }

.stock-qty {
  width: 52px;
  min-height: 52px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--tile);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.stock-qty.is-low {
  background: var(--warn);
  color: #fff;
}

.stock-qty.is-empty {
  background: var(--danger);
  color: #fff;
}

.stock-qty.is-low small,
.stock-qty.is-empty small { color: inherit; opacity: 0.85; }

.stock-qty small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  margin-top: 3px;
}

.list-item .title { font-weight: 700; color: var(--ink); }
.list-item .meta { color: var(--muted); font-size: 0.82rem; margin-top: 3px; }
.list-item .grow { flex: 1; min-width: 0; }

.list-item .actions {
  display: flex;
  flex-direction: row;
  gap: 6px;
  flex-shrink: 0;
  align-items: center;
}

.list-item .actions button {
  font-size: 0.75rem;
  padding: 8px 12px;
  min-height: 44px;
  width: auto;
  border-radius: 999px;
}

.list-item.cart-row .actions {
  flex-direction: column;
  align-items: flex-end;
}

.list-item.cart-row .actions button { width: auto; }

.list-item.plain { grid-template-columns: 1fr auto; }

.settings-ico {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--tile);
  color: var(--enamel);
}

.settings-ico .icon { width: 20px; height: 20px; }

a.settings-row {
  font-weight: inherit;
  color: inherit;
}

a.settings-row:hover {
  text-decoration: none;
  color: inherit;
}

a.settings-row:focus-visible {
  outline: 2px solid var(--enamel);
  outline-offset: -2px;
}

.settings-row > .icon {
  color: var(--muted);
  width: 18px;
  height: 18px;
}

.list-item.pick-btn .actions { flex-direction: row; }

.list-item.pick-btn .actions button,
.list-item.pick-btn .pick-plus { width: 40px; }

.empty {
  color: var(--muted);
  text-align: left;
  padding: 22px 18px;
  border: none;
  border-radius: 28px;
  background: var(--tape);
  box-shadow: var(--shadow);
}

.list > .empty {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.banner {
  background: var(--tape);
  border: none;
  color: var(--ink-soft);
  border-radius: 28px;
  padding: 14px 16px;
  font-size: 0.88rem;
  margin: 0;
  box-shadow: var(--shadow);
}

.banner.error { background: #fdecea; color: var(--danger); }
.banner.warn { background: #fff6e8; color: var(--warn); }

.nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: min(400px, calc(100% - 28px));
  height: 64px;
  padding: 0 8px;
  background: var(--enamel);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  border-radius: 999px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 20;
  box-shadow: 0 12px 32px rgba(17, 22, 29, 0.28);
  border-top: none;
}

.nav::before { display: none; }

.nav a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 64px;
  color: rgba(244, 247, 250, 0.55);
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  text-decoration: none;
  border-radius: 999px;
  transition: color var(--press-ms) var(--liquid), transform var(--press-ms) var(--liquid);
}

.nav a:hover { color: #fff; text-decoration: none; }

.nav a.active { color: var(--struk); }

.nav a.active::before { display: none; }

.nav a.locked { opacity: 0.35; cursor: not-allowed; }
.nav a:active:not(.locked) { transform: scale(0.9); }
.nav a svg { width: 20px; height: 20px; }

.period {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  padding: 5px;
  border-radius: 999px;
  background: var(--tape);
  border: none;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.period button {
  flex: 1;
  min-height: 40px;
  padding: 8px 6px;
  border: none;
  border-right: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.82rem;
  transition: background var(--press-ms) var(--liquid),
    color var(--press-ms) var(--liquid),
    transform var(--press-ms) var(--liquid);
}

.period button:last-child { border-right: none; }

.period button.active {
  background: var(--enamel);
  color: #f4f7fa;
  box-shadow: none;
}

.period button:active { transform: scale(0.96); }

.period button:focus-visible {
  outline: 2px solid var(--struk);
  outline-offset: -2px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 23, 26, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 30;
  padding: 0;
  animation: scrim-in 0.4s var(--liquid) both;
}

.modal {
  width: min(440px, 100%);
  background: var(--tape);
  border: none;
  border-top: none;
  border-radius: 28px 28px 0 0;
  padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  max-height: 85vh;
  overflow: auto;
  overscroll-behavior: contain;
  box-shadow: 0 -8px 32px rgba(17, 22, 29, 0.12);
  animation: sheet-up 0.52s var(--liquid) backwards;
}

.modal.is-settled { animation: none; }

.modal h2 { margin-bottom: 14px; }
.modal-actions { display: flex; gap: 8px; margin-top: 14px; }
.modal-actions .btn { flex: 1; }
.modal-actions .btn-cta {
  width: auto;
  min-height: var(--tap);
  font-size: 1rem;
}
.hidden { display: none !important; }

.guide-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  background: var(--tape);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.guide-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: start;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 16px;
  box-shadow: none;
}

.guide-step + .guide-step { border-top: 1px solid var(--hair); }

.guide-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  background: var(--enamel);
  color: var(--tape);
}

.guide-body h2 { font-size: 1.02rem; margin: 0 0 6px; }
.guide-body p { margin: 0 0 8px; color: var(--muted); font-size: 0.9rem; }

.guide-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.guide-link .icon { width: 16px; height: 16px; }

.list-item.cart-row,
.list-item.pick-btn {
  grid-template-columns: 1fr auto;
  width: 100%;
}

.pick-btn {
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  background: transparent;
  transition: transform var(--press-ms) var(--liquid);
}

.pick-btn:active { transform: scale(0.985); }

.pick-plus {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--enamel);
  color: var(--tape);
  font-weight: 700;
  transition: transform var(--press-ms) var(--liquid);
}

.pick-plus svg.icon { width: 18px; height: 18px; }

.search-wrap { position: relative; }

.search-wrap .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-wrap input { padding-left: 42px; }

.qty-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.qty-row .qty-btn {
  padding: 0;
  min-width: 44px;
  min-height: 44px;
}

.sync-strip { margin-top: 14px; margin-bottom: 0; }
.sync-strip a { margin-left: 6px; font-weight: 700; }

.setup-details {
  border: none;
  border-radius: 28px;
  padding: 16px 18px;
  color: var(--muted);
  font-size: 0.9rem;
  background: var(--tape);
  box-shadow: var(--shadow);
}

.setup-details summary {
  cursor: pointer;
  color: var(--ink-soft);
  font-weight: 700;
}

.setup-ol {
  margin: 10px 0 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 6px;
}

.setup-ol code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--enamel);
  background: #eef2f6;
  padding: 1px 5px;
  border-radius: 2px;
}

.product-pick {
  margin-top: 0;
  max-height: 240px;
  overflow: auto;
  overscroll-behavior: contain;
}

.section-gap { margin-top: 4px; }

.feed-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.panel-night {
  background: var(--night);
  color: #fff;
  border-radius: 28px;
  padding: 18px;
}

.panel-night .page-kicker { color: rgba(255, 255, 255, 0.62); }

.panel-night h2 {
  color: #fff;
  font-size: 1.25rem;
  margin: 2px 0 0;
}

.panel-night p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.88rem;
}

.panel-night .value {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

body.is-home .topbar { display: none; }
body.is-home .app-shell { padding-top: 12px; }

html.is-pwa .app-shell {
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
}

html.is-pwa body.is-home .app-shell {
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
}

.glance {
  display: grid;
  gap: 16px;
}

.glance-head {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
}

.glance-tools {
  display: flex;
  gap: 8px;
  align-items: center;
}

.glance-hello { min-width: 0; }

.glance-kicker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 2px;
}

.glance-kicker {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: capitalize;
}

.glance-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--enamel);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  transition: transform var(--press-ms) var(--liquid);
}

.glance-avatar:hover { text-decoration: none; color: #fff; }
.glance-avatar:active { transform: scale(0.92); }

.glance-title {
  margin: 0;
  font-size: clamp(1.2rem, 5vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.demo-tag {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--enamel);
  background: var(--struk);
  border-radius: 999px;
  padding: 4px 8px;
  line-height: 1.2;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--tape);
  color: var(--enamel);
  box-shadow: var(--shadow);
  text-decoration: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  appearance: none;
  transition: transform var(--press-ms) var(--liquid),
    color var(--press-ms) var(--liquid),
    background var(--press-ms) var(--liquid);
}

.icon-btn[hidden] { display: none !important; }

.icon-btn:hover { text-decoration: none; color: var(--ink); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.online { color: var(--ok); }
.icon-btn.offline {
  background: var(--warn);
  color: var(--tape);
  animation: net-offline-in 0.42s var(--liquid);
}
.icon-btn.online:hover { color: var(--ok); }
.icon-btn.offline:hover { color: var(--tape); background: var(--warn); }
.icon-btn:focus-visible,
.glance-avatar:focus-visible {
  outline: 2px solid var(--enamel);
  outline-offset: 2px;
}

.glance-wallet {
  background: var(--night);
  color: #fff;
  border-radius: 28px;
  padding: 18px 18px 16px;
}

.glance-period {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
}

.glance-period button {
  flex: 1;
  min-height: 44px;
  padding: 8px 10px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  transition: background var(--press-ms) var(--liquid),
    color var(--press-ms) var(--liquid),
    transform var(--press-ms) var(--liquid);
}

.glance-period button.active {
  background: var(--struk);
  color: var(--enamel);
}

.glance-period button:active { transform: scale(0.96); }

.glance-period button:focus-visible {
  outline: 2px solid var(--struk);
  outline-offset: 2px;
}

.glance-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.glance-wallet .glance-label { color: rgba(255, 255, 255, 0.62); }

.glance-num {
  margin: 6px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 8vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.glance-sub {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 500;
}

.glance-track {
  --p: 0;
  height: 8px;
  margin: 16px 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.glance-fill {
  height: 100%;
  width: calc(var(--p) * 1%);
  max-width: 100%;
  border-radius: 999px;
  background: var(--struk);
  transition: width 0.6s var(--liquid);
}

.glance-laba {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.glance-laba span {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.62);
}

.glance-laba.neg { color: #ffb4a4; }

.glance-go {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.glance-go a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 0 0;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.glance-go a:hover { text-decoration: none; }

.glance-go a svg {
  width: 22px;
  height: 22px;
  padding: 11px;
  box-sizing: content-box;
  border-radius: 50%;
  background: var(--tape);
  color: var(--enamel);
  box-shadow: var(--shadow);
  transition: transform var(--press-ms) var(--liquid), background var(--press-ms) var(--liquid);
}

.glance-go a.primary svg {
  background: var(--struk);
  color: var(--enamel);
}

.glance-go a:active svg { transform: scale(0.9); }

.glance-go a:focus-visible {
  outline: 2px solid var(--enamel);
  outline-offset: 3px;
  border-radius: 16px;
}

.glance-bento {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.22fr);
  gap: 12px;
}

.glance-bento article {
  background: var(--tape);
  border-radius: 24px;
  padding: 16px;
  box-shadow: var(--shadow);
  min-height: 96px;
}

.glance-stat {
  margin: 10px 0 0;
  font-size: clamp(1.25rem, 5vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.glance-feed h2 {
  margin: 0;
  font-size: 1rem;
}

.glance-feed-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.glance-feed-head a {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.glance-feed-head a .icon { width: 16px; height: 16px; }

.glance-feed ul {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--tape);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.glance-feed li {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "name amt" "when amt";
  column-gap: 12px;
  padding: 14px 16px;
  min-height: 56px;
  align-items: center;
}

.glance-feed li + li { border-top: 1px solid var(--hair); }

.glance-feed-name {
  grid-area: name;
  font-weight: 700;
  color: var(--ink);
}

.glance-feed-when {
  grid-area: when;
  font-size: 0.75rem;
  color: var(--muted);
}

.glance-feed-amt {
  grid-area: amt;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.glance-empty,
.glance-alert {
  margin: 0;
  padding: 14px 16px;
  background: var(--tape);
  border-radius: 24px;
  box-shadow: var(--shadow);
  color: var(--muted);
  font-size: 0.9rem;
}

.glance-alert { color: var(--ink-soft); }

.glance-start { display: grid; gap: 12px; }

.glance .sync-strip {
  background: transparent;
  box-shadow: none;
  padding: 4px 4px 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.glance .sync-strip a { color: var(--ink-soft); }

.glance .btn-ghost {
  margin-top: 0;
  color: var(--muted);
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translate3d(0, 16px, 0) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes sheet-up {
  from { transform: translate3d(0, 22%, 0); }
  to { transform: none; }
}

@keyframes scrim-in {
  from { background: rgba(20, 23, 26, 0); }
  to { background: rgba(20, 23, 26, 0.45); }
}

@keyframes ptr-spin {
  to { transform: rotate(360deg); }
}

@keyframes net-offline-in {
  from { transform: scale(0.86); }
  to { transform: none; }
}

.net-toast {
  position: fixed;
  top: calc(58px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  width: min(360px, calc(100% - 32px));
  margin: 0;
  padding: 12px 16px;
  border-radius: 16px;
  background: #fff6e8;
  color: var(--warn);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  box-shadow: var(--shadow);
  pointer-events: none;
}

.net-toast[hidden] { display: none; }

.tap-hint {
  position: fixed;
  z-index: 40;
  margin: 0;
  padding: 8px 12px;
  max-width: min(240px, calc(100vw - 24px));
  background: var(--enamel);
  color: var(--tape);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
  border-radius: 12px;
  box-shadow: var(--shadow);
  pointer-events: none;
}

.tap-hint[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .btn:active:not(:disabled),
  .nav a:active:not(.locked),
  .pick-btn:active,
  .icon-btn:active,
  .glance-avatar:active,
  .glance-go a:active svg,
  .glance-period button:active,
  .period button:active,
  a.brand:active {
    transform: none;
  }

  #app.route-enter > section,
  .modal,
  .modal-backdrop,
  .glance-fill,
  .ptr.is-busy .ptr-knob .icon,
  .icon-btn.offline {
    animation: none;
    transition: none;
  }

  .btn,
  .nav a,
  .pick-btn,
  .pick-plus,
  .icon-btn,
  .glance-avatar,
  .glance-go a svg,
  .glance-period button,
  .period button,
  a.brand,
  input, select, textarea,
  .ptr,
  .ptr-knob {
    transition: none;
  }
}
