@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700&display=swap');
:root {
    --bg:#101617;
    --bg-2:#151d1e;
    --panel:#1b2425;
    --panel-2:#202a2b;
    --line:#2d3839;
    --text:#f0f2ed;
    --muted:#929e9c;
    --lime:#d7f36b;
    --amber:#f5bd63;
    --aqua:#8bd3c7;
    --red:#f1837b;
    --radius:18px;
    --shadow:0 20px 60px rgba(0,0,0,.22);
    font-family:'DM Sans',system-ui,sans-serif;
    color:var(--text);
    background:var(--bg);
    color-scheme:dark
}

* {
    box-sizing:border-box
}

html {
    scroll-behavior:smooth
}

body {
    margin:0;
    min-height:100vh;
    background:var(--bg);
    color:var(--text)
}

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

button,a {
    transition:.2s ease
}

a {
    color:inherit;
    text-decoration:none
}

button {
    cursor:pointer
}

.brand {
    display:flex;
    align-items:center;
    gap:9px;
    font:700 17px 'Manrope',sans-serif;
    letter-spacing:-.5px
}

.brand-mark {
    width:31px;
    height:31px;
    border-radius:9px;
    background:var(--lime);
    color:#182016;
    display:grid;
    place-items:center;
    font-size:17px
}

.brand sup {
    font-size:8px;
    color:var(--lime);
    margin-left:1px
}

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

.eyebrow,.panel-kicker {
    text-transform:uppercase;
    color:var(--lime);
    letter-spacing:2px;
    font-size:10px;
    font-weight:700
}

.button {
    border:1px solid var(--line);
    border-radius:10px;
    padding:10px 15px;
    color:var(--text);
    background:transparent;
    font-weight:600;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:14px
}

.button:hover {
    border-color:#4a5857;
    transform:translateY(-1px)
}

.button.primary {
    background:var(--lime);
    border-color:var(--lime);
    color:#152014
}

.button.primary:disabled {
    background:#2a3332;
    border-color:#2a3332;
    color:#7e8987;
    cursor:default;
    transform:none
}

.button.accent {
    background:var(--amber);
    border-color:var(--amber);
    color:#211b10
}

.button.subtle {
    background:#222c2d
}

.button.ghost {
    border-color:transparent
}

.button.danger {
    color:var(--red)
}

.icon-button {
    width:36px;
    height:36px;
    border-radius:50%;
    border:1px solid var(--line);
    background:#1c2425;
    color:var(--text);
    font-size:21px
}

.alert {
    border-radius:12px;
    padding:12px 16px;
    font-size:14px
}

.alert.error {
    background:#432725;
    color:#ffc2bd
}

.alert.success {
    background:#213528;
    color:#bfe5b8;
    margin-bottom:18px
}

