/* CYP portal - the DYP portal's layout and card language, in CYP's palette
   and Inter. Loaded after cyp.css. Everything keys off the same tokens. */

:root { --hdrH: 60px; --heading: "Inter", -apple-system, system-ui, sans-serif; }
::selection { background: var(--text); color: var(--bg); }
body { overflow-y: scroll; }
body.fp-open { overflow: hidden; }

/* ---- header ---- */
.hdr { position: fixed; top: 0; left: 0; right: 0; z-index: 45; }
.hdr nav { display: flex; gap: 22px; align-items: center; margin-left: 28px; }
.hdr nav a { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-bottom: 2px; border-bottom: 1px solid transparent; }
.hdr nav a.active { color: var(--text); border-bottom-color: var(--text); }
.hdr nav a:hover { color: var(--text); }
.hdr-left { display: flex; align-items: center; }
.brand .cx { color: var(--muted); font-size: 13px; margin: 0 2px; }
.brand .g-logo { max-height: 30px; max-width: 150px; height: auto; width: auto; display: none; }
html:not(.dark) .brand .g-logo.gl-light { display: block; }
html.dark .brand .g-logo.gl-dark { display: block; }
.brand .g-name { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
main { padding: calc(var(--hdrH) + 30px) 40px 80px; max-width: 1500px; margin: 0 auto; }

/* ---- title row ---- */
.title-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }
.pt-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.page-title { font-family: var(--heading); font-weight: 600; font-size: 26px; letter-spacing: .14em; text-transform: uppercase; }
.page-sub { color: var(--muted); font-size: 13px; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid color-mix(in srgb, var(--green) 45%, transparent); background: var(--green-bg); color: var(--green); border-radius: 999px; padding: 5px 12px; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.gb-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: gbPulse 2s ease-out infinite; }
@keyframes gbPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 45%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.title-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.icon-row { display: flex; gap: 10px; }
.icon-btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 14px 10px; min-width: 104px; max-width: 128px;
  background: transparent; border: 1px solid var(--line); border-radius: 12px;
  color: var(--muted); cursor: pointer; font-family: inherit; text-align: center;
  font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; line-height: 1.5;
  transition: color .15s, border-color .15s, background .15s;
}
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.icon-btn:hover { color: var(--text); border-color: var(--faint); background: var(--panel); }
.icon-btn.mode-on, .icon-btn.mode-on:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.icon-btn:disabled { opacity: .4; cursor: default; }
#sheetCancelBtn, #sheetConfirmBtn, #sheetEditBtn, #sheetCreateBtn, #galleryExitBtn { display: none; }
body.sheet-mode #sheetCancelBtn, body.sheet-mode #sheetConfirmBtn { display: inline-flex; }
body.sheet-mode #addBtn, body.sheet-mode #galleryViewBtn, body.sheet-mode #sheetEditBtn, body.sheet-mode #sheetCreateBtn { display: none !important; }
body.sheet-hub #sheetEditBtn, body.sheet-hub #sheetCreateBtn { display: inline-flex; }
body.sheet-hub #addBtn, body.sheet-hub #galleryViewBtn { display: none !important; }
body.gallery-view #addBtn, body.gallery-view #galleryViewBtn { display: none !important; }
body.gallery-view:not(.guser) #galleryExitBtn { display: inline-flex; }
body.guser #galleryViewBtn, body.guser #addBtn, body.guser #galleryExitBtn { display: none !important; }
body.guser .hdr nav .team-only { display: none; }

