/* Kabyar shared mockup styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+Myanmar:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  color-scheme: dark;
  --bg-0: #0B0D11;
  --bg-1: #0F1115;
  --bg-2: #15181F;
  --glass: rgba(255,255,255,0.06);
  --glass-stroke: rgba(255,255,255,0.10);
  --text-hi: #F5F7FA;
  --text-mid: #A8B0BD;
  --text-lo: #5C6473;
  --cyan: #22D3EE;
  --violet: #8B5CF6;
  --blue: #3B82F6;
  --mint: #34D399;
  --amber: #FBBF24;
  --rose: #FB7185;
  --rose-deep: #E11D48;
  --grad-ko: linear-gradient(135deg, #22D3EE 0%, #8B5CF6 100%);
  --grad-urgent: linear-gradient(135deg, #FB7185 0%, #8B5CF6 100%);
  --grad-wellness: linear-gradient(135deg, #34D399 0%, #22D3EE 100%);
  --grad-glass-hi: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02));
  --shadow-1: 0 2px 8px rgba(0,0,0,0.35);
  --shadow-2: 0 8px 24px rgba(0,0,0,0.45);
  --shadow-3: 0 24px 64px rgba(0,0,0,0.55);
  --glow-ko: 0 0 24px rgba(34,211,238,0.45);
  --glow-violet: 0 0 24px rgba(139,92,246,0.40);
  --glow-urgent: 0 0 20px rgba(251,113,133,0.40);
  --emerald: #34D399;
  --red: #EF4444;
  --success: #34D399;
  --text: #F5F7FA;   /* alias for --text-hi, used by inline form styles */
  --border: rgba(255,255,255,0.10);
  --card: rgba(15,17,21,0.92);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html, body {
  background: var(--bg-0);
  color: var(--text-hi);
  font-family: 'Inter', 'Noto Sans Myanmar', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(800px 600px at 10% -10%, rgba(34,211,238,0.12), transparent 60%),
    radial-gradient(700px 500px at 110% 20%, rgba(139,92,246,0.14), transparent 60%),
    radial-gradient(600px 400px at 50% 110%, rgba(59,130,246,0.10), transparent 60%);
  z-index: -1;
  pointer-events: none;
}

.my { font-family: 'Noto Sans Myanmar', 'Padauk', sans-serif; line-height: 1.75; }
.mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; }

/* Phone frame */
.phone {
  width: 390px;
  height: 844px;
  background: var(--bg-1);
  border-radius: 44px;
  border: 1px solid var(--glass-stroke);
  box-shadow: var(--shadow-3), 0 0 80px rgba(34,211,238,0.08);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
.phone::before {
  content: '';
  position: absolute; top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 120px; height: 28px;
  background: #000;
  border-radius: 0 0 18px 18px;
  z-index: 100;
}

.statusbar {
  height: 44px;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 28px;
  font-size: 13px; font-weight: 600;
  color: var(--text-hi);
  flex-shrink: 0;
}

.screen {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px 120px;
  position: relative;
}

/* Glass card */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-stroke);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-radius: 28px;
  box-shadow: var(--shadow-2);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.glass::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--grad-glass-hi);
  pointer-events: none;
  border-radius: inherit;
}
.glass.glow-ko { box-shadow: var(--shadow-2), var(--glow-ko); }
.glass.glow-violet { box-shadow: var(--shadow-2), var(--glow-violet); }
.glass.glow-urgent { box-shadow: var(--shadow-2), var(--glow-urgent); }

.row { display: flex; gap: 12px; align-items: center; }
.col { display: flex; flex-direction: column; gap: 12px; }
.between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }

/* Typography */
h1, .h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.3px; }
h2, .h2 { font-size: 20px; font-weight: 600; }
.display { font-size: 34px; font-weight: 700; letter-spacing: -0.5px; }
.muted { color: var(--text-mid); }
.dim { color: var(--text-lo); }
.caption { font-size: 12px; color: var(--text-mid); letter-spacing: 0.2px; }

