/* 🏠 Boxes – the second EventEcosphere home layout (home.js). Light or dark from the device's setting.
   Everything here only applies while html[data-home=boxes]; the 🪐 Space ring (styles.css) is untouched. */
#boxes { display: none }
html[data-home=boxes] #space { display: none }
html[data-home=boxes] #boxes { display: block }

/* the 🪐 Space · 🏠 Boxes switch (also in the Space footer) – only when home.js is on */
.hometog { display: none }
html[data-home] .hometog { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass) }
.hometog button { min-height: 44px; min-width: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: inherit; font: 700 .92rem var(--body); cursor: pointer }
.hometog button[aria-pressed=true] { background: var(--sun); color: #062a26 }
.hometog button:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px }
#space footer .hometog { margin-top: 10px }

html[data-home=boxes] {
  --bx-bg: #f3f5f9; --bx-card: #ffffff; --bx-ink: #1d2330; --bx-muted: #5a6275; --bx-line: #dde2ec; --bx-sun: #0f7a6c; --bx-on: #fff;
  --ink: var(--bx-ink); --muted: var(--bx-muted); --line: var(--bx-line); --glass: var(--bx-card); --sun: var(--bx-sun); --sky: #2a6fdb;
  color-scheme: light; background: var(--bx-bg)
}
@media (prefers-color-scheme: dark) {
  html[data-home=boxes] {
    --bx-bg: #0e1322; --bx-card: #182036; --bx-ink: #eef2ff; --bx-muted: #a9b3d1; --bx-line: #2c3654; --bx-sun: #67e8d0; --bx-on: #062a26;
    --sky: #8fb8ff; color-scheme: dark
  }
}
html[data-home=boxes] body { background: var(--bx-bg); color: var(--bx-ink) }
html[data-home=boxes] .hometog button[aria-pressed=true] { background: var(--bx-sun); color: var(--bx-on) }

.bx { max-width: 1040px; margin: 0 auto; padding: 14px 16px 40px }
.bx a { color: inherit }
.bx-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
.bx :focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 10px }

/* header: name · 🔑 · ⠿, then 🔍, then the switch */
.bx-head { display: block }
.bx-top { display: flex; align-items: center; gap: 8px }
.bx-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; min-width: 0; flex: 1 }
.bx-logo { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; font-size: 1.35rem; background: color-mix(in srgb, var(--bx-sun) 18%, transparent) }
.bx-name { font: 600 1.3rem/1.1 var(--disp); letter-spacing: -.01em; white-space: nowrap }
.bx-name b { font-weight: 700; color: var(--bx-sun) }
.bx-signin { flex: none }
.bx-sib { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1.5px dashed var(--bx-line); background: var(--bx-card); color: var(--bx-ink); font: inherit; cursor: pointer }
.bx-sit { display: flex; flex-direction: column; line-height: 1.05; text-align: left }
.bx-sit b { font-size: .88rem } .bx-sit small { font-size: .7rem; color: var(--bx-muted); font-weight: 600 }
.bx-sinote { margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--bx-card); border: 1px solid var(--bx-line); font-size: .92rem }
.bx-sinote[hidden] { display: none }
#bxSites { flex: none; display: inline-flex }
.bx-find { position: relative; margin: 12px 0 10px }
.bx-fi { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 1rem; pointer-events: none }
.bx-find input { width: 100%; min-height: 48px; padding: 0 14px 0 42px; border-radius: 999px; border: 1.5px solid var(--bx-line); background: var(--bx-card); color: var(--bx-ink); font: 1rem var(--body); box-shadow: 0 2px 10px rgba(20,30,60,.05) }
.bx-find input::placeholder { color: var(--bx-muted) }
.bx-find input:focus-visible { outline: 3px solid var(--sky); outline-offset: 1px; border-radius: 999px }
.bx-head .hometog { margin: 0 0 14px }

