:root {
  --yellow: #f5c400;
  --yellow-hi: #ffe566;
  --red: #d32f2f;
  --red-deep: #c62828;
  --green: #2e7d32;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --bg: #f3f3f3;
  --card-radius: 14px;
  --press-scale: 0.96;
  --tap-ms: 120ms;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 600px at 50% -10%, #fff6c8 0%, transparent 55%),
    linear-gradient(180deg, #ececec, #f7f7f7);
  font-family: "Noto Sans Myanmar", "Padauk", "Myanmar Text", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
}

.phone {
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.04), 0 18px 50px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 10px 16px;
  background: var(--yellow);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand-title { font-weight: 800; font-size: 20px; line-height: 1.1; }
.brand-ver { font-size: 12px; color: #555; margin-top: 1px; }

.top-actions { display: flex; align-items: center; gap: 4px; }

/* R2 R35–R42: press / loading / active */
.icon-btn {
  appearance: none;
  border: 0;
  background: transparent;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform var(--tap-ms) ease, background var(--tap-ms) ease, opacity var(--tap-ms) ease;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn img { width: 28px; height: 28px; object-fit: contain; pointer-events: none; }
.icon-btn:active { transform: scale(var(--press-scale)); }
.icon-btn.is-active { background: rgba(0,0,0,.08); }
.icon-btn:disabled { opacity: .45; pointer-events: none; }

.menu-btn .dots,
.menu-btn .dots::before,
.menu-btn .dots::after {
  content: "";
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #333;
  margin: 3px auto;
}

.view { flex: 1; padding-bottom: 24px; }
.view[hidden] { display: none !important; }

.hero {
  padding: 28px 16px 18px;
  text-align: center;
  background: #fff;
}
.hero-num {
  font-size: 96px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: 2px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  display: inline-block;
  transform-origin: center center;
}
/* R14: App-like blink on digit change */
.hero-num.is-flash {
  animation: hero-flash 360ms ease-out;
}
@keyframes hero-flash {
  0% { transform: scale(1); opacity: 1; filter: brightness(1); }
  28% { transform: scale(1.1); opacity: 0.35; filter: brightness(1.35); }
  100% { transform: scale(1); opacity: 1; filter: brightness(1); }
}
.hero-num.is-loading { color: #9e9e9e; font-size: 64px; }
.hero-meta {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #444;
  font-size: 14px;
}
.pulse {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #fff 0 28%, #e53935 30% 100%);
  box-shadow: 0 0 0 0 rgba(229,57,53,.45);
  animation: pulse 1.6s ease-out infinite;
}
.pulse.is-idle { animation: none; opacity: .55; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(229,57,53,.45); }
  70% { box-shadow: 0 0 0 10px rgba(229,57,53,0); }
  100% { box-shadow: 0 0 0 0 rgba(229,57,53,0); }
}

.cards { padding: 8px 12px 0; display: grid; gap: 10px; }

.card {
  background: linear-gradient(180deg, #e53935, #c62828);
  color: #fff;
  border-radius: var(--card-radius);
  padding: 12px 14px 14px;
  box-shadow: 0 6px 16px rgba(198,40,40,.25);
}
.card-time {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 8px;
}
.grid3 {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr .7fr;
  gap: 6px;
  text-align: center;
}
.grid3.alt {
  grid-template-columns: 88px 1fr 1fr 1fr;
  align-items: end;
  text-align: center;
}
.lbl {
  font-size: 12px;
  opacity: .95;
  font-weight: 600;
  margin-bottom: 4px;
}
.val {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-height: 1.2em;
}
.val .hi { color: var(--yellow-hi); }
.card .side-time {
  font-weight: 700;
  text-align: left;
  padding-bottom: 2px;
}

.page-head {
  padding: 16px 16px 8px;
  font-weight: 800;
  font-size: 18px;
}
.list { padding: 0 12px; display: grid; gap: 8px; }
.row {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.row strong { font-size: 22px; color: var(--green); }
.row .muted { color: var(--muted); font-size: 13px; }

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 16px;
}
.btn {
  appearance: none;
  border: 0;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform var(--tap-ms) ease, opacity var(--tap-ms) ease;
}
.btn:active { transform: scale(var(--press-scale)); }
.btn:disabled { opacity: .4; pointer-events: none; }

/* R8–R13 empty / error */
.status-line, .empty, .error {
  margin: 16px;
  padding: 14px;
  border-radius: 12px;
  text-align: center;
  font-size: 14px;
}
.empty { background: #fafafa; color: #666; }
.error { background: #ffebee; color: #b71c1c; }
.status-line { color: #666; }

@media (min-width: 480px) {
  body { padding: 24px 0; }
  .phone { min-height: calc(100dvh - 48px); border-radius: 20px; overflow: hidden; }
}
