:root {
    --bg: #07111f;
    --surface: #0d1a2b;
    --surface-2: #122239;
    --text: #f4f7fb;
    --muted: #8fa2b8;
    --accent: #66e3bd;
    --accent-2: #72a7ff;
    --danger: #ff7d91;
    --border: rgba(255,255,255,.09);
    --shadow: 0 24px 70px rgba(0,0,0,.35);
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background:
        radial-gradient(
            circle at 75% 5%,
            rgba(114,167,255,.14),
            transparent 35%
        ),
        radial-gradient(
            circle at 10% 45%,
            rgba(102,227,189,.08),
            transparent 30%
        ),
        var(--bg);
    color: var(--text);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-shell {
    width: min(100%, 680px);
    margin: 0 auto;
    padding:
        max(20px, env(safe-area-inset-top))
        20px
        max(32px, env(safe-area-inset-bottom))
        20px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0 30px;
}

.brand {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .18em;
}

.brand-subtitle {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
}

.icon-button {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    background: rgba(255,255,255,.04);
    font-size: 25px;
}

.hero {
    position: relative;
    padding: 45px 0 35px;
    overflow: hidden;
}

.orb {
    position: absolute;
    width: 260px;
    height: 260px;
    right: -110px;
    top: 10px;
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(102,227,189,.28),
            rgba(102,227,189,0) 68%
        );
    pointer-events: none;
}

.hero-label,
.section-label,
.eyebrow {
    color: var(--accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.hero h1 {
    position: relative;
    margin: 18px 0;
    max-width: 600px;
    font-size: clamp(42px, 12vw, 76px);
    line-height: .96;
    letter-spacing: -.055em;
}

.hero h1 span {
    color: var(--accent);
}

.hero > p {
    max-width: 470px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.65;
}

.start-button {
    width: 100%;
    margin-top: 28px;
    padding: 17px;
    display: flex;
    gap: 15px;
    align-items: center;
    text-align: left;
    border: 1px solid rgba(102,227,189,.3);
    border-radius: 20px;
    color: var(--text);
    background: rgba(102,227,189,.08);
    box-shadow: var(--shadow);
}

.start-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 15px;
    color: var(--bg);
    background: var(--accent);
    font-size: 28px;
}

.start-button strong,
.start-button small {
    display: block;
}

.start-button strong {
    font-size: 15px;
}

.start-button small {
    margin-top: 4px;
    color: var(--muted);
}

.how-it-works {
    padding: 30px 0;
}

.idea {
    display: flex;
    gap: 20px;
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
}

.idea strong {
    color: var(--accent-2);
    font-size: 12px;
}

.idea b {
    font-size: 15px;
}

.idea p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.active-card {
    padding: 30px 0;
}

.active-card h1 {
    margin: 12px 0 4px;
    font-size: clamp(34px, 9vw, 58px);
    line-height: 1;
    letter-spacing: -.04em;
}

.intention {
    color: var(--muted);
    line-height: 1.6;
}

.timer {
    margin: 45px 0 10px;
    font-variant-numeric: tabular-nums;
    font-size: clamp(56px, 16vw, 100px);
    font-weight: 700;
    letter-spacing: -.06em;
}

.live-indicator {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
}

.live-indicator span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 30px;
}

.quick-button {
    min-height: 58px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    background: var(--surface);
    font-size: 12px;
}

.update-box {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.update-box input {
    min-width: 0;
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 14px;
    outline: none;
    padding: 15px;
    color: var(--text);
    background: var(--surface);
}

.update-box button,
.primary-button {
    border: 0;
    border-radius: 14px;
    padding: 0 18px;
    color: var(--bg);
    background: var(--accent);
    font-weight: 800;
}

.finish-button {
    width: 100%;
    margin-top: 28px;
    padding: 15px;
    border: 1px solid rgba(255,125,145,.25);
    border-radius: 14px;
    color: var(--danger);
    background: rgba(255,125,145,.05);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: grid;
    align-items: end;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(12px);
}

.modal-panel {
    width: min(100%, 680px);
    margin: 0 auto;
    padding: 30px 20px max(30px, env(safe-area-inset-bottom));
    border-radius: 28px 28px 0 0;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.modal-panel h2 {
    margin: 10px 0 28px;
    font-size: 32px;
}

.close-button {
    float: right;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    color: var(--text);
    background: rgba(255,255,255,.06);
    font-size: 24px;
}

label {
    display: block;
    margin-top: 18px;
    color: var(--muted);
    font-size: 12px;
}

label input,
label textarea {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 14px;
    outline: none;
    color: var(--text);
    background: var(--bg);
}

label textarea {
    min-height: 110px;
    resize: vertical;
}

.primary-button {
    width: 100%;
    margin-top: 20px;
    padding: 16px;
}

.toast {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 25px;
    z-index: 20;
    max-width: 500px;
    margin: auto;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: .2s ease;
    color: var(--text);
    background: var(--surface-2);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (min-width: 700px) {
    .app-shell {
        padding-left: 30px;
        padding-right: 30px;
    }
}