/* ☀️ the banner – a card at a time, every card the height of the tallest */
.bx-banner { padding: 12px 14px 10px; border-radius: 22px; border: 1.5px solid var(--bx-line); background: var(--bx-card); box-shadow: 0 6px 24px rgba(20,30,60,.08); margin: 0 0 14px }
.bx-banner:empty { display: none }
.bx-btop { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 2px 8px }
.bx-bh { font-weight: 800; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; opacity: .8 }
.bx-bdate { font-size: .82rem; color: var(--bx-muted) }
.bx-stack { display: grid }
.bx-stack > .bx-slide { grid-area: 1 / 1 }
.bx-stack > .bx-slide[hidden] { display: flex !important; visibility: hidden; pointer-events: none }
.bx-slide { display: flex; align-items: center; gap: 14px; min-height: 104px; padding: 12px 12px 12px 14px; border-radius: 16px; border-left: 5px solid var(--tbc); text-decoration: none;
  background: linear-gradient(120deg, color-mix(in srgb, var(--tbc) 16%, transparent), color-mix(in srgb, var(--tbc) 4%, transparent)) }
.bx-sic { flex: none; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 1.8rem; background: color-mix(in srgb, var(--tbc) 22%, transparent) }
.bx-st { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px }
.bx-sk { font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: color-mix(in srgb, var(--tbc) 55%, var(--bx-ink)) }
.bx-sh { font-size: 1.12rem; line-height: 1.25; overflow-wrap: break-word }
.bx-sx { font-size: .93rem; color: var(--bx-muted); line-height: 1.35; overflow-wrap: break-word }
.bx-sa { flex: none; font-size: 1.6rem; color: var(--bx-muted) }
.bx-bnav { display: flex; align-items: center; gap: 6px; margin: 8px 0 0 }
.bx-bar { flex: 1; display: flex; gap: 4px }
.bx-seg { flex: 1; height: 44px; border: 0; padding: 0; background: none; cursor: pointer; position: relative }
.bx-seg::after { content: ""; position: absolute; left: 0; right: 0; top: 20px; height: 4px; border-radius: 2px; background: var(--bx-line) }
.bx-seg[aria-current=true]::after { background: var(--bx-sun) }
.bx-bb { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--bx-line); background: none; color: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer }

/* quick circles */
.bx-quick { display: flex; gap: 4px; justify-content: space-between; overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; padding: 2px }
.bx-quick a { flex: 1 1 0; min-width: 56px; max-width: 96px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; font-size: .74rem; font-weight: 600; text-align: center; line-height: 1.15 }
.bx-qi { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; font-size: 1.4rem; background: var(--bx-card); border: 1.5px solid var(--bx-line); box-shadow: 0 1px 0 rgba(0,0,0,.06) }
.bx-quick a:hover .bx-qi { border-color: var(--bx-sun) }

/* the square boxes, a few rows each */
.bx-boxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px }
@media (min-width: 720px) { .bx-boxes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px } }
.bx-box { display: flex; flex-direction: column; min-height: 252px; padding: 10px 10px 8px; border-radius: 20px; border: 1.5px solid rgba(var(--sqc), .35); min-width: 0;
  background: linear-gradient(160deg, rgba(var(--sqc), .13), rgba(var(--sqc), .03) 60%), var(--bx-card) }
.bx-box .bx-bh { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; min-height: 52px; font: 700 1.02rem/1.2 var(--disp); letter-spacing: 0; text-transform: none; color: var(--bx-ink); opacity: 1 }
.bx-bi { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-size: 1.25rem; background: rgba(var(--sqc), .2) }
.bx-bt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; text-wrap: balance }
.bx-rows { display: flex; flex-direction: column }
.bx-row { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 2px; border-top: 1px solid rgba(var(--sqc, 128,128,128), .22); text-decoration: none; border-radius: 0 }
.bx-rows > .bx-row:first-child { border-top: 0 }
a.bx-row:hover .bx-rt { text-decoration: underline; text-underline-offset: 3px }
.bx-ri { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font-size: 1rem; background: rgba(var(--sqc, 128,128,128), .16) }
.bx-rn { flex: 1; min-width: 0; display: flex; flex-direction: column }
.bx-rt { font-weight: 600; font-size: .9rem; line-height: 1.15; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: break-word }
.bx-rn small { font-size: .76rem; color: var(--bx-muted); line-height: 1.2; overflow-wrap: break-word }
.bx-more { margin-top: auto; align-self: flex-end; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-size: .82rem; font-weight: 700; color: var(--bx-muted); text-decoration: none }
.bx-more:empty { display: none }
.bx-for { margin: auto 2px 2px; font-size: .78rem; color: var(--bx-muted); line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden }
.bx-later .bx-soon { opacity: .75 }
.bx-pill { margin-top: auto; align-self: flex-start; font: 700 .72rem var(--body); letter-spacing: .05em; text-transform: uppercase; border: 1px solid var(--bx-line); border-radius: 999px; padding: 4px 10px; color: var(--bx-muted) }
@media (min-width: 720px) { .bx-quick { justify-content: flex-start; gap: 14px } .bx-quick a { flex: 0 0 88px } }
@media (max-width: 419px) { .bx-logo { display: none } .bx-name { font-size: 1.16rem } .bx-sib { padding: 0 10px } }
@media (max-width: 374px) { .bx-rt { font-size: .84rem } .bx-name { font-size: 1.02rem } .bx-box { padding: 8px 8px 6px } }