/* ---- toolbar ---- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.toolbar input[type="text"], .toolbar select, .sh-controls input[type="text"], .sh-controls select {
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  padding: 0 14px; height: 42px; font-size: 13px; outline: none; min-width: 140px; border-radius: 10px;
}
.toolbar input:focus, .toolbar select:focus, .sh-controls input:focus, .sh-controls select:focus { border-color: var(--faint); }
.search-wrap { position: relative; display: flex; flex: 1; min-width: 220px; }
.search-wrap input[type="text"] { flex: 1; width: 100%; min-width: 0; padding-right: 82px; }
.search-clear { display: none; position: absolute; right: 9px; top: 50%; transform: translateY(-50%); height: 26px; align-items: center; padding: 0 12px; background: var(--text); color: var(--bg); border: none; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.search-wrap.has-text .search-clear { display: inline-flex; }
.toolbar select, .sh-controls select { appearance: none; -webkit-appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; background-size: 10px; }
.filter-btn { background: var(--panel); border: 1px solid var(--line); color: var(--text); padding: 0 18px; height: 42px; font-size: 12px; font-weight: 600; cursor: pointer; letter-spacing: .1em; text-transform: uppercase; font-family: inherit; display: inline-flex; align-items: center; gap: 10px; border-radius: 10px; }
.filter-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linejoin: round; }
.filter-btn:hover { border-color: var(--faint); }
.filter-btn .chev { color: var(--muted); font-size: 10px; transition: transform .15s; }
.filter-btn.open .chev { transform: rotate(180deg); }
.f-count { display: none; background: var(--text); color: var(--bg); border-radius: 20px; font-size: 11px; font-weight: 700; padding: 1px 8px; }
.f-count.on { display: inline-block; }
.f-x { display: none; color: var(--muted); font-size: 10.5px; font-weight: 700; line-height: 1; border: 1px solid var(--line); border-radius: 20px; padding: 4px 9px; cursor: pointer; letter-spacing: .08em; }
.f-x:hover { color: var(--text); border-color: var(--faint); }
.f-x.on { display: inline-block; }
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.vt-btn { background: var(--panel); border: none; color: var(--muted); height: 40px; padding: 0 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-family: inherit; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.vt-btn + .vt-btn { border-left: 1px solid var(--line); }
.vt-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.vt-btn.on { background: var(--text); color: var(--bg); }
.sortbox { display: inline-flex; align-items: stretch; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.sb-lbl { display: flex; align-items: center; padding: 0 3px 0 13px; white-space: nowrap; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.toolbar .sortbox select { background-color: transparent; border: none; border-radius: 0; min-width: 0; height: 40px; padding: 0 32px 0 8px; }
.sb-dir { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; background: transparent; border: none; border-left: 1px solid var(--line); color: var(--text); font-family: inherit; font-size: 12px; height: 40px; padding: 0 13px; cursor: pointer; }
.sb-dir:hover { background: var(--panel-2); }
.sb-arw { color: var(--green); font-size: 13px; line-height: 1; }
.sortbox.dim { opacity: .45; }
.count-note { color: var(--faint); font-size: 12px; letter-spacing: .04em; white-space: nowrap; }

/* ---- filter panel ---- */
.filter-panel { display: none; border: 1px solid var(--line); background: var(--panel); padding: 18px 20px 14px; margin: -10px 0 24px; border-radius: 12px; position: relative; }
.filter-panel.open { display: block; }
.f-group { margin-bottom: 16px; }
.f-boxes { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.f-box { display: inline-flex; align-items: center; gap: 9px; padding: 11px 16px; background: transparent; border: 1px solid var(--line); border-radius: 12px; color: var(--text); cursor: pointer; font-family: inherit; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; transition: color .15s, border-color .15s, background .15s; }
.f-box svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; flex: none; }
.f-box:hover { border-color: var(--faint); }
.f-box.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.f-badge { display: none; background: var(--text); color: var(--bg); border-radius: 999px; font-size: 10px; font-weight: 700; padding: 1px 7px; }
.f-badge.show { display: inline-block; }
.f-box.on .f-badge { background: var(--bg); color: var(--text); }
.f-applied { display: none; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; flex-wrap: wrap; gap: 8px; align-items: center; }
.f-applied.show { display: flex; }
.f-pill { display: inline-flex; align-items: baseline; gap: 8px; border: 1px solid color-mix(in srgb, var(--green) 45%, transparent); background: var(--green-bg); color: var(--green); border-radius: 999px; padding: 6px 8px 6px 14px; max-width: 320px; font-family: inherit; font-size: 12.5px; cursor: pointer; }
.f-pill:hover { border-color: var(--green); }
.f-pill .fp-lab { font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .65; }
.f-pill .fp-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-pill .fp-x { align-self: center; width: 16px; height: 16px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; background: color-mix(in srgb, var(--green) 18%, transparent); }
.f-sec { display: none; }
.f-sec.open { display: block; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.f-hint { color: var(--faint); font-size: 12.5px; margin-bottom: 8px; }
.f-label { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--text); font-weight: 700; margin-bottom: 10px; }
.f-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { background: transparent; border: 1px solid var(--line); color: var(--text); padding: 6px 13px; font-size: 13px; cursor: pointer; font-family: inherit; border-radius: 999px; height: auto; font-weight: 400; }
.chip:hover { border-color: var(--faint); }
.chip.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip.none:not(.on) { opacity: .4; }
.chip .n { opacity: .55; margin-left: 5px; font-size: 12px; }
.fp-head, .fp-foot { display: none; }
body.gallery-view .f-box[data-sec="live"], body.gallery-view #sec_live, body.gallery-view .ic-dots { display: none !important; }