/* Ko avatar */
.ko-avatar {
  border-radius: 50%;
  background: var(--grad-ko);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  color: #0B0D11;
  position: relative;
  flex-shrink: 0;
}
.ko-avatar::after {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(34,211,238,0.4);
  animation: breathe 3.2s ease-in-out infinite;
}
.ko-avatar.xs { width: 24px; height: 24px; font-size: 11px; }
.ko-avatar.sm { width: 36px; height: 36px; font-size: 14px; }
.ko-avatar.md { width: 56px; height: 56px; font-size: 20px; }
.ko-avatar.lg { width: 96px; height: 96px; font-size: 32px; }
.ko-avatar.hero { width: 160px; height: 160px; font-size: 52px; }
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.12); opacity: 0.2; }
}

/* Buttons */
.btn {
  border: none; cursor: pointer;
  padding: 12px 20px; border-radius: 999px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform 120ms cubic-bezier(0.2,0.8,0.2,1);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--grad-ko); color: #0B0D11; box-shadow: var(--glow-ko); }
.btn-ghost { background: var(--glass); border: 1px solid var(--glass-stroke); color: var(--text-hi); }
.btn-urgent { background: var(--grad-urgent); color: #fff; box-shadow: var(--glow-urgent); }

/* Chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-stroke);
  color: var(--text-hi);
}
.chip.urgent { background: rgba(251,113,133,0.15); color: #FECDD3; border-color: rgba(251,113,133,0.4); }
.chip.followup { background: rgba(251,191,36,0.12); color: #FDE68A; border-color: rgba(251,191,36,0.35); }
.chip.routine { background: rgba(59,130,246,0.12); color: #BFDBFE; border-color: rgba(59,130,246,0.35); }
.chip.wellness { background: rgba(52,211,153,0.12); color: #A7F3D0; border-color: rgba(52,211,153,0.35); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.active { background: rgba(34,211,238,0.15); color: var(--cyan); border-color: rgba(34,211,238,0.4); }

/* Form inputs */
input[type="checkbox"], input[type="radio"] { accent-color: var(--cyan); width: 16px; height: 16px; cursor: pointer; }

/* Global form elements — dark theme for all inputs, selects, textareas */
select,
input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="time"],
input[type="datetime-local"],
input:not([type]),
textarea {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--text-hi);
  font-family: 'Noto Sans Myanmar', 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.2s;
}
select:focus,
input:not([type="checkbox"]):not([type="radio"]):focus,
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(34,211,238,0.15);
}
/* Fix option elements which use OS-native styling */
select option {
  background: #1a1d24;
  color: #f5f7fa;
  padding: 8px;
}
select {
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a8b0bd' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
textarea { resize: vertical; }
::placeholder { color: var(--text-mid); opacity: 1; }
input::-webkit-calendar-picker-indicator { filter: invert(0.7); }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
.ko-bar .ko-avatar::after { animation: none; }

/* Ko command bar */
.ko-bar {
  position: absolute;
  left: 16px; right: 16px; bottom: 24px;
  background: rgba(15,17,21,0.85);
  border: 1px solid var(--glass-stroke);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border-radius: 28px;
  box-shadow: var(--shadow-3), 0 0 32px rgba(34,211,238,0.25);
  padding: 12px;
  z-index: 50;
}
.ko-bar .input-row { display: flex; align-items: center; gap: 10px; }
.ko-bar input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text-hi); font-family: 'Noto Sans Myanmar', 'Inter', sans-serif;
  font-size: 14px; line-height: 1.6;
  padding: 6px 0;
}
.ko-bar input::placeholder { color: var(--text-mid); }
.ko-bar .icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-stroke);
  display: flex; align-items: center; justify-content: center;
  color: var(--cyan); cursor: pointer; flex-shrink: 0;
}
.ko-bar .icon-btn.send { background: var(--grad-ko); color: #0B0D11; border: none; }
.ko-bar .ko-home-btn { background: rgba(34,211,238,0.08); border: 1px solid rgba(34,211,238,0.2); color: var(--cyan); text-decoration: none; font-size: 16px; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.2s; }
.ko-bar .ko-home-btn:hover { background: rgba(34,211,238,0.18); border-color: rgba(34,211,238,0.4); }
.ko-bar .suggestions {
  display: flex; gap: 8px; padding: 8px 4px 4px;
  overflow-x: auto;
}
.ko-bar .suggestions::-webkit-scrollbar { display: none; }
.ko-bar .suggestions .chip { white-space: nowrap; cursor: pointer; }

/* Chat bubble */
.bubble {
  max-width: 78%;
  padding: 12px 16px;
  border-radius: 22px;
  font-size: 14px;
  line-height: 1.6;
  position: relative;
}
.bubble.ko {
  background: rgba(34,211,238,0.08);
  border: 1px solid rgba(34,211,238,0.25);
  color: var(--text-hi);
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  box-shadow: 0 0 16px rgba(34,211,238,0.12);
}
.bubble.may {
  background: rgba(139,92,246,0.10);
  border: 1px solid rgba(139,92,246,0.30);
  color: var(--text-hi);
  align-self: flex-end;
  border-bottom-right-radius: 6px;
}
.chat-row { display: flex; gap: 8px; margin-bottom: 12px; }
.chat-row.ko { justify-content: flex-start; align-items: flex-end; }
.chat-row.may { justify-content: flex-end; }

/* Timeline */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(180deg, var(--cyan), var(--violet));
  opacity: 0.3;
}
.timeline-item { position: relative; padding-bottom: 16px; }
.timeline-item::before {
  content: ''; position: absolute; left: -24px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--cyan); box-shadow: var(--glow-ko);
}

