/* The screen layout editor (settings website) */
.ed-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
.ed-fmt { display: flex; flex-direction: column; align-items: flex-start; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.ed-fmt small { color: var(--mute); font-size: 11px; }
.ed-fmt.on { border-color: var(--acc); background: rgba(63,169,245,.12); }
.ed-main { display: grid; grid-template-columns: 220px minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.ed-pages, .ed-palette { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; position: sticky; top: 70px; max-height: calc(100vh - 150px); overflow: auto; }
.ed-pages h3, .ed-palette h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); margin: 0 0 8px; }
.ed-page { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.ed-page:hover { background: rgba(255,255,255,.04); }
.ed-page.on { border-color: var(--acc); background: rgba(63,169,245,.10); }
.ed-page.off { opacity: .55; }
.ed-page.over { border-color: #4ade80; background: rgba(74,222,128,.12); }
.ed-page .pi { font-size: 18px; width: 22px; text-align: center; }
.ed-page .pt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ed-page .pt small { color: var(--mute); font-size: 11px; }
.ed-page .pm button { background: none; border: 0; color: var(--mute); font-size: 11px; padding: 2px; cursor: pointer; }
.ed-page .pm button:disabled { opacity: .25; }
.ed-add { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; display: grid; gap: 6px; }
.ed-add h4 { margin: 0; font-size: 13px; }
.ed-add input, .ed-add select { width: 100%; }
.ed-type { display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto auto; column-gap: 6px; padding: 7px 8px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 6px; cursor: grab; background: rgba(255,255,255,.02); }
.ed-type span { grid-row: span 2; font-size: 18px; align-self: center; }
.ed-type b { font-size: 13px; } .ed-type small { color: var(--mute); font-size: 11px; }
.ed-type:hover { border-color: var(--acc); }
.ed-canvas { min-width: 0; }
.ed-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ed-head h2 { margin: 0; font-size: 20px; }
.ed-head .btn { margin-left: auto; }
.ed-frame { position: relative; background: #050608; border: 6px solid #22262e; border-radius: 14px; padding: 8px; }
.ed-frame.wide { aspect-ratio: 32 / 9; }
.ed-frame.tab { aspect-ratio: 16 / 10; }
.ed-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.ed-monitor { background: #000; border: 10px solid #22262e; border-radius: 16px; aspect-ratio: 16 / 9; display: flex; align-items: center; padding: 0 0; }
.ed-monitor .ed-frame { border: 0; border-radius: 0; width: 100%; }
.ed-flabel { position: absolute; top: -26px; left: 0; font-size: 12px; color: var(--mute); }
.ed-tabs .ed-frame { margin-top: 22px; }
.ed-grid { display: grid; gap: 8px; height: 100%; }
.ed-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; }
.ed-tile { position: relative; flex: 1; min-height: 0; background: #141821; border: 1px solid #2a3140; border-radius: 10px; padding: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2px; cursor: grab; overflow: hidden; }
.ed-tile.half { flex: 1 1 0; } .ed-tile.full { flex: 2 1 0; }
.ed-tile .ico { font-size: 26px; } .ed-tile b { font-size: 13px; } .ed-tile small { color: var(--mute); font-size: 11px; line-height: 1.25; max-height: 2.6em; overflow: hidden; }
.ed-tile small.when { color: #fbbf24; }
.ed-tile:hover { border-color: var(--acc); }
.ed-tile.over, .ed-slot.over, .ed-col.empty.over { outline: 3px solid #4ade80; outline-offset: -3px; }
.ed-tile.over::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: #4ade80; }
.ed-tile.dragging, .ed-chip.dragging, .ed-type.dragging { opacity: .35; }
.ed-tile.pending { opacity: .5; }
.ed-slot { flex: 1 1 0; border: 2px dashed #2a3140; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #4b5563; font-size: 11px; text-align: center; padding: 6px; }
.ed-col.empty .ed-slot { height: 100%; }
/* split: the widget top-left, the one shown at other times bottom-right */
.ed-tile.split { padding: 0; }
.sp-a, .sp-b { position: absolute; inset: 0; display: flex; flex-direction: row; gap: 6px; padding: 8px 10px; }
.sp-a { align-items: flex-start; } .sp-b { align-items: flex-end; }
.sp-a { clip-path: polygon(0 0, 100% 0, 0 100%); justify-content: flex-start; text-align: left; background: #141821; }
.sp-b { clip-path: polygon(100% 0, 100% 100%, 0 100%); justify-content: flex-end; text-align: right; background: #1d1a2b; }
.sp-a .ico, .sp-b .ico { font-size: 20px; line-height: 1; } .sp-a b, .sp-b b { line-height: 20px; }
.sp-line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sp-line line { stroke: #fbbf24; stroke-width: 1.2; vector-effect: non-scaling-stroke; stroke-dasharray: 4 3; }
.sp-time { position: absolute; left: 50%; top: 50%; font-size: 10px !important; transform: translate(-50%, -50%); background: rgba(251,191,36,.95); color: #111; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 8px; white-space: nowrap; text-align: center; line-height: 1.2; }
.sp-time small { display: block; font-weight: 600; font-size: 10px; color: #3b3000; }
.ed-whole { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--text); }
.ed-whole span { font-size: 40px; } .ed-whole small { color: var(--mute); }
.ed-over { margin-top: 10px; background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.5); color: #fca5a5; padding: 8px 12px; border-radius: 10px; font-size: 13px; }
.ed-hidden { margin-top: 14px; }
.ed-hidden h4 { margin: 0 0 6px; font-size: 13px; } .ed-hidden h4 small { color: var(--mute); font-weight: 400; }
.ed-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px dashed #3a4252; margin: 0 6px 6px 0; cursor: grab; font-size: 13px; }
.ed-chip small { color: var(--mute); }
@media (max-width: 1100px) { .ed-main { grid-template-columns: 1fr; } .ed-pages, .ed-palette { position: static; max-height: none; } }

.ed-overflow { margin-top: 8px; border: 2px dashed rgba(239,68,68,.6); border-radius: 12px; padding: 8px; height: 170px; background: rgba(239,68,68,.05); }
.ed-overflow .ed-grid { height: 100%; }
.ed-blank { visibility: hidden; }
.ed-tabs.one { grid-template-columns: 1fr; }
.ed-mockwrap { position: relative; }
.ed-frame.mock { pointer-events: none; }
.mk-cal { height: 100%; display: flex; flex-direction: column; gap: 6px; }
.mk-top { display: flex; justify-content: space-between; color: #cbd5e1; font-size: 12px; } .mk-top span { color: #64748b; }
.mk-grid { flex: 1; display: grid; gap: 3px; grid-auto-rows: 1fr; }
.mk-day { background: #141821; border-radius: 4px; padding: 3px; display: flex; flex-direction: column; gap: 2px; }
.mk-day i { display: block; height: 5px; border-radius: 2px; opacity: .85; }
.mk-kids { height: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mk-kid { background: #141821; border: 1px solid #2a3140; border-top: 3px solid #3fa9f5; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 4px; color: #cbd5e1; font-size: 12px; }
.mk-kid:nth-child(2) { border-top-color: #f5a623; } .mk-kid:nth-child(3) { border-top-color: #7ed321; }
.mk-kid.empty { border: 1px dashed #2a3140; background: transparent; }
.mk-pts { font-size: 26px; font-weight: 800; color: #3fa9f5; line-height: 1; } .mk-kid small { color: #64748b; }
.mk-kid i { display: block; height: 8px; border-radius: 4px; background: #1f2633; margin-top: 4px; }

.ed-del { position: absolute; top: 5px; right: 5px; z-index: 3; width: 26px; height: 26px; border-radius: 50%; border: 1px solid #3a4252; background: rgba(12,14,18,.85); font-size: 13px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s; }
.ed-tile:hover .ed-del, .ed-chip:hover .ed-del { opacity: 1; }
.ed-del:hover { border-color: #ef4444; background: rgba(239,68,68,.25); }
.ed-trash { margin-top: 10px; border: 2px dashed #3a4252; border-radius: 12px; padding: 12px; text-align: center; color: #64748b; font-size: 13px; }
.ed-trash.over { border-color: #ef4444; color: #fca5a5; background: rgba(239,68,68,.12); outline: none; }
.ed-tile.split .sp-a:hover, .ed-tile.split .sp-b[data-sub]:hover { filter: brightness(1.35); cursor: pointer; }

/* A calendar page's own settings, under its picture */
.ed-pset { margin-top: 16px; padding: 16px 18px; border: 1px solid var(--line, #2a303b); border-radius: 14px; background: rgba(255,255,255,.02); max-width: 760px; }
.ed-pset h3 { margin: 0 0 6px; font-size: 1rem; }
.ed-pset .btn { margin-top: 10px; }
.ed-pset a { color: #3fa9f5; }
.ed-pset .ps-h { margin: 14px 0 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--mute, #8b95a5); }

.ed-page.info { margin-bottom: 10px; border-style: dashed; }
.ed-info { padding: 6px 8px; max-width: 820px; }
.ed-info h2 { margin: 0 0 10px; } .ed-info h3 { margin: 18px 0 4px; font-size: 1rem; }
.ed-info p { line-height: 1.55; color: var(--text, #e8ecf2); }
.ed-full { margin-top: 12px; }

/* ---- Calendar set-up: categories, the page's key, tidying up */
.cs-box { max-width: none; }
.cs-card { margin-top: 16px; padding: 16px 18px; border: 1px solid var(--line, #2a303b); border-radius: 14px; background: rgba(255,255,255,.02); }
.cs-card h3 { margin: 0 0 6px; font-size: 1.05rem; } .cs-card h4 { margin: 14px 0 6px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--mute, #8b95a5); }
.cs-count { font-weight: 700; margin: 6px 0; } .cs-count.bad { color: #f87171; }
.cs-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.cs-group { border: 1px dashed var(--line, #2a303b); border-radius: 12px; padding: 10px; min-height: 84px; }
.cs-group.over, .cs-zone.over { border-color: #3fa9f5; background: rgba(63,169,245,.08); }
.cs-nogroup { background: rgba(255,255,255,.02); }
.cs-ghead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cs-ghead .mute { flex-basis: 100%; }
.cs-fixed { font-size: 1rem; }
.cs-name { flex: 1; min-width: 120px; padding: 7px 9px !important; }
.cs-col { width: 38px; height: 34px; padding: 2px; border-radius: 8px; flex: none; }
.cs-g { width: auto !important; max-width: 190px; padding: 6px 8px !important; border-left: 10px solid var(--gc, #555) !important; }
.cs-x { background: none; border: 0; color: var(--mute, #8b95a5); font-size: 15px; cursor: pointer; }
.cs-members { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cs-gen { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.cs-sug { margin: 6px 0 12px; }
.cs-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--panel-2, #1b2029); border: 1px solid var(--line, #2a303b); cursor: grab; font-size: .9rem; user-select: none; }
.cs-chip i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.cs-chip.k-person { border-style: dashed; }
.cs-chip.cs-other { cursor: default; opacity: .8; }
.cs-line { background: none; border: 1px solid var(--line, #2a303b); border-radius: 6px; color: var(--mute, #8b95a5); font-size: .72rem; padding: 1px 6px; cursor: pointer; }
.cs-line.on { background: #facc15; color: #111; border-color: #facc15; }
.cs-zone { display: flex; flex-wrap: wrap; gap: 6px; min-height: 46px; padding: 8px; border: 1px dashed var(--line, #2a303b); border-radius: 12px; align-items: center; }
.cs-key { border-style: solid; border-color: rgba(63,169,245,.5); }
.cs-hide { opacity: .85; }
.cs-room { color: var(--mute, #8b95a5); font-size: .8rem; margin-left: 4px; }
.cs-warn { background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.4); border-radius: 10px; padding: 8px 12px; font-size: .9rem; }
.cs-card .btn { margin-top: 12px; }
.cs-ov { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 9000; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow: auto; }
.cs-modal { background: var(--panel, #12161d); border: 1px solid var(--line, #2a303b); border-radius: 16px; padding: 20px 22px; width: min(1200px, 100%); }
.cs-tablewrap { max-height: 60vh; overflow: auto; border: 1px solid var(--line, #2a303b); border-radius: 10px; }
.cs-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.cs-table th { position: sticky; top: 0; background: var(--panel-2, #1b2029); text-align: left; padding: 8px; font-size: .75rem; text-transform: uppercase; color: var(--mute, #8b95a5); }
.cs-table td { padding: 6px 8px; border-top: 1px solid var(--line, #2a303b); vertical-align: middle; }
.cs-table .nowrap { white-space: nowrap; }
.cs-table select, .cs-table input.cs-title { padding: 5px 7px !important; font-size: .85rem; width: 100%; }
.cs-len { display: block; font-size: .7rem; color: var(--mute, #8b95a5); } .cs-len.bad { color: #f87171; }
.cs-prob { background: rgba(248,113,113,.15); color: #fca5a5; border-radius: 6px; padding: 2px 6px; font-size: .75rem; white-space: nowrap; }

.cs-expl { margin: 0 0 8px; }
.cs-sw { width: 30px; height: 30px; border-radius: 8px; border: 2px solid rgba(255,255,255,.25); cursor: pointer; flex: none; padding: 0; }
.cs-sw:hover { border-color: #fff; }
.cs-famg { border-style: solid; }
.cs-famg .cs-ghead .mute { flex-basis: auto; }
.cs-pop { position: absolute; z-index: 9500; background: var(--panel, #12161d); border: 1px solid var(--line, #2a303b); border-radius: 12px; padding: 10px; display: grid; grid-template-columns: repeat(5, 28px); gap: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.cs-pc { width: 28px; height: 28px; border-radius: 7px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.cs-pc.on { border-color: #fff; }
.cs-custom { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; font-size: .8rem; color: var(--mute, #8b95a5); margin-top: 4px; }
.cs-custom input { width: 40px; height: 26px; padding: 0; border: 0; background: none; }
.cs-linebox { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; color: var(--mute, #8b95a5); margin-left: 4px; padding-left: 8px; border-left: 1px solid var(--line, #2a303b); cursor: pointer; }
.cs-linebox input { width: 15px; height: 15px; margin: 0; }
.cs-gmap { margin-top: 14px; font-size: .9rem; } .cs-gmap summary { cursor: pointer; color: #3fa9f5; }
.cs-gmap ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 16px; }
.cs-gmap li i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: -1px; }
.cs-gen .cs-name { max-width: 320px; }

.cs-how { background: rgba(63,169,245,.1); border: 1px solid rgba(63,169,245,.35); border-radius: 10px; padding: 7px 12px; font-size: .9rem; margin: 0 0 10px; }
.cs-lp { display: inline-block; width: 18px; height: 4px; border-radius: 2px; background: var(--lc); margin-left: 2px; }
.cs-lineex { display: flex; gap: 14px; align-items: center; margin: 4px 0 10px; }
.cs-day { position: relative; width: 74px; height: 64px; flex: none; border-radius: 8px; background: #1b2029; border: 1px solid var(--line, #2a303b); padding: 4px 5px; font-size: .75rem; }
.cs-day b { display: block; margin-bottom: 3px; }
.cs-ev { display: block; border-radius: 4px; padding: 1px 4px; color: #0b0d12; font-weight: 700; font-size: .68rem; }
.cs-ln { position: absolute; left: 4px; right: 4px; bottom: 4px; height: 5px; border-radius: 3px; }
.cs-card p, .cs-card li { font-size: .92rem; }
/* Bigger, clearer type in the screen layout and calendar set-up */
.cs-card { padding: 20px 22px; } .cs-card h3 { font-size: 20px; margin-bottom: 10px; }
.cs-card h4 { font-size: 13px; margin-top: 20px; }
.cs-card p, .cs-card li, .cs-card .mute.small { font-size: 15px !important; line-height: 1.55; }
.cs-count { font-size: 16px; }
.cs-chip { font-size: 15px; padding: 6px 12px; }
.ed-pset h3 { font-size: 20px; } .ed-pset .mute.small, .ed-pset label { font-size: 15px; }
.ed-info h2 { font-size: 26px; } .ed-info h3 { font-size: 18px; margin-top: 22px; } .ed-info p { font-size: 16px; }

/* Add a widget: two columns; the rewards ones in a list of their own */
.ed-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.ed-types .ed-type { margin-bottom: 0; }
.ed-palette .ed-h2 { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }

/* The screen's own menu down the left of each preview */
.ed-frame.has-rail { display: flex; gap: 8px; }
.ed-frame.has-rail > .ed-grid, .ed-frame.has-rail > .mk-in { flex: 1; min-width: 0; height: 100%; }
.ed-frame.has-rail > .mk-in > * { height: 100%; }
.ed-rail { flex: none; width: 50px; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.ed-rail .ed-rb { flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 4px 2px; border-radius: 8px; color: #9aa4b2; text-align: center; border: 1px solid transparent; }
.ed-rail .ed-rb span { font-size: 15px; line-height: 1.1; }
.ed-rail .ed-rb small { font-size: 9px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-rail .ed-rb.on { background: #3fa9f5; color: #fff; }
.ed-rail .ed-rb.over, .ed-rail .ed-rb:hover { border-color: var(--acc); }

.ed-frame.tab .ed-rail { width: 44px; }
/* Tablet: the parts of a screen one after the other, down the page */
.ed-tabs.stack { grid-template-columns: minmax(0, 620px); justify-content: center; }

/* A calendar page: its title, then its few settings in one strip above the picture */
.ed-head h2 { font-size: 26px; font-weight: 800; }
.ed-pset.ed-pset-top { margin: 0 0 16px; max-width: none; display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.ed-pset-top .ps-grid { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(260px, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.ed-pset-top .ps-look .hint { display: none; }
.ed-pset-top select { margin-bottom: 8px; }
.ed-pset-top .btn { margin: 0 0 10px; min-width: 110px; }
@media (max-width: 900px) { .ed-pset-top .ps-grid { grid-template-columns: 1fr; } }

/* Categories: one row each – name, colour, as a line, shown, how it looks */
.cs-sub { font-weight: 700; color: #3fa9f5; margin: 0 0 10px; }
.cs-row { display: grid; grid-template-columns: minmax(200px, 1.6fr) 64px 110px 100px minmax(140px, 1fr) 30px; gap: 12px; align-items: center; padding: 6px 0; }
.cs-row.cs-rhead { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--mute, #8b95a5); padding: 2px 0; border-bottom: 1px solid var(--line, #2a303b); }
.cs-row .cs-nm { min-width: 0; display: flex; align-items: center; gap: 8px; }
.cs-row .cs-nm .cs-name { flex: 1; max-width: none; }
.cs-tk { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; margin: 0; cursor: pointer; }
.cs-tk input { width: 17px; height: 17px; margin: 0; }
.cs-tk.off { opacity: .4; }
.cs-pv { min-width: 0; }
.cs-loz { display: inline-block; max-width: 100%; padding: 3px 10px; border-radius: 6px; font-size: .82rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-pday { display: inline-flex; flex-direction: column; justify-content: space-between; width: 64px; height: 40px; padding: 3px 5px; border: 1px solid var(--line, #2a303b); border-radius: 6px; background: #141821; }
.cs-pday b { font-size: .75rem; } .cs-pday i { display: block; height: 5px; border-radius: 3px; }
.cs-grp { border: 1px dashed var(--line, #2a303b); border-radius: 12px; padding: 4px 10px 10px; margin: 6px 0; }
.cs-grp.over { border-color: #3fa9f5; background: rgba(63,169,245,.08); }
.cs-grp .cs-members { margin-top: 2px; }
.cs-nogroup { padding-top: 10px; }
.cs-orow { border-top: 1px solid var(--line, #2a303b); }
@media (max-width: 900px) { .cs-row { grid-template-columns: 1fr 44px auto auto; } .cs-row .cs-pv, .cs-row.cs-rhead span:nth-child(5) { display: none; } }

/* A calendar page: no widget list on the right, so it has the width */
.ed-main.nopal { grid-template-columns: 220px minmax(0, 1fr); }
/* The calendar picture, in the view it opens on */
.mk3 { display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 0; position: relative; }
.mk3r { flex: 1; min-height: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 4px; }
.mk3r > b { font-size: 10px; color: #c9d1db; align-self: center; }
.mk3c { display: grid; gap: 2px; min-height: 0; }
.mk3c i, .mkm i { background: #1a1f29; border-radius: 2px; position: relative; display: flex; flex-direction: column; gap: 2px; padding: 2px; min-width: 0; overflow: hidden; }
.mk3c i.we, .mkm i.we { background: #26303f; }
.mk3c i.gap, .mkm i.out { background: transparent; }
.mk3c i s, .mkm i s { display: block; height: 3px; border-radius: 2px; background: var(--ec); text-decoration: none; }
.mk3.scroll .mk3c i s { height: 6px; }
.mk3c i u, .mkm i u { font-size: 8px; color: #8b95a5; text-decoration: none; line-height: 1; }
.mk3.scroll .mk3r { mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
.mk-drag { position: absolute; right: 6px; bottom: 2px; font-size: 9px; color: #64748b; }
.mkm { flex: 1; min-height: 0; display: grid; grid-template-columns: 22px repeat(7, minmax(0, 1fr)); gap: 2px; }
.mkm > b { font-size: 9px; color: #8b95a5; text-align: center; } .mkm > b.we { color: #c9d1db; }
.mkm i.wk { background: transparent; font-size: 7px; color: #64748b; font-style: normal; justify-content: center; }
.mkw { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mkw > div { background: #1a1f29; border-radius: 4px; padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mkw > div.we { background: #26303f; }
.mkw b { font-size: 9px; color: #c9d1db; } .mkw small { font-size: 8px; color: #64748b; }
.mkw s { display: block; height: 14px; border-radius: 3px; background: var(--ec); text-decoration: none; }
/* The screen's menu, as on the screen: buttons share the height; the microphone (with its status dot) and the version at the bottom */
.ed-rail .ed-rb { flex: 1 1 0; min-height: 0; max-height: 48px; }
.ed-rfoot { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 4px; }
.ed-rmic { position: relative; width: 22px; height: 22px; border-radius: 50%; background: #1b2029; display: grid; place-items: center; font-size: 11px; }
.ed-rmic i { position: absolute; right: -1px; bottom: -1px; width: 6px; height: 6px; border-radius: 50%; background: #22c55e; }
.ed-rfoot small { font-size: 7px; color: #8b95a1; white-space: nowrap; }

/* Colour coding: clear headings, one row each, a colour square (a bar along its bottom when it's a line) */
.cs-card h3.cs-h1 { font-size: 24px; font-weight: 800; margin: 0 0 4px; }
.cs-card h3.cs-h2 { font-size: 19px; font-weight: 750; color: var(--text, #e8ecf2); margin: 26px 0 8px; padding-top: 18px; border-top: 1px solid var(--line, #2a303b); text-transform: none; letter-spacing: 0; }
.cs-limit { margin: 12px 0 4px; padding: 10px 14px; border-radius: 12px; background: rgba(63,169,245,.1); border: 1px solid rgba(63,169,245,.35); }
.cs-limit.bad { background: rgba(248,113,113,.14); border-color: rgba(248,113,113,.6); color: #fecaca; font-size: 1.02rem; }
.cs-row { grid-template-columns: minmax(200px, 440px) 70px 70px 210px 34px; justify-content: start; }
.cs-row.cs-prow { grid-template-columns: minmax(200px, 440px) 70px 290px 34px; }
.cs-row.cs-orow { grid-template-columns: minmax(200px, 440px) 70px 70px 210px 34px; }
.cs-row .cs-sw { justify-self: start; width: 40px; height: 32px; border-radius: 8px; border: 2px solid rgba(255,255,255,.25); background: var(--sc); padding: 0; cursor: pointer; }
.cs-row span.cs-sw { cursor: default; }
.cs-row .cs-sw.line { background: linear-gradient(to top, var(--sc) 0 7px, #141821 7px); }
.cs-ck { display: flex; } .cs-ck input { width: 20px; height: 20px; margin: 0; }
.cs-ck input:disabled { opacity: .3; }
.cs-sel { margin: 0 !important; padding: 6px 8px !important; height: 38px; }
@media (max-width: 900px) { .cs-row, .cs-row.cs-orow { grid-template-columns: 1fr 50px 40px 150px 28px; } .cs-row.cs-prow { grid-template-columns: 1fr 50px 170px 0; } }

/* A widget screen: the instructions, the screen (full width), the bin, then the widgets to add underneath */
.ed-how { margin: -2px 0 12px; padding: 9px 14px; border-radius: 10px; background: rgba(63,169,245,.1); border: 1px solid rgba(63,169,245,.35); font-size: .95rem; }
.ed-palette.ed-below { position: static; max-height: none; overflow: visible; margin-top: 16px; }
.ed-below .ed-types { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* The menu in the previews, as the screen draws it: grey icons and names, the screen you're on in blue; no names on a tablet */
.ed-rail { width: 58px; }
.ed-frame.tab .ed-rail { width: 46px; }
.ed-rail .ed-rb { color: #8b95a5; gap: 2px; }
.ed-rail .ed-rb span { font-size: 19px; line-height: 1; filter: grayscale(1); display: flex; align-items: center; justify-content: center; }
.ed-rail .ed-rb span svg { width: 20px; height: 20px; }
.ed-rail .ed-rb small { font-size: 10px; }
.ed-rail .ed-rb.on { background: #3fa9f5; color: #fff; }
.ed-rail .ed-rb.on span { filter: grayscale(1) brightness(2.2); }
/* Colour coding, round 2: groups have just a name and colour; the line is a thin bar along the bottom of the square */
.cs-row.cs-grow { grid-template-columns: minmax(200px, 440px) 70px 34px; }
.cs-row .cs-sw.line { background: #141821; box-shadow: inset 0 -3px 0 var(--sc); }
.cs-addc { margin: 6px 0 4px; }
.cs-other { display: flex; gap: 14px; align-items: flex-start; }
.cs-other .cs-sw { width: 40px; height: 32px; border-radius: 8px; border: 2px solid rgba(255,255,255,.25); background: var(--sc); flex: none; margin-top: 2px; }
.cs-other p { margin: 0 0 6px; }
/* How to display: three choices side by side */
.cs-row:not(.cs-prow):not(.cs-grow):not(.cs-orow) { grid-template-columns: minmax(200px, 440px) 70px 70px 340px 34px; }
.cs-radios { display: flex; gap: 6px; }
.cs-radios label { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 10px; border: 1px solid var(--line, #2a303b); border-radius: 999px; cursor: pointer; font-size: .9rem; white-space: nowrap; }
.cs-radios input { margin: 0; width: 15px; height: 15px; }
.cs-radios label:has(input:checked) { border-color: #3fa9f5; background: rgba(63,169,245,.14); font-weight: 700; }
/* Colour coding, round 3 */
.cs-radios label, .cs-radios label:has(input:checked) { border: 0; background: none; padding: 4px 6px; font-weight: 400; }
.cs-radios { gap: 10px; }
/* the square: as a line, a straight-topped bar along the bottom (the square's own corners round it); hidden, empty; as Other, grey */
.cs-row .cs-sw { position: relative; overflow: hidden; }
.cs-row .cs-sw.line { background: #141821; box-shadow: none; }
.cs-row .cs-sw.line::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--sc); }
.cs-row .cs-sw.blank { background: transparent; border-style: dashed; }
/* Other category */
.cs-other { margin: 10px 0 14px; align-items: center; }
.cs-other p { margin: 0; }
.cs-otick { margin: 0 0 6px; padding: 0; justify-content: flex-start; }
.cs-onote { margin: 0 0 14px; }
.cs-pop { grid-template-columns: repeat(6, 28px); }
.cs-pname { grid-column: 1 / -1; margin: 4px 0 0; font-size: .75rem; color: var(--mute, #8b95a5); }
.cs-row span.cs-sw.blank { background: transparent; border-style: dashed; }
.cs-modal a { color: #3fa9f5; }
.ed-tabs.side { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
/* The rail on the calendar and children's pictures works like on the widget screens: click to go to that screen */
.ed-frame.mock .ed-rail { pointer-events: auto; }
.ed-rb[data-page] { cursor: pointer; }
/* The screens list: ▲ ▼, a gap, then a bigger ✕ to delete. The screen's own red Delete button. */
.ed-page .pm button.pm-x { font-size: 17px; margin-left: 10px; padding: 0 4px; line-height: 1; }
.ed-page .pm button.pm-x:hover { color: #ef4444; }
.ed-head .ed-delpg { background: #ef4444; border-color: #ef4444; color: #fff; margin-left: 8px; }
.ed-head .ed-delpg:hover { background: #dc2626; }
/* Add a widget: a bigger heading, the how-to, the child's reward widget on its own row, a line, then the rest */
.ed-palette .ed-addh { font-size: 1.35rem; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 12px; }
.ed-palette .ed-how { margin: 0 0 16px; }
.ed-div { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