/* ---- grid + cards (DYP's card, Inter) ---- */
.igrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; padding: 0; }
.icard { border: 1px solid var(--line); background: var(--panel); cursor: pointer; border-radius: 14px; overflow: hidden; transition: border-color .25s, transform .25s, box-shadow .25s; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) and (pointer: fine) {
  .icard:hover { border-color: var(--faint); transform: translateY(-4px) scale(1.015); box-shadow: 0 14px 30px rgba(0,0,0,.14); }
  html.dark .icard:hover { box-shadow: 0 14px 34px rgba(0,0,0,.4); }
}
.ic-photo-wrap { aspect-ratio: 3 / 2; background: var(--panel-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ic-photo { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; }
.ic-miss { font-size: 22px; color: var(--faint); font-weight: 300; }
.ic-body { padding: 12px 16px 14px; position: relative; }
.ic-dots { position: absolute; top: 15px; right: 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.ic-stat { display: flex; align-items: center; gap: 6px; color: var(--faint); }
.ic-stat svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.ic-dot { width: 7px; height: 7px; border-radius: 50%; }
.ic-dot.on { background: var(--green); }
.ic-dot.off { background: var(--red); }
.ic-name { font-family: var(--heading); font-weight: 600; font-size: 14.5px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; padding-right: 40px; }
.ic-sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ic-tiers { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 11px; display: flex; flex-direction: column; gap: 8px; }
.tier-card { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr) minmax(0,.8fr) 64px; gap: 0 8px; align-items: baseline; }
.tier-card > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tl-name { letter-spacing: .1em; text-transform: uppercase; font-size: 10px; color: var(--text); font-weight: 600; }
.tc-size { color: var(--text); font-size: 11.5px; }
.tier-card .tl-price { color: var(--text); font-size: 12.5px; }
.tl-status { font-size: 8.5px; font-weight: 800; letter-spacing: .07em; text-align: right; }
.st-green { color: var(--green); } .st-amber { color: var(--amber); } .st-red { color: var(--red); } .st-none { color: var(--faint); }
.empty { padding: 60px 20px; text-align: center; color: var(--faint); font-size: 13px; border: 1px solid var(--line); border-radius: 12px; }
#showMoreWrap { display: none; text-align: center; margin-top: 26px; }
.btn.ghost { background: transparent; color: var(--text); }
.pick-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--faint); display: flex; align-items: center; justify-content: center; flex: none; transition: border-color .15s, background .15s; }
.pick-dot svg { width: 14px; height: 14px; stroke: var(--bg); stroke-width: 3.2; fill: none; display: none; }
.picked .pick-dot { background: var(--text); border-color: var(--text); }
.picked .pick-dot svg { display: block; }
.icard.picked, .lrow.picked { border-color: var(--text); }
.icard .pick-dot { margin: 14px auto 2px; }