/* Login */ .login-page {
    display:grid;
    place-items:center;
    background:radial-gradient(circle at 20% 10%,#253634 0,transparent 34%),radial-gradient(circle at 90% 85%,#2e3021 0,transparent 28%),#111718;
    padding:24px
}

.login-card {
    width:min(440px,100%);
    background:rgba(27,36,37,.92);
    border:1px solid var(--line);
    padding:42px;
    border-radius:24px;
    box-shadow:var(--shadow)
}

.login-card .brand {
    margin-bottom:54px
}

.login-card h1 {
    font:600 39px 'Manrope';
    letter-spacing:-1.6px;
    margin:10px 0 7px
}

.login-card>p {
    line-height:1.6
}

.stack-form {
    display:grid;
    gap:18px;
    margin-top:28px
}

.stack-form label,.dialog-card label {
    display:grid;
    gap:8px;
    color:#bac2c0;
    font-size:13px;
    font-weight:600
}

.stack-form input,.dialog-card input,.dialog-card textarea {
    width:100%;
    border:1px solid #354142;
    border-radius:10px;
    background:#12191a;
    color:var(--text);
    padding:13px;
    outline:none
}

.stack-form input:focus,.dialog-card input:focus,.dialog-card textarea:focus {
    border-color:var(--lime);
    box-shadow:0 0 0 3px rgba(215,243,107,.08)
}

.stack-form .button {
    margin-top:5px;
    width:100%;
    padding:13px
}

.demo-hint {
    display:flex;
    align-items:center;
    gap:8px;
    font-size:12px;
    color:#7f8b89;
    margin:25px 0 0!important
}

.demo-hint span {
    width:6px;
    height:6px;
    background:var(--lime);
    border-radius:50%
}

/* Admin */ .admin-page {
    background:#111718
}

.sidebar {
    position:fixed;
    inset:0 auto 0 0;
    width:232px;
    background:#151c1d;
    border-right:1px solid #273132;
    padding:28px 20px;
    display:flex;
    flex-direction:column;
    z-index:10
}

.sidebar .brand {
    padding:0 9px
}

.sidebar nav {
    display:grid;
    gap:6px;
    margin-top:70px
}

.sidebar nav a {
    padding:11px 12px;
    color:#8c9896;
    border-radius:9px;
    font-size:13px;
    display:flex;
    gap:12px
}

.sidebar nav a span {
    width:17px;
    text-align:center;
    font-size:15px
}

.sidebar nav a:hover,.sidebar nav a.active {
    background:#202929;
    color:#eef1ec
}

.sidebar-foot {
    margin-top:auto;
    padding:16px 8px 0;
    border-top:1px solid var(--line);
    display:grid;
    grid-template-columns:35px 1fr auto;
    align-items:center;
    gap:10px
}

.sidebar-foot .avatar {
    width:35px;
    height:35px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:#3a4847;
    color:var(--lime);
    font-weight:700
}

.sidebar-foot strong,.sidebar-foot small {
    display:block;
    max-width:110px;
    overflow:hidden;
    text-overflow:ellipsis
}

.sidebar-foot strong {
    font-size:12px
}

.sidebar-foot small {
    font-size:9px;
    color:var(--muted);
    margin-top:2px
}

.sidebar-foot>a {
    color:var(--muted)
}

.admin-main {
    margin-left:232px;
    padding:40px clamp(24px,4vw,66px) 80px;
    max-width:1600px
}

.admin-header {
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    margin-bottom:38px
}

.admin-header h1 {
    font:600 31px 'Manrope';
    letter-spacing:-1px;
    margin:9px 0 0
}

.header-actions,.canvas-tools {
    display:flex;
    gap:10px;
    align-items:center
}

.dashboard-strip {
    display:flex;
    align-items:center;
    border-bottom:1px solid var(--line);
    margin-bottom:24px
}

.dashboard-tabs {
    display:flex;
    gap:4px;
    overflow:auto
}

.dashboard-tab {
    padding:13px 16px;
    color:var(--muted);
    font-size:13px;
    display:flex;
    align-items:center;
    gap:8px;
    border-bottom:2px solid transparent;
    white-space:nowrap
}

.dashboard-tab.selected {
    color:var(--text);
    border-color:var(--lime)
}

.status-dot {
    width:7px;
    height:7px;
    border-radius:50%;
    background:#44504f
}

.status-dot.live {
    background:var(--lime);
    box-shadow:0 0 0 4px rgba(215,243,107,.08)
}

.dashboard-strip>.icon-button {
    margin-left:10px;
    margin-bottom:6px
}

.panel {
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:var(--radius);
    margin-bottom:22px;
    overflow:hidden
}

.panel-head {
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:20px 23px;
    border-bottom:1px solid var(--line)
}

.panel-head h2 {
    font:600 19px 'Manrope';
    margin:5px 0 0;
    letter-spacing:-.3px
}

.save-state {
    font-size:11px;
    color:var(--muted)
}

.raster-wrap {
    padding:22px;
    background:#141b1c
}

.raster-grid {
    --cell:60px;
    position:relative;
    min-height:540px;
    display:grid;
    grid-template-columns:repeat(12,1fr);
    grid-auto-rows:var(--cell);
    gap:7px;
    background-image:radial-gradient(circle,#34403f 1px,transparent 1px);
    background-size:calc((100% + 7px)/12) 67px;
    background-position:3px 3px
}

.raster-item {
    grid-column:var(--x)/span var(--w);
    grid-row:var(--y)/span var(--h);
    background:#20292a;
    border:1px solid #354142;
    border-radius:13px;
    padding:15px;
    display:grid;
    grid-template-columns:40px 1fr auto;
    gap:12px;
    align-items:start;
    position:relative;
    user-select:none;
    cursor:grab;
    box-shadow:0 5px 18px rgba(0,0,0,.12);
    min-width:0
}

.raster-item:hover {
    border-color:#53615f
}

.raster-item.dragging {
    opacity:.8;
    z-index:5;
    cursor:grabbing;
    box-shadow:0 15px 40px rgba(0,0,0,.4)
}

.module-chip {
    height:36px;
    border-radius:9px;
    background:#31403e;
    display:grid;
    place-items:center;
    font-size:10px;
    font-weight:700;
    color:var(--aqua)
}

.type-weather .module-chip {
    color:#94c9ff
}

.type-quote .module-chip {
    color:#d9a8f0
}

.type-pokemon .module-chip {
    color:var(--amber)
}

.type-rewards .module-chip {
    color:var(--lime)
}

.raster-item strong,.raster-item small {
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap
}

.raster-item strong {
    font-size:13px;
    margin:2px 0 7px
}

.raster-item small {
    font-size:10px;
    color:var(--muted)
}

.item-menu {
    color:#83908e;
    background:transparent;
    border:0;
    letter-spacing:1px;
    position:relative;
    z-index:2
}

.resize-handle {
    position:absolute;
    right:5px;
    bottom:5px;
    width:17px;
    height:17px;
    cursor:nwse-resize;
    background:linear-gradient(135deg,transparent 55%,#61706e 56%,#61706e 63%,transparent 64%,transparent 72%,#61706e 73%,#61706e 80%,transparent 81%)
}

.empty-canvas {
    grid-column:4/span 6;
    grid-row:2/span 4;
    display:grid;
    place-items:center;
    align-content:center;
    color:var(--muted);
    text-align:center
}

.empty-canvas span {
    font-size:35px
}

.empty-canvas h3 {
    color:var(--text);
    margin:12px 0 5px
}

.empty-canvas p {
    font-size:13px
}

.family-panel,.connection-panel {
    scroll-margin-top:20px
}

.children-grid {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(330px,1fr));
    gap:15px;
    padding:20px
}

.child-card {
    background:#171f20;
    border:1px solid var(--line);
    border-radius:14px;
    padding:17px;
    display:grid;
    grid-template-columns:48px 1fr auto;
    gap:13px;
    align-items:center
}

.child-avatar {
    width:45px;
    height:45px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:color-mix(in srgb,var(--child-color) 25%,#1b2425);
    color:var(--child-color);
    font-weight:700
}

.child-title h3 {
    font-size:15px;
    margin:0 0 5px
}

.tv-state {
    font-size:10px;
    color:var(--aqua)
}

.tv-state.paused {
    color:var(--red)
}

.star-count {
    text-align:right
}

.star-count span {
    color:var(--amber);
    font-size:16px
}

.star-count strong {
    font-size:22px;
    margin-left:4px
}

.star-count small {
    display:block;
    color:var(--muted);
    font-size:9px
}

.child-actions {
    grid-column:1/-1;
    border-top:1px solid var(--line);
    padding-top:12px;
    display:flex;
    justify-content:space-between
}

.child-actions form {
    display:flex;
    gap:5px
}

.child-actions button {
    background:#202a2b;
    color:#b9c2c0;
    border:1px solid var(--line);
    padding:7px 10px;
    border-radius:8px;
    font-size:11px
}

.child-actions .star-add {
    color:#222814;
    background:var(--lime);
    border-color:var(--lime)
}

.connection-grid {
    padding:21px;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:22px
}

.connection-grid>div {
    min-width:0
}

.connection-grid label {
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:1px;
    color:var(--muted)
}

.connection-grid p {
    font-size:11px;
    color:var(--muted);
    margin:8px 0
}

.copy-field {
    margin-top:8px;
    background:#12191a;
    border:1px solid var(--line);
    border-radius:9px;
    display:flex;
    align-items:center;
    padding:3px 3px 3px 11px
}

.copy-field code {
    font-size:11px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:#c5cfcc
}

.copy-field.secret code {
    filter:blur(4px)
}

.copy-field.secret:hover code {
    filter:none
}

.copy-field button {
    margin-left:auto;
    border:0;
    border-radius:7px;
    background:#293433;
    color:var(--text);
    padding:7px 10px;
    font-size:10px
}

.api-example pre {
    background:#12191a;
    border:1px solid var(--line);
    border-radius:9px;
    color:#b7c2bf;
    font-size:11px;
    padding:11px;
    line-height:1.6;
    margin:8px 0
}

dialog {
    border:0;
    padding:0;
    border-radius:18px;
    background:transparent;
    color:var(--text);
    box-shadow:var(--shadow);
    max-width:min(560px,calc(100vw - 30px));
    width:100%
}

dialog::backdrop {
    background:rgba(5,10,10,.78);
    backdrop-filter:blur(3px)
}

.dialog-card {
    background:#1c2526;
    border:1px solid #34403f;
    border-radius:18px;
    padding:28px;
    display:grid;
    gap:18px;
    position:relative
}

.dialog-card h2 {
    font:600 25px 'Manrope';
    margin:-10px 0 2px
}

.dialog-close {
    position:absolute;
    right:17px;
    top:15px;
    border:0;
    background:transparent;
    color:var(--muted);
    font-size:25px
}

.module-picker {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px
}

.module-picker button {
    border:1px solid var(--line);
    background:#151d1e;
    color:var(--text);
    border-radius:11px;
    padding:16px;
    text-align:left
}

.module-picker button:hover {
    border-color:var(--lime)
}

.module-picker button span {
    display:inline-grid;
    place-items:center;
    width:30px;
    height:30px;
    background:#293534;
    border-radius:8px;
    margin-right:8px;
    color:var(--lime);
    font-size:9px
}

.dialog-actions {
    display:flex;
    justify-content:space-between
}

.settings-dialog textarea {
    font:12px/1.5 monospace;
    resize:vertical
}

/* Public screen */ .screen-page {
    background:#0e1415;
    overflow-x:hidden
}

.screen-shell {
    min-height:100vh;
    padding:24px 31px 15px;
    display:grid;
    grid-template-rows:auto 1fr auto;
    gap:18px
}

.screen-header,.screen-footer {
    display:flex;
    justify-content:space-between;
    align-items:center
}

.screen-header {
    height:40px
}

.screen-context {
    display:flex;
    align-items:center;
    gap:11px;
    color:var(--muted);
    font-size:12px
}

.screen-context #dashboard-name {
    color:#d4dad6;
    font-weight:600
}

.online-dot {
    width:6px;
    height:6px;
    background:var(--lime);
    border-radius:50%;
    box-shadow:0 0 0 4px rgba(215,243,107,.07)
}

#clock {
    font-variant-numeric:tabular-nums
}

.screen-footer {
    color:#65716f;
    font-size:9px;
    text-transform:uppercase;
    letter-spacing:1.5px
}

.module-grid {
    display:grid;
    grid-template-columns:repeat(12,minmax(0,1fr));
    grid-auto-rows:minmax(56px,8.2vh);
    gap:12px;
    align-content:start
}

.screen-module {
    grid-column:var(--x)/span var(--w);
    grid-row:var(--y)/span var(--h);
    background:linear-gradient(145deg,#1b2425,#182021);
    border:1px solid #2d3939;
    border-radius:17px;
    padding:18px;
    overflow:hidden;
    position:relative;
    min-height:0
}

.module-header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:13px
}

.module-header h2 {
    font:600 13px 'Manrope';
    margin:0;
    color:#d8ddda
}

.module-header span {
    font-size:9px;
    color:#697673;
    text-transform:uppercase;
    letter-spacing:1.2px
}

.weather-now {
    display:grid;
    grid-template-columns:1fr auto;
    align-items:start
}

.weather-temp {
    font:500 clamp(36px,4vw,65px) 'Manrope';
    letter-spacing:-4px
}

.weather-temp sup {
    font-size:.35em;
    vertical-align:top;
    letter-spacing:0
}

.weather-condition {
    color:var(--muted);
    font-size:11px
}

.weather-icon {
    font-size:50px;
    color:var(--amber)
}

.forecast-row {
    display:flex;
    justify-content:space-between;
    margin-top:14px;
    border-top:1px solid var(--line);
    padding-top:11px
}

.forecast-day {
    text-align:center;
    font-size:9px;
    color:var(--muted)
}

.forecast-day b,.forecast-day span {
    display:block
}

.forecast-day b {
    color:#dce1dd;
    font-size:11px;
    margin-top:5px
}

.quote-mark {
    font:600 55px Georgia;
    color:var(--lime);
    height:35px;
    line-height:1
}

.quote-text {
    font:500 clamp(15px,1.45vw,24px)/1.35 'Manrope';
    letter-spacing:-.4px;
    max-width:90%;
    margin:6px 0
}

.quote-author {
    color:var(--muted);
    font-size:10px;
    margin-top:13px
}

.pokemon-content {
    display:grid;
    grid-template-columns:46% 1fr;
    height:calc(100% - 30px);
    align-items:center
}

.pokemon-art {
    width:100%;
    height:100%;
    object-fit:contain;
    image-rendering:auto;
    filter:drop-shadow(0 12px 18px rgba(0,0,0,.3))
}

.pokemon-name {
    font:600 clamp(20px,2vw,32px) 'Manrope';
    text-transform:capitalize;
    margin:0
}

.pokemon-id {
    color:var(--muted);
    font-size:10px
}

.pokemon-types {
    display:flex;
    gap:5px;
    margin:9px 0
}

.pokemon-types span {
    background:#303b3a;
    border-radius:20px;
    padding:4px 8px;
    font-size:8px;
    text-transform:uppercase
}

.stat-line {
    display:grid;
    grid-template-columns:30px 1fr 22px;
    gap:6px;
    align-items:center;
    font-size:8px;
    color:var(--muted);
    margin:5px 0
}

.stat-bar {
    height:3px;
    background:#303a39;
    border-radius:4px
}

.stat-bar i {
    display:block;
    height:100%;
    background:var(--lime);
    border-radius:4px
}

.reward-list {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(130px,1fr));
    gap:10px
}

.reward-child {
    background:#151d1e;
    border:1px solid #2b3636;
    border-radius:12px;
    padding:13px
}

.reward-top {
    display:flex;
    align-items:center;
    gap:8px
}

.reward-avatar {
    width:28px;
    height:28px;
    border-radius:50%;
    display:grid;
    place-items:center;
    font-size:10px;
    font-weight:700;
    background:color-mix(in srgb,var(--kid) 20%,#171f20);
    color:var(--kid)
}

.reward-name {
    font-size:11px;
    font-weight:600
}

.reward-stars {
    font:600 25px 'Manrope';
    margin:9px 0 5px
}

.reward-stars span {
    font-size:13px;
    color:var(--amber)
}

.progress {
    height:3px;
    background:#313b3a;
    border-radius:4px
}

.progress i {
    display:block;
    height:100%;
    background:var(--kid);
    border-radius:4px
}

.tv-pill {
    display:inline-flex;
    margin-top:9px;
    border-radius:10px;
    padding:3px 7px;
    background:#213330;
    color:var(--aqua);
    font-size:8px
}

.tv-pill.paused {
    background:#3b2928;
    color:#f2a39d
}

.calendar-days {
    display:grid;
    grid-template-columns:repeat(7,1fr);
    gap:7px;
    height:calc(100% - 36px)
}

.calendar-day {
    border-left:1px solid var(--line);
    padding-left:8px;
    min-width:0
}

.calendar-day.today {
    border-color:var(--lime)
}

.day-name {
    font-size:8px;
    color:var(--muted);
    text-transform:uppercase
}

.day-number {
    font:600 17px 'Manrope';
    margin:3px 0 10px
}

.calendar-day.today .day-number {
    color:var(--lime)
}

.event {
    border-radius:6px;
    background:#293638;
    border-left:2px solid var(--aqua);
    padding:6px;
    margin-bottom:5px;
    font-size:8px;
    line-height:1.3;
    overflow:hidden
}

.event time {
    display:block;
    color:var(--muted);
    font-size:7px;
    margin-bottom:2px
}

.screen-loading {
    grid-column:1/-1;
    min-height:60vh;
    display:grid;
    place-items:center;
    align-content:center;
    color:var(--muted);
    gap:16px
}

.loader {
    width:25px;
    height:25px;
    border:2px solid #33403f;
    border-top-color:var(--lime);
    border-radius:50%;
    animation:spin .8s linear infinite
}

.module-error {
    color:var(--muted);
    font-size:11px;
    display:grid;
    place-items:center;
    height:70%
}

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

}