/* Header bar */
.appheader {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px 16px;
}
.appheader .title { font-size: 18px; font-weight: 700; }

/* Waveform */
.waveform {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; height: 80px;
}
.waveform .bar {
  width: 4px; border-radius: 2px;
  background: var(--grad-ko);
  animation: wave 800ms ease-in-out infinite;
}
@keyframes wave {
  0%, 100% { height: 8px; }
  50% { height: 60px; }
}
.waveform .bar:nth-child(2n) { animation-delay: 100ms; }
.waveform .bar:nth-child(3n) { animation-delay: 200ms; }
.waveform .bar:nth-child(5n) { animation-delay: 320ms; }
.waveform .bar:nth-child(7n) { animation-delay: 480ms; }

/* Insight tile */
.tile { padding: 16px; min-height: 100px; }
.tile .num { font-size: 28px; font-weight: 700; background: var(--grad-ko); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tile .label { font-size: 11px; color: var(--text-mid); text-transform: uppercase; letter-spacing: 1px; }

/* Patient card */
.patient-card { padding: 16px; }
.patient-card .pname { font-size: 16px; font-weight: 600; }
.patient-card .pmeta { font-size: 12px; color: var(--text-mid); }

/* Gallery hub */
.hub { padding: 40px 24px; max-width: 1400px; margin: 0 auto; }
.hub h1 { margin-bottom: 8px; }
.hub .grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 32px;
}
.hub .card {
  background: var(--glass);
  border: 1px solid var(--glass-stroke);
  border-radius: 20px;
  padding: 20px;
  text-decoration: none;
  color: var(--text-hi);
  transition: transform 200ms;
  display: block;
}
.hub .card:hover { transform: translateY(-4px); box-shadow: var(--glow-ko); }
.hub .card .num { font-size: 11px; color: var(--cyan); letter-spacing: 2px; }
.hub .card h3 { font-size: 18px; margin-top: 6px; }
.hub .card p { color: var(--text-mid); margin-top: 6px; font-size: 13px; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand .logo {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--grad-ko); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--glow-ko); font-weight: 700; color: #0B0D11; font-size: 22px;
}

/* ─── Accessibility ───────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 8px;
  z-index: 10000;
  background: var(--cyan);
  color: var(--bg-0);
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  text-decoration: none;
  transition: top .2s;
}
.skip-link:focus {
  top: 0;
}
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
button:focus-visible, .chip:focus-visible, a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
button { cursor: pointer; }
a { color: inherit; }

/* ─── Responsive ──────────────────────────── */

