/* CutyBody Essential — presentation adapter, Liquid Glass 1.2 palette.
 * Source: TMPL_Essential/docs/{TOKENS,REFERENCES}.md, original TMPL_liquid.
 * Opt-in only. Do not move tokens to :root or change legacy --cb-* tokens:
 * the Story player and the two excluded Studios retain that contract.
 */
body.cb-essential {
  --lg-bg:#070a10;
  --lg-bg-raised:#0b0f18;
  --lg-raised:var(--lg-bg-raised);
  --lg-primary:hsl(344 100% 62%);
  --lg-secondary:hsl(246 100% 68%);
  --lg-text:#f1f3f8;
  --lg-muted:#abb0bd;
  --lg-stroke:rgb(255 255 255 / 14%);
  --es-bg:var(--lg-bg);
  --es-surface:#111620;
  --es-primary:var(--lg-primary);
  --es-secondary:var(--lg-secondary);
  --es-text:var(--lg-text);
  --es-muted:var(--lg-muted);
  --es-border:var(--lg-stroke);
  --es-radius:16px;
  --es-gap:24px;
  background:var(--lg-bg)!important;
  color:var(--lg-text);
  color-scheme:dark;
  line-height:1.5;
}
body.cb-essential::before { display:none; }
/* Native focus/controls of the shared Story player keep the original scheme. */
body.cb-essential #storyDialog { color-scheme:normal; }
body.cb-essential .cb-skip-link { position:fixed; top:8px; left:16px; z-index:1400; transform:translateY(-180%); padding:12px 18px; border-radius:10px; background:#f1f3f8; color:#070a10; font-weight:700; }
body.cb-essential .cb-skip-link:focus { transform:translateY(0); outline:3px solid var(--lg-secondary); }
body.cb-essential main { min-width:0; }
body.cb-essential main > .container { padding-top:28px!important; }
body.cb-essential :where(main,.modal,.cb-topbar,.cb-bottomnav,.cb-search-sheet,.cb-store-nav) :is(h1,h2,h3,h4,h5,h6) {
  color:var(--lg-text); font-weight:650; letter-spacing:-.025em; text-wrap:balance;
}
body.cb-essential main h1 { line-height:1.2; }
body.cb-essential :where(main,.modal) :is(p,li,td,th) { overflow-wrap:anywhere; }
body.cb-essential :where(main,.modal) :is(.text-muted,.text-secondary,.text-body-secondary,.form-text,small.text-muted) {
  color:var(--lg-muted)!important;
}
body.cb-essential :where(main,.modal,.cb-topbar,.cb-bottomnav,.cb-search-sheet,.cb-store-nav) a {
  text-underline-offset:3px;
}
/* Target real application controls; never reach the global story-dialog. */
body.cb-essential :where(main,.modal,.cb-topbar,.cb-bottomnav,.cb-search-sheet,.cb-store-nav) :is(a,button,input,select,textarea,[tabindex]):focus-visible {
  outline:3px solid #c7bdff!important; outline-offset:3px; box-shadow:none!important;
}
body.cb-essential :where(main,.modal) :is(.cb-card,.card,.cb-glass,.list-group-item) {
  color:var(--lg-text)!important; background:var(--es-surface)!important; border:1px solid var(--lg-stroke)!important;
  border-radius:var(--es-radius); box-shadow:none; backdrop-filter:none;
}
body.cb-essential :where(main,.modal) :is(.card-header,.card-footer) {
  color:var(--lg-text); background:transparent; border-color:var(--lg-stroke);
}
body.cb-essential :where(main,.modal) .cb-card:active { transform:none; }
body.cb-essential :where(main,.modal) :is(.form-control,.form-select,.cb-input) {
  min-height:46px; border:1px solid #596170!important; border-radius:10px!important;
  background-color:var(--lg-bg-raised)!important; color:var(--lg-text)!important;
  font-size:1rem; box-shadow:none!important;
}
body.cb-essential :where(main,.modal) textarea.form-control { min-height:112px; }
body.cb-essential :where(main,.modal) :is(.form-control,.cb-input)::placeholder { color:#a2aab8!important; opacity:1; }
body.cb-essential :where(main,.modal) :is(.form-control,.form-select,.cb-input):focus { border-color:var(--lg-secondary)!important; }
/* Auth already has one composite field around icon, input and reveal button. */
body.cb-essential.cb-auth-page .cb-input .cb-input-field {
  min-height:44px; border:0!important; border-radius:0!important;
  background:transparent!important; box-shadow:none!important; outline:none!important;
}
body.cb-essential.cb-auth-page .cb-input:focus-within {
  outline:3px solid #c7bdff!important; outline-offset:3px; border-color:#b9b1ff!important;
}
body.cb-essential.cb-auth-page .cb-input-invalid { border-color:#ff9db5!important; }
body.cb-essential :where(main,.modal) :is(.form-check-input,input[type=checkbox],input[type=radio]) { accent-color:var(--lg-primary); }
body.cb-essential :where(main,.modal) .form-check-input:checked { background-color:var(--lg-primary); border-color:var(--lg-primary); }
body.cb-essential :where(main,.modal) .form-range::-webkit-slider-thumb { background:var(--lg-primary); }
body.cb-essential :where(main,.modal) .form-range::-moz-range-thumb { background:var(--lg-primary); }
body.cb-essential :where(main,.modal,.cb-topbar,.cb-search-sheet) .btn {
  min-height:44px; display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 16px; border-radius:10px; font-size:.9rem; font-weight:650; line-height:1.35;
  box-shadow:none; transition:background-color .14s ease,border-color .14s ease;
}
body.cb-essential :where(main,.modal,.cb-topbar,.cb-search-sheet) :is(.cb-btn,.btn-primary,.cb-auth-submit) {
  background:var(--lg-primary)!important; border:1px solid var(--lg-primary)!important;
  color:#190810!important; text-shadow:none;
}
body.cb-essential :where(main,.modal,.cb-topbar,.cb-search-sheet) :is(.cb-btn,.btn-primary,.cb-auth-submit):hover { background:#ff658f!important; border-color:#ff658f!important; opacity:1; }
body.cb-essential :where(main,.modal,.cb-topbar,.cb-search-sheet) :is(.btn-outline-dark,.btn-outline-light,.btn-dark,.btn-light,.btn-secondary,.btn-outline-secondary) {
  background:#171e2a!important; border:1px solid #596170!important; color:var(--lg-text)!important;
}
body.cb-essential :where(main,.modal,.cb-topbar,.cb-search-sheet) :is(.btn-outline-dark,.btn-outline-light,.btn-dark,.btn-light,.btn-secondary,.btn-outline-secondary):hover {
  background:#232c3b!important; border-color:#8891a2!important; color:#fff!important; opacity:1;
}
body.cb-essential :where(main,.modal) .btn-outline-danger { color:#ffaba8; border-color:#bc6966; background:transparent; }
body.cb-essential :where(main,.modal) .btn-danger { color:#1c0808; border-color:#ff918b; background:#ff918b; }
body.cb-essential :where(main,.modal) :is(.btn:disabled,.btn.disabled) { opacity:.5; cursor:not-allowed; }
body.cb-essential :where(main,.modal) .alert { border-radius:12px!important; border-width:1px; box-shadow:none; }
body.cb-essential :where(main,.modal) :is(.alert-light,.alert-secondary) { background:#171e2a!important; color:var(--lg-text)!important; border-color:#596170!important; }
body.cb-essential :where(main,.modal) .alert-info { background:#102831!important; color:#b3efff!important; border-color:#346b7b!important; }
body.cb-essential :where(main,.modal) .alert-success { background:#10291f!important; color:#a7edc8!important; border-color:#3d785b!important; }
body.cb-essential :where(main,.modal) .alert-warning { background:#302719!important; color:#ffe2a3!important; border-color:#896a38!important; }
body.cb-essential :where(main,.modal) .alert-danger { background:#321b22!important; color:#ffc0c4!important; border-color:#98565f!important; }
body.cb-essential :where(main,.modal) .table {
  --bs-table-bg:transparent; --bs-table-color:var(--lg-text); --bs-table-border-color:var(--lg-stroke);
  --bs-table-striped-bg:#151d29; --bs-table-striped-color:var(--lg-text);
  color:var(--lg-text); border-color:var(--lg-stroke);
}
body.cb-essential :where(main,.modal) :is(.table thead,.table-light) { --bs-table-bg:#171e2a; --bs-table-color:var(--lg-muted); }
body.cb-essential :where(main,.modal) .table td,body.cb-essential :where(main,.modal) .table th { padding:14px 12px; vertical-align:middle; }
body.cb-essential :where(main,.modal) .list-group-item { border-radius:0; }
body.cb-essential :where(main,.modal) .list-group-item:first-child { border-radius:12px 12px 0 0; }
body.cb-essential :where(main,.modal) .list-group-item:last-child { border-radius:0 0 12px 12px; }
body.cb-essential :where(main,.modal) .pagination { flex-wrap:wrap; gap:4px; }
body.cb-essential :where(main,.modal) .page-link { background:#111620; color:var(--lg-text); border:1px solid #596170; border-radius:8px; min-width:44px; min-height:44px; display:grid; place-items:center; }
body.cb-essential :where(main,.modal) .active>.page-link { color:#190810; background:var(--lg-primary); border-color:var(--lg-primary); }
/* Shell: keep links, ordering, visibility conditions and JavaScript hooks. */
body.cb-essential .cb-topbar { z-index:1030; background:rgb(11 15 24 / 96%); border-bottom:1px solid var(--lg-stroke); box-shadow:none; backdrop-filter:blur(16px); padding:0; }
body.cb-essential .cb-topbar-inner { min-height:72px; max-width:1240px; gap:12px; padding:12px 24px; flex-wrap:wrap; }
body.cb-essential .cb-brand { gap:10px; flex-shrink:0; }
body.cb-essential .cb-brand-text { font-size:1.15rem; font-weight:750; letter-spacing:-.04em; color:var(--lg-text); }
body.cb-essential .cb-brand-dot { width:10px; height:10px; background:var(--lg-primary); box-shadow:none; }
body.cb-essential .cb-topbar-actions { gap:8px; flex-wrap:wrap; max-width:100%; }
body.cb-essential .cb-iconbtn { width:44px; height:44px; border-radius:12px; background:#111620; border:1px solid var(--lg-stroke); color:var(--lg-text); box-shadow:none; }
body.cb-essential .cb-cart-badge { background:var(--lg-primary); color:#190810; border-color:var(--lg-bg-raised); }
body.cb-essential .cb-bottomnav { padding-bottom:env(safe-area-inset-bottom); }
body.cb-essential .cb-bottomnav-inner { background:rgb(11 15 24 / 97%); border:1px solid var(--lg-stroke); box-shadow:0 8px 32px #0005; backdrop-filter:blur(16px); border-radius:20px; }
body.cb-essential .cb-bottomnav-inner::before,body.cb-essential .cb-nav-indicator,body.cb-essential .cb-create-ring { display:none; }
body.cb-essential .cb-nav-item { min-height:52px; color:var(--lg-muted); }
body.cb-essential .cb-nav-item.active { color:#f1ecff; }
body.cb-essential .cb-nav-item.active .cb-nav-icon-wrap { background:#28213d; color:#d2c8ff; box-shadow:none; }
body.cb-essential .cb-nav-avatar { box-shadow:none; border-color:var(--lg-stroke); }
body.cb-essential .cb-nav-avatar.active { border-color:var(--lg-secondary); }
body.cb-essential .cb-create-core { display:grid; place-items:center; width:58px; height:58px; border-radius:50%; background:var(--lg-primary); color:#190810; box-shadow:none; border:0; }
body.cb-essential :is(.cb-create-menu-card,.cb-search-card) { background:#111620; border:1px solid #596170; border-radius:16px; box-shadow:0 20px 60px #0006; }
body.cb-essential .cb-create-action { background:transparent; color:var(--lg-text); border-color:var(--lg-stroke); border-radius:12px; }
body.cb-essential .cb-create-action:hover { background:#1b2332; }
body.cb-essential .cb-create-action .sub { color:var(--lg-muted); }
body.cb-essential .cb-search-row { min-width:0; }
body.cb-essential .cb-search-input { min-height:44px; min-width:0; width:100%; flex:1; color:var(--lg-text); font-size:1rem; }
body.cb-essential .cb-search-input::placeholder { color:var(--lg-muted); }
body.cb-essential .cb-search-cancel { color:#d2c8ff; min-height:44px; flex-shrink:0; }
body.cb-essential .modal-content { background:#111620!important; color:var(--lg-text)!important; border:1px solid #596170!important; border-radius:18px; box-shadow:0 24px 80px #0008; backdrop-filter:none; }
body.cb-essential :is(.modal-header,.modal-footer) { border-color:var(--lg-stroke); }
body.cb-essential .modal .btn-close { filter:invert(1) grayscale(1) brightness(2); width:24px; height:24px; padding:10px; }
body.cb-essential :where(main,.modal) .cb-btn { min-height:44px; border-radius:10px; padding:10px 16px; font-weight:650; }
body.cb-essential :where(main,.modal) :is(.cb-newcard-hero,.cb-credit-card) { background:linear-gradient(135deg,#28213d,#141e2c); border:1px solid #596170; border-radius:18px; box-shadow:none; backdrop-filter:none; }
body.cb-essential .cb-newcard-orb { display:none; }
body.cb-essential .cb-cookie-notice { background:#111620; color:var(--lg-text); border-color:#596170; border-radius:16px; }
body.cb-essential .cb-cookie-actions button { background:var(--lg-primary); border-color:var(--lg-primary); color:#190810; }
@media(min-width:1100px) {
  body.cb-essential .cb-bottomnav-inner { max-width:620px; }
  body.cb-essential main > .container { padding-top:36px!important; }
}
@media(max-width:700px) {
  body.cb-essential .cb-topbar-inner { padding:10px 16px; min-height:64px; gap:8px; }
  body.cb-essential .cb-topbar-actions { gap:5px; }
  body.cb-essential .cb-brand-text { font-size:1.03rem; }
  body.cb-essential .cb-topbar-actions #cb-cookie-open { padding:8px 10px; font-size:.75rem; }
  body.cb-essential .cb-bottomnav-inner { border-radius:18px; }
  body.cb-essential main > .container { padding-top:22px!important; }
}
@media(max-width:380px) {
  body.cb-essential .cb-topbar-inner { padding-left:12px; padding-right:12px; }
  body.cb-essential .cb-topbar-actions { gap:4px; }
  body.cb-essential .cb-topbar-actions .cb-iconbtn { width:44px; height:44px; }
  body.cb-essential .cb-brand-text { font-size:1rem; }
}
@media(prefers-reduced-motion:reduce) {
  body.cb-essential :where(main,.modal,.cb-topbar,.cb-bottomnav,.cb-search-sheet) *,
  body.cb-essential :where(main,.modal,.cb-topbar,.cb-bottomnav,.cb-search-sheet) *::before,
  body.cb-essential :where(main,.modal,.cb-topbar,.cb-bottomnav,.cb-search-sheet) *::after {
    animation:none!important; transition:none!important; scroll-behavior:auto!important;
  }
}
@supports not (backdrop-filter:blur(1px)) {
  body.cb-essential :is(.cb-topbar,.cb-bottomnav-inner) { background:#0b0f18; }
}