@media(max-width:900px) {
    .sidebar {
        width:70px;
        padding:24px 12px
    }

    .sidebar .brand>span:last-child,.sidebar nav a:not(.active) {
        display:none
    }

    .sidebar nav a.active {
        justify-content:center
    }

    .sidebar-foot>div:not(.avatar),.sidebar-foot>a {
        display:none
    }

    .admin-main {
        margin-left:70px;
        padding:30px 18px
    }

    .admin-header {
        align-items:flex-start
    }

    .admin-header h1 {
        font-size:25px
    }

    .header-actions {
        flex-direction:column;
        align-items:stretch
    }

    .canvas-tools .save-state {
        display:none
    }

    .connection-grid {
        grid-template-columns:1fr
    }

    .screen-shell {
        padding:16px
    }

    .module-grid {
        display:flex;
        flex-direction:column
    }

    .screen-module {
        min-height:240px
    }

    .calendar-days {
        min-width:700px
    }

    .screen-module.type-calendar {
        overflow:auto
    }

    .screen-footer span:last-child {
        display:none
    }

}

@media(max-width:600px) {
    .admin-header {
        display:block
    }

    .header-actions {
        flex-direction:row;
        margin-top:20px
    }

    .panel-head {
        align-items:flex-start;
        gap:15px
    }

    .studio-panel .panel-head {
        display:block
    }

    .canvas-tools {
        margin-top:15px
    }

    .raster-grid {
        min-width:760px
    }

    .raster-wrap {
        overflow:auto
    }

    .children-grid {
        grid-template-columns:1fr;
        padding:12px
    }

    .module-picker {
        grid-template-columns:1fr
    }

    .login-card {
        padding:28px
    }

    .screen-context #dashboard-name {
        display:none
    }

}

/* Configurable dashboard canvas */ .raster-wrap {
    overflow:auto
}

.raster-viewport {
    width:min(100%,calc(70vh * var(--ratio-number)));
    aspect-ratio:var(--ratio);
    margin:auto;
    min-height:360px;
    overflow:auto;
    border:1px solid #263131;
    border-radius:9px
}

.raster-viewport .raster-grid {
    min-height:100%;
    height:100%;
    grid-template-rows:repeat(9,minmax(0,1fr));
    grid-auto-rows:calc((100% - 56px)/9);
    background-size:calc((100% + 7px)/12) calc((100% + 7px)/9)
}

.screen-shell .module-grid {
    width:min(100%,calc((100vh - 112px) * var(--ratio-number,1.7778)));
    aspect-ratio:var(--ratio,16 / 9);
    grid-template-rows:repeat(9,minmax(0,1fr));
    grid-auto-rows:calc((100% - 96px)/9);
    align-self:center;
    justify-self:center;
    align-content:stretch
}

.dialog-card select {
    width:100%;
    border:1px solid #354142;
    border-radius:10px;
    background:#12191a;
    color:var(--text);
    padding:13px;
    outline:none
}

.ratio-inputs {
    display:grid;
    grid-template-columns:1fr auto 1fr;
    align-items:end;
    gap:12px
}

.ratio-inputs>span {
    padding-bottom:13px;
    color:var(--muted)
}

.help-note {
    background:#141c1d;
    border-left:2px solid var(--aqua);
    border-radius:7px;
    padding:11px 13px;
    margin:0;
    color:var(--muted);
    font-size:11px;
    line-height:1.5
}

.help-note strong {
    color:var(--text)
}

@media(max-width:900px) {
    .screen-shell .module-grid {
        display:flex;
        width:100%;
        aspect-ratio:auto
    }

    .raster-viewport {
        min-width:760px;
        width:760px
    }

}

.calendar-empty {
    position:absolute;
    left:18px;
    right:18px;
    bottom:14px;
    padding:8px 10px;
    border-radius:7px;
    background:#202a2b;
    color:var(--muted);
    font-size:9px;
    text-align:center
}

/* Calendar source editor and multi-day layout */ .settings-dialog:has(.calendar-source-list) {
    max-height:88vh;
    overflow:auto
}

.calendar-source-list {
    display:grid;
    gap:12px
}

.calendar-source {
    display:grid;
    gap:11px;
    padding:14px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#151d1e
}

.calendar-source-head {
    display:flex;
    align-items:center;
    gap:10px
}

.calendar-source-head img,.calendar-image-placeholder {
    width:34px;
    height:34px;
    border-radius:8px;
    object-fit:cover;
    background:#263231;
    display:grid;
    place-items:center;
    color:var(--aqua);
    font-size:8px;
    font-weight:700
}

.calendar-source-head strong {
    font-size:12px
}

.calendar-source-head button {
    margin-left:auto;
    border:0;
    background:transparent;
    color:var(--red);
    font-size:10px
}

.calendar-source-fields {
    display:grid;
    grid-template-columns:1fr 80px;
    gap:10px
}

.calendar-source label small {
    color:var(--muted);
    font-weight:400
}

.calendar-source input[type=file] {
    padding:9px;
    font-size:10px
}

.add-calendar {
    justify-self:start
}

.type-calendar .module-body {
    height:calc(100% - 30px);
    position:relative
}

.calendar-layout {
    height:100%;
    display:flex;
    flex-direction:column;
    gap:7px
}

.calendar-all-day {
    display:grid;
    grid-template-columns:repeat(var(--calendar-days),minmax(0,1fr));
    gap:4px;
    flex:0 0 auto
}

