/* Helskärmsläget (HomeHubView, HubCards – B60): mörka glaskort på den levande bakgrunden, större text än i resten av
   klienten – tavlan läses på några meters håll. Bredvid tavlan ligger en sida per familjemedlem (HubPersonPage,
   HubChoreCard – B91). */

/* Menyn och vyernas ram göms; bakgrunden är dygnets färger utan temanas dämpning. */
html[data-hub] .sidebar,
html[data-hub] .topbar,
html[data-hub] .menu-backdrop {
    display: none;
}

/* Samma tyngd som temats regel i base.css, så att den här – som läses senare – gäller. */
html[data-hub]:not([data-theme="standard"]) body::before {
    background: none;
}

.hub {
    --hub-secondary: rgba(255, 255, 255, 0.68);
    --hub-alert: rgb(255, 153, 140);
    --hub-green: #30d158;
    --hub-teal: #40c8e0;
    --hub-orange: #ff9f0a;
    --hub-yellow: #ffd60a;
    --hub-purple: #bf5af2;
    --hub-indigo: #7d7aff;
    /* Luften mot fönstrets kanter. Sidorna som bläddras går ända ut och har samma luft var för sig. */
    --hub-gutter: 32px;
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    color: #fff;
    overflow: hidden;
}

.hub-inner {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 16px var(--hub-gutter) 0;
    /* Allt flyttas några punkter varje minut, så långsamt att det inte syns – mot inbrända spår. */
    transform: translate(var(--drift-x, 0), var(--drift-y, 0));
    transition: transform 3s ease-in-out;
}

/* Natt: dämpat, så att tavlan inte lyser upp köket. */
.hub-dim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.hub .tabular {
    font-variant-numeric: tabular-nums;
}

.hub .spacer {
    flex: 1;
}

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

.hub .tint-accent {
    color: var(--accent);
}
.hub .tint-green {
    color: var(--hub-green);
}
.hub .tint-teal {
    color: var(--hub-teal);
}
.hub .tint-orange {
    color: var(--hub-orange);
}
.hub .tint-yellow {
    color: var(--hub-yellow);
}
.hub .tint-purple {
    color: var(--hub-purple);
}
.hub .tint-indigo {
    color: var(--hub-indigo);
}

/* ---------- Rubriken ---------- */

