/* Shared UI kit for the admin screen and the account family (login, billing, operator, help, legal).
   Loaded after theme-ref.css; it only uses the tokens defined there (--accent, --ink, --muted, --line, --field ...) and a few --ui-* helpers.
   Direction: white page, one electric blue, bold black Gothic headings, 10px fields, 14px cards. No religious symbols. Motion 150/250 ms, off under reduced-motion. */
:root{
  --ui-ok-bg:#E6F5EF; --ui-ok-ink:#0E6B4D; --ui-wait-ink:#7A4E00; --ui-line-soft:#EDF1F7; --ui-bar:#F7F9FC;
  --ui-fast:150ms; --ui-slow:250ms; --ui-ease:cubic-bezier(.2,.7,.2,1);
  --ui-ring:0 0 0 3px rgba(10,102,255,.35);
}

/* ---------------------------------------------------------------- icons (inline SVG sprite, one stroke width everywhere) */
.ic{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}
.ic.sm{width:16px;height:16px}
.ic.lg{width:24px;height:24px}
.spritebox{position:absolute;width:0;height:0;overflow:hidden}

/* keyboard focus that is always visible */
:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid rgba(10,102,255,.5);outline-offset:2px}
input:focus-visible,select:focus-visible,textarea:focus-visible{outline:0;box-shadow:0 0 0 4px rgba(10,102,255,.2)}

/* ---------------------------------------------------------------- header: white, wordmark + page links left, account right */
header.top{position:sticky;top:0;z-index:30;display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;min-height:60px;padding:8px clamp(14px,2.4vw,28px);background:#fff;border-bottom:1px solid var(--line);backdrop-filter:none;-webkit-backdrop-filter:none}
header.top .brand{display:inline-flex;align-items:center;gap:10px;margin:0 10px 0 0;font-size:1.2rem;white-space:nowrap}
header.top .adminlink{margin:0;display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:6px 14px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);font-weight:600;font-size:.92rem;text-decoration:none;transition:background var(--ui-fast),border-color var(--ui-fast)}
header.top .adminlink:hover{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-dark)}
header.top #userbox{margin-left:auto;display:flex;align-items:center;gap:10px;font-size:.9rem;min-width:0}
header.top #userbox .muted{max-width:16ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
header.top #userbox button:not(.flag){min-height:40px;padding:6px 14px;font-size:.9rem;border-radius:10px}
header.top .langflags .flag{min-height:0;width:36px;height:28px;padding:2px;border-radius:6px}
header.top #userbox select{min-height:40px;padding:6px 10px;font-size:.9rem}
@media (max-width:640px){
  header.top{position:static;padding:8px 12px;gap:8px}
  header.top .brand{flex:1 1 100%;margin:0;font-size:1.1rem}
  header.top .adminlink{flex:1 1 auto;justify-content:center;min-height:44px;padding:6px 10px;font-size:.88rem}
  header.top #userbox{flex:1 1 100%;margin-left:0;justify-content:space-between;padding-top:6px;border-top:1px solid var(--ui-line-soft)}
  header.top #userbox .muted{display:none}
  header.top .adminlink{padding:6px 8px;font-size:.84rem;white-space:nowrap}
}
header.top .moremenu{display:none!important}

/* ---------------------------------------------------------------- status badges: colour + a dot, so state never relies on colour alone */
.badge{display:inline-flex;align-items:center;gap:6px;margin-left:8px;padding:3px 10px;border-radius:99px;font-size:.78rem;font-weight:700;line-height:1.5;vertical-align:middle;white-space:nowrap;background:var(--field);color:var(--muted)}
.badge::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor;flex:none}
.badge.b-ok,.badge.s-active{background:var(--ui-ok-bg);color:var(--ui-ok-ink)}
.badge.b-wait{background:var(--warn-bg);color:var(--ui-wait-ink)}
.badge.b-no,.badge.s-deleted{background:var(--err-bg);color:var(--err)}
.badge.s-suspended{background:var(--warn-bg);color:var(--ui-wait-ink)}
.badge.b-info{background:var(--accent-soft);color:var(--accent-dark)}

