/* VecinIA mobile browser simulator - Luminous Blue / sage / terracotta */
:root {
  --blue: #2450F0;
  --blue-deep: #0B3FAE;
  --blue-soft: #D9E8FF;
  --sage: #E7F0E8;
  --sage-deep: #6F8F78;
  --clay: #C46A3A;
  --ink: #14201A;
  --muted: #5A6B62;
  --white: #fff;
  --line: rgba(20, 32, 26, 0.08);
  --nav-h: 72px;
  --status-h: 44px;
  --home-h: 22px;
  --device-w: 390px;
  --device-h: 844px;
  --bezel: #1a1f1c;
  --bezel-rim: #2c3330;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; }

/* Light copy deterrence (forms stay selectable) */
body { -webkit-user-select: none; user-select: none; }
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}
button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: none;
  color: inherit;
}

/* Visually hidden until keyboard focus (WCAG skip link) */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  background: var(--blue-deep);
  color: #fff;
  font-weight: 700;
  z-index: 100;
}
.skip-link:focus {
  position: fixed;
  left: 12px;
  top: 12px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 16px;
  overflow: visible;
  clip: auto;
  white-space: normal;
  border-radius: 8px;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(1100px 520px at 8% -8%, #cfe0ff 0%, transparent 55%),
    radial-gradient(900px 480px at 100% 0%, #dcead9 0%, transparent 50%),
    linear-gradient(180deg, #eef4f0 0%, #f4f8f5 40%, #e8f0eb 100%);
  color: var(--ink);
}

/* ── Simulator chrome (outside the phone) ── */
.sim-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px 40px;
  gap: 18px;
}

.sim-toolbar {
  width: min(920px, 100%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}

.sim-brand { display: flex; align-items: center; gap: 12px; }
.sim-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.sim-title .brand-name { font-size: 22px; }
.sim-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sim-hint {
  width: 100%;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.device-toggle {
  display: inline-flex;
  background: rgba(255,255,255,.85);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px;
  gap: 2px;
  box-shadow: 0 8px 20px rgba(11,63,174,.08);
}

.device-toggle-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 11px;
  cursor: pointer;
  min-width: 96px;
  transition: background .2s ease, color .2s ease, transform .15s ease;
}
.device-toggle-btn:hover { color: var(--ink); }
.device-toggle-btn.active {
  background: linear-gradient(145deg, var(--blue), var(--blue-deep));
  color: #fff;
  box-shadow: 0 8px 18px rgba(36,80,240,.3);
}
.device-toggle-btn:focus-visible {
  outline: 3px solid var(--clay);
  outline-offset: 2px;
}

.device-stage {
  display: flex;
  justify-content: center;
  width: 100%;
  /* no opacity animation here — fill-mode:both left the phone invisible in some paints */
}

/* ── Phone frame ── */
.device {
  width: var(--device-w);
  height: var(--device-h);
  max-height: min(var(--device-h), calc(100vh - 160px));
  min-height: 640px;
  filter: drop-shadow(0 28px 48px rgba(20, 32, 26, 0.28));
  transition: width .25s ease;
}

.device-bezel {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, var(--bezel-rim), var(--bezel));
  border-radius: 48px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.08);
}

.device.android .device-bezel {
  border-radius: 36px;
  padding: 10px;
}

.device-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 38px;
  overflow: hidden;
  background: #f4f8f5;
  isolation: isolate;
}

.device.android .device-screen {
  border-radius: 28px;
}

/* In-device toasts & confirms — clipped by .device-screen overflow */
.device-feedback {
  position: absolute;
  inset: 0;
  z-index: 80;
  pointer-events: none;
}