/* Mobile — full screen, no phone frame */
@media (max-width: 430px) {
  .phone { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; border: none; box-shadow: none; }
  .phone::before { display: none; }
  body { padding: 0; display: block; }
  .statusbar { display: none; }
  .screen { padding: 8px 12px 130px; }
  .ko-bar { left: 8px; right: 8px; bottom: 8px; padding: 10px; border-radius: 22px; }
  .ko-bar input { font-size: 13px; }
  .ko-bar .icon-btn { width: 36px; height: 36px; }
  .glass { padding: 14px; border-radius: 20px; }
  .appheader { padding: 6px 8px 12px; }
  .bubble { max-width: 88%; padding: 10px 14px; font-size: 13px; }
  .tab-nav a { padding: 4px 8px; }
  .tab-nav .tab-label { font-size: 8px; }
  h1, .h1 { font-size: 20px; }
  h2, .h2 { font-size: 16px; }
  .tile .num { font-size: 22px; }
  .stat-grid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
}

/* Tablet — wider phone frame */
@media (min-width: 431px) and (max-width: 820px) {
  body { padding: 16px; }
  .phone { width: 100%; max-width: 480px; height: 90vh; border-radius: 32px; }
  .screen { padding: 8px 16px 130px; }
}

/* Desktop — full-width responsive layout, no phone frame */
@media (min-width: 821px) {
  body { padding: 0; display: block; background: var(--bg-0); }
  .phone {
    width: 100%; max-width: 960px; height: 100vh; height: 100dvh;
    margin: 0 auto;
    border-radius: 0; border-left: 1px solid var(--glass-stroke); border-right: 1px solid var(--glass-stroke);
    box-shadow: none;
  }
  .phone::before { display: none; }
  .statusbar { display: none; }
  .screen { padding: 16px 24px 140px; }
  .ko-bar { left: 24px; right: 24px; bottom: 16px; border-radius: 28px; }
  .bubble { max-width: 65%; }
  .glass { border-radius: 24px; }
  .appheader { padding: 12px 16px 20px; }
  .tab-nav { max-width: 960px; margin: 0 auto; }
  .stat-grid { grid-template-columns: repeat(4, 1fr) !important; }
}

/* Wide desktop — sidebar potential */
@media (min-width: 1200px) {
  .phone { max-width: 1100px; }
  .screen { padding: 20px 32px 140px; }
  .ko-bar { left: 32px; right: 32px; max-width: 700px; margin: 0 auto; position: absolute; left: 50%; right: auto; transform: translateX(-50%); width: calc(100% - 64px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ─── Consistent back button ─────────────── */
.back-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(34,211,238,0.1); border: 1px solid rgba(34,211,238,0.2);
  color: var(--cyan); text-decoration: none; transition: all 0.2s; flex-shrink: 0;
}
.back-btn:active { transform: scale(0.9); background: rgba(34,211,238,0.2); }
.back-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* ─── Global toast ────────────────────────── */
.ko-toast-global {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--card, rgba(15,17,21,0.92)); border: 1px solid var(--glass-stroke);
  color: var(--text-hi); padding: 10px 24px; border-radius: 20px; font-size: 13px;
  z-index: 500; opacity: 0; transition: all 0.3s; pointer-events: none;
  font-family: 'Noto Sans Myanmar', 'Inter', sans-serif;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5); white-space: nowrap;
}
.ko-toast-global.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.ko-toast-global.error { border-color: rgba(251,113,133,0.4); }
.ko-toast-global.success { border-color: rgba(52,211,153,0.4); }

/* ─── Skeleton loading ────────────────────── */
.skeleton { background: rgba(255,255,255,0.06); border-radius: 8px; animation: skeleton-pulse 1.5s ease-in-out infinite; }
.skeleton-text { height: 14px; margin-bottom: 8px; border-radius: 4px; }
.skeleton-text.short { width: 40%; }
.skeleton-text.medium { width: 65%; }
.skeleton-text.long { width: 90%; }
.skeleton-circle { border-radius: 50%; }
.skeleton-card { height: 80px; border-radius: 16px; margin-bottom: 12px; }
@keyframes skeleton-pulse { 0%,100% { opacity: 0.4; } 50% { opacity: 0.8; } }