/* feedback lines: an icon, not a typed glyph */
.msg.ok::before,.msg.err::before,.msg.warn::before{content:"";display:inline-block;width:1.05em;height:1.05em;margin-right:6px;vertical-align:-.17em;background:currentColor;-webkit-mask:var(--g) center/contain no-repeat;mask:var(--g) center/contain no-repeat}
.msg.ok{color:var(--ui-ok-ink);font-weight:600;--g:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7'/%3E%3C/svg%3E")}
.msg.err{--g:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4l9 16H3L12 4zM12 10v4M12 17.2v.1'/%3E%3C/svg%3E");font-weight:600}
.msg.warn{--g:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v5M12 16.2v.1'/%3E%3C/svg%3E");font-weight:600;color:var(--ui-wait-ink)}
.ferr{font-weight:600}
input[aria-invalid=true],select[aria-invalid=true],textarea[aria-invalid=true]{border-color:var(--err);background:var(--err-bg)}

/* danger: outlined red, solid only inside a confirmation */
button.danger{background:#fff;color:var(--err);border:1.5px solid color-mix(in srgb,var(--err) 50%,#fff)}
button.danger:hover:not(:disabled){background:var(--err-bg);border-color:var(--err)}
button.danger.solid{background:var(--err);color:#fff;border-color:var(--err)}
button.danger.solid:hover:not(:disabled){background:#A61F1F}

/* loading skeleton: matches the shape of a list row */
@keyframes ui-shimmer{from{background-position:120% 0}to{background-position:-20% 0}}
.skel{display:block;height:64px;margin:0 0 10px;border-radius:12px;border:1px solid var(--ui-line-soft);background:linear-gradient(100deg,var(--field) 30%,#fff 50%,var(--field) 70%) 120% 0/220% 100%;animation:ui-shimmer 1.4s linear infinite}
.skel.tall{height:112px}
@media (prefers-reduced-motion:reduce){.skel{animation:none;background:var(--field)}}

/* empty state: a quiet dashed box that says what to do next */
.emptynote{display:flex;align-items:center;gap:12px;margin:8px 0 4px;padding:18px 18px;border:1.5px dashed #C3CDDE;border-radius:12px;background:var(--ui-bar);color:var(--muted);font-size:.95rem}
.emptynote::before{content:"";flex:none;width:36px;height:36px;border-radius:10px;background:var(--accent-soft) center/20px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A66FF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E")}

/* ======================================================================== ADMIN ======================================================================== */
body.admin{background:#F7F9FC}
body.admin main{padding-top:22px;padding-bottom:60px}

/* left table of contents: icon + label, the current section carries a blue bar */
body.admin nav.toc{border-radius:14px;box-shadow:none;background:#fff}
.toc summary{padding:14px 18px;font-weight:800;font-size:.8rem;letter-spacing:.04em;color:var(--muted);text-transform:none}
.toc summary::after{content:"";float:right;width:16px;height:16px;margin-top:3px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;transition:transform var(--ui-fast)}
.toc details[open] summary::after{content:"";transform:rotate(180deg)}
.toc a{gap:10px;min-height:44px;padding:6px 12px;border-radius:10px;border-left:0;color:var(--ink);font-weight:600;font-size:.95rem;position:relative;transition:background var(--ui-fast),color var(--ui-fast)}
.toc a .ic{color:var(--muted);transition:color var(--ui-fast)}
.toc a:hover{background:var(--ui-line-soft)}
.toc a:hover .ic{color:var(--ink)}
.toc a.on{background:var(--accent-soft);color:var(--accent-dark);font-weight:800}
.toc a.on:not(:hover){color:var(--accent-dark)}
.toc a.on .ic{color:var(--accent)}
.toc a.on::before{content:"";position:absolute;left:-8px;top:10px;bottom:10px;width:3px;border-radius:3px;background:var(--accent)}
@media (max-width:1179px){
  body.admin nav.toc{box-shadow:0 6px 18px rgba(12,30,70,.08)}
  .toc a.on::before{left:0}
}
@media (max-width:1179px){.toc ol{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}}

/* cards: a titled panel with an icon tile, an optional state badge, then fields, then one footer line */
body.admin .card{--cpx:28px;--cpb:0px;padding:24px var(--cpx) var(--cpb);margin:0 0 18px;border-radius:14px;box-shadow:0 1px 2px rgba(12,30,70,.04);overflow:visible}
@media (min-width:1180px){body.admin .card{padding:26px var(--cpx) var(--cpb)}}
@media (max-width:640px){body.admin .card{--cpx:16px;padding:18px var(--cpx) var(--cpb)}}
body.admin .card>h2:first-child{display:block;margin:0 0 14px;padding-bottom:14px;border-bottom:1px solid var(--ui-line-soft);font-size:1.3rem;line-height:1.3}
body.admin .card>h2 .hic{display:inline-flex;vertical-align:middle;margin:0 12px 4px 0;align-items:center;justify-content:center;width:38px;height:38px;flex:none;border-radius:10px;background:var(--accent-soft);color:var(--accent)}
body.admin .card>h2 .hic .ic{width:20px;height:20px}
body.admin .card>h2 .badge{margin-left:8px;vertical-align:middle}
body.admin .card>h2 .helpbtn{margin-left:6px;vertical-align:middle}
body.admin .card h3{margin:20px 0 8px;font-size:1rem;font-weight:800}
body.admin .card>.grid,body.admin .card>.row,body.admin .card>label,body.admin .card>.fieldrow{margin-bottom:12px}
body.admin .card label{display:block}
body.admin .card label.inline{display:flex}
body.admin .card label .muted{font-weight:500;font-size:.86rem}
body.admin .grid{gap:0 18px}
body.admin .card>.row:last-child:not(.cardbar){margin-bottom:22px}
body.admin .card>:last-child:not(.cardbar){margin-bottom:22px}

/* the footer line: state on the left, secondary actions, then the one blue button; sits on the card edge */
.cardbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px 10px;margin:22px calc(var(--cpx,28px)*-1) 0;padding:14px var(--cpx,28px);border-top:1px solid var(--line);background:var(--ui-bar);border-radius:0 0 14px 14px}
.cardbar>*{margin:0}
.cardbar>span,.cardbar>p{order:-1;flex:1 1 12rem;min-width:0;font-size:.9rem}
.cardbar>button,.cardbar>a{order:2}
.cardbar>button.ghost,.cardbar>a.button,.cardbar>a.btnlink{order:1}
.cardbar>button.primary{order:3;min-height:48px;font-size:1rem;padding:0 22px}
.cardbar .dirtytag{order:-2;flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:99px;background:var(--warn-bg);color:var(--ui-wait-ink);font-size:.8rem;font-weight:700}
.cardbar .dirtytag::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}
.cardbar .dirtytag[hidden]{display:none}
.card.dirty{border-color:#E4C16B}
@media (max-width:640px){.cardbar>button.primary{flex:1 1 100%;order:4}.cardbar>button.ghost{flex:1 1 auto}}

/* first-time setup chips: 1 > 2 > 3 > 4, the next one is the loud one */
ol.setupchips{gap:12px;grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}
.schip>span:nth-child(2){min-width:0;flex:1 1 auto}
.schip small{flex:none;white-space:nowrap}
.schip{border-radius:12px;border:1.5px solid var(--line);background:#fff;transition:border-color var(--ui-fast),background var(--ui-fast),transform var(--ui-fast)}
.schip:hover{border-color:var(--accent);background:var(--accent-soft)}
.schip:active{transform:scale(.985)}
.schip .n{border:1.5px solid #B9C6DC;background:#fff;color:var(--muted);font-weight:800}
.schip.done{border-color:#BFE3D4;background:var(--ui-ok-bg)}
.schip.done .n{background:var(--ui-ok-ink);border-color:var(--ui-ok-ink)}
.schip.done small{color:var(--ui-ok-ink);font-weight:700}
.schip.next{border:2px solid var(--accent);background:var(--accent-soft);box-shadow:none}
.schip.next .n{background:var(--accent);border-color:var(--accent);color:#fff}
.schip small{color:var(--muted);font-weight:600}
#setupCard.alldone{padding-top:14px}
#setupCard .firstrunrow{margin:0 0 14px}

/* connection state (Drive): a status panel, not a stripe */
body.admin #keyState.step{display:flex;align-items:center;gap:10px;margin:0 0 16px;padding:12px 16px;border:1px solid var(--line);border-left:4px solid var(--warn);border-radius:10px;background:var(--warn-bg);color:var(--ui-wait-ink);font-weight:600}
body.admin #keyState.step.done{border-color:#BFE3D4;border-left-color:var(--ok);background:var(--ui-ok-bg);color:var(--ui-ok-ink)}
body.admin #keyState.step.now{border-color:#C9DCFF;border-left-color:var(--accent);background:var(--accent-soft);color:var(--accent-dark)}
body.admin #keyState .row{margin:0 0 0 auto}
body.admin .card details{border:1px solid var(--line);border-radius:12px;background:#fff;margin:0 0 14px}
body.admin .card details>summary{display:flex;align-items:center;gap:8px;min-height:48px;padding:10px 16px;font-weight:700;cursor:pointer;list-style:none;border-radius:12px}
body.admin .card details>summary::-webkit-details-marker{display:none}
body.admin .card details>summary::before{content:"";width:16px;height:16px;flex:none;background:var(--muted);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;transition:transform var(--ui-fast)}
body.admin .card details[open]>summary::before{transform:rotate(90deg)}
body.admin .card details[open]>summary{border-bottom:1px solid var(--ui-line-soft);border-radius:12px 12px 0 0}
body.admin .card details>:not(summary){margin-left:16px;margin-right:16px}
body.admin .card details>ol,body.admin .card details>ul{padding-left:20px}
body.admin .card details>:last-child{margin-bottom:14px}
body.admin .card details>summary+*{margin-top:12px}
body.admin ul.steps-list.test{margin-top:14px;list-style:none;padding:0;display:grid;gap:6px}
body.admin ul.steps-list.test:empty{display:none}
body.admin ul.steps-list.test li{padding:9px 12px 9px 14px;border-radius:10px;background:var(--ui-bar);border-left:4px solid var(--line);margin:0}
body.admin ul.steps-list.test li.ok{border-left-color:var(--ok);background:var(--ui-ok-bg);color:var(--ui-ok-ink)}
body.admin ul.steps-list.test li.no{border-left-color:var(--err);background:var(--err-bg);color:var(--err)}

/* chips = quick presets */
.chips{gap:8px}
.chip.btn,.chip{font-weight:600;transition:background var(--ui-fast),border-color var(--ui-fast),color var(--ui-fast)}
.fieldrow .fl{font-size:.85rem;font-weight:700;color:var(--muted);margin-bottom:6px}

/* ---- list rows: one pattern for programs, events, people, members, styles ---- */
body.admin .item{position:relative;gap:10px 12px;padding:14px 16px;margin:0 0 10px;border:1px solid var(--line);border-radius:12px;background:#fff;transition:border-color var(--ui-fast),box-shadow var(--ui-fast)}
body.admin .item:hover,body.admin .item:focus-within{border-color:#B9C6DC;box-shadow:0 2px 10px rgba(12,30,70,.06)}
body.admin .item>div>.row:first-child{margin:0 0 10px;gap:8px 10px}
body.admin .item>div>.row:first-child strong{font-size:1.08rem;font-weight:800}
body.admin .item .row .muted{font-size:.88rem}
body.admin .item .x{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;padding:0;font-size:0;line-height:0;border-radius:10px;color:var(--muted);background:none;opacity:.55;transition:opacity var(--ui-fast),background var(--ui-fast),color var(--ui-fast)}
body.admin .item .x::before{content:"";width:18px;height:18px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M10 11v6M14 11v6M6 7l1 13h10l1-13M9 7V4h6v3'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M10 11v6M14 11v6M6 7l1 13h10l1-13M9 7V4h6v3'/%3E%3C/svg%3E") center/contain no-repeat}
body.admin .item:hover .x,body.admin .item:focus-within .x,body.admin .item .x:focus-visible{opacity:1}
body.admin .item .x:hover{background:var(--err-bg);color:var(--err)}
@media (hover:none),(max-width:640px){body.admin .item .x{opacity:1}}
/* item footer: actions on the item's own bottom edge */
body.admin .item .cardbar,body.admin .item .itembar{--cpx:16px;margin:14px -16px -14px;padding:12px 16px}
body.admin .item.personrow{padding:10px 12px;margin-bottom:8px;align-items:center}
body.admin .item.personrow select,body.admin .item.personrow input{min-height:44px;padding:8px 12px}
body.admin .item.personrow .x{opacity:0}
body.admin .item.personrow:hover .x,body.admin .item.personrow:focus-within .x{opacity:1}
@media (hover:none),(max-width:640px){body.admin .item.personrow .x{opacity:1}}
.listhead{display:grid;grid-template-columns:8.5rem minmax(0,1fr) minmax(0,13rem) 44px;gap:8px;padding:0 12px 6px;font-size:.78rem;font-weight:800;letter-spacing:.02em;color:var(--muted)}
.listhead>span:first-child{padding-left:2px}
@media (max-width:640px){.listhead{display:none}}
.personrow.odd{border-color:#E4C16B}
#peopleFind{max-width:340px;margin:0 0 12px}
#peopleList:empty,#memberList:empty{display:none}

/* ---- draggable-looking order list ---- */
body.admin ul.ord{display:grid;grid-template-columns:minmax(0,1fr);gap:6px}
body.admin ul.ord li{display:flex;flex-wrap:wrap;min-width:0;align-items:center;gap:8px;min-height:48px;padding:6px 8px 6px 14px;border:1px solid var(--line);border-radius:10px;background:#fff;margin:0;transition:border-color var(--ui-fast),background var(--ui-fast)}
body.admin ul.ord li:hover{border-color:#B9C6DC}
body.admin ul.ord li.off{background:var(--ui-bar);color:var(--muted)}
body.admin ul.ord li .lbl{flex:1 1 140px;min-width:0;overflow-wrap:anywhere;font-weight:600}
body.admin ul.ord li button{min-height:40px;min-width:40px;padding:0 10px;background:var(--field);font-size:.9rem}
body.admin ul.ord li.cust{border-left:3px solid var(--accent)}

/* ---- tables: quiet header, comfortable rows, numbers aligned; phones get cards ---- */
body.admin table{font-size:.93rem}
body.admin th{padding:10px 12px;background:var(--ui-bar);color:var(--muted);font-size:.78rem;font-weight:800;letter-spacing:.02em;border-bottom:1px solid var(--line);white-space:nowrap}
body.admin td{padding:11px 12px;border-bottom:1px solid var(--ui-line-soft);vertical-align:middle}
body.admin tbody tr{transition:background var(--ui-fast)}
body.admin tbody tr:hover{background:var(--accent-soft)}
body.admin tbody tr:last-child td{border-bottom:0}
body.admin .tblwrap{margin-top:12px;border:1px solid var(--line);border-radius:12px;background:#fff}
body.admin .tblwrap table{margin:0}
body.admin .tblwrap thead th:first-child{border-top-left-radius:11px}
body.admin .tblwrap thead th:last-child{border-top-right-radius:11px}
#rpTable td:last-child{min-width:12rem}
@media (max-width:640px){
  #rpTable,#rpTable tbody,#rpTable tr,#rpTable td{display:block}
  #rpTable thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  #rpTable tr{padding:12px 14px;border-bottom:1px solid var(--line)}
  #rpTable tr:last-child{border-bottom:0}
  #rpTable td{display:flex;justify-content:space-between;gap:14px;padding:3px 0;border:0;text-align:right}
  #rpTable td::before{content:attr(data-label);flex:none;color:var(--muted);font-size:.82rem;text-align:left}
  #rpTable td:first-child{font-weight:800;font-size:1rem;justify-content:flex-start}
  #rpTable td:first-child::before{display:none}
  #rpTable td:last-child{min-width:0}
}

/* style cards (스타일) */
body.admin .styleitems{gap:12px}
body.admin .styleitem{border-radius:12px;border:1.5px solid var(--line);transition:border-color var(--ui-fast),box-shadow var(--ui-fast)}
body.admin .styleitem:hover{border-color:#B9C6DC;box-shadow:0 2px 10px rgba(12,30,70,.06)}
body.admin .styleitem.active{border-color:var(--accent);background:var(--accent-soft);box-shadow:none}
body.admin .stylegroup>.subh{font-size:.8rem;font-weight:800;letter-spacing:.03em;color:var(--muted);margin:18px 0 8px}

/* ---- danger zone ---- */
.dangerzone{margin:18px 0 6px;border:1.5px solid color-mix(in srgb,var(--err) 40%,#fff);border-radius:12px;background:#fff}
body.admin .card details.dangerzone>summary{color:var(--err);border-radius:10px}
body.admin .card details.dangerzone[open]>summary{border-bottom-color:color-mix(in srgb,var(--err) 20%,#fff)}
body.admin .card details.dangerzone>summary::before{background:var(--err)}
.dangerzone .row{margin:10px 0 14px}
.dangerzone input{max-width:320px}
.datarow{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px}
.datarow a{font-weight:600}

body.admin a.button{border-radius:10px;font-weight:700;min-height:48px;transition:background var(--ui-fast),border-color var(--ui-fast)}
body.admin a.button:hover{background:var(--accent-soft)}
.tbox{max-width:100%}
@media (max-width:640px){
  body.admin main{padding-left:12px;padding-right:12px}
  body.admin .grid{grid-template-columns:minmax(0,1fr)}
  body.admin .grid.two{grid-template-columns:minmax(0,1fr)}
  button.small{min-height:44px}
}
@media (prefers-reduced-motion:reduce){*{transition-duration:.001ms!important;animation-duration:.001ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important}}

/* people list: header row and the empty note only show when they mean something */
.listhead:has(~ #peopleList:empty){display:none}
#peopleList:not(:empty)+.emptynote{display:none}
body.admin .item.progitem{grid-template-columns:minmax(0,1fr)}
body.admin .card>.cardbar{margin-bottom:0}
#memberList .item select{max-width:240px}
#memberList .item>.ghost,#memberList .item>button{min-height:44px;align-self:center}

/* ---------------- welcome (first Sunday guide) ---------------- */
.whero{border-radius:14px;background:var(--accent-soft);border-color:#D5E3FB}
.whero::after{display:none}
.whero h1{color:var(--ink);font-weight:800;letter-spacing:-.03em}
.wring{font-weight:800}
.wstep{border-radius:14px;transition:border-color 150ms,box-shadow 150ms}
.wstep:hover{transform:none;box-shadow:var(--shadow);border-color:#B9C6DC}
.wstep .wicon{border-radius:12px;background:var(--accent-soft);color:var(--accent)}
.wstep h2{font-weight:800}
.wstep .wnum{color:var(--muted);font-weight:700}
.wstep.done{background:var(--ui-ok-bg,var(--accent-soft));border-color:#BFE3D4}
.wstep.done .wicon{background:var(--ok);color:#fff}
.wstate{color:var(--ui-ok-ink,var(--ok))}
@media (max-width:640px){
  body.admin .item.personrow>input.pn,body.admin .item.personrow>.tslot{grid-column:1/-1}
  body.admin .item.personrow>.x{grid-column:2;grid-row:1}
  body.admin .item .row:has(> .inline){gap:4px 14px}
}