.calendar-banner {
    min-width:0;
    height:25px;
    display:flex;
    align-items:center;
    gap:6px;
    padding:3px 7px;
    border-radius:6px;
    border-left:3px solid var(--calendar-color);
    background:color-mix(in srgb,var(--calendar-color) 16%,#202a2b);
    font-size:8px;
    font-weight:600;
    overflow:hidden
}

.calendar-banner>span:not(.event-thumb) {
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap
}

.calendar-banner small {
    margin-left:auto;
    color:var(--muted);
    font-size:7px;
    white-space:nowrap
}

.calendar-layout .calendar-days {
    grid-template-columns:repeat(var(--calendar-days),minmax(0,1fr));
    height:auto;
    min-height:0;
    flex:1
}

.event {
    border-left-color:var(--calendar-color);
    position:relative
}

.event b {
    display:block;
    font-weight:600
}

.event small {
    display:block;
    color:var(--muted);
    font-size:7px;
    margin-top:3px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis
}

.event-thumb {
    width:17px;
    height:17px;
    border-radius:4px;
    background-size:cover;
    background-position:center;
    flex:0 0 auto;
    float:left;
    margin-right:5px
}

.calendar-banner .event-thumb {
    float:none;
    margin:0
}

/* Compact public screen frame */ .screen-shell {
    padding:8px 10px 6px;
    gap:8px
}

.screen-header {
    height:32px
}

.screen-footer {
    font-size:8px;
    letter-spacing:1.3px
}

.module-grid {
    gap:8px
}

.screen-module {
    padding:14px;
    border-radius:14px
}

.module-header {
    margin-bottom:10px
}

.screen-shell .module-grid {
    width:min(100%,calc((100vh - 66px) * var(--ratio-number,1.7778)));
    grid-auto-rows:calc((100% - 64px)/9)
}

@media(max-width:900px) {
    .screen-shell {
        padding:8px
    }

    .screen-shell .module-grid {
        width:100%
    }

}

/* User account management */ .account-panel {
    max-width:900px
}

.account-form {
    padding:24px;
    display:grid;
    gap:22px
}

.account-form label {
    display:grid;
    gap:8px;
    color:#bac2c0;
    font-size:13px;
    font-weight:600
}

.account-form label small {
    color:var(--muted);
    font-weight:400
}

.account-form input {
    width:100%;
    border:1px solid #354142;
    border-radius:10px;
    background:#12191a;
    color:var(--text);
    padding:13px;
    outline:none
}

.account-form input:focus {
    border-color:var(--lime);
    box-shadow:0 0 0 3px rgba(215,243,107,.08)
}

.account-grid {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px
}

.account-passwords {
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:16px
}

.account-actions {
    display:flex;
    justify-content:flex-end
}

@media(max-width:900px) {
    .account-grid,.account-passwords {
        grid-template-columns:1fr
    }

}

/* Wide weather layout: current conditions + six-day forecast */ .type-weather .module-body {
    height:calc(100% - 30px);
    min-height:0;
    position:relative
}

.weather-layout {
    display:grid;
    grid-template-columns:minmax(260px,1fr) minmax(0,2.05fr);
    gap:14px;
    height:100%;
    min-height:0
}

.weather-current-card,.weather-forecast-card {
    background:#171b1c;
    border:1px solid #303637;
    border-radius:15px;
    min-height:0
}

.weather-current-card {
    display:grid;
    grid-template-columns:1.15fr 1fr;
    grid-template-rows:1fr auto auto;
    align-items:center;
    padding:20px 24px;
    column-gap:22px
}

.weather-current-visual {
    grid-row:1;
    display:grid;
    place-items:center;
    font-size:clamp(70px,8vw,145px);
    line-height:1;
    min-width:0
}

.weather-current-visual img {
    width:min(100%,170px);
    height:auto;
    object-fit:contain
}

.weather-current-reading {
    grid-row:1;
    display:grid;
    justify-items:center;
    align-content:center;
    gap:12px;
    min-width:0
}

.weather-thermometer {
    font-size:clamp(34px,3vw,62px);
    line-height:1
}

.weather-current-reading strong {
    font:400 clamp(40px,4.5vw,78px)/1 'Manrope';
    white-space:nowrap;
    letter-spacing:-2px
}

.weather-current-rain {
    font-size:clamp(17px,1.7vw,30px);
    white-space:nowrap;
    padding-bottom:8px
}

.weather-current-range {
    display:grid;
    gap:8px;
    font-size:clamp(16px,1.65vw,29px);
    white-space:nowrap;
    padding-bottom:3px
}

.weather-forecast-card {
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:8px;
    padding:20px 14px;
    align-items:stretch
}

.weather-forecast-day {
    display:grid;
    grid-template-rows:auto 1fr auto auto;
    justify-items:center;
    text-align:center;
    min-width:0
}

.weather-forecast-day h3 {
    font:400 clamp(15px,1.65vw,29px)/1.15 'Manrope';
    margin:0 0 10px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width:100%
}

.weather-forecast-icon {
    display:grid;
    place-items:center;
    font-size:clamp(55px,6vw,115px);
    line-height:1;
    width:100%;
    min-height:90px
}

.weather-forecast-icon img {
    width:min(100%,125px);
    height:auto;
    object-fit:contain
}

.weather-forecast-range,.weather-forecast-rain {
    font-size:clamp(13px,1.3vw,23px);
    white-space:nowrap
}

.weather-forecast-rain {
    margin-top:7px
}

.weather-provider {
    position:absolute;
    right:8px;
    bottom:4px;
    font-size:8px;
    color:#596462;
    opacity:.55
}

.type-weather.module-short .weather-layout {
    grid-template-columns:1fr 2fr
}

.type-weather.module-short .weather-current-card,.type-weather.module-short .weather-forecast-card {
    padding-top:10px;
    padding-bottom:10px
}

.type-weather.module-compact .weather-layout {
    grid-template-columns:1fr;
    height:auto
}

.type-weather.module-compact .weather-current-card {
    min-height:230px
}

.type-weather.module-compact .weather-forecast-card {
    grid-template-columns:repeat(3,1fr);
    row-gap:18px
}

.type-weather.module-narrow .weather-forecast-card {
    grid-template-columns:repeat(2,1fr)
}

/* Automatic module content fitting
   The complete module is laid out at its natural size and uniformly reduced only
   when its width or height would otherwise overflow the configured grid area. */ .screen-module {
    overflow:hidden
}

.module-scale {
    --module-scale:1;
    width:100%;
    height:100%;
    min-width:0;
    min-height:0;
    transform:scale(var(--module-scale));
    transform-origin:top left;
    will-change:transform;
}

.module-scale>.module-body {
    min-width:0;
    min-height:0
}

/* Keep the requested six-column weather composition at every module size.
   The universal fitter scales icons and typography together instead of changing
   the composition or hiding forecast data. */ .type-weather.module-compact .weather-layout, .type-weather.module-narrow .weather-layout {
    grid-template-columns:minmax(260px,1fr) minmax(0,2.05fr);
    height:100%
}

.type-weather.module-compact .weather-current-card {
    min-height:0
}

.type-weather.module-compact .weather-forecast-card, .type-weather.module-narrow .weather-forecast-card {
    grid-template-columns:repeat(6,minmax(0,1fr));
    row-gap:8px
}

/* Calendar: use the entire assigned module rectangle instead of being uniformly
   reduced by the generic content fitter. */ .type-calendar .module-scale {
    transform:none!important;
    width:100%!important;
    height:100%!important;
    display:flex;
    flex-direction:column
}

.type-calendar .module-body {
    height:auto!important;
    flex:1;
    min-height:0;
    overflow:hidden!important
}

.type-calendar .calendar-layout {
    width:100%;
    height:100%!important;
    min-height:0;
    flex:1
}

.type-calendar .calendar-time-body {
    height:100%;
    flex:1;
    min-height:0
}

.type-calendar .calendar-time-columns,.type-calendar .calendar-time-column {
    height:100%
}

/* Weather scales from the module container, not from the browser viewport. */ .type-weather {
    container-type:size
}

.type-weather .weather-layout {
    grid-template-columns:minmax(180px,1fr) minmax(0,2.05fr);
    gap:clamp(6px,1.2cqi,14px)
}

.type-weather .weather-current-card {
    padding:clamp(8px,2cqi,24px);
    column-gap:clamp(6px,1.8cqi,22px)
}

.type-weather .weather-current-visual {
    font-size:clamp(42px,13cqi,145px)
}

.type-weather .weather-current-visual img {
    width:min(100%,22cqi,170px)
}

.type-weather .weather-thermometer {
    font-size:clamp(22px,5cqi,62px)
}

.type-weather .weather-current-reading strong {
    font-size:clamp(30px,10cqi,78px);
    letter-spacing:clamp(-2px,-.25cqi,-1px)
}

.type-weather .weather-current-rain,.type-weather .weather-current-range {
    font-size:clamp(12px,3.1cqi,29px)
}

.type-weather .weather-forecast-card {
    gap:clamp(3px,.8cqi,8px);
    padding:clamp(8px,1.7cqi,20px) clamp(6px,1.2cqi,14px)
}

.type-weather .weather-forecast-day h3 {
    font-size:clamp(10px,2.5cqi,29px);
    margin-bottom:clamp(3px,1cqi,10px)
}

.type-weather .weather-forecast-icon {
    font-size:clamp(32px,8cqi,115px);
    min-height:0
}

.type-weather .weather-forecast-icon img {
    width:min(100%,12cqi,125px)
}

.type-weather .weather-forecast-range,.type-weather .weather-forecast-rain {
    font-size:clamp(9px,2cqi,23px)
}

/* At dashboard-sized widths, use two forecast rows. This preserves every day
   without overlapping weekday names or temperature/rain lines. */ .type-weather.weather-medium .weather-layout {
    grid-template-columns:minmax(190px,.95fr) minmax(0,1.6fr)
}

.type-weather.weather-medium .weather-forecast-card {
    grid-template-columns:repeat(3,minmax(0,1fr));
    grid-template-rows:repeat(2,minmax(0,1fr));
    row-gap:clamp(6px,1.5cqh,14px)
}

.type-weather.weather-medium .weather-forecast-day {
    grid-template-rows:auto minmax(0,1fr) auto auto
}

.type-weather.weather-medium .weather-forecast-day h3 {
    white-space:normal;
    line-height:1.05
}

.type-weather.weather-low .weather-current-card {
    padding-top:7px;
    padding-bottom:7px
}

.type-weather.weather-low .weather-forecast-card {
    padding-top:7px;
    padding-bottom:7px
}

.type-weather.weather-low .weather-forecast-rain {
    margin-top:2px
}

/* Very narrow weather modules stack current conditions above a 3x2 forecast. */ .type-weather.weather-compact .weather-layout {
    grid-template-columns:1fr;
    grid-template-rows:minmax(115px,.9fr) minmax(0,1.35fr)
}

.type-weather.weather-compact .weather-current-card {
    grid-template-columns:1fr 1fr;
    grid-template-rows:1fr auto;
    min-height:0
}

.type-weather.weather-compact .weather-current-visual,.type-weather.weather-compact .weather-current-reading {
    grid-row:1
}

.type-weather.weather-compact .weather-current-rain,.type-weather.weather-compact .weather-current-range {
    grid-row:2
}

/* Editable Little Wins profiles */ .child-edit-form {
    display:grid;
    grid-template-columns:auto 1fr;
    gap:12px;
    align-items:start
}

.child-avatar.has-picture,.reward-avatar.has-picture {
    background-size:cover;
    background-position:center;
    color:transparent
}

.child-fields {
    display:grid;
    grid-template-columns:minmax(120px,1fr) 72px;
    gap:8px
}

.child-fields label {
    font-size:9px
}

.child-fields input {
    margin-top:4px
}

.child-fields .child-picture {
    grid-column:1/-1
}

.child-picture span {
    display:block;
    margin-top:5px;
    color:var(--muted)
}

.child-fields button {
    justify-self:start
}

.child-actions {
    flex-wrap:wrap
}

.child-actions button.danger {
    color:#f2a39d;
    border-color:#6a3535
}

.reward-avatar {
    background-repeat:no-repeat
}

.reward-avatar.has-picture {
    width:34px;
    height:34px
}

@media(max-width:700px) {
    .child-edit-form {
        grid-template-columns:1fr
    }

    .child-fields {
        grid-template-columns:1fr
    }

    .child-fields .child-picture {
        grid-column:auto
    }

}

/* Reusable top display raster */ .top-raster-editor {
    padding:18px 22px 0;
    background:#141b1c;
    border-bottom:1px solid var(--line)
}

.top-raster-label {
    display:flex;
    align-items:baseline;
    gap:12px;
    margin-bottom:10px
}

.top-raster-label strong {
    font-size:12px
}

.top-raster-label span {
    font-size:10px;
    color:var(--muted)
}

.top-raster-viewport {
    height:105px;
    border:1px solid #263131;
    border-radius:9px;
    overflow:hidden;
    background:#111819
}

.top-raster-grid {
    min-height:100%!important;
    height:100%!important;
    grid-template-columns:repeat(var(--grid-columns,12),minmax(0,1fr))!important;
    grid-template-rows:repeat(var(--grid-rows,1),minmax(0,1fr))!important;
    grid-auto-rows:auto!important;
    background-size:calc((100% + 7px)/var(--grid-columns,12)) calc((100% + 7px)/var(--grid-rows,1))!important
}

.top-raster-grid .raster-item {
    padding:10px;
    grid-template-columns:30px 1fr auto;
    gap:8px;
    align-items:center
}

.top-raster-grid .module-chip {
    height:30px
}

.empty-top-raster {
    grid-column:1/-1;
    grid-row:1/-1;
    display:grid;
    place-items:center;
    color:var(--muted);
    font-size:11px;
    border:1px dashed #34403f;
    border-radius:8px;
    margin:8px
}

.screen-header {
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    gap:14px
}

.top-module-grid {
    display:none;
    min-width:0;
    height:100%;
    grid-template-columns:repeat(var(--top-grid-columns,12),minmax(0,1fr));
    grid-template-rows:repeat(var(--top-grid-rows,1),minmax(0,1fr));
    gap:6px;
    overflow:hidden
}

.screen-shell.has-top-modules .screen-header {
    height:var(--top-raster-height,72px);
    min-height:var(--top-raster-height,72px)
}

.screen-shell.has-top-modules .top-module-grid {
    display:grid
}

.top-module-grid .screen-module {
    grid-column:var(--x)/span var(--w);
    grid-row:var(--y)/span var(--h);
    min-height:0;
    padding:0 8px;
    border-radius:9px;
    background:#172021;
    display:flex;
    align-items:center
}

.top-module-grid .module-scale {
    transform:none!important;
    width:100%!important;
    height:100%!important;
    display:flex;
    align-items:center
}

.top-module-grid .module-header {
    display:none
}

.top-module-grid .module-body {
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    overflow:hidden
}

.reward-topbar-list {
    display:flex;
    align-items:center;
    justify-content:space-evenly;
    gap:clamp(8px,1.4vw,24px);
    width:100%;
    min-width:0;
    overflow:hidden
}

.reward-topbar-child {
    display:flex;
    align-items:center;
    gap:clamp(4px,.55vw,9px);
    min-width:0;
    white-space:nowrap
}

.reward-topbar-avatar {
    width:clamp(25px,2.2vw,38px);
    height:clamp(25px,2.2vw,38px);
    border-radius:50%;
    display:grid;
    place-items:center;
    background:color-mix(in srgb,var(--kid) 25%,#172021);
    color:var(--kid);
    font-weight:700;
    font-size:11px;
    background-size:cover;
    background-position:center;
    flex:0 0 auto
}

.reward-topbar-avatar.has-picture {
    color:transparent
}

.reward-topbar-stars {
    font:600 clamp(13px,1.25vw,21px) 'Manrope';
    display:flex;
    align-items:center;
    gap:3px
}

.reward-topbar-stars b {
    color:var(--amber);
    font-size:.8em
}

.reward-topbar-tv {
    font-size:clamp(15px,1.45vw,23px);
    filter:saturate(.8)
}

.reward-topbar-tv.paused {
    opacity:.35;
    filter:grayscale(1)
}

@media(max-width:900px) {
    .screen-header {
        grid-template-columns:auto 1fr
    }

    .screen-context {
        grid-column:1/-1
    }

    .top-module-grid {
        min-height:42px
    }

    .top-raster-viewport {
        min-width:760px
    }

    .top-raster-editor {
        overflow:auto
    }

}

/* Module settings shortcuts in the backend sidebar */ .sidebar-nav-label {
    margin: 1rem .75rem .35rem;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.sidebar-module-link {
    width: 100%;
    display: grid;
    grid-template-columns: 1.8rem minmax(0, 1fr);
    align-items: center;
    gap: .55rem;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.sidebar-module-link span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Compact module menu cards */ .sidebar-module-menu {
    display:grid;
    gap:.4rem;
    margin:.25rem .45rem .8rem
}

.sidebar-module-link {
    width:100%;
    display:grid;
    grid-template-columns:3.35rem minmax(0,1fr);
    align-items:center;
    gap:.8rem;
    padding:.5rem .55rem;
    border:1px solid transparent;
    border-radius:14px;
    background:transparent;
    color:var(--text);
    font:inherit;
    text-align:left;
    cursor:pointer;
    transition:background .16s,border-color .16s,transform .16s
}

.sidebar-module-link:hover {
    background:rgba(255,255,255,.045);
    border-color:rgba(255,255,255,.08);
    transform:translateX(2px)
}

.sidebar-module-icon {
    width:3.1rem;
    height:3.1rem;
    border-radius:14px;
    display:grid;
    place-items:center;
    background:#29383a;
    color:#d7f36b;
    font-size:.78rem;
    font-weight:800;
    letter-spacing:.03em;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.025)
}

.sidebar-module-title {
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:1rem;
    font-weight:600
}

.sidebar-module-icon.type-weather {
    color:#79c8ff
}

.sidebar-module-icon.type-webcam {
    color:#ffca70
}

.sidebar-module-icon.type-rewards {
    color:#ffcf58
}

.sidebar-module-icon.type-pokemon {
    color:#ff8d8d
}

.sidebar-module-icon.type-sonos {
    color:#b3a1ff
}

.webcam-fallback {
    display:none;
    position:absolute;
    inset:0;
    place-items:center;
    color:var(--muted);
    background:rgba(8,14,15,.75);
    font-weight:600
}

.webcam-stage.webcam-failed .webcam-fallback {
    display:grid
}

.webcam-stage.webcam-failed .online-dot {
    background:#e87373
}

/* Backend navigation and family form polish */ .sidebar {
    overflow:hidden
}

.sidebar nav {
    min-height:0;
    flex:1;
    overflow-y:auto;
    overflow-x:hidden;
    margin-top:34px;
    padding-right:4px;
    scrollbar-width:thin;
    scrollbar-color:#34403f transparent
}

.sidebar nav::-webkit-scrollbar {
    width:5px
}

.sidebar nav::-webkit-scrollbar-thumb {
    background:#34403f;
    border-radius:8px
}

.sidebar-foot {
    flex:0 0 auto;
    background:#151c1d;
    position:relative;
    z-index:2
}

.sidebar-module-menu {
    gap:.22rem;
    margin:.2rem .35rem .55rem
}

.sidebar-module-link {
    grid-template-columns:2.15rem minmax(0,1fr);
    gap:.62rem;
    padding:.32rem .4rem;
    border-radius:10px;
    min-height:2.45rem
}

.sidebar-module-icon {
    width:2rem;
    height:2rem;
    border-radius:9px;
    font-size:.58rem;
    letter-spacing:0
}

.sidebar-module-title {
    font-size:.78rem;
    font-weight:600
}

.sidebar-nav-label {
    margin:.65rem .65rem .25rem;
    font-size:.6rem
}

.children-grid {
    grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));
    align-items:start
}

.child-card {
    grid-template-columns:minmax(0,1fr) auto;
    gap:12px 16px;
    align-items:center
}

.child-edit-form {
    grid-column:1/-1;
    grid-template-columns:58px minmax(0,1fr);
    padding-bottom:13px;
    border-bottom:1px solid var(--line)
}

.child-avatar {
    width:54px;
    height:54px
}

.child-fields {
    grid-template-columns:minmax(150px,1.2fr) 82px minmax(180px,1fr) auto;
    align-items:end;
    gap:10px
}

.child-fields .child-picture {
    grid-column:auto
}

.child-fields label {
    display:grid;
    gap:5px;
    color:#aeb8b5;
    font-size:10px;
    text-transform:uppercase;
    letter-spacing:.06em
}

.child-fields input:not([type=color]) {
    width:100%;
    min-width:0;
    border:1px solid #354142;
    border-radius:9px;
    background:#12191a;
    color:var(--text);
    padding:10px 11px
}

.child-fields input[type=color] {
    width:100%;
    height:40px;
    border:1px solid #354142;
    border-radius:9px;
    background:#12191a;
    padding:4px
}

.child-picture span {
    display:flex;
    align-items:center;
    gap:6px;
    font-size:9px;
    text-transform:none;
    letter-spacing:0
}

.child-picture span input {
    width:auto!important
}

.child-fields>.button {
    height:40px;
    white-space:nowrap
}

.child-title {
    min-width:0
}

.child-title .tv-state {
    font-size:11px
}

.star-count {
    display:flex;
    align-items:center;
    gap:3px
}

.star-count small {
    margin-left:5px
}

.child-actions {
    grid-column:1/-1;
    border-top:0;
    padding-top:0;
    gap:8px;
    justify-content:flex-start;
    align-items:center
}

.child-actions form:last-child {
    margin-left:auto
}

@media(max-width:1150px) {
    .child-fields {
        grid-template-columns:minmax(150px,1fr) 76px
    }

    .child-fields .child-picture {
        grid-column:1/-1
    }

    .child-fields>.button {
        justify-self:start
    }

}

@media(max-width:700px) {
    .child-card {
        grid-template-columns:1fr
    }

    .child-edit-form {
        grid-template-columns:1fr
    }

    .child-fields {
        grid-template-columns:1fr
    }

    .child-fields .child-picture {
        grid-column:auto
    }

    .star-count {
        justify-content:flex-start
    }

    .child-actions form:last-child {
        margin-left:0
    }

}

/* Weather module: true container fitting and height-safe forecast cards */ .type-weather .module-scale {
    transform:none!important;
    width:100%!important;
    height:100%!important;
    display:flex;
    flex-direction:column
}

.type-weather .module-body {
    height:auto!important;
    flex:1;
    min-height:0;
    overflow:hidden!important;
    padding-bottom:0
}

.type-weather .weather-layout {
    width:100%;
    height:100%;
    min-height:0;
    display:grid;
    grid-template-columns:minmax(150px,.9fr) minmax(0,2.1fr);
    gap:clamp(5px,1.1cqi,14px)
}

.type-weather .weather-current-card,.type-weather .weather-forecast-card {
    height:100%;
    min-height:0;
    overflow:hidden
}

.type-weather .weather-current-card {
    display:grid;
    grid-template-rows:minmax(0,1fr) auto;
    padding:clamp(7px,1.6cqi,20px);
    gap:clamp(5px,1.2cqh,12px)
}

.type-weather .weather-current-main {
    min-height:0;
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);
    align-items:center;
    gap:clamp(5px,1.1cqi,14px)
}