/* list view */
.ilist { display: flex; flex-direction: column; gap: 10px; }
.lrow { display: grid; grid-template-columns: 92px minmax(0,1.4fr) minmax(0,1fr) minmax(0,1.2fr) 80px; gap: 0 18px; align-items: center; border: 1px solid var(--line); background: var(--panel); cursor: pointer; padding: 8px 18px 8px 8px; border-radius: 12px; transition: border-color .25s, transform .25s, box-shadow .25s; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) and (pointer: fine) { .lrow:hover { border-color: var(--faint); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.10); } }
body.sheet-mode .lrow { grid-template-columns: 34px 92px minmax(0,1.4fr) minmax(0,1fr) minmax(0,1.2fr) 80px; }
.l-thumb { height: 58px; background: var(--panel-2); display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 7px; }
.l-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.l-name { font-family: var(--heading); font-weight: 600; font-size: 13.5px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l-sub, .l-cat { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l-dots { position: static !important; flex-direction: row !important; gap: 12px; justify-content: flex-end; }
body.gallery-view .lrow { grid-template-columns: 220px minmax(0,1fr); gap: 2px 26px; padding: 18px 26px 16px 14px; align-items: center; }
body.gallery-view .lrow .l-cat { display: none; }
body.gallery-view .lrow .l-thumb { grid-row: 1 / span 4; height: auto; width: 100%; aspect-ratio: 3 / 2; border-radius: 10px; }
body.gallery-view .lrow .l-name { font-size: 16px; white-space: normal; }
.l-tiers { grid-column: 2; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 6px; display: flex; flex-direction: column; }
.tier-row, .lt-head { display: grid; grid-template-columns: 130px minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) minmax(0,.9fr) minmax(0,1fr); gap: 0 18px; align-items: center; padding: 10px 0; font-size: 14px; }
.tier-row .tl-name { font-size: 12px; }
.tier-row .tl-price { font-weight: 600; font-size: 15px; }
.lt-head { position: sticky; top: calc(var(--hdrH) + 10px); z-index: 40; padding: 11px 26px 11px 260px; margin-bottom: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; box-shadow: 0 10px 24px rgba(0,0,0,.12); }
.tr-today { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.avail-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* ---- overlay / modal (portal variant of cyp.css's) ---- */
.overlay { align-items: flex-start; overflow-y: auto; padding: 3vh 20px; background: rgba(0,0,0,.5); }
html.dark .overlay { background: rgba(0,0,0,.82); }
.overlay.open { display: flex; }
.modal { margin: auto; max-height: none; overflow: visible; }
.modal.wide { width: min(1400px, 92vw); }
.modal.mid { width: min(1040px, 92vw); }
.modal.narrow { width: min(560px, 92vw); }
.close-x { position: absolute; top: 0; right: -46px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; padding: 0; z-index: 2; }
.close-x:hover { color: var(--text); border-color: var(--faint); }
.modal { position: relative; }
.m-pad { padding: 30px 36px 36px; }

/* quick view */
.qv { grid-template-columns: minmax(0,1.5fr) 400px; gap: 30px; }
.qv .photo { border: 1px solid var(--line); aspect-ratio: 3 / 2; display: flex; align-items: center; justify-content: center; background: var(--panel-2); }
.qv .photo img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.d-name { font-family: var(--heading); font-weight: 600; font-size: 22px; letter-spacing: .12em; text-transform: uppercase; line-height: 1.25; margin-bottom: 10px; }
.d-meta { color: var(--text); font-size: 13.5px; line-height: 2; margin-bottom: 18px; }
.d-meta .lab { color: var(--faint); font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-right: 12px; display: inline-block; min-width: 90px; }
.sec-title { font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--text); margin: 0 0 10px; }
.sp-tier { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 12px 15px 13px; margin-top: 9px; }
.sp-thead { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding-bottom: 9px; margin-bottom: 7px; border-bottom: 1px solid var(--line); }
.sp-tname { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.sp-tprice { font-size: 17px; font-weight: 600; white-space: nowrap; }
.sp-f { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 3px 0; font-size: 13.5px; text-align: right; }
.sp-f::before { content: attr(data-h); flex: none; text-align: left; color: var(--faint); font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.t-status { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.st-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.story-box { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
.p-story-label { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.p-story { font-size: 14.5px; line-height: 1.8; margin-top: 14px; white-space: pre-line; }
.d-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 14px; }
.d-tags span { font-size: 11px; color: var(--muted); background: var(--panel); border-radius: 999px; padding: 3px 9px; border: 1px solid var(--line); }
.d-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 26px; border-top: 1px solid var(--line); padding-top: 18px; }
.d-foot .right { display: flex; gap: 8px; }
.nav-x { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; color: var(--muted); cursor: pointer; padding: 0; z-index: 2; }
.nav-x.prev { left: -46px; } .nav-x.next { right: -46px; }
.nav-x svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav-x[disabled] { opacity: .22; cursor: default; }

/* ---- client sheets ---- */
.cs-title { font-family: var(--heading); font-size: 17px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; margin: 0; }
.cs-sub { color: var(--muted); font-size: 13px; margin-top: 6px; }
.cs-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.cs-mark { flex: none; display: flex; align-items: center; }
.cs-logo { display: block; height: 24px; width: auto; }
.cs-logo.for-dark { display: none; }
html.dark .cs-logo.for-light { display: none; }
html.dark .cs-logo.for-dark { display: block; }
.cs-opts { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 10px; }
.tickline { display: flex; align-items: center; gap: 9px; font-size: 13px; cursor: pointer; }
.tickline input { width: 15px; height: 15px; accent-color: var(--text); cursor: pointer; }
.sh-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.sh-controls .search-wrap { flex: 1 1 240px; min-width: 200px; }
.sh-list { margin-top: 6px; max-height: 56vh; overflow-y: auto; padding-right: 4px; }
.sh-row { display: grid; grid-template-columns: 92px minmax(0,1fr) 148px auto; align-items: center; gap: 22px; padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.sh-row:last-child { border-bottom: none; }
.sh-row.is-expired { opacity: .5; }
.sh-row.is-expired:hover { opacity: 1; }
.sh-thumbs { position: relative; height: 34px; width: 92px; }
.sh-thumbs img, .sh-thumbs .sh-noimg { position: absolute; top: 0; width: 46px; height: 34px; object-fit: cover; border-radius: 5px; background: var(--panel-2); box-shadow: 0 0 0 2px var(--bg); }
.sh-thumbs img:nth-child(1) { left: 0; z-index: 3; } .sh-thumbs img:nth-child(2) { left: 23px; z-index: 2; } .sh-thumbs img:nth-child(3) { left: 46px; z-index: 1; }
.sh-main { min-width: 0; }
.sh-name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-meta { color: var(--muted); font-size: 12.5px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 9px; font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; border: 1px solid transparent; }
.sh-pill .sh-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sh-pill.live { color: var(--green); border-color: color-mix(in srgb, var(--green) 45%, transparent); background: var(--green-bg); }
.sh-pill.soon { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 45%, transparent); background: var(--amber-bg); }
.sh-pill.urgent { color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, transparent); background: var(--red-bg); }
.sh-pill.dead { color: var(--faint); border-color: var(--line); }
.sh-actions { display: flex; align-items: center; gap: 8px; opacity: .45; transition: opacity .15s; }
.sh-row:hover .sh-actions { opacity: 1; }
.sh-act { background: transparent; border: 1px solid var(--text); color: var(--text); border-radius: 999px; padding: 6px 13px; cursor: pointer; font-family: inherit; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
.sh-act:hover { background: var(--text); color: var(--bg); }
.sh-act.ok { color: var(--green); border-color: var(--green); }
.sh-ico { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid transparent; border-radius: 50%; color: var(--faint); cursor: pointer; padding: 0; }
.sh-ico:hover { color: var(--text); border-color: var(--line); background: var(--panel); }
.sh-ico svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sh-ico.sh-del:hover, .sh-ico.armed { color: var(--red); border-color: var(--red); }
.sh-skel { height: 64px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 18px; padding: 0 4px; }
.sh-skel span { display: block; height: 34px; width: 92px; border-radius: 5px; background: var(--panel-2); animation: shPulse 1.4s ease-in-out infinite; }
.sh-skel span.b { height: 12px; width: 190px; }
@keyframes shPulse { 0%,100% { opacity: .5; } 50% { opacity: .9; } }
.sh-none { padding: 30px 4px; text-align: center; }
.cs-orderhead { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 20px 0 0; }
.cs-orderhead .f-label { margin-bottom: 0; }
.cs-order { margin-top: 10px; max-height: 280px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.cso-row { display: flex; align-items: center; gap: 12px; padding: 7px 12px; border-bottom: 1px solid var(--line); cursor: grab; background: var(--panel); font-size: 13px; user-select: none; -webkit-user-select: none; }
.cso-row:last-child { border-bottom: none; }
.cso-row.dragging { border-radius: 8px; box-shadow: 0 10px 24px rgba(0,0,0,.2); }
.cso-grip { color: var(--faint); font-size: 14px; }
.cso-thumb { width: 46px; height: 30px; object-fit: cover; border-radius: 5px; background: var(--panel-2); -webkit-user-drag: none; }
.cso-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cso-n { color: var(--faint); font-size: 11.5px; margin-left: auto; }
.cso-x { background: none; border: none; color: var(--faint); font-size: 17px; line-height: 1; cursor: pointer; padding: 2px 4px; }
.cso-x:hover { color: var(--red); }
.modal-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }
.modal-actions .right { display: flex; gap: 10px; margin-left: auto; }

/* pick tray */
.pick-tray { display: none; margin: 0 0 22px; padding: 12px 14px 13px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
body.sheet-mode .pick-tray.show { display: block; }
.pt-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.pt-title { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pt-hint { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--faint); }
.pt-acts { margin-left: auto; display: flex; gap: 8px; }
.pt-btn { background: transparent; border: 1px solid var(--line); color: var(--text); padding: 6px 13px; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; font-family: inherit; border-radius: 999px; white-space: nowrap; }
.pt-btn:hover { border-color: var(--faint); background: var(--panel-2); }
.pt-btn.armed { color: var(--red); border-color: var(--red); }
.pt-btn.pt-solid { background: var(--text); color: var(--bg); border-color: var(--text); }
.pt-btn:disabled { opacity: .4; cursor: default; }
.pt-strip { display: flex; flex-wrap: wrap; gap: 10px; max-height: 42vh; overflow-y: auto; padding: 2px; }
.pt-item { position: relative; width: 152px; flex: none; cursor: grab; border: 1px solid var(--line); background: var(--bg); border-radius: 9px; overflow: hidden; user-select: none; -webkit-user-select: none; transition: border-color .15s; }
.pt-item:hover { border-color: var(--faint); }
.pt-item.dragging { border-color: var(--text); box-shadow: 0 12px 28px rgba(0,0,0,.2); }
.pt-photo { position: relative; aspect-ratio: 3 / 2; background: var(--panel-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pt-photo img { width: 100%; height: 100%; object-fit: contain; -webkit-user-drag: none; }
.pt-body { padding: 8px 10px 9px; }
.pt-name { font-weight: 600; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-sub { color: var(--muted); font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.pt-item .pick-dot { width: 20px; height: 20px; border-width: 1.8px; margin: 9px auto 1px; background: var(--text); border-color: var(--text); }
.pt-item .pick-dot svg { width: 11px; height: 11px; stroke-width: 3.4; display: block; }
.pt-item:hover .pick-dot { background: transparent; border-color: var(--red); }
.pt-item:hover .pick-dot svg { display: none; }
.pt-num { position: absolute; top: 5px; left: 5px; z-index: 2; pointer-events: none; background: rgba(0,0,0,.55); color: #fff; border-radius: 999px; padding: 1px 6px; font-size: 9px; font-weight: 700; }
.pt-x { position: absolute; inset: 0; z-index: 3; pointer-events: none; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.5); color: #fff; font-size: 24px; opacity: 0; transition: opacity .13s; }
.pt-item:hover .pt-x { opacity: 1; }
.pt-item.dragging .pt-x { opacity: 0; }
.pt-item.dragging .pick-dot { background: var(--text); border-color: var(--text); }
.pt-item.dragging .pick-dot svg { display: block; }
@media (hover: none) { .pt-item:hover { border-color: var(--line); } .pt-item:hover .pick-dot { background: var(--text); border-color: var(--text); } .pt-item:hover .pick-dot svg { display: block; } .pt-item:hover .pt-x { opacity: 0; } }

/* ---- gate ---- */
.gate .gfield { display: flex; flex-direction: column; gap: 10px; }
.gate .who { font-size: 11px; color: var(--faint); text-align: center; letter-spacing: .06em; }

/* ---- responsive ---- */
@media (max-width: 1150px) {
  main { padding-left: 24px; padding-right: 24px; }
  .igrid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
}
@media (max-width: 820px) {
  main { padding: calc(var(--hdrH) + 20px) 16px 90px; }
  .hdr nav { display: none; }
  .title-row { margin-bottom: 22px; gap: 14px; }
  .page-title { font-size: 19px; }
  .page-sub { font-size: 12.5px; }
  .title-actions { width: 100%; align-items: stretch; }
  .icon-row { width: 100%; }
  .icon-btn { flex: 1; max-width: none; min-width: 0; }
  body.guser .title-actions { display: none !important; }
  .toolbar { gap: 10px; }
  .search-wrap { order: 1; flex: 1 1 100%; }
  .toolbar input[type="text"] { font-size: 16px; height: 46px; }
  .filter-btn { order: 2; flex: 1 1 0; min-width: 0; justify-content: center; height: 46px; padding: 0 10px; }
  .filter-btn .chev { display: none; }
  .sortbox { order: 3; flex: 1 1 0; min-width: 0; height: 46px; }
  .sb-lbl { padding-left: 12px; }
  .toolbar .sortbox select { flex: 1; height: 44px; font-size: 15px; padding: 0 22px 0 8px; background-position: right 7px center; background-size: 9px; }
  .sb-dir { height: 44px; padding: 0 10px; }
  .sb-dir .sb-txt { display: none; }
  .view-toggle, .count-note { display: none; }
  .filter-panel.open { position: fixed; inset: 0; z-index: 130; margin: 0; border: none; border-radius: 0; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 26px 20px 130px; }
  .fp-head { display: block; font-family: var(--heading); font-size: 20px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 20px; }
  .f-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 0; }
  .f-box { width: 100%; justify-content: center; padding: 14px 10px; }
  .f-sec.open { margin-top: 20px; padding-top: 20px; }
  .f-chips { gap: 10px; }
  .chip { padding: 11px 16px; font-size: 15px; }
  .fp-foot { display: flex; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 131; padding: 14px 20px calc(16px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
  .fp-btn { flex: 1; padding: 15px; border-radius: 999px; cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
  .fp-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
  .fp-solid { background: var(--text); border: 1px solid var(--text); color: var(--bg); }
  .igrid { grid-template-columns: 1fr; gap: 18px; }
  .icard:hover { transform: none; }
  .ic-name { font-size: 16px; white-space: normal; }
  .lrow { grid-template-columns: 72px 1fr; gap: 4px 14px; padding: 12px; }
  .lrow .l-thumb { grid-row: span 2; height: 64px; }
  .l-cat, .l-dots { display: none; }
  .lt-head { display: none; }
  body.gallery-view .lrow { grid-template-columns: 1fr; }
  body.gallery-view .lrow .l-thumb { grid-row: auto; height: auto; }
  body.gallery-view .l-tiers { grid-column: 1 / -1; }
  .tier-row { grid-template-columns: minmax(0,auto) minmax(0,1fr) auto; gap: 0 10px; font-size: 13px; padding: 8px 0; }
  .tier-row > span:nth-child(2), .tier-row > span:nth-child(3), .tier-row > span:nth-child(4) { display: none; }
  .overlay { padding: 0; align-items: stretch; background: var(--bg); }
  .modal, .modal.wide, .modal.mid, .modal.narrow { width: 100%; max-width: 100%; min-height: 100dvh; border: none; border-radius: 0; }
  .m-pad { padding: calc(var(--hdrH) + 14px) 18px 40px; }
  .close-x { top: calc(var(--hdrH) + 8px); right: 12px; width: 40px; height: 40px; border: none; background: none; font-size: 22px; }
  .nav-x { display: none; }
  .qv { grid-template-columns: 1fr; }
  .d-name { font-size: 18px; padding-right: 40px; }
  /* sheets are a desktop thing for now */
  #clientSheetBtn, #sheetEditBtn, #sheetCreateBtn, #sheetCancelBtn, #sheetConfirmBtn, .pick-tray { display: none !important; }
}