.hub-head {
    flex: none;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.hub-clock {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.hub-clock .time {
    font: 200 88px/1 ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    letter-spacing: -1px;
    white-space: nowrap;
}

.hub-clock .date {
    font: var(--title2);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
}

.hub-greeting {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    padding-top: 18px;
    text-align: right;
}

.hub-greeting .hello {
    font: var(--title2);
    color: rgba(255, 255, 255, 0.75);
}

.hub-greeting .family {
    max-width: 100%;
    font: var(--large-title);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Raden med sidor står i sidhuvudets mitt när den får plats där – i liggande läge. */
.hub-pager-slot {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: center;
    padding-top: 18px;
}

.hub-head.with-pager .hub-greeting {
    flex: none;
    max-width: 38%;
}

/* Personens bild bredvid namnet, på hennes sida. */
.hub-face {
    flex: none;
    margin-top: 12px;
}

.hub-warning {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: var(--subheadline);
    font-weight: 600;
    color: var(--hub-orange);
}

.hub-buttons {
    flex: none;
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.hub-close {
    flex: none;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    color: #fff;
    font-size: 20px;
}

.hub-close:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* ---------- Kolumnerna ---------- */

.hub-cards,
.hub-loading {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.hub-columns {
    flex: 1;
    min-height: 0;
    display: grid;
    gap: 20px;
    align-items: stretch;
}

.hub-columns.count-3 {
    /* Dagen till vänster får lite mer än en tredjedel. */
    grid-template-columns: minmax(0, 38fr) minmax(0, 31fr) minmax(0, 31fr);
}

.hub-columns.count-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hub-columns.count-1 {
    grid-template-columns: minmax(0, 1fr);
}

/* Varje kolumn rullar för sig om den inte får plats – oftast gör den det, och då står allt still. */
.hub-column {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 32px;
    overflow-y: auto;
    scrollbar-width: none;
}

.hub-column::-webkit-scrollbar {
    display: none;
}

/* ---------- Glaskorten ---------- */

.hub-card {
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(30, 38, 50, 0.42);
    -webkit-backdrop-filter: blur(30px) saturate(1.3);
    backdrop-filter: blur(30px) saturate(1.3);
}

.hub-card.next {
    padding: 26px;
}

/* Korten glider in ett i taget när tavlan öppnas. */
@media (prefers-reduced-motion: no-preference) {
    .hub.appearing .hub-card {
        animation: hub-card-in 0.9s cubic-bezier(0.2, 0.9, 0.3, 1) both;
    }

    .hub.appearing .hub-column:nth-child(2) .hub-card {
        animation-delay: 0.12s;
    }

    .hub.appearing .hub-column:nth-child(3) .hub-card {
        animation-delay: 0.24s;
    }
}

@keyframes hub-card-in {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
}

.hub-card hr {
    width: 100%;
    height: 1px;
    border: 0;
    background: rgba(255, 255, 255, 0.15);
}

.hub-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.hub-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font: var(--footnote);
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
}

.hub-label .icon {
    flex: none;
    font-size: 17px;
}

.hub-empty {
    font: var(--title3);
    color: var(--hub-secondary);
}

.hub-date {
    font: var(--subheadline);
    color: var(--hub-secondary);
}

.hub-progress {
    display: block;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.hub-progress::before {
    content: "";
    display: block;
    width: max(var(--p), 8px);
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(to right, color-mix(in srgb, currentColor 70%, transparent), currentColor);
    transition: width 1s ease-in-out;
}

/* ---------- Härnäst ---------- */

.hub-countdown {
    flex: none;
    padding: 7px 16px;
    border-radius: 999px;
    /* Vit text: den fyllda ytan, som tonar mot orange – eller mot den valda accentens ljusa variant (Fas 42). */
    background: linear-gradient(to right, var(--accent-fill), var(--accent-glow, var(--hub-orange)));
    font: var(--title3);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 0 6px color-mix(in srgb, var(--accent) 35%, transparent);
}

/* Glöder när det är mindre än en kvart kvar. */
@media (prefers-reduced-motion: no-preference) {
    .hub-countdown.soon {
        animation: hub-glow 1.2s ease-in-out infinite alternate;
    }
}

@keyframes hub-glow {
    to {
        box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 90%, transparent);
    }
}

.hub-next {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hub-next .title {
    font: 700 44px/1.1 ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow-wrap: anywhere;
}

.hub-next.none .title {
    font-size: 34px;
}

.hub-next .meta {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    font: var(--title3);
    font-weight: 500;
    color: var(--hub-secondary);
}

.hub-next .place {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-running {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hub-running p {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.hub-running .title {
    min-width: 0;
    font: var(--title3);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-running .ends {
    flex: none;
    font: var(--subheadline);
    color: var(--hub-secondary);
}

/* ---------- Idag: tidslinjen ---------- */

.hub-timeline {
    display: flex;
    flex-direction: column;
}

.hub-event {
    display: flex;
    align-items: stretch;
    gap: 14px;
    padding-bottom: 14px;
}

.hub-event.past {
    opacity: 0.4;
}

.hub-event .time {
    flex: none;
    width: 64px;
    font: var(--title3);
    font-weight: 600;
    white-space: nowrap;
}

/* En prick per händelse och ett streck ned till nästa. */
.hub-event .rail {
    flex: none;
    width: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding-top: 6px;
}

.hub-event .dot {
    flex: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
}

.hub-event.past .dot {
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.hub-event.ongoing .dot {
    position: relative;
    background: var(--hub-green);
}

.hub-event .stem {
    flex: 1;
    width: 2px;
    background: rgba(255, 255, 255, 0.14);
}

.hub-event .what {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.hub-event .what .hub-progress {
    width: 100%;
    margin-top: 4px;
}

.hub-event .title {
    font: var(--title3);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.hub-event .place {
    font: var(--subheadline);
    color: var(--hub-secondary);
}

.hub-event .avatar-stack {
    margin-top: 4px;
}

.hub-now {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 14px;
    font: var(--subheadline);
    font-weight: 600;
}

.hub-now .now {
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-fill);
    font: var(--caption);
    font-weight: 800;
    text-transform: uppercase;
}

.hub-now .line {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, var(--accent), transparent);
}

/* ---------- Middag ---------- */

.hub-dinner {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hub-dinner .title {
    font: 700 30px/1.15 ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
    overflow-wrap: anywhere;
}

.hub-dinner .cook {
    margin-top: 4px;
    font: var(--title3);
    color: var(--hub-secondary);
}

/* "Börja laga": kvällens recept i lagningsläget (B120). */
.hub-cook {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 20px;
    border-radius: 999px;
    background: var(--accent-fill);
    color: #fff;
    font: var(--title3);
}

.hub-cook:disabled {
    opacity: 0.7;
}

.hub-cook .spinner {
    width: 20px;
    height: 20px;
    border-color: rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
}

.hub-cook-failed {
    font: var(--subheadline);
    color: var(--hub-alert);
}

/* ---------- Att handla, Att göra och Övrigt ---------- */

.hub-due {
    flex: none;
    padding: 4px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-fill) 85%, transparent);
    font: var(--caption);
    font-weight: 700;
}

.hub-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hub-item {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 44px;
    color: inherit;
    text-align: left;
}

.hub-item:disabled {
    cursor: default;
}

.hub-item .ring {
    flex: none;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: transparent;
    font-size: 14px;
}

.hub-item .ring .icon {
    stroke-width: 3.4;
}

.hub-item.done .ring {
    border-color: var(--hub-green);
    background: var(--hub-green);
    color: #fff;
}

.hub-item .name {
    flex: 1;
    min-width: 0;
    font: var(--title3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-item.done .name {
    text-decoration: line-through;
    opacity: 0.5;
}

.hub-item .list {
    flex: none;
    max-width: 45%;
    font: var(--subheadline);
    color: var(--hub-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* "Senast idag": appens röda är för mörkt för liten text på den mörka ytan. */
.hub-item .list.due {
    color: var(--hub-alert);
}

/* På en persons sida står listans namn under varan, så att varan får hela bredden. */
.hub-item.stacked {
    min-height: 52px;
}

.hub-item .stack {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.hub-item .stack .name {
    flex: none;
}

.hub-item .stack .list {
    max-width: 100%;
}

/* ---------- Familjen just nu ---------- */

.hub-members {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hub-member {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hub-member .face {
    position: relative;
    flex: none;
    display: block;
    border-radius: 50%;
}

/* På väg: en lila ring runt bilden. */
.hub-member.onTheWay .face {
    box-shadow: 0 0 0 3px var(--hub-purple);
    outline: 4px solid transparent;
}

/* Live: en ring som växer och tonar bort, om och om igen. */
@media (prefers-reduced-motion: no-preference) {
    .hub-member.live .face::before,
    .hub-event.ongoing .dot::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 50%;
        border: 2px solid var(--hub-green);
        animation: hub-pulse 2s ease-out infinite;
    }
}

@keyframes hub-pulse {
    from {
        opacity: 0.8;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(1.5);
    }
}

.hub-member .grow {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hub-member .name {
    font: var(--title3);
    font-weight: 600;
}

.hub-member .where {
    font: var(--subheadline);
    color: var(--hub-secondary);
}

.hub-member .state {
    flex: none;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    font: var(--caption);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
}

.hub-member.live .state {
    background: color-mix(in srgb, var(--hub-green) 18%, transparent);
    color: var(--hub-green);
}

.hub-member.onTheWay .state {
    background: color-mix(in srgb, var(--hub-purple) 18%, transparent);
    color: var(--hub-purple);
}

.hub-journey {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
    padding: 14px;
    border-radius: 18px;
    background: color-mix(in srgb, var(--hub-purple) 14%, transparent);
    color: var(--hub-purple);
}

.hub-journey .head {
    display: flex;
    align-items: center;
    gap: 10px;
    font: var(--body);
    font-weight: 600;
}

.hub-journey .head .grow {
    color: #fff;
}

.hub-journey .head .late,
.hub-journey .head .on-time {
    flex: none;
    font: var(--caption);
    font-weight: 700;
}

.hub-journey .late {
    color: var(--hub-alert);
}

.hub-journey .on-time {
    color: var(--hub-green);
}

.hub-journey .route {
    font: var(--subheadline);
    color: var(--hub-secondary);
}

.hub-residence {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hub-residence .name {
    flex: none;
    font: var(--body);
    font-weight: 600;
}

.hub-residence .where {
    min-width: 0;
    font: var(--subheadline);
    color: var(--hub-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- I morgon ---------- */

.hub-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hub-row .time {
    flex: none;
    width: 64px;
    font: var(--body);
    font-weight: 600;
}

.hub-row .time .icon {
    font-size: 18px;
}

.hub-row .title {
    flex: 1;
    min-width: 0;
    font: var(--body);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-row .title.strong {
    flex: 0 1 auto;
    font-weight: 600;
}

.hub-row .cook {
    font: var(--subheadline);
    color: var(--hub-secondary);
    white-space: nowrap;
}

/* ---------- Sidorna (B91) ---------- */

/* Tavlan och en sida per familjemedlem ligger bredvid varandra och bläddras i sidled. Sidhuvudet står still. */
.hub-pages {
    flex: 1;
    min-height: 0;
    display: flex;
    margin: 0 calc(-1 * var(--hub-gutter));
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    /* Ett svep förbi första eller sista sidan ska inte bläddra i webbläsarens historik. */
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.hub-pages::-webkit-scrollbar {
    display: none;
}

.hub-page {
    flex: 0 0 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 0 var(--hub-gutter);
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* En persons sida i liggande läge: sysslorna i mitten får mest plats; utan listor får de hela högra delen. */
.hub-columns.count-3.person {
    grid-template-columns: minmax(0, 34fr) minmax(0, 39fr) minmax(0, 27fr);
}

.hub-columns.count-2.person {
    grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
}

/* Raden med sidor: tavlan och familjens bilder. Den valda har en ring; de andra är mindre, inte blekare. */
.hub-pager {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.hub-page-button {
    flex: none;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #fff;
    opacity: 0.8;
    transform: scale(0.82);
}

.hub-page-button.current {
    opacity: 1;
    transform: none;
}

.hub-page-button.current > * {
    outline: 2.5px solid #fff;
    outline-offset: 2px;
    border-radius: 50%;
}

.hub-page-button .home {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    font-size: 17px;
}

@media (prefers-reduced-motion: no-preference) {
    .hub-page-button {
        transition:
            transform 0.2s ease,
            opacity 0.2s ease;
    }
}

/* När raden inte får plats i sidhuvudet står den i en egen remsa längst ned – aldrig över ett kort. */
.hub-strip {
    flex: none;
    display: flex;
    justify-content: center;
    margin-top: -10px;
    padding-bottom: 10px;
}

.hub-strip[hidden] {
    display: none;
}

/* ---------- Sysslor på en persons sida ---------- */

/* "2 kvar" eller "Allt klart". */
.hub-left {
    flex: none;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font: var(--caption);
    font-weight: 700;
}

.hub-left.all {
    background: color-mix(in srgb, var(--hub-green) 16%, transparent);
    color: var(--hub-green);
}

.hub-problem {
    font: var(--subheadline);
    font-weight: 600;
    color: var(--hub-alert);
}

.hub-note {
    font: var(--subheadline);
    color: var(--hub-secondary);
}

.hub-chores {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Större än i resten av klienten: raden träffas av små fingrar och läses på håll. */
.hub-chore {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 64px;
    color: inherit;
    text-align: left;
}

.hub-chore:disabled {
    cursor: default;
}

.hub-chore.as-needed {
    gap: 12px;
}

.hub-chore .ring {
    flex: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.5);
    color: transparent;
    font-size: 18px;
}

.hub-chore .ring .icon {
    stroke-width: 3.4;
}

.hub-chore.done .ring {
    border-color: var(--hub-green);
    background: var(--hub-green);
    color: #fff;
}

.hub-chore .grow {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hub-chore .title {
    font: var(--title2);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.hub-chore.done .title {
    text-decoration: line-through;
    opacity: 0.5;
}

.hub-chore .detail {
    font: var(--subheadline);
    color: var(--hub-secondary);
}

.hub-chore .detail.late {
    color: var(--hub-alert);
}

/* "+10": grön när poängen är intjänade. */
.hub .points-pill {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font: var(--headline);
    font-weight: 700;
}

.hub .points-pill.earned {
    background: color-mix(in srgb, var(--hub-green) 16%, transparent);
    color: var(--hub-green);
}

/* "Gjort" för en syssla vid behov. */
.hub-done {
    flex: none;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--accent-fill);
    color: #fff;
    font: var(--headline);
    font-weight: 700;
}

.hub-done:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Firandet efter en bock – "+10 poäng till Ella" med Ångra – i tavlans stil. Rutan ligger utanför tavlan i sidan. */
html[data-hub] .undo-toast.celebration {
    bottom: 84px;
    width: auto;
    max-width: calc(100vw - 64px);
    min-height: 56px;
    gap: 14px;
    padding: 8px 10px 8px 22px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(40, 48, 62, 0.78);
    -webkit-backdrop-filter: blur(30px) saturate(1.3);
    backdrop-filter: blur(30px) saturate(1.3);
    color: #fff;
    font: var(--title3);
    font-weight: 600;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

html[data-hub] .undo-toast.celebration .mark {
    font-size: 24px;
    color: #ffd60a;
}

html[data-hub] .undo-toast.celebration .button.plain {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font: var(--title3);
    font-weight: 700;
}

/* Smalt fönster: mindre luft och en mindre klocka. */
@media (max-width: 680px) {
    .hub {
        --hub-gutter: 16px;
    }

    .hub-inner {
        padding: 12px var(--hub-gutter) 0;
    }

    .hub-face {
        display: none;
    }

    .hub-chore .title {
        font: var(--title3);
        font-weight: 600;
    }

    .hub-head {
        gap: 12px;
    }

    .hub-clock .time {
        font-size: 52px;
    }

    .hub-clock .date {
        font: var(--body);
    }

    .hub-greeting {
        padding-top: 6px;
    }

    .hub-greeting .hello {
        font: var(--body);
    }

    .hub-greeting .family {
        font: var(--title3);
        font-weight: 700;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .hub-buttons {
        margin-top: 6px;
    }

    .hub-close {
        width: 44px;
        height: 44px;
    }
}

/* Första hämtningen: väntan och fel, på den mörka ytan. */
.hub-loading .loading {
    color: var(--hub-secondary);
}

.hub-loading .error-banner {
    padding: 22px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(30, 38, 50, 0.42);
    color: #fff;
    font: var(--title3);
}

.hub-loading .error-banner .message .icon {
    margin-top: 2px;
    font-size: 22px;
    color: var(--hub-alert);
}

.hub-loading .error-banner .reference {
    color: var(--hub-secondary);
}

.hub-loading .error-banner button {
    color: #fff;
    font: var(--body);
    font-weight: 600;
}

/* Bilden på rätten (B105), som appens 76 punkter. */
.hub-dinner .recipe-image.hub-thumb {
    width: 76px;
    height: 76px;
    border-radius: 16px;
}

/* "Visa alla (12)" och "Visa färre" på ett kort (B110, B116); "Visa tidigare" överst i Idag. */
.hub-expand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font: var(--headline);
    color: var(--hub-secondary);
}

.hub-expand .icon {
    font-size: 15px;
    stroke-width: 2.8;
}