.type-weather .weather-current-visual {
    grid-row:auto;
    min-height:0;
    height:100%;
    font-size:clamp(34px,min(12cqi,25cqh),130px);
    overflow:hidden
}

.type-weather .weather-current-visual img {
    width:100%;
    height:100%;
    max-width:150px;
    max-height:100%;
    object-fit:contain
}

.type-weather .weather-current-reading {
    grid-row:auto;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:clamp(2px,.6cqh,7px);
    min-width:0
}

.type-weather .weather-thermometer {
    font-size:clamp(18px,min(4.5cqi,10cqh),50px)
}

.type-weather .weather-current-reading strong {
    font-size:clamp(24px,min(8.2cqi,18cqh),72px);
    line-height:1;
    letter-spacing:clamp(-2px,-.2cqi,-1px)
}

.type-weather .weather-current-stats {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:clamp(3px,.65cqi,8px)
}

.type-weather .weather-current-stats>span {
    min-width:0;
    display:grid;
    place-items:center;
    padding:clamp(3px,.65cqh,7px) 2px;
    border-radius:8px;
    background:rgba(255,255,255,.025)
}

.type-weather .weather-current-stats small {
    font-size:clamp(7px,min(1.15cqi,2.6cqh),12px);
    color:var(--muted);
    text-transform:uppercase;
    letter-spacing:.04em
}

.type-weather .weather-current-stats b {
    font-size:clamp(10px,min(1.9cqi,4.2cqh),21px);
    font-weight:500;
    white-space:nowrap
}

.type-weather .weather-forecast-card {
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    grid-template-rows:minmax(0,1fr);
    gap:clamp(2px,.55cqi,8px);
    padding:clamp(5px,1.1cqi,15px)
}

.type-weather .weather-forecast-day {
    height:100%;
    min-height:0;
    display:grid;
    grid-template-rows:auto minmax(0,1fr) auto auto;
    align-items:center;
    justify-items:center;
    gap:clamp(1px,.6cqh,7px);
    overflow:hidden
}

.type-weather .weather-forecast-day h3 {
    font-size:clamp(8px,min(1.7cqi,3.6cqh),24px);
    line-height:1.05;
    margin:0;
    max-width:100%;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis
}