.device-toast {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(var(--home-h) + 72px); /* above bottom nav (64px) + home chrome */
  padding: 12px 14px;
  border-radius: 14px;
  background: #1a2430;
  color: #f7faf8;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 12px 28px rgba(20, 32, 26, 0.28);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}

.device-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.device-toast.success {
  background: linear-gradient(145deg, #1f7a4d, #14603c);
}

.device-toast.error {
  background: linear-gradient(145deg, #c45c3a, #a34428);
}

.device-toast.info {
  background: linear-gradient(145deg, var(--blue), var(--blue-deep));
}

.device-dialog {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: rgba(20, 32, 26, 0.42);
  pointer-events: auto;
}

.device-dialog[hidden] {
  display: none !important;
}

.device-dialog-card {
  width: 100%;
  max-width: 300px;
  background: #fff;
  border-radius: 18px;
  padding: 18px 16px 14px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(20, 32, 26, 0.22);
  animation: device-dialog-in 0.2s ease;
}

@keyframes device-dialog-in {
  from { opacity: 0; transform: scale(0.96) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.device-dialog-msg {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  white-space: pre-line;
}

.device-dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.device-dialog-actions .btn {
  min-width: 0;
  flex: 1;
  padding: 10px 12px;
  font-size: 13px;
}

/* Cutouts */
.device-cutout {
  position: absolute;
  z-index: 50;
  pointer-events: none;
  left: 0; right: 0; top: 0;
  height: var(--status-h);
}

.cutout-island,
.cutout-hole { display: none; }

.device.ios .cutout-island {
  display: block;
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 118px;
  height: 34px;
  background: #0a0c0b;
  border-radius: 20px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}

.device.android .cutout-hole {
  display: block;
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  background: #0a0c0b;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(0,0,0,.35);
}

/* Status bar */
.status-bar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  height: var(--status-h);
  z-index: 45;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 22px 8px;
  pointer-events: none;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.device.android .status-bar {
  align-items: center;
  padding: 0 18px 0;
  font-size: 12px;
  font-weight: 600;
}

.sb-icons { display: flex; align-items: center; gap: 6px; }
.sb-signal {
  width: 16px; height: 10px;
  background:
    linear-gradient(to right,
      currentColor 0 2px, transparent 2px 4px,
      currentColor 4px 6px, transparent 6px 8px,
      currentColor 8px 10px, transparent 10px 12px,
      currentColor 12px 16px);
  opacity: .85;
  mask: none;
  display: inline-block;
  clip-path: polygon(0 70%, 25% 70%, 25% 45%, 50% 45%, 50% 25%, 75% 25%, 75% 0, 100% 0, 100% 100%, 0 100%);
  background: currentColor;
}
.sb-wifi {
  width: 14px; height: 10px;
  border: 2px solid currentColor;
  border-top: 0; border-left: 0; border-right: 0;
  border-radius: 0 0 10px 10px;
  position: relative;
  opacity: .85;
}
.sb-wifi::before {
  content: "";
  position: absolute;
  inset: -5px -3px 2px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  opacity: .55;
}
.sb-battery {
  width: 22px; height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  position: relative;
  opacity: .9;
  padding: 1px;
}
.sb-battery::after {
  content: "";
  position: absolute;
  right: -3px; top: 2px;
  width: 2px; height: 5px;
  background: currentColor;
  border-radius: 0 1px 1px 0;
}
.sb-battery i {
  display: block;
  height: 100%;
  width: 72%;
  background: currentColor;
  border-radius: 1px;
}

.device.ios .status-bar { padding-bottom: 6px; }

/* Home chrome */
.home-chrome {
  position: absolute;
  left: 12px; right: 12px; bottom: 12px;
  height: var(--home-h);
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.device.android .home-chrome {
  bottom: 10px;
  height: 28px;
}

.home-indicator {
  display: none;
  width: 120px;
  height: 5px;
  border-radius: 999px;
  background: rgba(20,32,26,.35);
}

.android-nav {
  display: none;
  width: 70%;
  justify-content: space-between;
  align-items: center;
  opacity: .55;
}

.device.ios .home-indicator { display: block; }
.device.android .android-nav { display: flex; }

.an-back {
  width: 12px; height: 12px;
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
}
.an-home {
  width: 14px; height: 14px;
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.an-recents {
  width: 12px; height: 12px;
  border: 2px solid var(--ink);
  border-radius: 2px;
}

/* Inset app under status + above home */
#app {
  height: 100%;
  padding-top: calc(var(--status-h) + 4px);
  padding-bottom: var(--home-h);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(420px 220px at 10% -10%, #cfe0ff 0%, transparent 55%),
    radial-gradient(360px 200px at 100% 0%, #dcead9 0%, transparent 50%),
    #f4f8f5;
}

.brand-name {
  font-family: "Fraunces", serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--blue-deep);
}
.brand-name span { color: var(--clay); }

.logo-mark {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(145deg, var(--blue), var(--blue-deep));
  display: grid; place-items: center;
  box-shadow: 0 10px 24px rgba(27,110,243,.35);
}
.logo-mark svg { width: 32px; height: 32px; }
.logo-mark.sm { width: 34px; height: 34px; border-radius: 10px; }
.logo-mark.sm svg { width: 20px; height: 20px; }

.view {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  position: relative;
}
.view.active { display: flex; }

/* LOGIN */
.login-bg {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 18px 28px;
  gap: 22px;
}
.brand-hero { text-align: center; }
.brand-hero .logo-mark {
  margin: 0 auto;
  animation: pop-in .5s cubic-bezier(.2,.8,.2,1) both;
}
.brand-hero .brand-name {
  font-size: 38px;
  display: block;
  margin-top: 12px;
}
.tagline {
  color: var(--muted);
  margin-top: 8px;
  font-size: 14px;
}
.login-card {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 18px 40px rgba(11,63,174,.12);
}
.login-card label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.login-card input, .login-card select {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px;
  background: #fff; color: var(--ink);
}
.login-card input:focus, .login-card select:focus {
  outline: 3px solid rgba(27,110,243,.35);
  border-color: var(--blue);
}
.btn {
  border: 0; border-radius: 14px; padding: 14px 16px; font-weight: 700; cursor: pointer;
}
.btn:focus-visible { outline: 3px solid var(--clay); outline-offset: 2px; }
.btn.primary {
  background: linear-gradient(145deg, var(--blue), var(--blue-deep));
  color: #fff; box-shadow: 0 12px 28px rgba(27,110,243,.35);
}
.btn.primary:active { transform: translateY(1px); }
.hint { font-size: 12px; color: var(--muted); text-align: center; }
.hint code { background: var(--sage); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.desk-link { text-align: center; font-size: 13px; font-weight: 600; color: var(--blue-deep); }

.demo-users-panel {
  background: rgba(27, 110, 243, 0.06);
  border: 1px solid rgba(27, 110, 243, 0.14);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 4px;
}
.demo-users-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue-deep);
  margin: 0 0 4px;
}
.demo-users-sub {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 8px;
  line-height: 1.35;
  font-weight: 500;
}
.demo-users-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}
.demo-users-list li {
  font-size: 11px;
  color: var(--ink);
  line-height: 1.3;
}
.demo-users-list strong { font-weight: 700; color: var(--blue-deep); }

/* PRIMARY: four-role hub */
.persona-hub {
  width: min(1040px, 100%);
  margin: 8px auto 32px;
  padding: 0 4px 24px;
  animation: fade-up .5s cubic-bezier(.2,.8,.2,1) both;
}
.persona-hub-intro { text-align: center; margin-bottom: 28px; }
.persona-hub-kicker {
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--sage-deep); margin: 0 0 8px;
}
.persona-hub-title {
  margin: 0; font-family: "Fraunces", serif;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  letter-spacing: -0.03em; line-height: 1.05; color: var(--blue-deep);
}
.persona-hub-title .brand-name span { color: var(--clay); }
.persona-hub-lead {
  margin: 12px auto 0; max-width: 36rem;
  font-size: 1.05rem; color: var(--muted); line-height: 1.45;
}
.persona-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.hub-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
  text-decoration: none;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
  background:
    linear-gradient(165deg, rgba(255,255,255,.98), rgba(244,248,245,.94)),
    radial-gradient(120% 80% at 100% 0%, rgba(36,80,240,.1), transparent 55%);
  border: 1.5px solid rgba(36,80,240,.12);
  border-radius: 20px;
  padding: 20px 18px 18px;
  cursor: pointer;
  font: inherit;
  min-height: 210px;
  box-shadow: 0 14px 36px rgba(11,63,174,.1);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
  animation: fade-up .45s cubic-bezier(.2,.8,.2,1) both;
  animation-delay: 0s;
}
.hub-card:nth-child(2) { animation-delay: .05s; }
.hub-card:nth-child(3) { animation-delay: .1s; }
.hub-card:nth-child(4) { animation-delay: .15s; }
@media (prefers-reduced-motion: reduce) {
  .hub-card, .persona-card { animation: none !important; opacity: 1 !important; transform: none !important; }
}
.hub-card:hover {
  transform: translateY(-4px);
  border-color: rgba(36,80,240,.45);
  box-shadow: 0 20px 44px rgba(36,80,240,.18);
}
.hub-card:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; }
.hub-card.active {
  border-color: transparent;
  background: linear-gradient(145deg, var(--blue), var(--blue-deep));
  color: #fff;
  box-shadow: 0 16px 36px rgba(36,80,240,.32);
}
.hub-card.active .hub-card-num,
.hub-card.active .hub-card-title,
.hub-card.active .hub-card-desc,
.hub-card.active .hub-card-cta { color: #fff; }
.hub-card.active .hub-card-frame {
  color: #fff;
  background: rgba(255,255,255,.18);
}
.hub-card-num { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--blue); }
.hub-card-frame {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--sage-deep); background: rgba(90,140,110,.12);
  padding: 4px 10px; border-radius: 999px;
}
.hub-card-title {
  font-family: "Fraunces", serif; font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  letter-spacing: -0.02em; color: var(--blue-deep); line-height: 1.2; margin-top: 4px;
}
.hub-card-desc { font-size: 13px; color: var(--muted); line-height: 1.4; flex: 1; }
.hub-card-cta { font-size: 13px; font-weight: 700; color: var(--blue); margin-top: 8px; }
.persona-hub-foot { text-align: center; margin: 28px 0 0; }
.persona-hub-foot a { color: var(--blue-deep); font-weight: 600; text-decoration: none; }
.persona-hub-foot a:hover { text-decoration: underline; }
.sim-experience[hidden], .persona-hub[hidden] { display: none !important; }
.back-to-hub { width: min(920px, 100%); margin: 0 auto 8px; }
.back-to-hub .linkish {
  background: none; border: 0; color: var(--blue-deep); font: inherit;
  font-weight: 600; font-size: 13px; cursor: pointer; padding: 0;
}
.back-to-hub .linkish:hover { text-decoration: underline; }

/* Secondary persona bar (inside experience) — equal pills matching device toggle */
.persona-bar {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  background: rgba(255,255,255,.88);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(11,63,174,.08);
}
.persona-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  text-align: left;
  text-decoration: none;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .15s ease, box-shadow .2s ease;
  font: inherit;
  min-height: 72px;
}
.persona-card:hover {
  background: rgba(36,80,240,.06);
  transform: translateY(-1px);
}
.persona-card.active {
  background: linear-gradient(145deg, var(--blue), var(--blue-deep));
  color: #fff;
  box-shadow: 0 8px 18px rgba(36,80,240,.3);
}
.persona-card:focus-visible {
  outline: 3px solid var(--clay);
  outline-offset: 2px;
}
.persona-card strong {
  font-family: "Fraunces", serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--blue-deep);
  line-height: 1.2;
}
.persona-card.active strong { color: #fff; }
.persona-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}
.persona-card.active .persona-desc { color: rgba(255,255,255,.88); }
a.persona-card {
  color: inherit;
  text-decoration: none;
}
.badge-dot {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--clay);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}
.icon-btn { position: relative; }
.card-unread {
  border-color: rgba(27,110,243,.35);
  box-shadow: inset 3px 0 0 var(--blue);
}

