/* Courtwheel's web page: calm, mobile first, light and dark. The colors are shared with the app. */

:root {
    --bg: #F7F6F2;
    --surface: #FFFFFF;
    --ink: #1B1F24;
    --muted: #6B7280;
    --line: #E5E3DC;
    --primary: #2F5D50;
    --primary-soft: #E3EEEA;
    --on-primary: #FFFFFF;
    --accent: #C6D93B;
    --singles: #3B6EA8;
    --singles-soft: #E6EEF7;
    --doubles: #B8643A;
    --doubles-soft: #F6E9E1;
    --danger: #B3261E;
    --danger-soft: #F9E3E1;
    --success: #2E7D32;
    --success-soft: #E4F1E5;
    --seek: #9A6700;
    --seek-soft: #FBF3E0;
    --shadow: 0 1px 2px rgba(27, 31, 36, 0.04), 0 4px 16px rgba(27, 31, 36, 0.05);
    --radius: 16px;
    --tabbar: 64px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #111416;
        --surface: #1A1E21;
        --ink: #E8EAE6;
        --muted: #9AA1A9;
        --line: #2A2F33;
        --primary: #7FB8A4;
        --primary-soft: #1F3530;
        --on-primary: #0E1A16;
        --singles: #8AB4E8;
        --singles-soft: #1C2836;
        --doubles: #E3A27A;
        --doubles-soft: #35251C;
        --danger: #F2B8B5;
        --danger-soft: #3A1F1E;
        --success: #8FD19E;
        --success-soft: #1D3022;
        --seek: #E0B44C;
        --seek-soft: #2B2418;
        --shadow: none;
        color-scheme: dark;
    }
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-feature-settings: "cv11", "tnum";
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 16px calc(var(--tabbar) + 32px + env(safe-area-inset-bottom));
}

/* Header. */

.header {
    padding: 20px 0 8px;
}

.header .eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.header h1 {
    margin: 4px 0 2px;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.header .sub {
    color: var(--muted);
    font-size: 14px;
}

/* Who the page takes me for, always in view at the top, with a way to change it. */
.me-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--primary-soft);
    font-size: 15px;
}

.me-bar.tap {
    cursor: pointer;
}

.me-bar.none {
    background: var(--seek-soft);
}

.me-bar .grow {
    flex: 1;
}

.link-btn {
    border: 0;
    background: none;
    padding: 4px 0;
    color: var(--primary);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.row.pick {
    width: 100%;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    background: none;
    font: inherit;
    color: var(--ink);
    text-align: left;
}

.row.pick.current {
    font-weight: 600;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--primary);
    color: var(--on-primary);
    font-weight: 600;
    font-size: 13px;
    flex: none;
}

.phase {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
}

.phase::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Cards. */

.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    margin: 12px 0;
}

.card h2,
.section-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.section-title {
    margin: 28px 4px 8px;
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 13px;
}

.note {
    background: var(--primary-soft);
    color: var(--ink);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin: 12px 0;
    font-size: 14px;
}

.action-card {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
    text-align: left;
    border: 0;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px 16px;
    margin: 12px 0;
    border-left: 4px solid var(--accent);
}

.action-card .grow {
    flex: 1;
}

.action-card strong {
    display: block;
    font-weight: 600;
}

.chevron {
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
}

/* Buttons and chips. */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 12px;
    border: 0;
    background: var(--primary);
    color: var(--on-primary);
    font-weight: 600;
}

.btn.secondary {
    background: var(--primary-soft);
    color: var(--primary);
}

.btn.ghost {
    background: transparent;
    color: var(--primary);
    padding-left: 8px;
    padding-right: 8px;
}

.btn.danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.btn.block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.option-btn {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    border-radius: 12px;
    padding: 12px 14px;
    margin-top: 8px;
    background: var(--primary);
    color: var(--on-primary);
    font-weight: 500;
}

.option-btn.alt {
    background: var(--primary-soft);
    color: var(--ink);
}

.option-btn small {
    display: block;
    opacity: 0.8;
    font-weight: 400;
    font-size: 12px;
    margin-top: 2px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    background: var(--primary-soft);
    color: var(--primary);
}

.chip.singles {
    background: var(--singles-soft);
    color: var(--singles);
}

.chip.doubles {
    background: var(--doubles-soft);
    color: var(--doubles);
}

.chip.none {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--line);
}

.chip.danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.chip.accent {
    background: var(--accent);
    color: #1B1F24;
}

.chip.success {
    background: var(--success-soft);
    color: var(--success);
}

.toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    font-size: 14px;
    font-weight: 500;
}

.toggle[aria-pressed="true"] {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--on-primary);
}

/* The plan. */

.sticky-top {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--bg);
}

