:root {
  --navy: #163a86;
  --navy-deep: #0d2a68;
  --navy-mid: #1b4aa3;
  --ink: #111827;
  --gold: #d4af37;
  --gold-2: #f0d36c;
  --green: #22c55e;
  --red: #e11d2a;
  --yellow: #ffe14a;
  --live: #ff2d2d;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: Inter, "Noto Sans Myanmar", "Segoe UI", sans-serif;
  background: #050814;
  color: #111;
  min-height: 100vh;
}

.stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
}
.stage::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 20%, rgba(30, 80, 180, .35), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(20, 140, 90, .18), transparent 42%),
    linear-gradient(180deg, #07101f, #04060d);
  z-index: 0;
}
.ticker-bg {
  position: absolute;
  inset: 0;
  opacity: .22;
  color: #7ec8ff;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  padding: 20px;
}
.phone {
  width: 390px;
  max-width: 100%;
  height: 844px;
  max-height: 92vh;
  background: #fff;
  border-radius: 42px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  box-shadow:
    0 0 0 12px #1a1c22,
    0 0 0 14px #3a3d46,
    0 40px 80px rgba(0,0,0,.55);
  display: flex;
  flex-direction: column;
}
.notch {
  height: 28px;
  background: #0b1c44;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .4px;
  flex-shrink: 0;
}
.app {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #f4f6fb;
}

