html, body, #root { margin: 0; min-height: 100%; }
body { background: var(--ds-page); }

/* ---- 15PP app concept: phone demo on brand black ---- */
.app-stage {
    background: #0e0f12;
    border-radius: 24px;
    padding: 28px 16px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.app-stage .file-caption, .app-stage p { color: #9aa0a6; }

.phone {
    position: relative;
    width: 320px;
    max-width: 100%;
    height: 620px;
    background: #0e0f12;
    border: 8px solid #26282d;
    border-radius: 44px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #f2f2f2;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

/* Splash */
.splash {
    position: absolute;
    inset: 0;
    background: #0e0f12;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px;
    text-align: center;
    z-index: 3;
}
.splash-logo { width: 230px; max-width: 80%; }
.splash-tag {
    margin: 0;
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #c8c9cc;
}
.splash-note { margin: 0; font-size: 12px; color: #7c7f85; }
.splash-who { margin: 18px 0 2px; font-size: 13px; color: #9aa0a6; }
.splash-profiles { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 10px 0 16px; padding: 0 12px; }
.splash-profiles .gold-button { margin: 0; min-width: 0; padding: 13px 20px; }
.gold-button.ghost { background: transparent; color: #f7ab00; border: 1px solid #f7ab00; }
.profile-chip { background: rgba(247, 171, 0, 0.12); color: #f7ab00; border: 1px solid rgba(247, 171, 0, 0.4); border-radius: 999px; font-size: 11px; font-weight: 700; padding: 4px 10px; cursor: pointer; }

.gold-button {
    background: #f7ab00;
    color: #0e0f12;
    border: 0;
    border-radius: 999px;
    padding: 13px 26px;
    font-size: 15px;
    font-weight: 800;
    font-style: italic;
    letter-spacing: 0.02em;
    cursor: pointer;
    min-height: 44px;
}
.gold-button:active { transform: scale(0.97); }

/* Daily quote */
.quote-card { background: #17181d; border: 1px solid #26272e; border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; }
.quote-text { margin: 0; font-size: 14px; line-height: 1.5; color: #e8e9ec; font-style: italic; }
.quote-author { display: inline-block; margin: 8px 0 0; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #f7ab00; text-decoration: none; }

/* Header */
.phone-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 8px;
}
.phone-head img { width: 104px; }
.phone-date { font-size: 11px; letter-spacing: 0.12em; color: #9aa0a6; font-weight: 700; }

/* Body */
.phone-body { flex: 1; overflow-y: auto; padding: 4px 16px 16px; scrollbar-width: thin; }

.progress-line { margin: 6px 0 14px; }
.progress-text { font-size: 14px; margin-bottom: 6px; color: #e8e9eb; }
.progress-text strong { color: #f7ab00; font-size: 18px; font-style: italic; }
.progress-track { height: 8px; border-radius: 99px; background: #26282d; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #f7ab00, #ffd34d); border-radius: 99px; transition: width 0.25s ease; }

.perfect { color: #f7ab00; font-weight: 700; font-size: 13px; text-align: center; margin: 4px 0 10px; }

.area { margin-bottom: 16px; }
.area-name {
    font-size: 15px;
    font-weight: 800;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #f7ab00;
}
.area-tag { font-size: 12px; color: #9aa0a6; margin: 2px 0 8px; }

.point-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: #16181c;
    border: 1px solid #26282d;
    border-radius: 12px;
    padding: 11px 14px;
    margin-bottom: 7px;
    cursor: pointer;
    color: #f2f2f2;
    font-size: 14px;
    min-height: 44px;
}
.point-row.on { border-color: #f7ab00; background: #1d1a10; }
.point-label { font-weight: 600; }
.point-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #3a3d43;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #0e0f12;
    flex: none;
}
.point-row.on .point-check { background: #f7ab00; border-color: #f7ab00; }

.microcopy { font-size: 12px; color: #7c7f85; text-align: center; margin: 10px 4px 4px; line-height: 1.5; }

/* Daily score */
.score-line { margin: 0 0 16px; }
.score-label { font-size: 13px; font-weight: 700; color: #e8e9eb; margin-bottom: 8px; }
.score-label span { font-weight: 400; color: #9aa0a6; font-size: 11px; margin-left: 6px; }
.score-row { display: flex; gap: 4px; }
.score-btn {
    flex: 1;
    min-width: 0;
    height: 30px;
    border-radius: 8px;
    border: 1px solid #3a3d43;
    background: #16181c;
    color: #c8c9cc;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}
.score-btn.on { background: #f7ab00; border-color: #f7ab00; color: #0e0f12; }
.score-note { font-size: 11px; color: #7c7f85; margin-top: 6px; }
.track-btn { width: 100%; margin-top: 10px; padding: 12px; border-radius: 12px; border: 1px dashed #f7ab00; background: transparent; color: #f7ab00; font-size: 13px; font-weight: 600; cursor: pointer; }
.track-btn:active { background: rgba(247, 171, 0, 0.08); }
.track-line { margin: 10px 0 0; font-size: 13px; color: #f7ab00; }
.track-undo { background: none; border: none; color: #9aa0a6; font-size: 12px; text-decoration: underline; cursor: pointer; padding: 0 0 0 6px; }

/* Streak */
.streak-hero { text-align: center; padding: 26px 0 10px; }
.streak-flame { font-size: 44px; }
.streak-flame svg { width: 44px; height: 44px; color: #f7ab00; }
.streak-count { font-size: 64px; font-weight: 800; font-style: italic; color: #f7ab00; line-height: 1; }
.streak-label { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: #c8c9cc; margin-top: 4px; }

.week-row { display: flex; justify-content: space-between; margin: 18px 4px; }
.week-cell { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.week-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #0e0f12;
    background: #26282d;
}
.week-dot.done { background: #f7ab00; }
.week-dot.today { background: transparent; border: 2px dashed #f7ab00; }
.week-day { font-size: 11px; color: #9aa0a6; }

.milestones { display: flex; gap: 8px; margin: 8px 0 4px; }
.milestone {
    flex: 1;
    background: #16181c;
    border: 1px solid #26282d;
    border-radius: 12px;
    padding: 12px 6px;
    text-align: center;
}
.milestone strong { display: block; font-size: 20px; font-style: italic; color: #f7ab00; }
.milestone span { font-size: 11px; color: #9aa0a6; }
.milestone.hit { border-color: #f7ab00; }

.history-label { font-size: 12px; color: #9aa0a6; margin: 12px 0 6px; }
.history-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.hist-dot { width: 16px; height: 16px; border-radius: 5px; background: #26282d; }
.hist-dot.done { background: #f7ab00; }
.hist-dot.today { background: transparent; border: 2px dashed #f7ab00; }

/* Plus */
.plus-hero { display: flex; align-items: center; gap: 10px; margin: 8px 0 12px; }
.plus-hero img { width: 130px; }
.plus-badge {
    background: #f7ab00;
    color: #0e0f12;
    font-weight: 800;
    font-style: italic;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 14px;
    letter-spacing: 0.08em;
}
.plus-lead { font-size: 14px; line-height: 1.5; color: #e8e9eb; margin: 0 0 14px; }

.tiers { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.tier {
    background: #16181c;
    border: 1px solid #26282d;
    border-radius: 14px;
    padding: 12px 14px;
}
.tier.plus { border-color: #f7ab00; }
.tier.diamond { border-color: #e8e9eb; }
.tier.diamond .tier-name { color: #e8e9eb; }
.tier-name { font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: 0.06em; font-size: 13px; color: #c8c9cc; }
.tier.plus .tier-name { color: #f7ab00; }
.tier ul { margin: 8px 0; padding-left: 18px; font-size: 13px; color: #d7d8da; line-height: 1.55; }
.tier-price { font-size: 16px; font-weight: 800; color: #f2f2f2; }
.tier-price span { font-size: 11px; font-weight: 400; color: #9aa0a6; }

/* Tab bar */
.tab-bar {
    display: flex;
    border-top: 1px solid #26282d;
    background: #0e0f12;
    padding: 6px 4px 10px;
}
.tab {
    flex: 1;
    background: none;
    border: 0;
    color: #9aa0a6;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 0;
    cursor: pointer;
    min-height: 44px;
}
.tab.active { color: #f7ab00; }
.tab-icon { font-size: 16px; }
.tab-icon svg { width: 16px; height: 16px; vertical-align: -2px; }

.toast {
    position: absolute;
    left: 50%;
    bottom: 76px;
    transform: translateX(-50%);
    background: #f7ab00;
    color: #0e0f12;
    font-size: 12px;
    font-weight: 700;
    padding: 9px 16px;
    border-radius: 999px;
    white-space: nowrap;
    z-index: 4;
}

.wake-status { margin: 8px 0 0; font-size: 13px; }

@media (min-width: 768px) {
    .app-stage { padding: 36px 24px 24px; }
    .phone { width: 340px; height: 660px; }
}

/* ---- standalone app overrides ---- */
body { background: #0e0f12; }
.save-caption { margin: 0; font-size: 11px; color: #7c7f85; text-align: center; }
.app-stage { min-height: 100dvh; justify-content: center; box-sizing: border-box; }

@media (max-width: 480px) {
    .app-stage { padding: 0; border-radius: 0; gap: 0; }
    .app-stage .save-caption { position: fixed; bottom: 2px; left: 0; right: 0; opacity: 0.6; pointer-events: none; }
    .phone { width: 100%; max-width: 480px; height: 100dvh; border-radius: 0; border: none; }
    .tab-bar { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
}