@media (max-width: 720px) {
  .persona-hub-grid { grid-template-columns: 1fr; }
  .hub-card { min-height: 0; }
  .persona-bar { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .persona-bar { grid-template-columns: 1fr; }
}

/* SHELL — absolute chrome inside device screen */
#view-shell {
  padding-bottom: calc(var(--nav-h) + 8px);
}
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  backdrop-filter: blur(10px);
  background: rgba(244,248,245,.9);
  flex-shrink: 0;
}
.brand.compact { display: flex; align-items: center; gap: 8px; }
.brand.compact .brand-name { font-size: 18px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,.85); cursor: pointer;
  display: grid; place-items: center;
}
.icon-btn:focus-visible { outline: 3px solid var(--clay); outline-offset: 2px; }

.content {
  flex: 1;
  overflow: auto;
  padding: 6px 14px 20px;
  -webkit-overflow-scrolling: touch;
}

.greeting .hi { font-size: 14px; color: var(--muted); font-weight: 500; }
.greeting h2 {
  font-family: "Fraunces", serif; font-size: 24px; letter-spacing: -0.02em; margin-top: 2px;
}
.chip.active {
  background: var(--primary-soft, #EEF2FF);
  color: var(--blue-deep, #2450F0);
  border-color: var(--blue-deep, #2450F0);
}
.chip {
  display: inline-flex; margin-top: 8px; font-size: 12px; font-weight: 600;
  color: var(--sage-deep); background: rgba(111,143,120,.12);
  padding: 5px 10px; border-radius: 999px;
}

.hero-card {
  margin-top: 14px;
  background: linear-gradient(145deg, var(--blue), var(--blue-deep));
  color: #fff; border-radius: 22px; padding: 20px 18px;
  box-shadow: 0 16px 32px rgba(11,63,174,.28);
}
.hero-card .label { font-size: 12px; font-weight: 600; opacity: .85; text-transform: uppercase; letter-spacing: .04em; }
.hero-card .amount { font-family: "Fraunces", serif; font-size: 36px; font-weight: 700; margin: 6px 0; }
.cta-white {
  display: inline-flex; margin-top: 12px; background: #fff; color: var(--blue-deep);
  font-weight: 700; padding: 12px 18px; border-radius: 14px; border: 0; cursor: pointer;
}
.cta-white:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.section { margin-top: 20px; }
.section h3 {
  font-size: 12px; font-weight: 700; color: var(--muted);
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: 10px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px;
  text-align: left; cursor: pointer; color: inherit;
  transition: transform .15s ease, border-color .15s ease;
}
.mini:hover { border-color: rgba(27,110,243,.35); transform: translateY(-1px); }
.mini:focus-visible { outline: 3px solid var(--clay); outline-offset: 2px; }
.mini .ico {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--blue-soft); margin-bottom: 10px;
}
.mini h4 { font-size: 14px; margin-bottom: 2px; }
.mini p { font-size: 12px; color: var(--muted); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 10px;
}
.card .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pill { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.pill.work { background: rgba(196,106,58,.14); color: var(--clay); }
.pill.open { background: rgba(27,110,243,.12); color: var(--blue-deep); }
.pill.done { background: rgba(61,154,106,.15); color: #2d7a52; }

.method {
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px;
  border: 1.5px solid var(--line); background: #fff; margin-bottom: 10px; cursor: pointer;
}
.method.selected { border-color: var(--blue); background: linear-gradient(90deg, rgba(27,110,243,.06), #fff 60%); }
.pay-btn { width: 100%; margin-top: 8px; }

/* Bottom nav — absolute inside device screen, not viewport */
.bottom-nav {
  position: absolute;
  left: 10px; right: 10px;
  bottom: 4px;
  height: 64px;
  border-radius: 20px;
  background: rgba(255,255,255,.96);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(20,32,26,.1);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  padding: 6px 4px 8px;
  z-index: 30;
}
.bottom-nav button {
  border: 0; background: transparent; color: var(--muted);
  font-size: 10px; font-weight: 600; display: flex; flex-direction: column;
  align-items: center; gap: 2px; cursor: pointer;
  min-height: 44px; justify-content: flex-end;
}
.bottom-nav button.active { color: var(--blue-deep); }
.bottom-nav button:focus-visible { outline: 3px solid var(--clay); outline-offset: -2px; border-radius: 10px; }
.bottom-nav button span { font-size: 17px; line-height: 1; }
.bottom-nav .fab { position: relative; top: -16px; }
.fab-btn {
  width: 50px; height: 50px; border-radius: 16px;
  background: linear-gradient(145deg, var(--clay), #a85228);
  color: #fff; display: grid; place-items: center; font-size: 26px;
  box-shadow: 0 10px 22px rgba(196,106,58,.4); margin-bottom: 2px;
}
.bottom-nav .fab { color: var(--clay); }

/* Drawer inside device */
.drawer {
  position: absolute;
  inset: 0 auto 0 0;
  width: min(280px, 86%);
  background: #fff;
  z-index: 40;
  transform: translateX(-105%);
  transition: transform .25s ease;
  padding: 16px 14px;
  border-right: 1px solid var(--line);
  overflow: auto;
}
.drawer.open { transform: translateX(0); }
.drawer-head { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.drawer-head span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.drawer-nav { display: flex; flex-direction: column; gap: 2px; }
.drawer-nav button {
  text-align: left; border: 0; background: transparent; padding: 12px 10px;
  border-radius: 12px; font-weight: 600; cursor: pointer; min-height: 44px;
}
.drawer-nav button:hover { background: var(--sage); }
.drawer-nav button:focus-visible { outline: 3px solid var(--clay); outline-offset: 0; }
.drawer-nav button.danger { color: var(--clay); }
.backdrop {
  position: absolute; inset: 0; background: rgba(20,32,26,.35); z-index: 35;
}

.secure { text-align: center; font-size: 12px; color: var(--muted); margin-top: 10px; }
.list-line { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; gap: 8px; }
.list-line:last-child { border-bottom: 0; }
.muted { color: var(--muted); font-size: 13px; }

/* Stub detail rows */
.meter-bar {
  height: 8px; border-radius: 999px; background: var(--sage); overflow: hidden; margin-top: 8px;
}
.meter-bar > i {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--blue-deep));
}
.craft-row {
  display: flex; gap: 12px; align-items: center;
}
.craft-avatar {
  width: 42px; height: 42px; border-radius: 14px;
  background: var(--blue-soft); color: var(--blue-deep);
  display: grid; place-items: center; font-weight: 700; flex-shrink: 0;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-down {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes content-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pop-in {
  from { opacity: 0; transform: scale(.86); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Narrow desktop / phone browser: shrink frame but keep bezel visible */
@media (max-width: 440px) {
  .sim-page { padding: 12px 8px 24px; }
  .device {
    width: min(390px, 100%);
    height: min(780px, calc(100vh - 130px));
    min-height: 560px;
  }
  .device-bezel { border-radius: 36px; padding: 8px; }
  .device-screen { border-radius: 30px; }
  .sim-hint { display: none; }
}

/* Ultra-narrow: still show a compact frame (do not strip chrome) */
@media (max-width: 360px) {
  .device {
    width: 100%;
    min-height: 520px;
    filter: drop-shadow(0 16px 28px rgba(20, 32, 26, 0.22));
  }
  .device-bezel { border-radius: 28px; padding: 8px; }
  .device-screen { border-radius: 22px; }
}