.client-header {
  background: linear-gradient(180deg, #1a3f8f, #14357a);
  color: #fff;
  text-align: center;
  padding: 14px 16px 16px;
  flex-shrink: 0;
}
.client-header h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: .4px;
}
.page-header {
  background: linear-gradient(180deg, #1a3f8f, #14357a);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.page-header h2 { font-size: 20px; font-weight: 700; }
.back-btn {
  width: 32px; height: 32px; border: 0; background: transparent; color: #fff;
  font-size: 22px; cursor: pointer;
}

.view { display: none; flex: 1; min-height: 0; overflow: auto; flex-direction: column; }
.view.active { display: flex; }
#view-2d, #view-3d { background: #fff; }
#view-2d .notice, #view-3d .notice { margin-top: auto; }

.hero-wrap {
  background: #fff;
  padding: 18px 18px 8px;
  text-align: center;
}
.hero-num {
  font-size: 92px;
  font-weight: 800;
  color: #163a86;
  line-height: .9;
  letter-spacing: -2px;
  transition: transform .25s ease, color .25s;
}
.lock-tag {
  display: inline-block;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.hero-num.locked { color: #b91c1c; }
.updated {
  margin-top: 8px;
  color: #6b7280;
  font-size: 13px;
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 16px 6px;
  background: #fff;
}
.pair .box {
  border: 1px solid #111;
  background: #fff;
  border-radius: 4px;
  padding: 8px 10px 10px;
  text-align: center;
}
.pair .box small {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .4px;
}
.pair .box b {
  display: block;
  margin-top: 2px;
  font-size: 22px;
  font-weight: 800;
}

.d3-banner {
  margin: 8px 16px 0;
  background: #1a3f8f;
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}
.d3-banner span:last-child { font-size: 28px; letter-spacing: 1px; }

.slot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 16px 8px;
  background: #fff;
}
.slot-card {
  background: linear-gradient(180deg, #1c4aa8, #163a86);
  color: #fff;
  border-radius: 10px;
  padding: 10px 10px 12px;
  min-height: 86px;
  box-shadow: 0 6px 14px rgba(22, 58, 134, .18);
}
.slot-card .t {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  opacity: .95;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.18);
}
.slot-card .n {
  text-align: center;
  color: var(--yellow);
  font-size: 34px;
  font-weight: 800;
  padding-top: 8px;
  letter-spacing: 1px;
  text-shadow: 0 2px 0 rgba(0,0,0,.15);
}

.notice {
  margin: 8px 16px 16px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 4px 16px rgba(15, 40, 90, .08);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  overflow: hidden;
}
.notice .ok {
  width: 28px; height: 28px; border-radius: 50%;
  background: #1a3f8f; color: #fff;
  display: grid; place-items: center;
  flex-shrink: 0; font-size: 14px;
}
.marquee {
  overflow: hidden;
  flex: 1;
  color: #1a3f8f;
  font-weight: 600;
  font-size: 14px;
}
.marquee span {
  display: inline-block;
  padding-left: 100%;
  animation: slide 14s linear infinite;
  white-space: nowrap;
}
@keyframes slide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.tabbar {
  flex-shrink: 0;
  height: 72px;
  background: #151515;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  padding: 8px 6px 10px;
}
.tabbar button {
  border: 0;
  background: transparent;
  color: #d1d5db;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
}
.tabbar button.active { color: #fff; }
.icon-live {
  width: 38px; height: 28px; border-radius: 6px;
  background: #e10600;
  display: grid; place-items: center;
  position: relative;
  color: #fff;
}
.icon-live .dot {
  position: absolute; right: -2px; top: -2px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px #151515;
}
.cal {
  width: 34px; height: 30px; border-radius: 5px;
  background: linear-gradient(180deg, #f59e0b, #d97706);
  color: #fff; font-weight: 800; font-size: 12px;
  display: grid; place-items: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.cal.star { background: linear-gradient(180deg, #ef4444, #b91c1c); font-size: 16px; }

.live-body {
  background: radial-gradient(circle at top, #1e4aa3, #0b1c44);
  color: #fff;
  padding: 20px 18px 24px;
  min-height: 100%;
}
.live-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,45,45,.15);
  border: 1px solid rgba(255,45,45,.5);
  color: #ffb4b4;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
}
.live-badge i {
  width: 8px; height: 8px; border-radius: 50%; background: #ff2d2d;
  animation: blink 1s infinite;
  display: block;
}
@keyframes blink { 50% { opacity: .2; } }
.live-hero { font-size: 108px; font-weight: 800; letter-spacing: -3px; line-height: 1; margin: 18px 0 6px; font-variant-numeric: tabular-nums; text-shadow: 0 0 22px rgba(255, 213, 74, .28); }
.live-hero.frozen { text-shadow: none; color: #fecaca; }
.live-kpis b { display: block; font-size: 24px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.live-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.live-kpis div {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 14px;
}
.live-kpis small { opacity: .7; font-size: 12px; letter-spacing: 1px; }
.live-list { margin-top: 18px; display: grid; gap: 8px; }
.live-list .row {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(0,0,0,.18);
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
}
.live-list .row em { color: var(--yellow); font-style: normal; font-size: 20px; }

.holiday-list { padding: 18px 16px; display: grid; gap: 14px; }
.holiday-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 35, 80, .08);
  padding: 22px 18px;
  text-align: center;
}
.holiday-card b { display: block; font-size: 22px; margin-bottom: 10px; }
.holiday-card p { color: #374151; font-size: 16px; }

.admin-head {
  background: #111;
  color: #fff;
  text-align: center;
  padding: 18px 16px 16px;
  flex-shrink: 0;
}
.admin-head .hero { font-size: 64px; font-weight: 800; line-height: 1; }
.admin-head .kv { display: grid; grid-template-columns: 1fr 1fr; margin-top: 8px; }
.admin-head .kv b { display: block; font-size: 20px; }
.admin-head .kv small { opacity: .75; font-size: 12px; letter-spacing: 1px; }
.admin-head .upd { margin-top: 10px; font-size: 12px; opacity: .8; }

.admin-list { background: #fff; padding: 12px 16px 20px; }
.admin-date {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 700; padding: 6px 0 10px; border-bottom: 1px solid #eee;
}
.admin-date .st { color: #2563eb; }
.slot-row {
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.slot-row .top {
  display: flex; justify-content: space-between; align-items: center;
}
.slot-row .time { font-size: 20px; font-weight: 800; }
.slot-row .res { font-size: 34px; font-weight: 800; color: var(--red); }
.slot-row .ops {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 6px; gap: 8px;
}
.start-t { color: #3b82f6; font-size: 13px; font-weight: 600; }
.btns { display: flex; gap: 8px; }
.btn {
  border: 1px solid #d1d5db;
  background: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  letter-spacing: .4px;
}
.btn.pub { color: #059669; border-color: #a7f3d0; }
.btn.edit { color: #111; }
.btn.open { background: #16a34a; color: #fff; border-color: #16a34a; }
.btn.close { background: #dc2626; color: #fff; border-color: #dc2626; }
.d3-row .label { font-weight: 800; font-size: 18px; }

.admin-tabbar {
  height: 70px;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  flex-shrink: 0;
}
.admin-tabbar button {
  border: 0; background: transparent; cursor: pointer;
  font-size: 11px; font-weight: 700; color: #6b7280;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.admin-tabbar button.active { color: #111; }
.admin-tabbar svg { width: 22px; height: 22px; }

.form-pad { padding: 16px; display: grid; gap: 12px; }
.field { background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.04); }
.field label { display: block; font-size: 12px; font-weight: 700; color: #6b7280; letter-spacing: 1px; margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 12px 12px; font-size: 18px; font-weight: 700; font-family: inherit;
}
.gold-btn {
  background: linear-gradient(180deg, #f0d36c, #c9a227);
  border: 0; color: #111; font-weight: 800; padding: 14px;
  border-radius: 12px; cursor: pointer; font-size: 15px;
  box-shadow: 0 8px 18px rgba(201,162,39,.28);
}
.sent-head {
  padding: 16px;
}
.sent-cta {
  width: 100%;
  background: #1a3f8f;
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 16px;
}
.msg-card {
  background: #fff; margin: 0 16px; border-radius: 14px; padding: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,.05);
}
.msg-card .row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.msg-card .row span { font-weight: 700; }
.link { color: #2563eb; font-weight: 800; cursor: pointer; background: none; border: 0; font-size: 14px; }
.red-btn {
  display: block; width: calc(100% - 32px); margin: 12px 16px 0;
  background: #e11d2a; color: #fff; border: 0; border-radius: 12px;
  padding: 16px; font-weight: 800; font-size: 16px; cursor: pointer;
  letter-spacing: .4px;
}

.modal {
  position: absolute; inset: 0; background: rgba(0,0,0,.45);
  display: none; align-items: flex-end; z-index: 20;
}
.modal.show { display: flex; }
.sheet {
  background: #fff; width: 100%; border-radius: 18px 18px 0 0;
  padding: 18px 18px 28px;
}
.sheet h3 { margin-bottom: 12px; }
.sheet input {
  width: 100%; font-size: 28px; font-weight: 800; text-align: center;
  padding: 12px; border: 1px solid #e5e7eb; border-radius: 12px;
}
.sheet .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.sheet .save { background: #111; color: #fff; border: 0; border-radius: 10px; padding: 12px; font-weight: 800; cursor: pointer; }
.sheet .cancel { background: #f3f4f6; border: 0; border-radius: 10px; padding: 12px; font-weight: 800; cursor: pointer; }

.toast {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%,-50%);
  background: rgba(30,30,30,.92); color: #fff; padding: 10px 16px;
  border-radius: 20px; font-size: 14px; font-weight: 700; display: none; z-index: 30;
  white-space: nowrap;
}
.toast.show { display: block; }

.apps-body {
  background:
    linear-gradient(180deg, rgba(20,20,20,.2), rgba(20,20,20,.45)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='800'%3E%3Crect fill='%23111111' width='100%25' height='100%25'/%3E%3C/svg%3E");
  background-size: cover;
  min-height: 100%;
  color: #fff;
  padding: 70px 28px 24px;
}
.apps-wallpaper {
  background:
    radial-gradient(ellipse at 20% 0%, #5a5a5a 0%, transparent 50%),
    radial-gradient(ellipse at 80% 40%, #2a2a2a 0%, transparent 45%),
    linear-gradient(165deg, #3e3e40 0%, #1a1a1c 40%, #0c0c0e 100%);
  min-height: 100%;
  padding: 80px 36px 30px;
  display: flex;
  flex-direction: column;
}
.app-grid { display: flex; gap: 28px; }
.app-icon { text-align: center; color: #fff; text-decoration: none; width: 86px; }
.app-icon .logo {
  width: 74px; height: 74px; border-radius: 18px;
  background: #111; display: grid; place-items: center;
  margin: 0 auto 8px; box-shadow: 0 10px 20px rgba(0,0,0,.35);
}
.app-icon small { font-size: 11px; font-weight: 700; letter-spacing: .3px; }
.dock {
  margin-top: auto;
  background: rgba(255,255,255,.12);
  border-radius: 22px;
  display: flex; justify-content: space-around;
  padding: 12px 8px;
  backdrop-filter: blur(10px);
}
.dock i {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 22px;
}

@media (max-width: 480px) {
  .stage { padding: 0; }
  .phone {
    width: 100%; height: 100vh; max-height: 100vh;
    border-radius: 0; box-shadow: none;
  }
  .notch { display: none; }
}
