/* ShopAutoFC light/dark display modes. Order and payment data are unchanged. */
:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
.theme-toggle {
  width: 38px; height: 38px; display: inline-grid; place-items: center;
  border: 1px solid #dce3ed; border-radius: 12px; background: #fff;
  color: #24354a; font-size: 18px; line-height: 1;
}
.theme-toggle:hover { border-color: #80b8f5; background: #f0f7ff; }
body[data-admin="true"] .theme-toggle { margin-left: auto; flex: 0 0 auto; }

:root[data-theme="light"] body {
  background: radial-gradient(ellipse at 90% 0, #e6f2ff 0, transparent 34%), #f4f6fa;
  color: #182536;
}
:root[data-theme="light"] .top {
  background: rgba(255,255,255,.94); border-bottom-color: #e3e8ef;
  box-shadow: 0 5px 20px rgba(25,47,77,.05);
}
:root[data-theme="light"] .brand { color: #172538; }
:root[data-theme="light"] .brand small { color: #8290a2; }
:root[data-theme="light"] .mark { color: #fff; background: linear-gradient(145deg,#4f9cf3,#55cce0); }
:root[data-theme="light"] .profile,
:root[data-theme="light"] nav button.ghost { color: #34445a; border-color: #dfe5ed; background: #fff; }
:root[data-theme="light"] .hero .copy {
  background: linear-gradient(135deg,#fff 5%,#edf6ff 100%);
  border-color: #e2eaf4; box-shadow: 0 12px 34px rgba(34,65,103,.07);
}
:root[data-theme="light"] .hero .copy h1 { color: #172538; }
:root[data-theme="light"] .hero .copy p { color: #65758a; }
:root[data-theme="light"] .hero .eyebrow { color: #ad7a27; }
:root[data-theme="light"] .hero .art { border-color: #e2e8f0; box-shadow: 0 12px 30px rgba(34,65,103,.08); }
:root[data-theme="light"] .toolbar.glass,
:root[data-theme="light"] .side.glass,
:root[data-theme="light"] .card.glass,
:root[data-theme="light"] .profile-card,
:root[data-theme="light"] .auth-card,
:root[data-theme="light"] .live-order {
  color: #1b2a3d; border-color: #e3e8ef;
  background: #fff; box-shadow: 0 7px 22px rgba(28,49,77,.06);
}
:root[data-theme="light"] .toolbar .search,
:root[data-theme="light"] input,
:root[data-theme="light"] select,
:root[data-theme="light"] textarea {
  color: #202d3d; background: #fff; border-color: #dfe5ed;
}
:root[data-theme="light"] .filters button,
:root[data-theme="light"] .ghost,
:root[data-theme="light"] .add,
:root[data-theme="light"] .inline-button {
  color: #526174; background: #fff; border-color: #dfe5ed;
}
:root[data-theme="light"] .filters button.on,
:root[data-theme="light"] .selected.card .add {
  color: #1264b3; border-color: #9ccafa; background: #eaf4ff;
}
:root[data-theme="light"] .section h2,
:root[data-theme="light"] .card h3,
:root[data-theme="light"] .side h3,
:root[data-theme="light"] .profile-card h2,
:root[data-theme="light"] .auth-card h1,
:root[data-theme="light"] .live-order-head b { color: #1c2b3e; }
:root[data-theme="light"] .muted,
:root[data-theme="light"] .section small,
:root[data-theme="light"] .message-note,
:root[data-theme="light"] .contact,
:root[data-theme="light"] .card .tag { color: #748297; }
:root[data-theme="light"] .card .price { color: #1470c9; }
:root[data-theme="light"] .card .photo,
:root[data-theme="light"] .photo.fc-shared { background: #edf2f7; }
:root[data-theme="light"] .status { color: #41546a; background: #f7f9fc; border-color: #e3e8ef; }
:root[data-theme="light"] .live-cart-row { border-color: #e7ebf0; }
:root[data-theme="light"] .live-cart-row small { color: #718095; }
:root[data-theme="light"] .live-cart-total { color: #40536b; border-color: #e3e8ef; }
:root[data-theme="light"] .live-cart-total b,
:root[data-theme="light"] .amount { color: #1376d0; }
:root[data-theme="light"] .bottom {
  background: rgba(255,255,255,.96); border-color: #e1e7ef;
  box-shadow: 0 -7px 22px rgba(24,46,76,.06);
}
:root[data-theme="light"] .bottom button { color: #718095; }
:root[data-theme="light"] .bottom button.active { color: #126fc6; }
:root[data-theme="light"] .cart-popup {
  color: #17304a; border-color: #b8d9fa;
  background: linear-gradient(130deg,#fff,#eaf5ff);
  box-shadow: 0 10px 28px rgba(27,83,137,.17);
}
:root[data-theme="light"] .cart-popup span,
:root[data-theme="light"] .cart-popup small { color: #61758c; }
:root[data-theme="light"] .cart-popup b { color: #0877c8; }
:root[data-theme="light"] .chatlaunch {
  color: #20354d; border-color: #c9e1f8;
  background: linear-gradient(130deg,#fff,#eaf5ff); box-shadow: 0 10px 26px #1a36551c;
}
:root[data-theme="light"] .chat {
  color: #203044; border-color: #dce5ef; background: rgba(255,255,255,.98);
  box-shadow: 0 20px 55px rgba(30,54,83,.2);
}
:root[data-theme="light"] .chathead { border-color: #e5ebf2; }
:root[data-theme="light"] .context,
:root[data-theme="light"] .composer { border-color: #e5ebf2; background: #f7f9fc; }
:root[data-theme="light"] .bubble.shop { color: #26374b; border-color: #e2e8f0; background: #f5f7fa; }
:root[data-theme="light"] .bubble.me { color: #133c65; border-color: #cce3fa; background: #e8f4ff; }
:root[data-theme="light"] .live-modal { color: #1d2c40; background: #fff; border-color: #dfe6ef; }
:root[data-theme="light"] .live-modal p,
:root[data-theme="light"] .live-modal h2 { color: #24354a; }
:root[data-theme="light"] .history-entry,
:root[data-theme="light"] .history-summary > div { border-color: #e3e8ef; }

:root[data-theme="dark"] .theme-toggle {
  color: #d8e7f6; border-color: #2c3c50; background: #121c28;
}
:root[data-theme="dark"] .theme-toggle:hover { background: #1c2a3b; border-color: #55779e; }

/* The separate management page shares the same persisted switch. */
:root[data-theme="light"] body[data-admin="true"] {
  background: #f4f6fa; color: #1c2c40;
}
:root[data-theme="light"] body[data-admin="true"] .live-header {
  color: #1c2c40; background: rgba(255,255,255,.96); border-color: #e1e7ef;
  box-shadow: 0 5px 20px rgba(25,47,77,.05);
}
:root[data-theme="light"] body[data-admin="true"] .live-logo,
:root[data-theme="light"] body[data-admin="true"] .live-logo b { color: #1c2c40; }
:root[data-theme="light"] body[data-admin="true"] .live-logo span { color: #758398; }
:root[data-theme="light"] body[data-admin="true"] .live-header nav button,
:root[data-theme="light"] body[data-admin="true"] .live-header .text-btn {
  color: #53647a; border-color: #e1e7ef; background: #fff;
}
:root[data-theme="light"] body[data-admin="true"] .live-header nav button.active {
  color: #1269ba; background: #eaf4ff; border-color: #c6def6;
}
:root[data-theme="light"] body[data-admin="true"] .live-intro,
:root[data-theme="light"] body[data-admin="true"] .profile-card,
:root[data-theme="light"] body[data-admin="true"] .live-order,
:root[data-theme="light"] body[data-admin="true"] .auth-card,
:root[data-theme="light"] body[data-admin="true"] .admin-order-list > *,
:root[data-theme="light"] body[data-admin="true"] .live-modal {
  color: #24354a; background: #fff; border-color: #e2e8f0;
  box-shadow: 0 8px 24px rgba(30,54,83,.06);
}
:root[data-theme="light"] body[data-admin="true"] .live-intro h1,
:root[data-theme="light"] body[data-admin="true"] .profile-card h2,
:root[data-theme="light"] body[data-admin="true"] .live-order p { color: #26374b; }
:root[data-theme="light"] body[data-admin="true"] .live-intro p,
:root[data-theme="light"] body[data-admin="true"] .profile-card p,
:root[data-theme="light"] body[data-admin="true"] .live-order small { color: #6e7d91; }
:root[data-theme="light"] body[data-admin="true"] .field input,
:root[data-theme="light"] body[data-admin="true"] .field select,
:root[data-theme="light"] body[data-admin="true"] .field textarea,
:root[data-theme="light"] body[data-admin="true"] .live-modal input,
:root[data-theme="light"] body[data-admin="true"] .live-modal select,
:root[data-theme="light"] body[data-admin="true"] .live-modal textarea {
  color: #24354a; background: #fff; border-color: #dfe5ed;
}
:root[data-theme="light"] body[data-admin="true"] .live-filter button,
:root[data-theme="light"] body[data-admin="true"] .inline-button,
:root[data-theme="light"] body[data-admin="true"] .text-btn {
  color: #50647b; background: #fff; border-color: #dfe5ed;
}
:root[data-theme="light"] body[data-admin="true"] .history-entry,
:root[data-theme="light"] body[data-admin="true"] .history-summary > div { border-color: #e3e8ef; }

@media (max-width: 500px) {
  .theme-toggle { width: 34px; height: 34px; border-radius: 11px; }
  .top nav { gap: 6px; }
  body[data-admin="true"] .live-header { flex-wrap: wrap; }
  body[data-admin="true"] .live-header nav { order: 4; }
  body[data-admin="true"] .theme-toggle { margin-left: auto; }
}


/* 4.2.22 targeted storefront improvements. */
.shop-overview{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,320px);gap:20px;align-items:start;margin:24px 0}
.shop-overview>.hero{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);gap:16px;min-width:0;width:100%;max-width:100%;padding:0;margin:0;align-self:stretch}
.shop-overview>.hero>*{min-width:0;max-width:100%}
.shop-overview .copy{padding:26px 24px;display:flex;flex-direction:column;justify-content:center;border-radius:22px;overflow-wrap:break-word}
.shop-overview .copy h1{font-size:clamp(28px,2.3vw,38px);line-height:1.14;margin:14px 0}
.shop-overview .copy p{font-size:14px;line-height:1.65;margin:0 0 16px;max-width:100%}
.shop-overview .copy .eyebrow{font-size:9px;letter-spacing:.13em}
.shop-overview #hero{align-self:flex-start;max-width:100%;min-width:0;padding:10px 14px}
.shop-overview .art{width:100%;min-width:0;max-width:100%;height:100%;min-height:0;aspect-ratio:auto;position:relative;border-radius:22px;overflow:hidden}
.shop-overview .art .anime-panel{position:absolute;inset:0;display:block;min-width:0;width:100%;height:100%;object-fit:cover;object-position:65% center}
.shop-overview .art small{left:12px;right:12px;bottom:12px;font-size:9px;overflow-wrap:anywhere}
.top-depositors{position:relative;min-width:0;width:100%;max-width:100%;padding:20px;border-radius:22px;background:#111d2a;box-shadow:0 10px 28px #0002;backdrop-filter:none}
:root[data-theme="light"] .top-depositors{background:#fff;border-color:#e2e8f0}
.top-depositors h2{margin:7px 0;font-size:23px;line-height:1.3}
.top-depositors p,.top-depositors>small{font-size:11px;line-height:1.5;opacity:.8}
.top-depositors p{margin:0}
.top-depositors ol{list-style:none;margin:12px 0;padding:0}
.top-depositors li{display:flex;align-items:center;gap:9px;padding:9px 0;border-bottom:1px solid #8996a329;font-size:12px;min-width:0}
.top-depositors li>span{flex:1;min-width:0;overflow-wrap:anywhere}
.top-depositors li>strong{white-space:nowrap;color:var(--green,#41a595);font-size:12px}
.top-rank{display:grid;place-items:center;width:26px;height:26px;flex:0 0 26px;border-radius:50%;background:#e5b34826;color:#ba881e}
.shop-group-heading{grid-column:1/-1;margin:14px 0 0;padding:10px 14px;border-left:4px solid var(--cyan,#41a595);font-size:19px;background:#8996a30d;border-radius:4px 12px 12px 4px}
.toolbar #sort{min-width:155px;max-width:100%;font:inherit}
@media(min-width:1100px){
 body:not([data-admin="true"])>.top .shell,body:not([data-admin="true"])>main.shell{max-width:1440px}
 .shop-overview>.hero{min-height:290px}
 .shop-overview .copy{padding:24px}
 .shop-overview+.live-notice{margin-top:0}
}
@media(min-width:821px) and (max-width:1099px){
 .shop-overview{grid-template-columns:minmax(0,1fr) 280px;gap:16px}
 .shop-overview>.hero{grid-template-columns:minmax(0,1fr)}
 .shop-overview .copy{z-index:1;background:linear-gradient(90deg,var(--bg) 65%,transparent)}
 .shop-overview .art{display:none}
 .top-depositors{padding:16px}
 .shop-overview .copy h1{font-size:30px}
}
@media(max-width:820px){
 .shop-overview{grid-template-columns:minmax(0,1fr);gap:16px;margin:16px 0}
 .shop-overview>.hero{grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);gap:12px}
 .shop-overview .copy{padding:22px 18px}
 .shop-overview .copy h1{font-size:30px}
 .top-depositors{padding:18px}
 .toolbar{flex-wrap:wrap}.toolbar #search{min-width:0;flex:1 1 180px}.toolbar #sort{flex:0 1 160px}
}
@media(max-width:560px){
 .shop-overview>.hero{grid-template-columns:minmax(0,1fr)}
 .shop-overview .art{display:block;aspect-ratio:16/7;height:auto}
 .shop-overview .art .anime-panel{position:static;height:auto;aspect-ratio:16/7}
 .shop-overview .copy h1{font-size:32px}
}

/* Compact overview: the catalog starts within a normal laptop viewport. */
.top-depositors{padding:16px}
.top-depositors .section-kicker{font-size:9px;letter-spacing:.12em}
.top-depositors h2{font-size:21px;margin:4px 0}
.top-depositors p,.top-depositors>small{font-size:10px;line-height:1.5}
.top-depositors ol{margin:8px 0}
.top-depositors li{padding:6px 0}
.top-rank{width:22px;height:22px;flex-basis:22px}
:root[data-theme="light"] .top-depositors li>strong{color:#137b65}
body:not([data-admin="true"]) #screen>.layout .toolbar{padding:9px;margin-bottom:10px}
body:not([data-admin="true"]) #screen>.layout .filters{margin-bottom:10px}
body:not([data-admin="true"]) #screen>.layout .section{margin:10px 2px}
@media(min-width:821px){.shop-overview{margin:18px 0}.shop-overview .copy{padding:22px}}
/* Admin uses normal header flow: fixed nav inside a blurred header was overlapping controls on Safari. */
body[data-admin="true"] .live-header{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;position:sticky;top:0;width:100%;height:auto;min-height:0;padding:14px max(18px,calc((100vw - 1440px)/2));z-index:40}
body[data-admin="true"] .live-logo{grid-column:1;grid-row:1;min-width:0;max-width:100%;font-size:25px}
body[data-admin="true"] .live-logo b{font-size:20px}
body[data-admin="true"] .theme-toggle{grid-column:2;grid-row:1;margin:0}
body[data-admin="true"] #admin-logout{grid-column:3;grid-row:1;margin:0;min-height:38px;padding:8px}
body[data-admin="true"] #admin-nav{position:static;inset:auto;transform:none;grid-column:1/-1;grid-row:2;display:flex;justify-content:flex-start;align-items:center;gap:6px;width:100%;max-width:100%;min-width:0;height:auto;margin:0;padding:4px;overflow-x:auto;overflow-y:hidden;border-radius:12px;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;scrollbar-width:thin}
body[data-admin="true"] #admin-nav.hidden{display:none!important}
body[data-admin="true"] #admin-nav button{flex:0 0 auto;min-height:40px;height:auto;padding:9px 13px;font-size:12px!important;border-radius:9px;white-space:nowrap}
:root[data-theme="light"] body[data-admin="true"] #admin-nav{background:#f3f6fa;border-color:#dde5ef}
body[data-admin="true"] .live-main{width:100%;max-width:1440px;min-width:0;padding:20px 24px 110px!important}
body[data-admin="true"] .live-intro{padding:20px 24px;margin:0 0 18px}
body[data-admin="true"] .live-intro h1{font-size:28px;line-height:1.2}
body[data-admin="true"] .live-intro p{margin:8px 0 0}
body[data-admin="true"] .live-filter{gap:8px;margin-bottom:14px;flex-wrap:wrap}
body[data-admin="true"] .live-filter button{min-height:38px}
body[data-admin="true"] #order-search{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;width:100%;min-width:0;align-items:stretch;margin:0 0 16px}
body[data-admin="true"] #order-search input{display:block;width:100%;min-width:0;max-width:100%;font-size:15px;padding:11px 13px}
body[data-admin="true"] #order-search .primary-btn{width:auto;min-width:84px;padding:10px 20px}
body[data-admin="true"] .reply-form>.primary-btn{width:auto;flex:0 0 auto}
body[data-admin="true"] .profile-card,body[data-admin="true"] .live-order,body[data-admin="true"] .live-grid>*{min-width:0;overflow-wrap:anywhere}
body[data-admin="true"] .field input,body[data-admin="true"] .field select,body[data-admin="true"] .field textarea{width:100%;max-width:100%;min-width:0}
body[data-admin="true"] .button-row,body[data-admin="true"] .live-actions,body[data-admin="true"] .secondary-actions{flex-wrap:wrap;gap:8px}
body[data-admin="true"] .live-order-head{gap:10px;flex-wrap:wrap}
body[data-admin="true"] .live-order-head b{overflow-wrap:anywhere}
body[data-admin="true"] #chat-toggle{right:16px;bottom:calc(16px + env(safe-area-inset-bottom));z-index:81}
body[data-admin="true"] .chat-window{position:fixed;right:12px;bottom:calc(78px + env(safe-area-inset-bottom));width:min(400px,calc(100vw - 24px));height:min(620px,calc(100dvh - 170px));max-height:calc(100dvh - 110px);z-index:80}
body[data-admin="true"] .chat-thread{min-height:0;flex:1 1 auto}
body[data-admin="true"] .chat-head,body[data-admin="true"] .chat-composer{flex-shrink:0}
body[data-admin="true"] .live-modal{width:min(760px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:90dvh;overflow:auto}
@media(min-width:1200px){
 body[data-admin="true"] .live-header{grid-template-columns:auto minmax(0,1fr) auto auto;gap:18px}
 body[data-admin="true"] #admin-nav{grid-row:1;grid-column:2;justify-content:center}
 body[data-admin="true"] .theme-toggle{grid-column:3}
 body[data-admin="true"] #admin-logout{grid-column:4}
}
@media(max-width:760px){
 body[data-admin="true"] .live-header{padding:12px;gap:8px}
 body[data-admin="true"] .live-logo{font-size:21px;gap:6px}
 body[data-admin="true"] .live-logo b{font-size:17px;letter-spacing:-.4px}
 body[data-admin="true"] .live-logo span{font-size:7px;letter-spacing:1px}
 body[data-admin="true"] #admin-nav{padding:3px;border-radius:10px}
 body[data-admin="true"] #admin-nav button{min-height:42px;padding:9px 12px}
 body[data-admin="true"] #admin-logout{font-size:11px;padding:7px}
 body[data-admin="true"] .live-main{padding:16px 12px 110px!important}
 body[data-admin="true"] .live-intro{padding:18px 16px;margin-bottom:14px}
 body[data-admin="true"] .live-intro h1{font-size:25px}
 body[data-admin="true"] .live-intro .inventory-tag{display:none}
 body[data-admin="true"] .live-intro>div{max-width:100%}
 body[data-admin="true"] .live-filter button{font-size:12px;padding:8px 11px}
 body[data-admin="true"] #order-search{gap:8px}
 body[data-admin="true"] #order-search input{font-size:16px;padding:10px}
 body[data-admin="true"] #order-search .primary-btn{min-width:68px;padding:10px 14px}
 body[data-admin="true"] .live-grid{grid-template-columns:minmax(0,1fr)}
 body[data-admin="true"] .profile-card,body[data-admin="true"] .live-order{padding:16px}
 body[data-admin="true"] .field input,body[data-admin="true"] .field select,body[data-admin="true"] .field textarea,body[data-admin="true"] .chat-composer input{font-size:16px}
 body[data-admin="true"] .live-main .empty{padding:28px 16px}
 body[data-admin="true"] .chat-order-context{max-height:140px;overflow:auto;flex:0 1 auto}
 body[data-admin="true"] .live-modal{margin:auto;padding:0}
}

@media(max-width:820px){
 body:not([data-admin="true"]) .chat-composer input,
 body:not([data-admin="true"]) .toolbar input,
 body:not([data-admin="true"]) .toolbar select{font-size:16px}
}
body[data-admin="true"] .order-chat{bottom:calc(16px + env(safe-area-inset-bottom));right:12px}