.type-weather .weather-forecast-icon {
    width:100%;
    height:100%;
    min-height:0;
    font-size:clamp(25px,min(6.7cqi,16cqh),100px);
    overflow:hidden
}

.type-weather .weather-forecast-icon img {
    width:100%;
    height:100%;
    max-width:110px;
    max-height:100%;
    object-fit:contain
}

.type-weather .weather-forecast-range,.type-weather .weather-forecast-rain {
    font-size:clamp(7px,min(1.28cqi,2.8cqh),18px);
    line-height:1.05;
    white-space:nowrap;
    margin:0
}

.type-weather .weather-provider {
    display:none
}

/* Medium widths use two rows only when the module is tall enough. */ .type-weather.weather-medium:not(.weather-low) .weather-layout {
    grid-template-columns:minmax(145px,.85fr) minmax(0,1.65fr)
}

.type-weather.weather-medium:not(.weather-low) .weather-forecast-card {
    grid-template-columns:repeat(3,minmax(0,1fr));
    grid-template-rows:repeat(2,minmax(0,1fr))
}

/* Low modules keep a single forecast row and reduce decorative spacing. */ .type-weather.weather-low .weather-layout {
    grid-template-columns:minmax(130px,.8fr) minmax(0,2fr)
}

.type-weather.weather-low .weather-current-card,.type-weather.weather-low .weather-forecast-card {
    padding-top:4px;
    padding-bottom:4px
}

.type-weather.weather-low .weather-current-stats>span {
    padding-top:2px;
    padding-bottom:2px
}

/* Narrow modules stack today above a 3x2 forecast while retaining all values. */ .type-weather.weather-compact .weather-layout {
    grid-template-columns:1fr;
    grid-template-rows:minmax(82px,.72fr) minmax(0,1.28fr)
}

.type-weather.weather-compact .weather-current-card {
    grid-template-columns:minmax(0,1.35fr) minmax(145px,.9fr);
    grid-template-rows:1fr;
    align-items:stretch
}

.type-weather.weather-compact .weather-current-main {
    grid-template-columns:minmax(0,.8fr) minmax(0,1fr)
}

.type-weather.weather-compact .weather-current-stats {
    grid-template-columns:1fr;
    grid-auto-rows:minmax(0,1fr)
}

.type-weather.weather-compact .weather-forecast-card {
    grid-template-columns:repeat(3,minmax(0,1fr));
    grid-template-rows:repeat(2,minmax(0,1fr))
}

/* Extremely short modules prioritize readable essentials and never overflow. */ .type-weather.weather-short .weather-thermometer {
    display:none
}

.type-weather.weather-short .weather-current-card {
    gap:2px
}

.type-weather.weather-short .weather-forecast-day {
    gap:1px
}

.type-weather.weather-tiny .weather-current-stats small {
    display:none
}

.type-weather.weather-tiny .weather-forecast-rain {
    display:none
}

/* Persistent module instances and optional titles */ .module-title-hidden .module-body {
    height:100%
}

.module-title-hidden .module-scale {
    height:100%
}

.sidebar-module-link.is-disabled {
    opacity:.58
}

.sidebar-module-title {
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    min-width:0
}

.sidebar-module-title small {
    font-size:.62rem;
    font-weight:500;
    color:var(--muted);
    line-height:1.15
}

.toggle-setting {
    display:flex!important;
    flex-direction:row!important;
    align-items:center;
    gap:.65rem
}

.toggle-setting input {
    width:auto!important;
    margin:0
}

/* Weather spacing refinement: compact forecast content and stacked min/max values */ .type-weather .weather-current-stats {
    grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr);
    align-items:stretch
}

.type-weather .weather-current-stats>span {
    place-items:stretch
}

.type-weather .weather-current-rain {
    align-content:center;
    text-align:center
}

.type-weather .weather-current-temperatures {
    display:grid!important;
    grid-template-rows:repeat(2,minmax(0,1fr));
    gap:2px;
    padding-inline:clamp(4px,.8cqi,10px)!important
}

.type-weather .weather-current-temperatures b {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:.32em;
    line-height:1
}

.type-weather .weather-current-temperatures i,.type-weather .weather-forecast-temps i {
    font-style:normal;
    color:var(--lime);
    font-weight:800
}

.type-weather .weather-current-temperatures b:last-child i,.type-weather .weather-forecast-temps span:last-child i {
    color:var(--amber)
}

.type-weather .weather-forecast-card {
    align-items:stretch
}

.type-weather .weather-forecast-day {
    grid-template-rows:auto minmax(36px,1fr) auto;
    align-content:center;
    gap:clamp(2px,.35cqh,5px);
    padding-block:clamp(2px,.35cqh,5px)
}

.type-weather .weather-forecast-day h3 {
    align-self:end;
    margin-bottom:0
}

.type-weather .weather-forecast-icon {
    display:grid;
    place-items:center;
    align-self:stretch;
    max-height:48cqh
}

.type-weather .weather-forecast-icon span {
    line-height:1
}

.type-weather .weather-forecast-values {
    align-self:start;
    display:grid;
    grid-template-rows:auto auto;
    justify-items:center;
    gap:clamp(2px,.35cqh,5px);
    width:100%
}

.type-weather .weather-forecast-temps {
    display:grid;
    grid-template-rows:repeat(2,auto);
    gap:1px;
    justify-items:center;
    width:100%;
    font-size:clamp(7px,min(1.28cqi,2.8cqh),18px);
    line-height:1.05;
    white-space:nowrap
}

.type-weather .weather-forecast-temps span {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:.28em
}

.type-weather .weather-forecast-rain {
    font-size:clamp(7px,min(1.15cqi,2.45cqh),16px);
    line-height:1;
    white-space:nowrap;
    margin:0;
    color:var(--muted)
}

.type-weather.weather-low .weather-forecast-day {
    grid-template-rows:auto minmax(24px,1fr) auto;
    gap:1px;
    padding-block:1px
}

.type-weather.weather-low .weather-forecast-icon {
    max-height:42cqh
}

.type-weather.weather-short .weather-forecast-values {
    gap:1px
}

.type-weather.weather-tiny .weather-forecast-rain {
    display:none
}

/* Weather emphasis: larger forecast icons and stronger current-day values */ .type-weather .weather-current-stats b {
    font-size:clamp(12px,min(2.35cqi,5.2cqh),27px);
    font-weight:600;
}

.type-weather .weather-current-rain b {
    font-size:clamp(12px,min(2.15cqi,4.8cqh),25px);
}

.type-weather .weather-current-temperatures b {
    font-size:clamp(13px,min(2.45cqi,5.4cqh),28px);
}

.type-weather .weather-forecast-day {
    grid-template-rows:auto minmax(0,1fr) auto;
}

.type-weather .weather-forecast-icon {
    width:100%;
    height:100%;
    max-height:none;
    font-size:clamp(38px,min(8.8cqi,27cqh),145px);
    padding-block:clamp(1px,.45cqh,5px);
}

.type-weather .weather-forecast-icon img {
    width:100%;
    height:100%;
    max-width:155px;
    max-height:100%;
    object-fit:contain;
}

.type-weather .weather-forecast-temps {
    font-size:clamp(7px,min(1.18cqi,2.6cqh),16px);
}

.type-weather .weather-forecast-rain {
    font-size:clamp(7px,min(1.05cqi,2.25cqh),14px);
}

.type-weather.weather-low .weather-forecast-icon {
    max-height:none;
    font-size:clamp(30px,min(7.5cqi,24cqh),105px);
}

/* Studio and screen management enhancements */ .studio-panel .raster-viewport {
    width: 100%;
    max-width: none;
}

.screen-module .module-scale {
    zoom: var(--font-scale, 1);
}

.screen-list {
    display: grid;
    gap: 12px;
    margin: 18px 0;
}

