/* Now view (#home) and the Add sheet (quick capture). Loaded after styles/app-shell.css. */

.capture-sheet .quick-capture {
    margin: 0;
}

.quick-capture-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.6rem 0 0;
}

/* ---------- Now view ---------- */

.now-section.tool-section {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.now-view {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 1.25rem;
    align-items: start;
    --kind: var(--kind-task);
}

.now-view[data-kind="routine"] { --kind: var(--kind-routine); }

.now-view[data-kind="event"] { --kind: var(--kind-event); }

.now-view[data-mode="break"] { --kind: var(--kind-break); }

.now-view[data-mode="free"] { --kind: var(--kind-free); }

.now-card {
    background: var(--surface);
    border-radius: 20px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    border-top: 6px solid var(--kind);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 60vh;
    justify-content: center;
    position: relative;
}

.now-pip-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Beats the phone rule ".tool-section button { width: 100% }" in styles/base.css. */
.now-card .now-pip-btn {
    width: auto;
}

.now-pip-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--on-surface);
}

.now-kicker {
    margin: 0 0 0.25rem;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--kind);
}

.now-title {
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    line-height: 1.15;
    margin: 0 0 0.5rem;
    word-break: break-word;
    max-width: 22ch;
}

.now-meta {
    color: var(--text-muted);
    margin: 0 0 1.25rem;
}

.now-timer {
    position: relative;
    width: min(62vw, 260px);
    aspect-ratio: 1;
    margin: 0 auto 1.25rem;
}

.now-timer[hidden] {
    display: none;
}

.now-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.now-ring-bg,
.now-ring-fg {
    fill: none;
    stroke-width: 12;
}

.now-ring-bg {
    stroke: #ececf1;
}

.now-ring-fg {
    stroke: var(--kind);
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}

.now-timer.late .now-ring-fg {
    stroke: #d93025;
}

.now-timer-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.now-time-left {
    font-size: clamp(2.4rem, 11vw, 3.6rem);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.now-time-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.35rem;
}

.now-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    width: 100%;
    max-width: 420px;
    text-align: left;
}

.now-steps[hidden] {
    display: none;
}

.now-steps li {
    padding: 0.45rem 0.75rem;
    border-left: 3px solid #e0e0e0;
    margin-bottom: 0.25rem;
    color: var(--text-muted);
}

.now-steps li.active {
    border-left-color: var(--kind);
    color: var(--on-surface);
    font-weight: 700;
    background: #fff6ed;
}

.now-steps li.done {
    text-decoration: line-through;
    opacity: 0.6;
}

.now-actions,
.now-skip-choices {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    max-width: 520px;
}

.now-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 52px;
    padding: 0.7rem 1.2rem;
    border-radius: 12px;
    font-size: 1.05rem;
}

.now-actions .btn-primary {
    flex: 1 1 100%;
    font-size: 1.2rem;
    background: var(--kind);
}

.now-actions .btn-secondary,
.now-actions .btn-outline {
    flex: 1 1 0;
}

.now-skip-choices {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #ddd;
}

.now-skip-choices[hidden] {
    display: none;
}

.now-skip-choices p {
    flex: 1 1 100%;
    margin: 0;
    color: var(--text-muted);
}

.now-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.now-next {
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    padding: 1rem;
}

.now-next h3 {
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.now-next-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.75rem;
}

.now-next-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.6rem;
    align-items: baseline;
    padding: 0.55rem 0.5rem;
    border-left: 4px solid var(--kind-task);
    border-radius: 4px;
    margin-bottom: 0.35rem;
    background: #fafafa;
}

.now-next-item.kind-routine { border-left-color: var(--kind-routine); }

.now-next-item.kind-event { border-left-color: var(--kind-event); }

.now-next-time {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 0.9rem;
}

.now-next-name {
    word-break: break-word;
}

.now-next-len,
.now-next-empty {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.now-side .daily-progress {
    margin: 0;
    border-radius: 16px;
}

@media (max-width: 900px) {
    .now-view {
        grid-template-columns: minmax(0, 1fr);
    }

    .now-card {
        min-height: 0;
    }
}

/* ---------- Phones ---------- */

@media (max-width: 768px) {
    .quick-capture-form {
        flex-wrap: wrap;
    }

    .quick-capture-form input[type="text"] {
        flex: 1 1 100%;
        font-size: 16px; /* no zoom on iOS */
    }

    .quick-capture-form .btn {
        flex: 1 1 0;
    }

    #home.tool-section {
        overflow-y: auto;
        padding: 10px 4px;
    }

    .now-card {
        padding: 1.25rem 1rem;
        border-radius: 16px;
        flex: 0 0 auto;
    }

    .now-title {
        font-size: 1.7rem;
    }

    .now-meta {
        margin-bottom: 0.75rem;
    }

    .now-timer {
        width: min(58vw, 230px);
        margin-bottom: 1rem;
    }
}

/* Longer translated labels: keep the three stats on one row. */

.daily-progress-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    text-align: center;
}

.daily-progress-stat .stat-label {
    word-break: break-word;
    hyphens: auto;
}