/* Many open requests at once still leave room for the dates: the pinned list scrolls itself. */
.urgent-cards {
    padding-bottom: 6px;
    max-height: 42vh;
    overflow-y: auto;
}

.action-card.urgent {
    background: var(--seek-soft);
    border-left-color: var(--seek);
    box-shadow: 0 2px 10px rgba(154, 103, 0, 0.18);
    margin: 0 0 8px;
}

.action-card.urgent strong {
    color: var(--seek);
}

.toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 10px 0;
    background: var(--bg);
}

.toolbar .grow {
    flex: 1;
}

.month {
    margin: 22px 4px 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.tile {
    display: flex;
    gap: 14px;
    width: 100%;
    align-items: stretch;
    text-align: left;
    border: 0;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px 16px;
    margin: 8px 0;
    scroll-margin-top: 64px;
    position: relative;
}

.tile.past {
    opacity: 0.55;
}

.tile.next {
    box-shadow: var(--shadow), inset 0 0 0 2px var(--primary);
}

.tile.mine::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--primary);
}

.tile.off {
    padding-top: 10px;
    padding-bottom: 10px;
    background: transparent;
    box-shadow: none;
    border: 1px dashed var(--line);
}

.tile .day {
    width: 44px;
    flex: none;
    text-align: center;
}

.tile .day .wd {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tile .day .dn {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
}

.tile .body {
    flex: 1;
    min-width: 0;
}

.tile .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    color: var(--muted);
    font-size: 13px;
}

.tile .names {
    margin-top: 6px;
    font-size: 15px;
    font-weight: 500;
}

.tile .names .me {
    color: var(--primary);
    font-weight: 700;
}

.tile .names .vs {
    color: var(--muted);
    font-weight: 400;
    margin: 0 4px;
}

.tile.canceled .names {
    text-decoration: line-through;
    color: var(--muted);
}

.next-label {
    color: var(--primary);
    font-weight: 600;
}

.empty {
    text-align: center;
    color: var(--muted);
    padding: 40px 16px;
}

/* Bottom sheet. */

.scrim {
    position: fixed;
    inset: 0;
    z-index: 20;
    background: rgba(17, 20, 22, 0.4);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fade 0.15s ease-out;
}

.sheet {
    width: 100%;
    max-width: 640px;
    max-height: 88vh;
    overflow: auto;
    background: var(--surface);
    border-radius: 20px 20px 0 0;
    padding: 8px 20px calc(24px + env(safe-area-inset-bottom));
    animation: rise 0.2s ease-out;
}

.sheet .grip {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--line);
    margin: 4px auto 14px;
}

.sheet h3 {
    margin: 0 0 4px;
    font-size: 20px;
    letter-spacing: -0.01em;
}

.people-list {
    list-style: none;
    margin: 12px 0;
    padding: 0;
}

.people-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}

.people-list li:last-child {
    border-bottom: 0;
}

@keyframes fade {
    from { opacity: 0; }
}

@keyframes rise {
    from { transform: translateY(24px); opacity: 0.6; }
}

/* Forms. */

label.field {
    display: block;
    margin: 12px 0;
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

label.field input,
label.field select,
label.field textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    font-size: 16px;
}

label.field input:focus,
label.field select:focus,
label.field textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: -1px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

/* Availability calendar. */

.cal {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-top: 8px;
}

.cal .wd {
    text-align: center;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.cal .cell {
    aspect-ratio: 1;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 14px;
    color: var(--muted);
    opacity: 0.35;
}

.cal button.cell {
    border: 0;
    opacity: 1;
    color: var(--ink);
    background: var(--primary-soft);
    font-weight: 600;
    position: relative;
}

.cal button.cell.none {
    background: transparent;
    border: 1px dashed var(--line);
    color: var(--muted);
    font-weight: 500;
}

.cal button.cell.blocked {
    background: var(--danger-soft);
    color: var(--danger);
    text-decoration: line-through;
}

.cal button.cell:disabled {
    opacity: 0.4;
    cursor: default;
}

.cal button.cell .dot {
    position: absolute;
    bottom: 5px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.6;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 12px;
}

.legend span::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: -1px;
    background: var(--swatch);
}

.row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.row:last-child {
    border-bottom: 0;
}

.row .grow {
    flex: 1;
    min-width: 0;
}

.right {
    text-align: right;
}

/* Requests. */

.request.highlight {
    box-shadow: var(--shadow), inset 0 0 0 2px var(--accent);
}

/* An open request stands apart from the rest of the page: tinted, with an accent bar. */
.request.seek {
    background: var(--seek-soft);
    border-left: 4px solid var(--seek);
}

.request .head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.ranked {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    counter-reset: rank;
}

.ranked li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-top: 1px solid var(--line);
    font-size: 14px;
}

.ranked li::before {
    counter-increment: rank;
    content: counter(rank);
    width: 22px;
    height: 22px;
    flex: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 600;
    background: var(--bg);
    color: var(--muted);
}