/* 🔍 results – while searching, the boxes step aside */
.bx-results { padding: 6px 12px 8px; border-radius: 20px; border: 1.5px solid var(--bx-line); background: var(--bx-card); margin: 0 0 14px }
.bx-results[hidden] { display: none }
.bx-rh { margin: 6px 2px; font-weight: 700; color: var(--bx-muted) }
.bx-results .bx-row { --sqc: 43,160,140 }
.bx-finding .bx-banner, .bx-finding .bx-quick, .bx-finding .bx-boxes { display: none }

.bx-foot { margin-top: 28px; color: var(--bx-muted); font-size: .9rem; text-align: center }

/* 📅 EVENTBOXES – one box per event (home.js). The tool boxes (#bxBoxes) stay in the page for 🔍 search only. */
html[data-evboxes] #bxBoxes { display: none }
.bx-finding #bxEvWrap { display: none }
.bx-evbox { min-height: 0 }
.bx-evh { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 52px; padding: 2px 2px 4px; text-decoration: none }
.bx-evh .bx-bt { font: 700 1.05rem/1.2 var(--disp); overflow-wrap: anywhere }
.bx-evh:hover .bx-bt { text-decoration: underline; text-underline-offset: 3px }
.bx-evw { font-size: .78rem; color: var(--bx-muted); line-height: 1.25 }
.bx-cd { align-self: flex-start; margin: 0 2px 6px; padding: 3px 10px; border-radius: 999px; font: 700 .76rem/1.3 var(--body); background: rgba(var(--sqc), .2); color: var(--bx-ink) }
.bx-cd-on { background: #d9822b; color: #fff }
.bx-cd-done, .bx-cd-tbc { background: none; border: 1px dashed var(--bx-line); color: var(--bx-muted) }
.bx-num { font-weight: 700; color: color-mix(in srgb, rgb(var(--sqc)) 55%, var(--bx-ink)) }
.bx-evbox .bx-soon .bx-rt, .bx-evbox .bx-soon .bx-ri { opacity: .6 }
.bx-done { opacity: .85 }
.bx-co .bx-rows { margin-top: 2px }
.bx-seed { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; min-height: 120px; padding: 16px; border-radius: 20px; border: 2px solid var(--bx-sun); cursor: pointer; text-align: left; font: inherit; color: var(--bx-ink);
  background: linear-gradient(120deg, color-mix(in srgb, var(--bx-sun) 18%, transparent), color-mix(in srgb, var(--bx-sun) 5%, transparent)), var(--bx-card) }
.bx-seedi { flex: none; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 2rem; background: color-mix(in srgb, var(--bx-sun) 22%, transparent) }
.bx-seedt { display: flex; flex-direction: column; gap: 4px; min-width: 0 }
.bx-seedt b { font: 700 1.25rem/1.2 var(--disp) }
.bx-seedt small { font-size: .9rem; color: var(--bx-muted); line-height: 1.35 }
.bx-fill { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; margin: 0 0 10px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--bx-sun); background: var(--bx-card); color: var(--bx-ink); font: 700 .95rem var(--body); cursor: pointer; text-align: left }
.bx-seedmsg { margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--bx-card); border: 1px solid var(--bx-line); font-size: .92rem }
.bx-seedmsg[hidden] { display: none }
.bx-past { margin-top: 14px }
.bx-past > summary { display: flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--bx-line); background: var(--bx-card); font-weight: 700; cursor: pointer; list-style: none }
.bx-past > summary::-webkit-details-marker { display: none }
.bx-past > summary::before { content: "▸"; margin-right: 8px; color: var(--bx-muted) }
.bx-past[open] > summary::before { content: "▾" }
.bx-past > .bx-boxes { margin-top: 10px }

