:root {
      --bg: #0c1017;
      --card: #151c28;
      --card-border: rgba(201,162,39,0.12);
      --accent: #d4af37;
      --accent-soft: rgba(212,175,55,0.15);
      --text: #f0ebe3;
      --muted: #8b9aab;
      --success: #4a9b6e;
      --danger: #c45c5c;
      --input-bg: #0a0e14;
    }
    * { box-sizing: border-box; margin: 0; padding: 0; }
    html { background: var(--bg); }
    body {
      font-family: "Noto Serif TC", "PingFang TC", "Microsoft JhengHei", "Songti TC", Georgia, serif;
      background: radial-gradient(ellipse at top, #141b28 0%, var(--bg) 55%);
      color: var(--text);
      min-height: 100vh;
      min-height: 100dvh;
      line-height: 1.7;
      -webkit-font-smoothing: antialiased;
      -webkit-tap-highlight-color: transparent;
    }
    .container {
      max-width: 680px;
      margin: 0 auto;
      padding: 1.25rem 1.2rem 3.5rem;
      padding-top: max(1.25rem, env(safe-area-inset-top));
      padding-bottom: max(3.5rem, env(safe-area-inset-bottom));
    }
    header {
      text-align: center;
      padding: 1.5rem 0 1.4rem;
      margin-bottom: 1.4rem;
      position: relative;
    }
    header::after {
      content: "";
      display: block;
      width: 48px;
      height: 2px;
      background: linear-gradient(90deg, transparent, var(--accent), transparent);
      margin: 1rem auto 0;
      opacity: 0.7;
    }
    h1 {
      font-size: 1.75rem;
      font-weight: 400;
      letter-spacing: 0.12em;
      color: var(--accent);
    }
    .subtitle {
      color: var(--muted);
      font-size: 0.88rem;
      margin-top: 0.4rem;
      letter-spacing: 0.04em;
    }
    .card {
      background: var(--card);
      border-radius: 16px;
      padding: 1.35rem 1.25rem;
      margin-bottom: 1rem;
      border: 1px solid var(--card-border);
      box-shadow: 0 4px 24px rgba(0,0,0,0.25);
    }
    h2 {
      font-size: 1rem;
      color: var(--accent);
      margin-bottom: 0.95rem;
      font-weight: 500;
      letter-spacing: 0.03em;
    }
    label {
      display: block;
      font-size: 0.8rem;
      color: var(--muted);
      margin-bottom: 0.35rem;
    }
    textarea, input[type="text"], input[type="number"], select {
      width: 100%;
      background: var(--input-bg);
      border: 1px solid rgba(255,255,255,0.08);
      color: var(--text);
      padding: 0.75rem 0.95rem;
      border-radius: 10px;
      font-family: inherit;
      font-size: 1rem;
      resize: vertical;
      transition: border-color 0.2s;
    }
    textarea:focus, input:focus, select:focus {
      outline: none;
      border-color: rgba(212,175,55,0.45);
    }
    textarea { min-height: 88px; }
    .btn-row { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 1rem; }
    button {
      background: var(--accent);
      color: #0c1017;
      border: none;
      padding: 0.72rem 1.3rem;
      border-radius: 10px;
      font-size: 0.95rem;
      font-weight: 600;
      cursor: pointer;
      transition: opacity 0.2s, transform 0.12s, box-shadow 0.2s;
      box-shadow: 0 2px 12px rgba(212,175,55,0.25);
    }
    button:hover { opacity: 0.95; }
    button:active { transform: scale(0.97); }
    button.secondary {
      background: transparent;
      color: var(--accent);
      border: 1px solid rgba(212,175,55,0.5);
      box-shadow: none;
    }
    button.danger {
      background: transparent;
      color: var(--danger);
      border: 1px solid rgba(196,92,92,0.5);
      box-shadow: none;
    }
    button:disabled { opacity: 0.38; cursor: not-allowed; box-shadow: none; }
    .controls { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; margin-top: 0.9rem; }
    @media (max-width: 520px) { .controls { grid-template-columns: 1fr; } }
    .slider-group { display: flex; flex-direction: column; gap: 0.3rem; }
    input[type="range"] { width: 100%; accent-color: var(--accent); height: 1.4rem; }
    .search-row { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
    .search-row select, .search-row input { flex: 1; min-width: 88px; }
    .note { font-size: 0.76rem; color: var(--muted); margin-top: 0.55rem; line-height: 1.5; }
    #sessionView { display: none; }
    .step-indicator {
      display: flex;
      justify-content: space-between;
      margin-bottom: 1.2rem;
      gap: 0.3rem;
    }
    .step-dot {
      flex: 1;
      text-align: center;
      padding: 0.5rem 0.15rem;
      border-radius: 8px;
      font-size: 0.68rem;
      background: var(--input-bg);
      color: var(--muted);
      border: 1px solid transparent;
      transition: all 0.25s;
    }
    .step-dot.active {
      background: var(--accent-soft);
      color: var(--accent);
      border-color: rgba(212,175,55,0.4);
      font-weight: 600;
    }
    .step-dot.done { color: var(--success); }
    .step-title {
      font-size: 1.55rem;
      text-align: center;
      margin-bottom: 0.45rem;
      color: var(--accent);
      letter-spacing: 0.06em;
    }
    .step-guidance {
      text-align: center;
      color: var(--muted);
      font-size: 0.95rem;
      margin-bottom: 1.15rem;
      min-height: 3.2em;
      line-height: 1.65;
    }
    .timer-display {
      font-size: 3rem;
      text-align: center;
      font-variant-numeric: tabular-nums;
      letter-spacing: 0.06em;
      margin: 0.9rem 0;
      font-weight: 300;
      color: var(--text);
    }
    .scripture-display {
      background: var(--input-bg);
      padding: 1.1rem 1rem;
      border-radius: 12px;
      font-size: 1.08rem;
      margin: 0.9rem 0;
      max-height: 220px;
      overflow-y: auto;
      white-space: pre-wrap;
      line-height: 1.9;
      border: 1px solid rgba(255,255,255,0.05);
    }
    .progress-bar {
      height: 3px;
      background: var(--input-bg);
      border-radius: 2px;
      overflow: hidden;
      margin: 1rem 0;
    }
    .progress-fill {
      height: 100%;
      background: linear-gradient(90deg, #b8942a, var(--accent));
      width: 0%;
      transition: width 0.3s linear;
      border-radius: 2px;
    }
    footer {
      text-align: center;
      padding: 1.75rem 0 0.5rem;
      color: var(--muted);
      font-size: 0.76rem;
      letter-spacing: 0.04em;
    }
    .install-hint {
      background: var(--accent-soft);
      border: 1px solid rgba(212,175,55,0.28);
      border-radius: 12px;
      padding: 0.95rem 1rem;
      margin-bottom: 1.1rem;
      font-size: 0.86rem;
      color: var(--muted);
      display: none;
      line-height: 1.55;
    }
    .install-hint.show { display: block; }
    .voice-status { font-size: 0.78rem; color: var(--muted); margin-top: 0.45rem; }
    .step-edit { margin-bottom: 0.9rem; }
    .step-edit label { font-weight: 500; color: var(--accent); margin-bottom: 0.3rem; }
    .music-rec {
      background: var(--input-bg);
      border-radius: 10px;
      padding: 0.85rem 0.95rem;
      margin-top: 0.75rem;
      font-size: 0.8rem;
      color: var(--muted);
      line-height: 1.6;
      border: 1px solid rgba(255,255,255,0.04);
    }
    .music-rec a { color: var(--accent); text-decoration: none; }
    .music-rec a:hover { text-decoration: underline; }