.ranked li.asked::before {
    background: var(--accent);
    color: #1B1F24;
}

.ranked li .grow {
    flex: 1;
}

/* Stats. */

.table-wrap {
    overflow-x: auto;
    margin: 0 -4px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-align: right;
    padding: 6px 4px;
    white-space: nowrap;
}

th:first-child,
td:first-child {
    text-align: left;
}

td {
    padding: 9px 4px;
    border-top: 1px solid var(--line);
    text-align: right;
    white-space: nowrap;
}

tr.me td {
    color: var(--primary);
    font-weight: 600;
}

.range {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.heat {
    display: grid;
    gap: 3px;
    font-size: 12px;
    margin-top: 8px;
}

.heat .h {
    color: var(--muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.heat .h.rowh {
    justify-content: flex-start;
}

.heat .c {
    aspect-ratio: 1;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 13px;
}

.heat .c.self {
    background: transparent;
}

.issue {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    border-top: 1px solid var(--line);
}

.issue:first-of-type {
    border-top: 0;
}

.issue .mark {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 7px;
    flex: none;
    background: var(--muted);
}

.issue.ERROR .mark {
    background: var(--danger);
}

.issue.COMPROMISE .mark {
    background: var(--doubles);
}

.history li {
    padding: 8px 0;
    border-top: 1px solid var(--line);
    font-size: 14px;
    display: flex;
    gap: 12px;
}

.history li:first-child {
    border-top: 0;
}

.history .when {
    color: var(--muted);
    font-size: 12px;
    width: 72px;
    flex: none;
    padding-top: 2px;
}

ul.plain {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Money. */

.amount {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.amount.pos {
    color: var(--success);
}

.amount.neg {
    color: var(--danger);
}

.amount.muted {
    color: var(--muted);
    font-weight: 500;
}

/* What an entry means for me, under its amount. */
.mine {
    white-space: nowrap;
}

.mine.pos {
    color: var(--success);
}

.mine.neg {
    color: var(--seek);
}

/* Payments are bookkeeping: one small muted line, so the real expenses stand out. */
.row.transfer {
    padding: 6px 0;
    font-size: 13px;
    color: var(--muted);
}

.row.transfer .amount {
    font-weight: 500;
}

.kind-icon {
    width: 20px;
    text-align: center;
    color: var(--muted);
    flex: none;
}

.snippet {
    white-space: pre-wrap;
    background: var(--bg);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    margin-top: 8px;
    max-height: 160px;
    overflow: auto;
}

/* Tab bar. */

.tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
}

.tabbar .inner {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
}

.tabbar button {
    flex: 1;
    height: var(--tabbar);
    border: 0;
    background: transparent;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    position: relative;
}

.tabbar button svg {
    width: 22px;
    height: 22px;
}

.tabbar button[aria-selected="true"] {
    color: var(--primary);
}

.tabbar button[aria-selected="true"] .icon-pill {
    background: var(--primary-soft);
}

.icon-pill {
    padding: 3px 16px;
    border-radius: 999px;
    display: grid;
    place-items: center;
}

.badge {
    position: absolute;
    top: 8px;
    left: calc(50% + 8px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--accent);
    color: #1B1F24;
    font-size: 10px;
    display: grid;
    place-items: center;
}

/* On a laptop the tab bar floats as a card under the column instead of spanning the screen. */

@media (min-width: 760px) {
    .tabbar {
        left: 50%;
        right: auto;
        bottom: 16px;
        width: 640px;
        transform: translateX(-50%);
        border: 1px solid var(--line);
        border-radius: 18px;
        box-shadow: 0 8px 24px rgba(17, 20, 22, 0.08);
        padding-bottom: 0;
    }
}

/* Feedback. */

.toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--tabbar) + 16px + env(safe-area-inset-bottom));
    transform: translate(-50%, 20px);
    max-width: calc(100% - 32px);
    background: var(--ink);
    color: var(--bg);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 30;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.loading {
    min-height: 80vh;
    display: grid;
    place-items: center;
}

.spinner {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid var(--primary-soft);
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Where the plan opens: below the sticky toolbar. */
.anchor {
    scroll-margin-top: 60px;
}

.cal-month {
    margin: 22px 0 4px;
}

.cal-month:first-child {
    margin-top: 0;
}

.note .option-btn.alt {
    background: var(--surface);
}

.cal button.cell:disabled:not(.blocked) {
    background: transparent;
}

.money-actions .btn {
    flex: 1;
}

.asked-box .q {
    font-weight: 600;
    margin-top: 12px;
}

.btn-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 4px;
}

.accent-text {
    color: var(--primary);
}

.opt-section {
    border-top: 1px solid var(--line);
    margin-top: 14px;
    padding-top: 12px;
}

.opt-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2px;
}

.opt-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.opt-row .who {
    width: 96px;
    flex: none;
}

.pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.pill {
    display: inline-block;
    border: none;
    border-radius: 999px;
    padding: 5px 12px;
    font: inherit;
    font-size: 14px;
    background: var(--line);
    color: var(--ink);
}

.pill.tap {
    cursor: pointer;
}

.pill.asked {
    background: var(--primary);
    color: var(--on-primary);
}

.pill.yes {
    background: var(--primary-soft);
    color: var(--primary);
}

.pill.wait {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
}

.small-btn {
    min-height: 32px;
    padding: 4px 12px;
}

/* One line per point, so a tick or a warning always starts its own line. */
.impacts {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 3px;
    font-size: 13px;
}

.impacts .good {
    color: var(--success);
}

.impacts .bad {
    color: #9A6700;
}

.cand {
    display: flex;
    gap: 12px;
    padding: 10px 0;
}

.cand .rank {
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--line);
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 600;
}