/* 🔑 ECO_AUTH: the account button (eco-account.js) in the header, and the line above the event boxes */
.bx-signin .ecoa { color: var(--bx-ink) }
.bx-sib[hidden] { display: none }
.bx-cloud { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 12px; font-size: .92rem; color: var(--bx-muted) }
.bx-cloudb { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--bx-sun); background: var(--bx-card); color: var(--bx-ink); font: 600 .95rem var(--body, inherit); cursor: pointer }
.bx-wait { grid-column: 1 / -1; margin: 0; padding: 18px 16px; border-radius: 20px; border: 1.5px dashed var(--bx-line); background: var(--bx-card); color: var(--bx-muted) }
/* 🔑 ECO_SIGNEDOUT: events kept on this device only */
.bx-devonly { background: color-mix(in srgb, var(--bx-sun) 16%, transparent); border-radius: 14px; padding: 8px 10px; color: var(--bx-ink) }
.bx-devchip { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border-radius: 999px; background: var(--bx-card); border: 1.5px solid var(--bx-line); font-weight: 700; font-size: .88rem }
/* 📚 ECO_HOMESECS: the event's own sections on its box, the built-in tools in a smaller group underneath */
.bx-secs .bx-row small { font-weight: 400 }
.bx-nosec { margin: 2px 2px 0; font-size: .8rem; color: var(--bx-muted) }
.bx-toolh { margin: 10px 2px 4px; padding-top: 8px; border-top: 1px solid rgba(var(--sqc, 128,128,128), .22); font: 700 .7rem/1.2 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--bx-muted) }
.bx-tools { display: flex; flex-wrap: wrap; gap: 6px }
.bx-tool { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 10px; border-radius: 10px; font-size: .8rem; font-weight: 600; text-decoration: none; color: var(--bx-ink); background: rgba(var(--sqc, 128,128,128), .12) }
.bx-tool:hover .bx-tt { text-decoration: underline; text-underline-offset: 3px }
.bx-tool small { font-size: .72rem; font-weight: 400; color: var(--bx-muted) }
/* 🎯 ECO_QUICKPICK: "Which event?" under the quick circles */
.bx-pick { --sqc: 43,160,140; margin: -4px 0 14px; padding: 10px 12px 12px; border: 1px solid var(--bx-line); border-radius: 16px; background: var(--bx-card) }
.bx-pickh { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: .9rem }
.bx-pickh b { margin-right: auto }
.bx-pickx { flex: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: none; color: var(--bx-muted); font-size: 1rem; cursor: pointer }
.bx-picks { display: flex; flex-wrap: wrap; gap: 6px }
.bx-pick .bx-tool { flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; padding: 4px 12px }
.bx-finding .bx-pick { display: none }
/* 🧩 ECO_ONE: an event box is one link; the active ones first, the rest in a closed row */
a.bx-one { display: flex; flex-direction: column; text-decoration: none; color: inherit; min-height: 0 }
a.bx-one .bx-bt { font: 700 1.05rem/1.2 var(--disp); overflow-wrap: anywhere; margin: 2px 2px 2px }
a.bx-one .bx-evw { margin: 0 2px 6px }
a.bx-one:hover .bx-bt { text-decoration: underline; text-underline-offset: 3px }
.bx-keys { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 2px 0 }
.bx-key { font-size: .76rem; padding: 2px 9px; border-radius: 999px; background: rgba(var(--sqc, 128,128,128), .14); color: var(--bx-ink) }
.bx-onebar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 12px 0 0 }
.bx-manage { color: var(--bx-muted); font-size: .88rem; min-height: 44px; display: inline-flex; align-items: center }
.bx-acts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 14px; margin: 0 0 10px }
.bx-act { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer }
.bx-act input { width: 22px; height: 22px; flex: none }
