:root {
      --bg: #f8f5ee;
      --fg: #17231f;
      --muted: #6b6458;
      --card: rgba(255,255,255,.82);
      --card-solid: #ffffff;
      --border: #e4dccb;
      --primary: #0f766e;
      --primary-2: #115e59;
      --primary-soft: #dff7f3;
      --accent: #d6a84f;
      --accent-soft: #fff3d5;
      --danger: #b42318;
      --danger-soft: #fff0ee;
      --shadow: 0 24px 70px rgba(26, 41, 34, .12);
      --shadow-soft: 0 14px 35px rgba(26, 41, 34, .08);
      --radius-xl: 28px;
      --radius-lg: 20px;
      --radius-md: 14px;
      --safe-bottom: env(safe-area-inset-bottom, 0px);
    }
    [data-theme="dark"] {
      --bg: #0b1412;
      --fg: #f7f2e8;
      --muted: #a8a096;
      --card: rgba(17,28,25,.78);
      --card-solid: #111c19;
      --border: #24352f;
      --primary: #2dd4bf;
      --primary-2: #5eead4;
      --primary-soft: rgba(45,212,191,.12);
      --accent: #e6b85c;
      --accent-soft: rgba(230,184,92,.13);
      --danger: #ffb4a8;
      --danger-soft: rgba(255,180,168,.12);
      --shadow: 0 24px 70px rgba(0, 0, 0, .35);
      --shadow-soft: 0 14px 35px rgba(0, 0, 0, .22);
    }
    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body {
      margin: 0;
      min-height: 100vh;
      background:
        radial-gradient(circle at top left, rgba(15,118,110,.16), transparent 34rem),
        radial-gradient(circle at 82% 8%, rgba(214,168,79,.18), transparent 27rem),
        var(--bg);
      color: var(--fg);
      font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      overflow-x: hidden;
    }
    button, select, input { font: inherit; }
    button { cursor: pointer; }
    .app-shell {
      width: min(1180px, calc(100% - 32px));
      margin: 0 auto;
      padding: 28px 0 110px;
    }
    .topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 24px;
    }
    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }
    .brand-mark {
      width: 48px;
      height: 48px;
      border-radius: 18px;
      display: grid;
      place-items: center;
      color: white;
      background: linear-gradient(145deg, var(--primary), var(--primary-2));
      box-shadow: var(--shadow-soft);
      flex: 0 0 auto;
    }
    .brand h1 {
      font-family: "Plus Jakarta Sans", Inter, sans-serif;
      font-size: clamp(20px, 3vw, 30px);
      line-height: 1.05;
      margin: 0;
      letter-spacing: -.04em;
    }
    .brand p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
    .top-actions { display: flex; gap: 10px; align-items: center; }
    .icon-btn, .btn {
      border: 1px solid var(--border);
      background: var(--card);
      color: var(--fg);
      border-radius: 999px;
      min-height: 44px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      padding: 0 16px;
      box-shadow: 0 8px 22px rgba(0,0,0,.04);
      backdrop-filter: blur(16px);
      transition: transform .18s ease, border-color .18s ease, background .18s ease;
    }
    .icon-btn { width: 44px; padding: 0; }
    .btn:hover, .icon-btn:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--primary) 38%, var(--border)); }
    .btn-primary {
      border: 0;
      background: linear-gradient(145deg, var(--primary), var(--primary-2));
      color: white;
    }
    [data-theme="dark"] .btn-primary { color: #06201c; }
    .btn-ghost { background: transparent; box-shadow: none; }
    .grid {
      display: grid;
      grid-template-columns: minmax(0, 1.05fr) minmax(320px, .65fr);
      gap: 20px;
      align-items: start;
    }
    .panel {
      border: 1px solid var(--border);
      background: var(--card);
      border-radius: var(--radius-xl);
      box-shadow: var(--shadow);
      backdrop-filter: blur(22px);
      overflow: hidden;
    }
    .hero {
      padding: clamp(20px, 4vw, 34px);
      position: relative;
      min-height: 390px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }
    .hero:before {
      content: "";
      position: absolute;
      inset: 18px 18px auto auto;
      width: 170px;
      height: 170px;
      border-radius: 50%;
      background: radial-gradient(circle, var(--accent-soft), transparent 65%);
      opacity: .9;
      pointer-events: none;
    }
    .hero-corner {
      position: absolute;
      top: 18px;
      left: 18px;
      z-index: 2;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px;
      border: 1px solid var(--border);
      border-radius: 999px;
      background: color-mix(in srgb, var(--card-solid) 72%, transparent);
      box-shadow: 0 12px 30px rgba(0,0,0,.06);
      backdrop-filter: blur(18px);
    }
    .location-row {
      position: relative;
      z-index: 1;
      display: flex;
      justify-content: center;
      align-items: flex-start;
      gap: 14px;
      text-align: center;
    }
    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 7px 10px;
      border-radius: 999px;
      background: var(--primary-soft);
      color: var(--primary);
      font-weight: 700;
      font-size: 12px;
      margin-bottom: 12px;
    }
    .location-title { margin: 0; font-family: "Plus Jakarta Sans", Inter, sans-serif; font-size: clamp(20px, 3vw, 34px); letter-spacing: -.045em; }
    .location-subtitle { margin: 8px 0 0; color: var(--muted); }
    .next-block { position: relative; z-index: 1; margin-top: 34px; text-align: center; }
    .next-label { color: var(--muted); font-weight: 800; font-size: 13px; margin: 0 0 14px; text-transform: uppercase; letter-spacing: .08em; }
    .next-prayer-focus {
      display: grid;
      place-items: center;
      gap: 13px;
    }
    .next-name-row {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: clamp(10px, 2vw, 16px);
    }
    .next-hero-icon {
      width: 36px;
      height: 36px;
      border-radius: 999px;
      display: inline-grid;
      place-items: center;
      color: var(--primary);
      background: var(--primary-soft);
      box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 14%, transparent);
      flex: 0 0 auto;
    }
    .next-hero-icon svg { width: 20px; height: 20px; display: block; }
    .next-name { font-family: "Plus Jakarta Sans", Inter, sans-serif; font-size: clamp(56px, 11vw, 104px); line-height: .9; margin: 0; letter-spacing: -.075em; }
    .next-time-row {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: clamp(10px, 2vw, 16px);
    }
    .next-time { color: var(--fg); font-size: clamp(44px, 8vw, 86px); font-weight: 800; line-height: .95; margin: 0; letter-spacing: -.065em; font-variant-numeric: tabular-nums; }
    .analog-clock {
      --hour-angle: 0deg;
      --minute-angle: 0deg;
      width: 38px;
      height: 38px;
      border-radius: 999px;
      border: 2px solid color-mix(in srgb, var(--primary) 55%, var(--border));
      background: linear-gradient(145deg, var(--card-solid), var(--primary-soft));
      position: relative;
      box-shadow: var(--shadow-soft);
      flex: 0 0 auto;
    }
    .analog-clock::before {
      content: "";
      position: absolute;
      inset: 5px;
      border-radius: 999px;
      border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
    }
    .analog-clock::after {
      content: "";
      position: absolute;
      width: 5px;
      height: 5px;
      border-radius: 999px;
      background: var(--primary);
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      z-index: 4;
    }
    .clock-hand {
      position: absolute;
      left: 50%;
      bottom: 50%;
      transform-origin: 50% 100%;
      border-radius: 999px;
      z-index: 3;
    }
    .clock-hand.hour {
      width: 3px;
      height: 25%;
      background: var(--fg);
      transform: translateX(-50%) rotate(var(--hour-angle));
    }
    .clock-hand.minute {
      width: 2px;
      height: 34%;
      background: var(--primary);
      transform: translateX(-50%) rotate(var(--minute-angle));
    }
    [data-theme="dark"] .analog-clock { background: linear-gradient(145deg, var(--card-solid), var(--muted)); }
    .countdown {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: clamp(15px, 3vw, 20px);
      line-height: 1;
      margin: 16px 0 0;
      padding: 9px 15px;
      border-radius: 999px;
      background: var(--primary-soft);
      color: var(--primary);
      font-weight: 800;
      letter-spacing: -.015em;
      font-variant-numeric: tabular-nums;
    }
    .countdown::before { content: "Dalam "; font-weight: 700; margin-right: 4px; opacity: .82; }
    .hero-footer { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; align-items: center; justify-content: space-between; }
    .mini-info { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
    .side-stack { display: grid; gap: 16px; }
    .card { padding: 18px; border: 1px solid var(--border); background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); backdrop-filter: blur(18px); }
    .card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
    .card-title h2 { margin: 0; font-family: "Plus Jakarta Sans", Inter, sans-serif; font-size: 18px; letter-spacing: -.03em; }
    .prayer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .prayer-card {
      border: 1px solid var(--border);
      background: var(--card-solid);
      border-radius: 18px;
      padding: 14px;
      display: grid;
      gap: 12px;
      transition: transform .16s ease, border-color .16s ease;
    }
    .prayer-card.active { border-color: color-mix(in srgb, var(--primary) 70%, var(--border)); background: var(--primary-soft); }
    .prayer-card.next { border-color: color-mix(in srgb, var(--accent) 70%, var(--border)); background: var(--accent-soft); }
    .prayer-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
    .prayer-title { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
    .prayer-icon {
      width: 32px;
      height: 32px;
      border-radius: 12px;
      display: inline-grid;
      place-items: center;
      background: var(--primary-soft);
      color: var(--primary);
      flex: 0 0 auto;
    }
    .prayer-icon svg { width: 18px; height: 18px; display: block; }
    .prayer-card.next .prayer-icon { background: rgba(214,168,79,.18); color: var(--accent); }
    .prayer-card.active .prayer-icon { background: rgba(15,118,110,.16); color: var(--primary); }
    [data-theme="dark"] .prayer-card.next .prayer-icon { background: rgba(230,184,92,.16); }
    [data-theme="dark"] .prayer-card.active .prayer-icon { background: rgba(45,212,191,.16); }
    .prayer-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; }
    .prayer-time { font-size: 26px; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
    .badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 9px; font-size: 11px; font-weight: 800; background: var(--primary-soft); color: var(--primary); white-space: nowrap; }
    .badge.gold { background: var(--accent-soft); color: var(--accent); }
    .status-box { padding: 12px 14px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.45; }
    .status-box.error { background: var(--danger-soft); color: var(--danger); }
    .tabs { display: flex; gap: 8px; padding: 6px; border: 1px solid var(--border); background: var(--card); border-radius: 999px; width: fit-content; margin: 22px 0 16px; }
    .tab-btn { border: 0; background: transparent; color: var(--muted); padding: 10px 16px; border-radius: 999px; font-weight: 800; }
    .tab-btn.active { color: white; background: var(--primary); }
    [data-theme="dark"] .tab-btn.active { color: #06201c; }
    .content-section { display: none; }
    .content-section.active { display: block; }
    .toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
    .select, .input {
      border: 1px solid var(--border);
      background: var(--card-solid);
      color: var(--fg);
      border-radius: 14px;
      min-height: 44px;
      padding: 0 14px;
      outline: none;
      max-width: 100%;
    }
    .table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 20px; background: var(--card-solid); }
    table { width: 100%; border-collapse: collapse; min-width: 740px; }
    th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; white-space: nowrap; }
    th { position: sticky; top: 0; background: var(--card-solid); color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
    tr.today-row td { background: var(--primary-soft); font-weight: 800; }
    .drawer-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,.36);
      opacity: 0;
      pointer-events: none;
      transition: opacity .2s ease;
      z-index: 50;
    }
    .drawer {
      position: fixed;
      left: 50%;
      bottom: 0;
      width: min(620px, 100%);
      transform: translate(-50%, 104%);
      background: var(--bg);
      color: var(--fg);
      border: 1px solid var(--border);
      border-bottom: 0;
      border-radius: 30px 30px 0 0;
      box-shadow: 0 -30px 80px rgba(0,0,0,.22);
      z-index: 60;
      padding: 18px 18px calc(18px + var(--safe-bottom));
      transition: transform .25s ease;
    }
    .drawer.open { transform: translate(-50%, 0); }
    .drawer-backdrop.open { opacity: 1; pointer-events: auto; }
    .drawer-handle { width: 48px; height: 5px; border-radius: 99px; background: var(--border); margin: 0 auto 16px; }
    .drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
    .drawer-head h3 { margin: 0; font-family: "Plus Jakarta Sans", Inter, sans-serif; font-size: 22px; letter-spacing: -.04em; }
    .form-grid { display: grid; gap: 12px; }
    .field label { display: block; color: var(--muted); font-size: 12px; font-weight: 800; margin: 0 0 7px; }
    .field select, .field input { width: 100%; }
    .drawer-actions { display: flex; gap: 10px; margin-top: 14px; }
    .drawer-actions .btn { flex: 1; }
    .toast {
      position: fixed;
      left: 50%;
      bottom: calc(82px + var(--safe-bottom));
      transform: translateX(-50%) translateY(20px);
      opacity: 0;
      pointer-events: none;
      z-index: 80;
      background: var(--card-solid);
      color: var(--fg);
      border: 1px solid var(--border);
      box-shadow: var(--shadow-soft);
      border-radius: 18px;
      padding: 12px 14px;
      width: min(520px, calc(100% - 32px));
      display: flex;
      gap: 10px;
      align-items: flex-start;
      transition: opacity .2s ease, transform .2s ease;
      font-size: 14px;
      line-height: 1.45;
    }
    .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
    .skeleton { background: linear-gradient(90deg, rgba(128,128,128,.12), rgba(128,128,128,.22), rgba(128,128,128,.12)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 14px; min-height: 16px; }
    @keyframes shimmer { to { background-position: -200% 0; } }
    .footer-note { color: var(--muted); font-size: 12px; line-height: 1.65; margin: 22px 0 0; }
    .footer-note a { color: var(--primary); font-weight: 800; text-decoration: none; }
    .hide { display: none !important; }
    @media (max-width: 900px) {
      .app-shell { width: min(100% - 22px, 720px); padding-top: 18px; }
      .grid { grid-template-columns: 1fr; }
      .topbar { align-items: flex-start; }
      .top-actions { gap: 8px; flex: 0 0 auto; }
      .top-actions .btn span { display: none; }
      .top-actions .btn { width: 44px; padding: 0; }
      .hero { min-height: 410px; }
      .prayer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    @media (max-width: 520px) {
      .app-shell { width: min(100% - 18px, 520px); }
      .brand-mark { width: 42px; height: 42px; border-radius: 15px; }
      .brand p { display: none; }
      .hero { padding: 18px; border-radius: 24px; min-height: 365px; }
      .location-row { display: flex; }
      .hero .location-row .btn, .hero .location-row .icon-btn { display: none; }
      .eyebrow { margin-bottom: 8px; }
      .location-title { font-size: 22px; }
      .location-subtitle { font-size: 13px; margin-top: 6px; }
      .next-block { margin-top: 28px; }
      .next-prayer-focus { gap: 10px; }
      .next-name-row { gap: 10px; }
      .next-time-row { gap: 10px; }
      .next-name { font-size: clamp(48px, 15vw, 72px); }
      .next-time { font-size: clamp(42px, 13vw, 64px); }
      .hero-corner { top: 14px; left: 14px; padding: 7px; gap: 7px; }
      .next-hero-icon { width: 32px; height: 32px; }
      .next-hero-icon svg { width: 18px; height: 18px; }
      .analog-clock { width: 34px; height: 34px; }
      .countdown { font-size: 15px; padding: 8px 13px; margin-top: 14px; }
      .hero-footer { margin-top: 22px; }
      .prayer-grid { gap: 9px; }
      .prayer-card { padding: 12px; border-radius: 16px; }
      .prayer-time { font-size: 22px; }
      .toolbar { align-items: stretch; }
      .toolbar > * { width: 100%; }
      .tabs { width: 100%; }
      .tab-btn { flex: 1; }
      .drawer-actions { flex-direction: column; }
    }