.chain {
    padding: 10px 0;
    line-height: 1.6;
}

.heat .c.total {
    background: transparent;
    border: 1.5px solid var(--ink);
    font-weight: 700;
}

.cand.mine {
    background: var(--primary-soft);
    border-radius: 14px;
    margin: 4px -8px;
    padding: 10px 8px;
}

.warn-text {
    color: #9A6700;
    margin: 2px 0 4px;
}

.opt-section.tentative .cand {
    opacity: 0.6;
}

/* Plan views: list, calendar, overview. */

.chips.views {
    margin: 4px 0 10px;
}

.goals .goal {
    display: flex;
    gap: 10px;
    padding: 6px 0;
}

.goals .goal .mark {
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--success);
    background: var(--success-soft);
}

.goals .goal.missed .mark {
    color: var(--seek);
    background: var(--seek-soft);
}

.goals .goal.missed .small {
    color: var(--seek);
}

.timeline-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.timeline-wrap svg {
    display: block;
}

.timeline-box {
    position: relative;
}

.timeline-names {
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    pointer-events: none;
    background: var(--surface);
}

/* Standings: four narrow number columns that fit a phone. */
.standings th {
    white-space: normal;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
    hyphens: manual;
}

.standings td:not(:first-child) {
    text-align: center;
}

/* Blocking a date right on its tile, before the plan is published. */
.blocked-by {
    color: var(--danger);
    margin-top: 6px;
}

.block-toggle {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
}

.block-toggle.on {
    background: var(--danger-soft);
    color: var(--danger);
}

/* Money: my balance in one line; settling and the details open on request. */
.balance-line {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
}

.balance-line.neg {
    color: var(--seek);
}

.balance .btn + .btn {
    margin-top: 8px;
}

/* An expense split by shares: one number per person. */
.share-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.share-row span {
    flex: 1;
}

.share-row input {
    width: 84px;
    min-height: 40px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    text-align: right;
}

.row.tap {
    cursor: pointer;
}

/* "Today", floating in once the next date is out of view, like the app's. */
.today-fab {
    position: fixed;
    right: 16px;
    bottom: calc(var(--tabbar) + 16px + env(safe-area-inset-bottom));
    z-index: 9;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    background: var(--primary);
    color: var(--on-primary);
    font: inherit;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 14px rgba(27, 31, 36, 0.18);
    cursor: pointer;
}

.today-fab[hidden] {
    display: none;
}

.avatar.small {
    width: 26px;
    height: 26px;
    font-size: 11px;
}

/* A message to send, shown as it will be pasted. */
.message-text {
    white-space: pre-wrap;
    font-size: 14px;
    user-select: text;
}

/* A candidate's answer next to their name. */
.ok-text {
    color: var(--success);
    font-weight: 600;
}

.no-text {
    color: var(--danger);
    font-weight: 600;
}

.pill.tap:disabled {
    opacity: 0.45;
    cursor: default;
}

/* On an open request: how many of my chances to step in I have answered. */
.answered {
    display: block;
    margin-top: 2px;
    color: var(--success);
    font-weight: 600;
}

.urgent-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 6px 4px 6px;
}

.answered.missing {
    color: var(--seek);
}

.left-out { margin: 10px 4px 4px; }
.left-out .label { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }

/* The start page without a link: the name, the slogan, one sentence, the legal links. */
.landing {
    padding-top: 15vh;
    text-align: center;
}

.landing img {
    border-radius: 20px;
}

.landing h1 {
    margin: 20px 0 4px;
    font-size: 32px;
}

.landing .slogan {
    margin: 0 0 20px;
    color: var(--primary);
    font-size: 20px;
    font-weight: 600;
}

.landing p {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    color: var(--muted);
}

.landing .links {
    margin-top: 48px;
    font-size: 14px;
}

.landing .links a {
    color: var(--muted);
}