.screen-list-item {
    display: grid;
    grid-template-columns: auto minmax(0,1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #151d1e;
}

.screen-list-item small {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

.screen-list-item form {
    grid-column: 2 / -1;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.screen-create, .module-transfer {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: end;
    margin-top: 16px;
}

.module-transfer {
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

@media (max-width: 700px) {
    .screen-list-item, .screen-list-item form, .screen-create, .module-transfer {
        grid-template-columns: 1fr;
    }

    .screen-list-item .status-dot {
        display: none;
    }

}

.studio-panel .raster-viewport {
    min-width: 0;
}

/* ==========================================================================
   Responsive public-screen viewport handling
   --------------------------------------------------------------------------
   The configured dashboard aspect ratio is kept on conventional desktop and
   landscape screens. On portrait screens, including Android Chrome in normal
   mobile mode and with "Desktop site" enabled, the dashboard fills the
   available browser viewport instead of remaining a centered landscape frame.
   ========================================================================== */

html,
body {
    width: 100%;
    min-height: 100%;
}

body,
.screen-page,
.screen-shell {
    min-height: 100vh;
    min-height: 100dvh;
}

/* Standard mobile-browser layout. */
@media (max-width: 900px) {
    .screen-shell {
        width: 100%;
        min-height: 100dvh;
        padding: 8px;
        gap: 8px;
    }

    .screen-shell .module-grid {
        display: grid;
        width: 100%;
        min-width: 0;
        height: auto;
        min-height: 0;
        aspect-ratio: auto;
        align-self: stretch;
        justify-self: stretch;
    }
}

/*
 * Portrait layout.
 *
 * This query does not depend on the reported CSS width, so it also works when
 * Android Chrome's "Desktop site" option reports a desktop-sized viewport.
 */
@media (orientation: portrait) {
    html,
    body {
        width: 100%;
        height: 100%;
        min-height: 100%;
        overflow-x: hidden;
    }

    .screen-page {
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .screen-shell {
        width: 100%;
        min-width: 0;
        min-height: 100vh;
        min-height: 100dvh;
        padding: 8px;
        gap: 8px;
        grid-template-rows: auto minmax(0, 1fr) auto;
    }

    .screen-shell .module-grid {
        display: grid;
        width: 100%;
        min-width: 0;
        height: 100%;
        min-height: 0;
        max-width: none;
        max-height: none;
        aspect-ratio: auto;
        align-self: stretch;
        justify-self: stretch;
        align-content: stretch;
    }
}

/*
 * Touch devices using a desktop-sized viewport.
 *
 * This reinforces the portrait rules for Android browsers in "Desktop site"
 * mode without changing the normal layout on mouse-driven desktop computers.
 */
@media (orientation: portrait) and (hover: none) and (pointer: coarse) {
    .screen-shell {
        width: 100vw;
        min-height: 100dvh;
        margin: 0;
    }

    .screen-shell .module-grid {
        width: 100%;
        height: 100%;
        margin: 0;
        aspect-ratio: auto;
    }
}

/* Clock module */
.type-clock .module-body{display:grid;place-items:center;overflow:hidden}.clock{width:100%;height:100%;display:grid;place-items:center;align-content:center;text-align:center}.clock-time{font:700 clamp(2.7rem,10vw,9rem)/.9 'Manrope',sans-serif;letter-spacing:-.07em}.clock-date{margin-top:.8rem;color:var(--muted);font-size:clamp(.75rem,2vw,1.45rem);letter-spacing:.08em;text-transform:uppercase}.clock-minimal .clock-time{font-weight:500;letter-spacing:-.05em}.clock-split{grid-template-columns:1fr;gap:1rem}.clock-split .clock-time,.clock-split .clock-date{padding:1rem 1.35rem;border:1px solid var(--line);border-radius:18px;background:#151d1e}.clock-split .clock-date{margin:0;color:var(--text)}.clock-face{position:relative;width:min(70%,min(48vh,440px));aspect-ratio:1;border:clamp(3px,.5vw,7px) solid #d9e1de;border-radius:50%;background:radial-gradient(circle at center,#d9e1de 0 4%,transparent 4.5%),repeating-conic-gradient(from -1deg,#8d9996 0 1deg,transparent 1deg 30deg)}.clock-hand{position:absolute;left:50%;bottom:50%;width:4px;height:31%;border-radius:8px;background:#d9e1de;transform-origin:50% 100%;transform:translateX(-50%) rotate(var(--angle))}.clock-hand.hour{height:24%;width:7px}.clock-hand.second{width:2px;height:35%;background:var(--lime)}.clock-face>b{position:absolute;left:50%;top:50%;width:14px;height:14px;border-radius:50%;background:var(--lime);transform:translate(-50%,-50%)}
/* Family card arrangement */
.children-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));align-items:start}.child-card{display:block;padding:18px}.child-summary{display:grid;grid-template-columns:58px minmax(0,1fr) auto;gap:13px;align-items:center}.child-control-link{display:flex;gap:8px;margin:14px 0}.child-control-link .button{flex:1;text-align:center;justify-content:center}.child-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between;padding:13px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.child-actions form{display:flex;gap:6px;align-items:center}.tv-days-form input{width:72px;background:#12191a;border:1px solid var(--line);border-radius:8px;color:var(--text);padding:7px 8px}.child-edit-details{margin-top:12px}.child-edit-details summary{cursor:pointer;color:var(--muted);font-size:11px;font-weight:600}.child-edit-details[open] summary{margin-bottom:12px}.child-edit-form{display:block;border:0;padding:0}.child-fields{display:grid;grid-template-columns:minmax(140px,1fr) 82px minmax(180px,1fr) auto;gap:10px;align-items:end}.child-edit-details>.danger{margin-top:10px}@media(max-width:760px){.child-fields{grid-template-columns:1fr 82px}.child-picture{grid-column:1/-1}.child-fields>.button{grid-column:1/-1}.child-actions,.child-actions form{width:100%}.tv-days-form input{flex:1}.child-control-link{flex-direction:column}}

/* Family members and messages */
.member-admin-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:16px}.member-admin-card,.message-editor-card{display:grid;gap:10px;padding:16px;border:1px solid var(--line);border-radius:16px;background:var(--panel-2,#151d1e)}.member-admin-card label,.message-editor-card label{display:grid;gap:6px}.message-control-page{min-height:100vh;background:#101718;padding:24px}.message-control{width:min(980px,100%);margin:auto}.message-editor-list{display:grid;gap:14px;margin-top:20px}.message-list{display:grid;gap:.7em}.message-item{position:relative;display:grid;grid-template-columns:auto 1fr;gap:.8em;align-items:start;padding:.85em 1em;border-radius:1em;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);overflow:hidden}.message-item.type-info{border-left:5px solid #70b7ff}.message-item.type-important{border-left:5px solid #ffc85c;background:rgba(255,200,92,.08)}.message-item.type-warning{border-left:5px solid #ff8a65}.message-item.type-success{border-left:5px solid #74d99f}.message-item.type-very_important{border:2px solid #ffcf57;background:rgba(255,207,87,.12);animation:messagePulse 1.8s ease-in-out infinite}.message-item.type-very_important:after{content:"";position:absolute;inset:-40%;background:linear-gradient(110deg,transparent 35%,rgba(255,255,255,.16),transparent 65%);animation:messageSweep 2.8s linear infinite;pointer-events:none}.message-avatar{width:2.8em;height:2.8em;border-radius:50%;display:grid;place-items:center;background:var(--member);background-size:cover;background-position:center;font-weight:800;color:#101718}.message-avatar.has-picture{font-size:0}.message-meta{display:flex;gap:.6em;align-items:center;text-transform:uppercase;letter-spacing:.08em;font-size:.65em;opacity:.72}.message-item strong{display:block;font-size:1.08em;margin-top:.18em}.message-item p{margin:.3em 0 0;opacity:.82;white-space:pre-wrap}@keyframes messagePulse{0%,100%{transform:scale(1);box-shadow:0 0 0 rgba(255,207,87,0)}50%{transform:scale(1.012);box-shadow:0 0 24px rgba(255,207,87,.22)}}@keyframes messageSweep{from{transform:translateX(-55%)}to{transform:translateX(55%)}}

/* Polished family member and private message editors */
.panel-intro{margin:.55rem 0 0;color:var(--muted);max-width:62ch}.member-total-badge{display:inline-flex;align-items:center;min-height:34px;padding:0 13px;border:1px solid var(--line);border-radius:999px;background:rgba(255,255,255,.04);font-size:.82rem;color:var(--muted)}
.member-admin-grid-v2{grid-template-columns:repeat(auto-fit,minmax(min(100%,330px),1fr));gap:18px}.member-profile-card{display:flex;flex-direction:column;gap:18px;padding:20px;border:1px solid var(--line);border-radius:22px;background:linear-gradient(145deg,rgba(255,255,255,.045),rgba(255,255,255,.018));box-shadow:0 18px 50px rgba(0,0,0,.12)}.member-profile-card:hover{border-color:rgba(255,255,255,.2);transform:translateY(-1px)}.member-card-top{display:flex;align-items:center;gap:14px}.member-card-top h3{margin:.15rem 0 .15rem;font-size:1.15rem}.member-card-top small{color:var(--muted)}.member-card-eyebrow{text-transform:uppercase;letter-spacing:.11em;font-size:.65rem;color:var(--muted)}.member-avatar-large{width:72px;height:72px;flex:0 0 72px;border-radius:24px;display:grid;place-items:center;background:var(--member-color,#8bd3c7);background-size:cover;background-position:center;color:#10201e;font-size:1.6rem;font-weight:900;box-shadow:inset 0 0 0 1px rgba(255,255,255,.25),0 12px 24px rgba(0,0,0,.18)}.member-avatar-large.has-picture{font-size:0}.member-avatar-placeholder{background:transparent;border:1px dashed rgba(255,255,255,.28);color:var(--muted);box-shadow:none}.member-fields{display:grid;gap:14px}.member-color-field,.member-upload-field{display:grid;gap:7px;font-size:.78rem;color:var(--muted)}.color-input-wrap{display:flex;align-items:center;gap:10px;padding:7px 10px;border:1px solid var(--line);border-radius:12px;background:rgba(0,0,0,.12)}.color-input-wrap input[type=color]{width:42px;height:30px;border:0;padding:0;background:transparent}.color-input-wrap code{font-family:inherit;color:var(--text);font-size:.82rem}.upload-drop{position:relative;display:grid;gap:2px;padding:13px 14px;border:1px dashed rgba(255,255,255,.22);border-radius:14px;background:rgba(255,255,255,.025);overflow:hidden}.upload-drop strong{color:var(--text);font-size:.86rem}.upload-drop small{color:var(--muted)}.upload-drop input{position:absolute;inset:0;opacity:0;cursor:pointer}.upload-drop:hover{border-color:var(--accent);background:rgba(255,255,255,.045)}.member-card-actions{display:flex;gap:10px;align-items:center;margin-top:auto}.member-card-actions .button{flex:1}.member-add-card{border-style:dashed;background:rgba(255,255,255,.018)}
.message-control-page{min-height:100vh;background:radial-gradient(circle at 15% 0%,rgba(139,211,199,.1),transparent 35%),#0d1415;padding:clamp(18px,4vw,48px)}.message-control-v2{width:min(1080px,100%)}.message-control-hero{display:flex;justify-content:space-between;gap:24px;align-items:end;margin-bottom:28px}.message-control-hero h1{margin:.35rem 0 .5rem;font-size:clamp(2rem,5vw,3.6rem);line-height:1}.message-control-hero p{max-width:650px;margin:0;color:#91a1a2}.message-count{display:grid;justify-items:center;min-width:92px;padding:16px;border:1px solid rgba(255,255,255,.1);border-radius:20px;background:rgba(255,255,255,.035)}.message-count strong{font-size:1.7rem}.message-count span{font-size:.72rem;color:#91a1a2;text-transform:uppercase;letter-spacing:.08em}.message-compose-card,.message-existing-section{padding:clamp(18px,3vw,30px);border:1px solid rgba(255,255,255,.1);border-radius:26px;background:rgba(20,29,30,.88);box-shadow:0 28px 70px rgba(0,0,0,.2);backdrop-filter:blur(18px)}.message-existing-section{margin-top:22px}.editor-section-title{display:flex;gap:13px;align-items:flex-start;margin-bottom:22px}.editor-section-title>span{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:rgba(139,211,199,.12);color:#8bd3c7;font-weight:800;font-size:.75rem}.editor-section-title h2{margin:0 0 3px;font-size:1.25rem}.editor-section-title p{margin:0;color:#91a1a2;font-size:.88rem}.message-editor-form{display:grid;gap:18px}.editor-fieldset{border:0;padding:0;margin:0}.editor-fieldset legend,.editor-field>span,.member-color-field>span,.member-upload-field>span{display:block;margin-bottom:8px;color:#91a1a2;font-size:.75rem;text-transform:uppercase;letter-spacing:.08em}.message-type-picker{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.message-type-choice{position:relative;display:flex;gap:8px;align-items:center;justify-content:center;min-height:52px;padding:10px;border:1px solid rgba(255,255,255,.1);border-radius:14px;background:rgba(255,255,255,.025);cursor:pointer;font-size:.78rem;text-align:center}.message-type-choice input,.member-choice input{position:absolute;opacity:0;pointer-events:none}.message-type-choice:has(input:checked){border-color:currentColor;background:rgba(255,255,255,.075);box-shadow:0 0 0 2px currentColor inset}.message-type-choice.type-info{color:#70b7ff}.message-type-choice.type-success{color:#74d99f}.message-type-choice.type-warning{color:#ff9b73}.message-type-choice.type-important{color:#ffc85c}.message-type-choice.type-very_important{color:#ff6f7d}.type-icon{display:grid;place-items:center;width:25px;height:25px;border-radius:8px;background:currentColor;color:#101718;font-weight:900}.editor-fields-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(130px,.6fr);gap:12px}.editor-field{display:grid;gap:0}.editor-field input,.editor-field textarea{width:100%;border:1px solid rgba(255,255,255,.11);border-radius:13px;background:rgba(7,11,12,.42);color:var(--text);padding:12px 13px;outline:none}.editor-field textarea{resize:vertical;min-height:100px}.editor-field input:focus,.editor-field textarea:focus{border-color:#8bd3c7;box-shadow:0 0 0 3px rgba(139,211,199,.1)}.editor-field small{margin-top:6px;color:#708081;font-size:.7rem}.editor-field em{font-style:normal;opacity:.55;text-transform:none;letter-spacing:0}.member-choice-grid{display:flex;flex-wrap:wrap;gap:9px}.member-choice{position:relative;display:flex;align-items:center;gap:8px;min-height:46px;padding:6px 12px 6px 7px;border:1px solid rgba(255,255,255,.1);border-radius:999px;background:rgba(255,255,255,.025);cursor:pointer}.member-choice:has(input:checked){border-color:#8bd3c7;background:rgba(139,211,199,.1);box-shadow:0 0 0 2px rgba(139,211,199,.15) inset}.member-choice-avatar{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:var(--member-color,#4d5c5d);background-size:cover;background-position:center;color:#101718;font-weight:800}.member-choice-avatar.has-picture{font-size:0}.whole-family .member-choice-avatar{background:#293536;color:#b8c6c6}.editor-actions{display:flex;justify-content:flex-end;gap:10px}.editor-actions.split{justify-content:space-between}.message-save-button{min-width:180px}.message-editor-list-v2{gap:12px}.message-edit-card{border:1px solid rgba(255,255,255,.09);border-radius:18px;background:rgba(255,255,255,.025);overflow:hidden}.message-edit-card[open]{background:rgba(255,255,255,.035)}.message-edit-card summary{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:15px 17px;cursor:pointer;list-style:none}.message-edit-card summary::-webkit-details-marker{display:none}.message-edit-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:#70b7ff;color:#101718;font-weight:900}.message-edit-card.type-success .message-edit-icon{background:#74d99f}.message-edit-card.type-warning .message-edit-icon{background:#ff9b73}.message-edit-card.type-important .message-edit-icon{background:#ffc85c}.message-edit-card.type-very_important .message-edit-icon{background:#ff6f7d;animation:messagePulse 1.8s ease-in-out infinite}.message-edit-summary{display:grid;gap:2px}.message-edit-summary strong{font-size:.95rem}.message-edit-summary small{color:#91a1a2}.message-edit-chevron{transition:transform .2s}.message-edit-card[open] .message-edit-chevron{transform:rotate(180deg)}.message-edit-card .message-editor-form{padding:4px 17px 18px;border-top:1px solid rgba(255,255,255,.07)}.message-empty-state{display:grid;justify-items:center;padding:38px;border:1px dashed rgba(255,255,255,.12);border-radius:18px;color:#91a1a2;text-align:center}.message-empty-state>div{font-size:2rem}.message-empty-state h3{margin:8px 0 3px;color:var(--text)}.message-empty-state p{margin:0}
@media(max-width:760px){.message-control-hero{align-items:flex-start}.message-count{display:none}.message-type-picker{grid-template-columns:1fr 1fr}.message-type-choice:last-child{grid-column:1/-1}.editor-fields-grid{grid-template-columns:1fr}.message-compose-card,.message-existing-section{border-radius:20px}.member-admin-grid-v2{grid-template-columns:1fr}.member-card-actions{flex-wrap:wrap}.member-card-actions>*{flex:1 1 140px}}
.language-switch{position:fixed;top:18px;right:22px;z-index:20;display:flex;gap:8px;align-items:center;font-weight:700}.language-switch a{color:inherit;text-decoration:none;opacity:.7}.language-switch a:hover{opacity:1}.account-grid select{width:100%}

/* Dashboard and module slideshow */
.screen-module.module-slide{opacity:0;pointer-events:none;visibility:hidden;transition:opacity .45s ease;}
.screen-module.module-slide.is-slide-active{opacity:1;pointer-events:auto;visibility:visible;}
.screen-slideshow-editor{width:100%;margin-top:.65rem;border-top:1px solid var(--line,rgba(255,255,255,.12));padding-top:.55rem;}
.screen-slideshow-editor summary{cursor:pointer;font-weight:700;}
.screen-slide-row{display:grid;grid-template-columns:auto minmax(8rem,1fr) 6rem;align-items:center;gap:.55rem;margin:.4rem 0;}
.screen-slide-row input[type=number]{width:100%;}
.slideshow-settings{border:1px solid var(--line,rgba(255,255,255,.12));border-radius:12px;padding:.8rem;margin:.6rem 0;}
.slideshow-settings legend{font-weight:700;padding:0 .35rem;}

/* Animated slideshow transitions */
.screen-module.module-slide{
  --slide-transition-ms:500ms;
  transition:opacity var(--slide-transition-ms) ease,transform var(--slide-transition-ms) cubic-bezier(.22,.61,.36,1);
  will-change:opacity,transform;
}
.screen-module.module-slide[data-slide-transition="slide-left"]{transform:translateX(12%)}
.screen-module.module-slide[data-slide-transition="slide-right"]{transform:translateX(-12%)}
.screen-module.module-slide[data-slide-transition="slide-up"]{transform:translateY(12%)}
.screen-module.module-slide[data-slide-transition="slide-down"]{transform:translateY(-12%)}
.screen-module.module-slide.is-slide-active{transform:translate(0,0)}
.screen-module.module-slide.is-slide-entering[data-slide-transition="slide-left"]{transform:translateX(12%)}
.screen-module.module-slide.is-slide-entering[data-slide-transition="slide-right"]{transform:translateX(-12%)}
.screen-module.module-slide.is-slide-entering[data-slide-transition="slide-up"]{transform:translateY(12%)}
.screen-module.module-slide.is-slide-entering[data-slide-transition="slide-down"]{transform:translateY(-12%)}
.screen-module.module-slide.is-slide-leaving{visibility:visible;opacity:0;pointer-events:none;z-index:3}
.screen-module.module-slide.is-slide-leaving[data-slide-transition="slide-left"]{transform:translateX(-12%)}
.screen-module.module-slide.is-slide-leaving[data-slide-transition="slide-right"]{transform:translateX(12%)}
.screen-module.module-slide.is-slide-leaving[data-slide-transition="slide-up"]{transform:translateY(-12%)}
.screen-module.module-slide.is-slide-leaving[data-slide-transition="slide-down"]{transform:translateY(12%)}
#screen{--dashboard-transition-ms:700ms;transition:opacity var(--dashboard-transition-ms) ease,transform var(--dashboard-transition-ms) cubic-bezier(.22,.61,.36,1);will-change:opacity,transform}
#screen.dashboard-transition-out{opacity:0}
#screen.dashboard-transition-out[data-dashboard-transition="slide-left"]{transform:translateX(-8%)}
#screen.dashboard-transition-out[data-dashboard-transition="slide-right"]{transform:translateX(8%)}
#screen.dashboard-transition-out[data-dashboard-transition="slide-up"]{transform:translateY(-8%)}
#screen.dashboard-transition-out[data-dashboard-transition="slide-down"]{transform:translateY(8%)}
#screen.dashboard-transition-in{transition:none;opacity:0}
#screen.dashboard-transition-in[data-dashboard-transition="slide-left"]{transform:translateX(8%)}
#screen.dashboard-transition-in[data-dashboard-transition="slide-right"]{transform:translateX(-8%)}
#screen.dashboard-transition-in[data-dashboard-transition="slide-up"]{transform:translateY(8%)}
#screen.dashboard-transition-in[data-dashboard-transition="slide-down"]{transform:translateY(-8%)}
@media(prefers-reduced-motion:reduce){.screen-module.module-slide,#screen{transition-duration:1ms!important}}

/* Editor-only visibility and navigation for modules occupying the same raster cells. */
.raster-item.overlap-stack-item {
    --overlap-offset:calc(var(--overlap-index, 0) * 5px);
    transform:translate(var(--overlap-offset),var(--overlap-offset));
    border-style:dashed;
}

.raster-item.overlap-stack-item::after {
    content:"";
    position:absolute;
    inset:4px -6px -6px 4px;
    border:1px solid rgba(139,211,199,.32);
    border-radius:13px;
    pointer-events:none;
    z-index:-1
}

.raster-item.overlap-stack-active {
    border-style:solid;
    border-color:var(--aqua);
    box-shadow:0 8px 24px rgba(0,0,0,.32)
}

.overlap-stack-nav {
    position:absolute;
    left:10px;
    bottom:10px;
    z-index:20;
    display:flex;
    align-items:center;
    gap:5px;
    max-width:calc(100% - 20px);
    padding:4px 6px;
    border:1px solid rgba(139,211,199,.5);
    border-radius:999px;
    background:rgba(15,21,22,.94);
    color:#dce7e5;
    box-shadow:0 4px 14px rgba(0,0,0,.35)
}

.overlap-stack-nav button {
    width:24px;
    height:24px;
    padding:0;
    border:0;
    border-radius:50%;
    background:#31403e;
    color:var(--aqua);
    font-size:18px;
    line-height:1;
    cursor:pointer
}

.overlap-stack-count {
    color:var(--aqua);
    font-size:10px;
    font-weight:700;
    white-space:nowrap
}

.overlap-stack-name {
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:10px;
    color:#b9c6c4
}