/* ─── Print stylesheet ────────────────────── */
@media print {
  body { background: #fff !important; color: #000 !important; padding: 0 !important; }
  body::before { display: none !important; }
  .phone { width: 100% !important; height: auto !important; border-radius: 0 !important; border: none !important; box-shadow: none !important; }
  .phone::before, .statusbar, .ko-bar, .tab-nav, .search-overlay, .ko-toast-global { display: none !important; }
  .screen { padding: 8px !important; overflow: visible !important; height: auto !important; }
  .glass { background: rgba(0,0,0,0.03) !important; border: 1px solid #ddd !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; box-shadow: none !important; }
  .glass::before { display: none !important; }
  .chip { border: 1px solid #ccc !important; background: transparent !important; }
  .btn { box-shadow: none !important; }
  a { color: #000 !important; }
  .ko-avatar { background: #eee !important; color: #333 !important; }
  .ko-avatar::after { display: none !important; }
}

/* ─── Smooth page entrance ─────────────────────────────────── */
.screen { animation: fadeSlideIn 0.3s ease-out; }
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ─── Empty state ──────────────────────────────────────────── */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-mid); }
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state .msg { font-size: 14px; line-height: 1.5; }

/* ─── Loading spinner ──────────────────────────────────────── */
.ko-spinner { width: 24px; height: 24px; border: 3px solid var(--glass-stroke); border-top-color: var(--cyan); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Badge ────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; border-radius: 9px; font-size: 10px; font-weight: 700; padding: 0 5px; }
.badge-rose { background: var(--rose); color: #fff; }
.badge-cyan { background: var(--cyan); color: #0B0D11; }
.badge-amber { background: var(--amber); color: #0B0D11; }

/* ─── Swipe hint ───────────────────────────────────────────── */
.swipe-hint { text-align: center; color: var(--text-lo); font-size: 11px; padding: 8px; animation: swipeHint 2s ease-in-out infinite; }
@keyframes swipeHint { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(8px); } }

/* ─── Tooltip ──────────────────────────────────────────────── */
[data-tooltip] { position: relative; }
[data-tooltip]:hover::after { content: attr(data-tooltip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); padding: 4px 10px; background: var(--bg-2); color: var(--text-hi); font-size: 11px; border-radius: 6px; white-space: nowrap; z-index: 100; pointer-events: none; margin-bottom: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }

/* ─── Scroll to top FAB ────────────────────────────────────── */
.scroll-top { position: fixed; bottom: 80px; right: 16px; width: 36px; height: 36px; border-radius: 50%; background: var(--glass); backdrop-filter: blur(8px); border: 1px solid var(--glass-stroke); color: var(--text-hi); font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 100; }
.scroll-top.visible { opacity: 1; pointer-events: auto; }

/* ─── Offline banner ───────────────────────────────────────── */
.offline-banner { position: fixed; top: 0; left: 0; right: 0; padding: 6px; text-align: center; background: var(--rose); color: #fff; font-size: 12px; font-weight: 600; z-index: 10002; transform: translateY(-100%); transition: transform 0.3s; }
.offline-banner.show { transform: translateY(0); }

/* ─── Progress bar ─────────────────────────────────────────── */
.progress-bar { height: 4px; border-radius: 2px; background: var(--glass); overflow: hidden; }
.progress-bar .fill { height: 100%; border-radius: 2px; background: var(--grad-ko); transition: width 0.4s ease; }

/* ─── Accordion ────────────────────────────────────────────── */
.accordion-header { cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; }
.accordion-header::after { content: '▸'; transition: transform 0.2s; }
.accordion-header.open::after { transform: rotate(90deg); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.accordion-body.open { max-height: 500px; }

/* ─── Highlight animation ──────────────────────────────────── */
.highlight-flash { animation: flash 0.6s ease; }
@keyframes flash { 0%, 100% { background: transparent; } 50% { background: rgba(34,211,238,0.15); } }

