@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap');

/* Benny-only Modern theme. The existing rules remain the Classic theme. */
body.design-theme-modern {
  --modern-ink: #172135;
  --modern-muted: #61708b;
  --modern-line: #dce4f2;
  --modern-card: rgba(255, 255, 255, 0.9);
  --modern-accent: #176bff;
  --modern-teal: #00a88f;
  --modern-warm: #f29a2e;
  background:
    radial-gradient(circle at 3% 0%, rgba(0, 168, 143, 0.16), transparent 26rem),
    radial-gradient(circle at 100% 16%, rgba(23, 107, 255, 0.15), transparent 32rem),
    #f4f7fc;
  color: var(--modern-ink);
  font-family: 'DM Sans', sans-serif;
  text-align: left;
}

.design-theme-modern .header-wrap { max-width: 1584px; margin: 28px auto 18px; padding: 0 24px; text-align: center; }
.design-theme-modern .banner-img { border-radius: 24px; box-shadow: 0 24px 60px rgba(31, 53, 89, 0.18); border: 1px solid rgba(255,255,255,0.78); }
.design-theme-modern .site-title { font: 700 clamp(2.2rem, 5vw, 4.5rem)/1 'Fraunces', serif; letter-spacing: -0.055em; color: var(--modern-ink); margin: 42px 0; }
.design-theme-modern .static-message { max-width: 900px; border: 1px solid var(--modern-line); border-radius: 20px; box-shadow: 0 18px 45px rgba(31, 53, 89, 0.1); background: var(--modern-card); color: var(--modern-muted); font-size: 1rem; line-height: 1.6; }
.design-theme-modern .static-message .highlight { color: var(--modern-teal); font-size: 1.1rem; }
.design-theme-modern .static-message a { color: var(--modern-accent); }

.design-theme-modern .cart-widget { background: #172135; border: 0; padding: 12px 16px; box-shadow: 0 16px 35px rgba(23, 33, 53, 0.24); }
.design-theme-modern .cart-label { color: #fff; }.design-theme-modern .cart-count { background: #58e1c7; color: #0d2a2a; }
.design-theme-modern .cart-banner { background: var(--modern-teal); color: #fff; border-radius: 999px; }

.design-theme-modern #search-container { max-width: 1584px; margin: 0 auto; padding: 4px 24px 0; }
.design-theme-modern #search-bar-container { padding: 10px; border: 1px solid var(--modern-line); background: rgba(255,255,255,0.82); border-radius: 18px; box-shadow: 0 15px 36px rgba(31, 53, 89, 0.08); }
.design-theme-modern #search-bar { min-height: 48px; border: 0; background: #eef3fb; color: var(--modern-ink); border-radius: 12px; font-family: inherit; }
.design-theme-modern #search-button, .design-theme-modern #copy-link-button { min-height: 48px; border-radius: 12px; background: var(--modern-accent); color: #fff; box-shadow: none; }
.design-theme-modern #copy-link-button { background: #e8edf7; color: var(--modern-ink); }
.design-theme-modern #result-counter { color: var(--modern-muted); font-weight: 700; letter-spacing: 0.02em; margin: 18px 0; text-align: center; }
.design-theme-modern #dropdowns-container { transform: none; gap: 10px; margin: 0 auto 24px; padding: 18px; border: 1px solid var(--modern-line); border-radius: 20px; background: rgba(255,255,255,0.65); }
.design-theme-modern .dropdown-group { min-width: 136px; }.design-theme-modern .dropdown-group label { color: var(--modern-muted); font-size: 0.73rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.design-theme-modern .dropdown-group select, .design-theme-modern .owner-settings-modal select { width: 100%; min-width: 136px; max-width: 190px; padding: 10px 30px 10px 12px; border: 1px solid var(--modern-line); border-radius: 10px; background: #fff; color: var(--modern-ink); font-family: inherit; font-size: .88rem; }
.design-theme-modern .sib-set-filter-toggle { border: 1px solid var(--modern-line); border-radius: 12px; background: #fff; min-height: 48px; padding: 0 14px; }.design-theme-modern #reset-button-container { margin: 0 0 24px; }

.design-theme-modern #nests { max-width: 1584px; margin: 0 auto; padding: 0 24px; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.design-theme-modern .nest { min-height: 270px; padding: 30px 24px 24px; border: 1px solid var(--modern-line); border-radius: 22px; background: var(--modern-card); box-shadow: 0 16px 38px rgba(31, 53, 89, 0.09); color: var(--modern-ink); transition: transform .2s ease, box-shadow .2s ease; }
.design-theme-modern .nest:hover { transform: translateY(-4px); box-shadow: 0 22px 45px rgba(31, 53, 89, .14); }.design-theme-modern .nest p { line-height: 1.55; margin: .36rem 0; }
.design-theme-modern .nest.gold-frame { border: 2px solid var(--modern-warm); }.design-theme-modern .nest-file-id { color: var(--modern-muted); font-size: .82rem; font-weight: 600; }.design-theme-modern .nest-price { color: #c56704; }
.design-theme-modern .nest-highlight-badge { background: #fff0d8; color: #a65b03; border-color: #ffd696; }.design-theme-modern .nest-highlighted-trait { color: var(--modern-accent) !important; text-shadow: none !important; }
.design-theme-modern .nest-delete-toggle, .design-theme-modern .nest-highlight-toggle, .design-theme-modern .nest-offer-toggle { box-shadow: none; }.design-theme-modern .nest-delete-toggle { background: #fff0f0; color: #bd3030; border-color: #ffd1d1; }.design-theme-modern .nest-highlight-toggle { background: #f0f3f8; color: #8290a8; border-color: #d8e0ec; }.design-theme-modern .nest-highlight-toggle.active { background: #fff2cc; color: #bb7d00; border-color: #ffd875; }.design-theme-modern .nest-offer-toggle { background: #edf4ff; color: #176bff; border-color: #cbdcff; }.design-theme-modern .nest-offer-toggle.active { background: #176bff; color: #fff; }

.design-theme-modern .teleport-button, .design-theme-modern .pedigree-button, .design-theme-modern .contact-button, .design-theme-modern .reset-button { border-radius: 12px; font-family: inherit; font-weight: 700; border: 1px solid transparent; box-shadow: none; }.design-theme-modern .main-page .nest-actions .contact-button, .design-theme-modern .contact-button { background: var(--modern-teal); color: #fff; }.design-theme-modern .main-page .nest-actions .teleport-button { background: #eaf1fc; color: #1d4f96; }.design-theme-modern .main-page .nest-actions .pedigree-button { background: #f0f2f7; color: #39475d; }.design-theme-modern .main-page .nest-actions .make-offer-button.pedigree-button { background: #e8f8f2; color: #08745f; }.design-theme-modern .reset-button { background: #f2f4f8; color: #4c5c73; border-color: #d9e0eb; }
.design-theme-modern .pagination a, .design-theme-modern .pagination span { border-radius: 10px; background: #fff; color: var(--modern-ink); border-color: var(--modern-line); }.design-theme-modern .pagination .current-page { background: var(--modern-accent); color: #fff; }

.design-theme-modern .owner-admin-shell { max-width: 1584px; margin: 0 auto; padding: 0 24px; }.design-theme-modern .owner-admin-bulk { background: transparent; }.design-theme-modern .owner-admin-button-row { gap: 10px; }.design-theme-modern .owner-admin-panel-toggle { border-radius: 12px; background: #fff; color: var(--modern-ink); border-color: var(--modern-line); box-shadow: 0 8px 18px rgba(31,53,89,.07); }.design-theme-modern .owner-admin-panel-toggle::before { color: var(--modern-teal); }.design-theme-modern .owner-maintenance-toggle-button { border-radius: 14px; box-shadow: none; }.design-theme-modern .owner-maintenance-status { border-radius: 12px; }
.design-theme-modern .owner-settings-modal, .design-theme-modern .owner-storage-modal { background: #fff; color: var(--modern-ink); border: 1px solid var(--modern-line); border-radius: 20px; box-shadow: 0 30px 70px rgba(23,33,53,.27); }.design-theme-modern .owner-settings-modal input, .design-theme-modern .owner-settings-modal textarea { border-color: var(--modern-line); background: #f7f9fd; color: var(--modern-ink); border-radius: 10px; font-family: inherit; }.design-theme-modern .owner-settings-help { color: var(--modern-muted); font-size: .88rem; margin: -4px 0 8px; }
.design-theme-modern .modal-overlay, .design-theme-modern .owner-settings-overlay { background: rgba(20,31,48,.45); backdrop-filter: blur(7px); }.design-theme-modern .cart-modal { background: #fff; color: var(--modern-ink); border: 1px solid var(--modern-line); border-radius: 22px; box-shadow: 0 32px 75px rgba(23,33,53,.3); }

@media (max-width: 920px) { .design-theme-modern #nests { grid-template-columns: repeat(2, minmax(0, 1fr)); } .design-theme-modern #search-container, .design-theme-modern #nests, .design-theme-modern .owner-admin-shell, .design-theme-modern .header-wrap { padding-left: 14px; padding-right: 14px; } }
@media (max-width: 620px) { .design-theme-modern #nests { grid-template-columns: 1fr; gap: 14px; }.design-theme-modern .nest { border-radius: 18px; min-height: 0; }.design-theme-modern #search-bar-container { flex-wrap: wrap; }.design-theme-modern #search-bar { width: 100%; }.design-theme-modern #dropdowns-container { padding: 12px; }.design-theme-modern .dropdown-group, .design-theme-modern .dropdown-group select { width: min(100%, 240px); }.design-theme-modern .cart-widget { top: 10px; right: 10px; }.design-theme-modern .cart-label { display: none; } }

/* Dark modern refinement: a focused midnight interface, distinct from Classic. */
body.design-theme-modern {
  --modern-ink: #edf6ff;
  --modern-muted: #9baec5;
  --modern-line: rgba(147, 186, 219, 0.17);
  --modern-card: rgba(13, 28, 48, 0.88);
  --modern-accent: #54d6ff;
  --modern-teal: #32c6a6;
  --modern-warm: #ffae4c;
  background:
    radial-gradient(circle at 3% -8%, rgba(33, 143, 189, 0.3), transparent 30rem),
    radial-gradient(circle at 104% 12%, rgba(52, 198, 166, 0.2), transparent 28rem),
    radial-gradient(circle at 50% 100%, rgba(73, 83, 186, 0.16), transparent 36rem),
    #07111f;
}

.design-theme-modern .site-title { color: #f2f8ff; text-shadow: 0 10px 28px rgba(0,0,0,.32); }
.design-theme-modern .banner-img { border-radius: 0; border-color: rgba(151, 222, 255, .23); box-shadow: 0 24px 65px rgba(0,0,0,.38); }
.design-theme-modern .static-message, .design-theme-modern #search-bar-container, .design-theme-modern #dropdowns-container { background: rgba(11, 26, 46, .8); border-color: var(--modern-line); box-shadow: 0 18px 45px rgba(0,0,0,.2); }
.design-theme-modern .static-message { color: var(--modern-muted); }.design-theme-modern .static-message a { color: var(--modern-accent); }
.design-theme-modern #search-bar { background: rgba(4, 16, 31, .75); color: #f3f8ff; }.design-theme-modern #copy-link-button { background: rgba(145, 183, 217, .13); color: #dcecff; }
.design-theme-modern .dropdown-group select { min-height: 34px; padding: 6px 28px 6px 10px; background: #0a1a2e; color: #dbeaff; border-color: rgba(151, 210, 245, .2); }
.design-theme-modern .owner-settings-modal select { background: #0a1a2e; color: #dbeaff; border-color: rgba(151, 210, 245, .2); }
.design-theme-modern .dropdown-group label { color: #90a7c1; }
.design-theme-modern .sib-set-filter-toggle { background: rgba(12, 29, 49, .96); border-color: rgba(117, 197, 243, .22); box-shadow: none; }
.design-theme-modern .sib-set-filter-toggle-pill { background: #53637c; }
.design-theme-modern .sib-set-filter-toggle-knob { background: #d9e7f8; }
.design-theme-modern .sib-set-filter-toggle input:checked + .sib-set-filter-toggle-pill { background: linear-gradient(135deg, #239d91, #177488); }
.design-theme-modern .sib-set-filter-toggle-label { color: #b9d8f1; }
.design-theme-modern #reset-dropdowns-button { margin: 0; min-height: 48px; white-space: nowrap; }
.design-theme-modern #dropdowns-container { gap: 7px; padding: 13px 14px; }
.design-theme-modern .dropdown-group { min-width: 108px; }
.design-theme-modern .dropdown-group select { min-width: 108px; width: 108px; max-width: 108px; font-size: .8rem; }
.design-theme-modern .dropdown-group label { font-size: .67rem; letter-spacing: .045em; }

.design-theme-modern .nest { background: linear-gradient(145deg, rgba(19, 40, 66, .96), rgba(10, 24, 43, .96)); border-color: var(--modern-line); box-shadow: 0 16px 42px rgba(0,0,0,.23), inset 0 1px 0 rgba(218,240,255,.035); }.design-theme-modern .nest:hover { box-shadow: 0 28px 55px rgba(0,0,0,.36), 0 0 0 1px rgba(84,214,255,.23); }.design-theme-modern .nest-file-id { color: #91aac5; }.design-theme-modern .nest-price { color: #ffbb67; }
.design-theme-modern .nest-highlight-badge { background: rgba(255, 174, 76, .16); border-color: rgba(255, 190, 101, .4); color: #ffd196; }.design-theme-modern .nest.gold-frame { border-color: #ffae4c; }.design-theme-modern .nest-highlighted-trait { color: #70dbff !important; }
.design-theme-modern .nest-delete-toggle { background: rgba(255, 101, 113, .14); border-color: rgba(255, 135, 145, .34); color: #ffabb3; }.design-theme-modern .nest-highlight-toggle { background: rgba(169, 193, 222, .12); border-color: rgba(169,193,222,.2); color: #8fa8c6; }.design-theme-modern .nest-highlight-toggle.active { background: rgba(255, 174, 76, .2); border-color: rgba(255, 193, 108, .45); color: #ffcf83; }.design-theme-modern .nest-offer-toggle { background: rgba(84,214,255,.12); border-color: rgba(84,214,255,.3); color: #8ee6ff; }.design-theme-modern .nest-offer-toggle.active { background: #1c94c2; }

.design-theme-modern .teleport-button, .design-theme-modern .pedigree-button, .design-theme-modern .contact-button, .design-theme-modern .reset-button { border-radius: 999px; padding-left: 1.65rem; padding-right: 1.65rem; letter-spacing: .025em; transition: transform .18s ease, box-shadow .18s ease, filter .18s ease; }.design-theme-modern .teleport-button:hover, .design-theme-modern .pedigree-button:hover, .design-theme-modern .contact-button:hover, .design-theme-modern .reset-button:hover { transform: translateY(-2px); filter: brightness(1.08); }
.design-theme-modern .main-page .nest-actions .contact-button, .design-theme-modern .contact-button { background: linear-gradient(135deg, #20ad90, #178b9b); box-shadow: 0 10px 24px rgba(20, 165, 143, .22); }.design-theme-modern .main-page .nest-actions .teleport-button { background: linear-gradient(135deg, #1e557c, #173651); color: #dff4ff; border-color: rgba(121,205,255,.2); }.design-theme-modern .main-page .nest-actions .pedigree-button { background: linear-gradient(135deg, #34435d, #252f45); color: #e4edff; border-color: rgba(185,205,239,.16); }.design-theme-modern .main-page .nest-actions .make-offer-button.pedigree-button { background: linear-gradient(135deg, #268d5d, #186c56); color: #e8fff7; }.design-theme-modern .reset-button { background: rgba(157,185,219,.12); color: #d4e5fb; border-color: rgba(170,208,242,.2); }
.design-theme-modern .cart-widget { background: rgba(8, 20, 37, .9); border: 1px solid rgba(113,210,255,.22); }.design-theme-modern .cart-count { background: #50dcbd; }.design-theme-modern .cart-banner { background: linear-gradient(135deg, #198c7c, #176989); }
.design-theme-modern .pagination a, .design-theme-modern .pagination span { background: rgba(16,35,58,.88); color: #d8eaff; border-color: var(--modern-line); }.design-theme-modern .pagination .current-page { background: #1b9eca; }
.design-theme-modern .owner-admin-panel-toggle { background: linear-gradient(135deg, rgba(33, 66, 94, .96), rgba(20, 42, 65, .96)); color: #e5f2ff; border-color: rgba(106,190,240,.22); box-shadow: 0 10px 25px rgba(0,0,0,.15); border-radius: 999px; }.design-theme-modern .owner-admin-panel-toggle::before { color: #69dfc5; }.design-theme-modern .owner-settings-modal, .design-theme-modern .owner-storage-modal, .design-theme-modern .cart-modal { background: #0d2038; color: #e9f3ff; border-color: rgba(116, 197, 246, .24); }.design-theme-modern .owner-settings-modal input, .design-theme-modern .owner-settings-modal textarea { background: #08182b; color: #e9f3ff; border-color: rgba(116,197,246,.2); }.design-theme-modern .owner-settings-help { color: #9bb3cf; }

/* Benny-only Modern colorways share the Modern layout and change its surfaces and accents. */
body.design-theme-modern.design-theme-modern-red {
  --modern-ink: #fff0ec; --modern-muted: #d6aaa3; --modern-line: rgba(255, 114, 99, .27);
  --modern-accent: #ff715d; --modern-teal: #ef4a3e; --modern-warm: #ffa185;
  --variant-surface: #2a1312; --variant-deep: #1b0c0c; --variant-card: #351918;
  --variant-soft: #482320; --variant-button: #d93632; --variant-button-ink: #fff;
  --variant-glow: rgba(232, 52, 45, .25);
  background: radial-gradient(circle at 6% -8%, rgba(208, 38, 34, .3), transparent 31rem),
              radial-gradient(circle at 104% 18%, rgba(255, 103, 77, .15), transparent 28rem), #190c0c;
}
body.design-theme-modern.design-theme-modern-orange {
  --modern-ink: #fff1e4; --modern-muted: #d6b9a0; --modern-line: rgba(255, 174, 105, .25);
  --modern-accent: #ffad62; --modern-teal: #f58a42; --modern-warm: #ffd08a;
  --variant-surface: #2b1c14; --variant-deep: #1b110c; --variant-card: #352219;
  --variant-soft: #493021; --variant-button: #e87830; --variant-button-ink: #251207;
  --variant-glow: rgba(255, 144, 60, .22);
  background: radial-gradient(circle at 6% -8%, rgba(224, 103, 32, .26), transparent 31rem),
              radial-gradient(circle at 104% 18%, rgba(255, 177, 94, .14), transparent 28rem), #19110c;
}
body.design-theme-modern.design-theme-modern-yellow {
  --modern-ink: #fff9df; --modern-muted: #d5c9a4; --modern-line: rgba(246, 211, 108, .25);
  --modern-accent: #f6d565; --modern-teal: #e9bd43; --modern-warm: #ffe294;
  --variant-surface: #292614; --variant-deep: #19180d; --variant-card: #343018;
  --variant-soft: #464021; --variant-button: #e1b940; --variant-button-ink: #241b07;
  --variant-glow: rgba(246, 211, 93, .2);
  background: radial-gradient(circle at 6% -8%, rgba(204, 162, 36, .25), transparent 31rem),
              radial-gradient(circle at 104% 18%, rgba(255, 225, 124, .13), transparent 28rem), #17170d;
}
body.design-theme-modern.design-theme-modern-pink {
  --modern-ink: #fff0f8; --modern-muted: #deb4cd; --modern-line: rgba(255, 145, 205, .25);
  --modern-accent: #ff8ac9; --modern-teal: #f064ac; --modern-warm: #ffb5dd;
  --variant-surface: #2b1426; --variant-deep: #1d0b19; --variant-card: #371a30;
  --variant-soft: #4b2440; --variant-button: #dc4d9b; --variant-button-ink: #fff;
  --variant-glow: rgba(246, 85, 167, .25);
  background: radial-gradient(circle at 6% -8%, rgba(219, 62, 150, .27), transparent 31rem),
              radial-gradient(circle at 104% 18%, rgba(255, 141, 205, .16), transparent 28rem), #1a0b18;
}
body.design-theme-modern.design-theme-modern-green {
  --modern-ink: #edfff4; --modern-muted: #a9ceb9; --modern-line: rgba(118, 223, 161, .25);
  --modern-accent: #75e4aa; --modern-teal: #43c986; --modern-warm: #c8ed91;
  --variant-surface: #14291e; --variant-deep: #0b1b13; --variant-card: #1b3426;
  --variant-soft: #254934; --variant-button: #2fab70; --variant-button-ink: #071c12;
  --variant-glow: rgba(72, 206, 131, .23);
  background: radial-gradient(circle at 6% -8%, rgba(46, 164, 99, .28), transparent 31rem),
              radial-gradient(circle at 104% 18%, rgba(123, 228, 169, .14), transparent 28rem), #0c1912;
}
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) {
  --modern-card: var(--variant-card);
}

body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) .site-title,
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) .nest-price,
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) .nest-highlighted-trait {
  color: var(--modern-accent) !important;
}
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) .banner-img {
  border-color: var(--modern-line);
}
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) :is(.static-message, #search-bar-container, #dropdowns-container) {
  background: var(--variant-surface); border-color: var(--modern-line);
}
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) :is(#search-bar, .dropdown-group select, .owner-settings-modal select, .owner-settings-modal input, .owner-settings-modal textarea) {
  background: var(--variant-deep); color: var(--modern-ink); border-color: var(--modern-line);
}
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) :is(.dropdown-group label, .nest-file-id, .owner-settings-help, .sib-set-filter-toggle-label) {
  color: var(--modern-muted);
}
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) .nest {
  background: linear-gradient(145deg, var(--variant-card), var(--variant-deep)); border-color: var(--modern-line);
}
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) .nest:hover {
  box-shadow: 0 28px 55px rgba(0, 0, 0, .36), 0 0 0 1px var(--modern-accent);
}
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) #search-button,
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) .nest-offer-toggle.active {
  background: var(--variant-button); color: var(--variant-button-ink); border-color: var(--modern-line);
}
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) #copy-link-button,
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) :is(.pagination a, .pagination span, .reset-button, .sib-set-filter-toggle) {
  background: var(--variant-soft); color: var(--modern-ink); border-color: var(--modern-line);
}
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) .pagination .current-page {
  background: var(--variant-button); color: var(--variant-button-ink); border-color: var(--modern-line);
}
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) :is(.nest-actions .contact-button, .contact-button, .nest-actions .make-offer-button.pedigree-button, .cart-banner) {
  background: linear-gradient(135deg, var(--variant-button), var(--modern-accent));
  color: var(--variant-button-ink); box-shadow: 0 10px 24px var(--variant-glow);
}
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) :is(.nest-actions .teleport-button, .nest-actions .pedigree-button, .owner-admin-panel-toggle) {
  background: linear-gradient(135deg, var(--variant-soft), var(--variant-surface));
  color: var(--modern-ink); border-color: var(--modern-line);
}
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) .owner-admin-panel-toggle::before,
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) .static-message .highlight {
  color: var(--modern-accent);
}
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) :is(.owner-settings-modal, .owner-storage-modal, .cart-modal, .cart-widget) {
  background: var(--variant-surface); color: var(--modern-ink); border-color: var(--modern-line);
}
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) :is(.cart-count, .sib-set-filter-toggle input:checked + .sib-set-filter-toggle-pill) {
  background: var(--modern-accent); color: var(--variant-button-ink);
}
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) .owner-theme-form #design-theme {
  border-color: var(--modern-line);
  background: linear-gradient(45deg, transparent 50%, var(--modern-accent) 50%) calc(100% - 21px) center / 6px 6px no-repeat,
              linear-gradient(135deg, var(--modern-accent) 50%, transparent 50%) calc(100% - 15px) center / 6px 6px no-repeat,
              var(--variant-deep);
  color: var(--modern-ink);
}
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) :is(.owner-sib-set-edit-panel, .owner-rich-editor-toolbar, .owner-sib-set-edit-member-row) {
  background-color: var(--variant-surface);
  border-color: var(--modern-line);
  color: var(--modern-ink);
}
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) :is(.owner-sib-set-edit-header, .owner-sib-set-edit-members > strong, .owner-sib-set-edit-additions > strong) {
  color: var(--modern-accent);
}
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) :is(.owner-sort-select, .owner-sib-set-edit-form input, .owner-sib-set-edit-form textarea) {
  background-color: var(--variant-deep);
  color: var(--modern-ink);
  border-color: var(--modern-line);
}
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) .owner-sort-select {
  background-image: linear-gradient(45deg, transparent 50%, var(--modern-accent) 50%), linear-gradient(135deg, var(--modern-accent) 50%, transparent 50%);
}
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) .owner-settings-switch input:checked + .owner-settings-switch-pill {
  background: var(--variant-button);
  border-color: var(--modern-line);
}
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) .owner-settings-switch-label {
  color: var(--modern-ink);
}
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) :is(.nest-offer-toggle, .nest-highlight-badge) {
  background: var(--variant-soft);
  color: var(--modern-accent);
  border-color: var(--modern-line);
}

:root {
  --bg: #121212;
  --surface: #1e1e2e;
  --text: #e0e0e0;
  --primary: #1abc9c;
  --primary-hover: #16a085;
  --secondary: #3498db;
  --secondary-hover: #2980b9;
  --accent: #f39c12;
  --accent-hover: #d35400;
  --danger: #e74c3c;
  --danger-hover: #c0392b;
  --muted: #2a2a2a;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  position: relative;
  padding-bottom: 3rem;
  text-align: center;
  margin: 0;
}

.cart-widget {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(30, 30, 46, 0.95);
  border: 1px solid rgba(243,156,18,0.45);
  color: var(--text);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.45);
}

.cart-banner {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 1190;
  max-width: min(520px, calc(100vw - 32px));
  width: max-content;
  background: rgba(243, 156, 18, 0.96);
  color: #111;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(0,0,0,0.38);
}

.cart-banner:hover {
  background: #ffb62e;
}

.cart-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.cart-label {
  font-weight: 700;
  color: var(--accent);
}

.cart-count {
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--bg);
  font-weight: 700;
}

.static-message {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 10px;
  padding: 20px;
  margin: 20px auto;
  max-width: 800px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  text-align: center;
  font-size: 1.2rem;
  line-height: 1.6;
}

.static-message p {
  margin: 15px 0;
}

.static-message .highlight {
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 700;
}

.static-message a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
}

.static-message a:hover {
  color: var(--primary-hover);
}

/* SPECIAL AD BOX ABOVE SEARCH BAR, BUTTONS CENTERED BELOW TEXT */
.special-ad-box {
  background: radial-gradient(circle at top left, rgba(243,156,18,0.25), transparent 60%),
              radial-gradient(circle at bottom right, rgba(52,152,219,0.25), transparent 60%),
              var(--surface);
  border-radius: 12px;
  padding: 18px 20px 22px 20px;
  margin: 10px auto 20px auto;
  max-width: 900px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.6);
  border: 1px solid rgba(243,156,18,0.4);
  text-align: center;
}

.special-ad-box h2 {
  margin: 0 0 6px 0;
  font-size: 1.4rem;
  color: var(--accent);
}

.special-ad-box p {
  margin: 0;
  font-size: 1rem;
}

/* NEW: container for multiple special buttons */
.special-ad-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  padding: 0 8px;
}

.special-ad-button {
  display: inline-block;
  margin-top: 0; 
  padding: 10px 26px;
  background: linear-gradient(180deg, #4f6855 0%, #405346 100%);
  color: #eef3fb;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.85rem;
  border: 1px solid rgba(214, 222, 235, 0.18);
  box-shadow: 0 10px 22px rgba(0,0,0,0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.special-ad-button:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #5a765f 0%, #49604f 100%);
  border-color: rgba(183, 214, 193, 0.32);
  box-shadow: 0 14px 26px rgba(0,0,0,0.28);
}

/* Small info box when special mode is active */
.special-mode-box {
  background: var(--surface);
  border-radius: 8px;
  padding: 10px 16px;
  margin: 10px auto 10px auto;
  max-width: 800px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.5);
  border: 1px solid var(--primary);
}

.special-mode-box h3 {
  margin: 0 0 4px 0;
  color: var(--primary);
  font-size: 1.1rem;
}

.special-mode-box p {
  margin: 0;
  font-size: 0.95rem;
}

.special-mode-link {
  color: var(--secondary);
  text-decoration: underline;
  font-weight: 600;
}

.special-mode-link:hover {
  color: var(--secondary-hover);
}

/* QUICK SEARCH BUTTONS UNDER SEARCH BAR */
.quick-search-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 8px auto 14px auto;
  max-width: 900px;
  padding: 0 12px;
}

.quick-search-button {
  display: inline-block;
  padding: 10px 18px;
  background: linear-gradient(180deg, #51636c 0%, #425159 100%);
  color: #eef3fb;
  border: 1px solid rgba(214, 222, 235, 0.18);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(0,0,0,0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.quick-search-button:hover {
  background: linear-gradient(180deg, #5d727c 0%, #4b5c65 100%);
  border-color: rgba(185, 207, 217, 0.32);
  box-shadow: 0 14px 26px rgba(0,0,0,0.28);
  transform: translateY(-1px);
}

#page-title {
  margin: 0 auto 20px auto;
  max-width: 100%;
  display: block;
}

#search-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#search-bar-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.sib-set-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(30, 30, 46, 0.95);
  border: 1px solid rgba(243, 156, 18, 0.3);
  color: #eef3fb;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0,0,0,0.22);
  user-select: none;
}

.sib-set-filter-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sib-set-filter-toggle-pill {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(101, 109, 133, 0.8);
  position: relative;
  transition: background 0.18s ease;
}

.sib-set-filter-toggle-knob {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f4f6fb;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform 0.18s ease;
  box-shadow: 0 4px 8px rgba(0,0,0,0.24);
}

.sib-set-filter-toggle input:checked + .sib-set-filter-toggle-pill {
  background: linear-gradient(180deg, #7a6327 0%, #5e4b1e 100%);
}

.sib-set-filter-toggle input:checked + .sib-set-filter-toggle-pill .sib-set-filter-toggle-knob {
  transform: translateX(20px);
}

.sib-set-filter-toggle-label {
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #f4c04f;
}

#search-bar {
  padding: 10px;
  width: 600px;
  max-width: 90%;
  box-sizing: border-box;
  background-color: var(--surface);
  color: var(--text);
  border: 1px solid var(--muted);
  border-radius: 4px;
}

#search-button,
#copy-link-button {
  padding: 10px 20px;
  margin-left: 10px;
  background-color: var(--primary);
  color: var(--bg);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

#search-button:hover,
#copy-link-button:hover {
  background-color: var(--primary-hover);
}

.main-page #search-button,
.main-page #copy-link-button {
  background: linear-gradient(180deg, #32465c 0%, #273749 100%);
  border: 1px solid rgba(214, 222, 235, 0.18);
  border-radius: 10px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
  color: #eef3fb;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.main-page #search-button:hover,
.main-page #copy-link-button:hover {
  background: linear-gradient(180deg, #39516a 0%, #2d4055 100%);
  border-color: rgba(214, 222, 235, 0.28);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

#result-counter {
  margin-bottom: 10px;
}

#nests {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 20px;
}

.nest {
  padding: 1rem;
  background-color: var(--surface);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  text-align: center;
  position: relative;
}

.nest-price {
  font-weight: 700;
  color: var(--accent);
}

.nest-file-id {
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.nest-price-missing {
  color: #ff8f8f;
}

.nest-price-teleport-check {
  color: #f39c12;
}

.nest-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 12px;
  margin-top: 12px;
}

.nest.gold-frame {
  border: 3px solid var(--accent);
}

.nest-highlighted {
  box-shadow: 0 0 0 1px rgba(255, 210, 110, 0.25), 0 14px 30px rgba(0,0,0,0.34);
}

.nest-highlight-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px auto;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #8e6f2d 0%, #71571d 100%);
  border: 1px solid rgba(255, 216, 132, 0.45);
  color: #fff4cf;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nest-highlighted-trait {
  color: #ffd86a !important;
  font-weight: 800 !important;
  font-size: 1.08em !important;
  text-shadow: 0 0 10px rgba(255, 210, 106, 0.18) !important;
}

.nest-highlight-toggle-form {
  position: absolute;
  top: 12px;
  left: 56px;
  margin: 0;
  z-index: 3;
}

.nest-offer-toggle-form {
  position: absolute;
  top: 12px;
  left: 104px;
  margin: 0;
  z-index: 3;
}

.nest-delete-toggle-form {
  position: absolute;
  top: 12px;
  left: 12px;
  margin: 0;
  z-index: 3;
}

.nest-delete-toggle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 140, 140, 0.52);
  background: linear-gradient(180deg, #b44a4a 0%, #872c2c 100%);
  color: #fff2f2;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(0,0,0,0.26);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.nest-delete-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 189, 189, 0.74);
  background: linear-gradient(180deg, #c95a5a 0%, #9e3a3a 100%);
  box-shadow: 0 14px 26px rgba(0,0,0,0.3);
}

.nest-highlight-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(214, 222, 235, 0.18);
  background: linear-gradient(180deg, #43495a 0%, #353b4a 100%);
  color: rgba(255,255,255,0.42);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 10px 22px rgba(0,0,0,0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.nest-highlight-toggle:hover {
  transform: translateY(-1px);
  color: rgba(255,255,255,0.78);
  border-color: rgba(214, 222, 235, 0.3);
  box-shadow: 0 14px 26px rgba(0,0,0,0.28);
}

.nest-highlight-toggle.active {
  background: linear-gradient(180deg, #8d6c29 0%, #70561f 100%);
  border-color: rgba(255, 216, 132, 0.55);
  color: #ffd86a;
}

.nest-offer-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(214, 222, 235, 0.18);
  background: linear-gradient(180deg, #5a5d65 0%, #43464e 100%);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(0,0,0,0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.nest-offer-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(153, 202, 255, 0.62);
}

.nest-offer-toggle.active {
  background: linear-gradient(180deg, #3178c6 0%, #205494 100%);
  border-color: rgba(170, 215, 255, 0.72);
}

.owner-offer-nest-label {
  margin-top: 14px;
  color: #9fcaff;
  font-weight: 800;
  text-align: center;
}

.teleport-button,
.pedigree-button,
.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem;
  padding: 0.75rem 1.5rem;
  color: var(--bg);
  text-decoration: none;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.nest-actions .teleport-button,
.nest-actions .pedigree-button,
.nest-actions .contact-button,
.nest-actions .make-offer-button {
  width: 180px;
  min-height: 48px;
  margin-top: 0;
  box-sizing: border-box;
}

.owner-inline-price-form {
  margin-top: 14px;
  text-align: left;
}

.owner-inline-price-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  text-align: center;
}

.owner-inline-price-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
}

.owner-inline-price-actions input[type="number"] {
  width: 180px;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #444;
  background: #0f0f0f;
  color: #fff;
  box-sizing: border-box;
}

.owner-inline-price-actions .contact-button {
  width: 180px;
  min-height: 46px;
  margin-top: 0;
}

.teleport-button {
  background-color: var(--secondary);
}

.teleport-button:hover {
  background-color: var(--secondary-hover);
}

.pedigree-button {
  background-color: #ffeb3b;
}

.pedigree-button:hover {
  background-color: #f2d91f;
}

.make-offer-button.pedigree-button {
  background-color: #2f8a4c;
  color: #fff;
}

.make-offer-button.pedigree-button:hover {
  background-color: #236b3a;
}

.contact-button {
  background-color: var(--primary);
}

.contact-button:hover {
  background-color: var(--primary-hover);
}

.add-to-cart-button {
  background-color: #33b249;
}

.add-to-cart-button:hover {
  background-color: #28903a;
}

.main-page .nest-actions .teleport-button,
.main-page .nest-actions .pedigree-button,
.main-page .nest-actions .contact-button {
  border: 1px solid rgba(214, 222, 235, 0.18);
  border-radius: 10px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
  color: #eef3fb;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.main-page .nest-actions .contact-button {
  background: linear-gradient(180deg, #355b4a 0%, #284438 100%);
}

.main-page .nest-actions .contact-button:hover {
  background: linear-gradient(180deg, #3d6954 0%, #2e4f40 100%);
  border-color: rgba(214, 222, 235, 0.28);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.28);
}

.main-page .nest-actions .teleport-button {
  background: linear-gradient(180deg, #32465c 0%, #273749 100%);
}

.main-page .nest-actions .teleport-button:hover {
  background: linear-gradient(180deg, #39516a 0%, #2d4055 100%);
  border-color: rgba(214, 222, 235, 0.28);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.28);
}

.main-page .nest-actions .pedigree-button {
  background: linear-gradient(180deg, #4d4654 0%, #3c3642 100%);
}

.main-page .nest-actions .pedigree-button:hover {
  background: linear-gradient(180deg, #585060 0%, #463f4b 100%);
  border-color: rgba(214, 222, 235, 0.28);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.28);
}

.main-page .nest-actions .make-offer-button.pedigree-button {
  background: linear-gradient(180deg, #3f9b59 0%, #276b3c 100%);
}

.main-page .nest-actions .make-offer-button.pedigree-button:hover {
  background: linear-gradient(180deg, #4cad66 0%, #2f7e47 100%);
  border-color: rgba(170, 226, 184, 0.4);
}

.disabled-cart-button,
.add-to-cart-button:disabled {
  background-color: #555;
  cursor: not-allowed;
  opacity: 0.65;
}

#scroll-up {
  display: none;
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--surface);
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

#scroll-up img {
  width: 1.5rem;
  height: 1.5rem;
}

#dropdowns-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 20px;
  transform: scale(0.9);
  transform-origin: top center;
}

.dropdown-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dropdown-group label {
  margin-bottom: 4px;
  font-weight: 500;
  font-size: 0.85rem;
}

.dropdown-group select {
  padding: 5px;
  border-radius: 4px;
  border: 1px solid var(--muted);
  background-color: var(--surface);
  color: var(--text);
  min-width: 120px;
  max-width: 140px;
  width: 120px;
  font-size: 0.85rem;
  box-sizing: border-box;
}

.dropdown-group select option:first-child {
  color: #888 !important;
  font-style: italic;
}

.info-message {
  color: var(--primary);
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
}

.show-all-link {
  color: var(--text);
  text-decoration: underline;
}

.show-all-link:hover {
  color: var(--primary);
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.8);
  z-index: 1000;
}

.modal {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  color: var(--text);
  padding: 1.5rem;
  border-radius: 8px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  z-index: 1001;
}

.cart-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 680px);
  max-height: 80vh;
  overflow-y: auto;
  z-index: 1002;
  background: linear-gradient(180deg, rgba(30,30,46,0.98), rgba(18,18,18,0.98));
  border: 1px solid rgba(243,156,18,0.35);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  padding: 24px;
  text-align: left;
}

.cart-modal h2 {
  margin-top: 0;
  color: var(--accent);
}

.cart-preview-stats,
.checkout-item-lines {
  background: rgba(0,0,0,0.22);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}

.cart-preview-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.cart-preview-note {
  min-height: 1.2em;
  color: #ff8f8f;
  font-weight: 600;
}

.offer-nest-details {
  display: block;
  width: 100%;
  min-height: 190px;
  margin-top: 8px;
  padding: 12px;
  box-sizing: border-box;
  resize: vertical;
  border: 1px solid rgba(214, 222, 235, 0.25);
  border-radius: 10px;
  background: rgba(0,0,0,0.34);
  color: var(--text);
  font: inherit;
}

.modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  align-items: stretch;
}

.modal-actions-inline {
  margin-top: 0;
  margin-bottom: 12px;
}

.cart-modal .modal-actions .pedigree-button,
.cart-modal .modal-actions .contact-button,
.cart-modal .modal-actions .reset-button {
  min-width: 120px;
  min-height: 46px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
}

.buyer-name-input {
  width: 100%;
  padding: 12px;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid var(--muted);
  background: #111;
  color: var(--text);
}

.payment-info-image {
  display: block;
  width: min(100%, 320px);
  margin: 8px auto 18px auto;
  border-radius: 14px;
  border: 1px solid rgba(243,156,18,0.35);
  box-shadow: 0 12px 28px rgba(0,0,0,0.35);
}

#payment-info-modal {
  text-align: center;
}

#payment-info-text {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 440px;
}

#payment-info-modal .modal-actions {
  justify-content: center;
}

#payment-info-link {
  background: linear-gradient(180deg, #465e69 0%, #394d57 100%);
  border: 1px solid rgba(183, 206, 214, 0.4);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.14), 0 0 18px rgba(120, 160, 180, 0.24);
}

#payment-info-link:hover {
  background: linear-gradient(180deg, #516b77 0%, #425964 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.22), 0 0 24px rgba(120, 160, 180, 0.34);
}

#rare-modal-list {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

#rare-modal-list li {
  margin: 0.5rem 0;
}

#rare-modal-list a {
  text-decoration: none;
  color: var(--accent);
}

.reset-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  min-height: 46px;
  box-sizing: border-box;
  background-color: var(--danger);
  color: var(--bg);
  text-decoration: none;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
  margin-top: 5px;
}

.reset-button:hover {
  background-color: var(--danger-hover);
}

.main-page .reset-button {
  background: linear-gradient(180deg, #4d4654 0%, #3c3642 100%);
  border: 1px solid rgba(214, 222, 235, 0.18);
  border-radius: 10px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
  color: #eef3fb;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.main-page .reset-button:hover {
  background: linear-gradient(180deg, #585060 0%, #463f4b 100%);
  border-color: rgba(214, 222, 235, 0.28);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

.owner-page .contact-button,
.owner-page .reset-button,
.owner-page .pedigree-button,
.owner-page .teleport-button,
.owner-page .owner-storage-check-button,
.owner-page .owner-sales-overview-button,
.owner-page .owner-admin-panel-toggle,
.owner-page .owner-maintenance-toggle-button {
  border: 1px solid rgba(214, 222, 235, 0.16);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
  color: #eef3fb;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, filter 0.16s ease;
}

.owner-page .contact-button {
  background: linear-gradient(180deg, #4f6855 0%, #405346 100%);
}

.owner-page .contact-button:hover {
  background: linear-gradient(180deg, #5a765f 0%, #49604f 100%);
  border-color: rgba(183, 214, 193, 0.32);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

/* Local-only bulk offer actions use distinct colors to prevent accidental mass changes. */
.owner-page .owner-bulk-offer-enable {
  background: linear-gradient(180deg, #bd7b20 0%, #94580f 100%);
}

.owner-page .owner-bulk-offer-enable:hover {
  background: linear-gradient(180deg, #d28a27 0%, #a96514 100%);
  border-color: rgba(245, 196, 116, 0.42);
}

.owner-page .owner-bulk-offer-remove {
  background: linear-gradient(180deg, #934d4d 0%, #6e3434 100%);
}

.owner-page .owner-bulk-offer-remove:hover {
  background: linear-gradient(180deg, #aa5a5a 0%, #823d3d 100%);
  border-color: rgba(237, 170, 170, 0.42);
}

.owner-page .pedigree-button,
.owner-page .teleport-button {
  background: linear-gradient(180deg, #4a5a72 0%, #3c495d 100%);
}

.owner-page .pedigree-button:hover,
.owner-page .teleport-button:hover {
  background: linear-gradient(180deg, #566883 0%, #46556b 100%);
  border-color: rgba(189, 204, 227, 0.32);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.owner-page .reset-button {
  background: linear-gradient(180deg, #7a5454 0%, #694646 100%);
}

.owner-page .reset-button:hover {
  background: linear-gradient(180deg, #896060 0%, #755050 100%);
  border-color: rgba(232, 186, 186, 0.34);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.owner-page .owner-storage-check-button {
  background: linear-gradient(180deg, #6f6549 0%, #5c543d 100%);
}

.owner-page .owner-storage-check-button:hover {
  background: linear-gradient(180deg, #7d7252 0%, #675e44 100%);
  border-color: rgba(221, 208, 166, 0.34);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.owner-page .owner-sales-overview-button {
  background: linear-gradient(180deg, #51636c 0%, #425159 100%);
}

.owner-page .owner-sales-overview-button:hover {
  background: linear-gradient(180deg, #5d727c 0%, #4b5c65 100%);
  border-color: rgba(185, 207, 217, 0.32);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.owner-page .owner-admin-panel-toggle {
  background: linear-gradient(180deg, #5c546c 0%, #4a4356 100%);
}

.owner-page .owner-admin-panel-toggle:hover {
  background: linear-gradient(180deg, #695f7b 0%, #544c61 100%);
  border-color: rgba(205, 193, 223, 0.32);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.owner-page .owner-maintenance-toggle-button {
  background: linear-gradient(180deg, #3e465f 0%, #32394e 100%);
}

.owner-page .owner-maintenance-toggle-button:hover {
  border-color: rgba(214, 222, 235, 0.28);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.owner-page .owner-maintenance-toggle-button.enabled {
  border-color: rgba(215, 170, 92, 0.4);
}

.owner-page .owner-maintenance-toggle-button.disabled {
  border-color: rgba(120, 190, 170, 0.36);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 1.5rem 0;
}

.pagination a,
.pagination span {
  margin: 0.25rem;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--text);
  border-radius: 5px;
  transition: transform 0.2s ease;
  font-weight: 600;
  border: 1px solid var(--muted);
}

.pagination a:hover {
  transform: scale(1.05);
  background-color: var(--surface);
}

.pagination .current-page {
  background-color: var(--primary);
  color: var(--bg);
  border-color: var(--primary);
}

/* Added specific wrapper for bottom pagination to ensure visibility */
.bottom-pagination-wrapper {
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

.owner-admin-bulk .bottom-pagination-wrapper {
  margin-top: 0.45rem;
  margin-bottom: 0.35rem;
  padding-bottom: 0;
}

.owner-admin-bulk .bottom-pagination-wrapper .pagination {
  margin: 0.3rem 0;
}

.checkout-page {
  min-height: 100vh;
}

.checkout-shell {
  max-width: 1100px;
  margin: 90px auto 30px auto;
  padding: 0 18px;
}

.checkout-shell h1 {
  margin-bottom: 18px;
}

.checkout-empty {
  background: var(--surface);
  border-radius: 14px;
  padding: 24px;
  max-width: 700px;
  margin: 0 auto;
}

.checkout-empty p {
  margin: 0;
}

.checkout-empty-actions {
  margin-top: 18px;
}

.checkout-back-link {
  min-width: 200px;
  text-decoration: none;
}

.checkout-content {
  max-width: 980px;
  margin: 0 auto;
}

#checkout-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.checkout-item {
  background: var(--surface);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.28);
}

.checkout-item h2 {
  margin-top: 0;
  color: var(--accent);
  font-size: 1.08rem;
}

.checkout-item-price,
.checkout-summary {
  font-weight: 700;
  color: var(--primary);
}

.checkout-summary {
  margin-top: 18px;
  font-size: 1.2rem;
}

.checkout-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.checkout-actions .contact-button,
.checkout-actions .reset-button,
.checkout-actions .pedigree-button,
.checkout-actions .teleport-button {
  min-height: 46px;
  box-sizing: border-box;
  margin-top: 0;
}

.checkout-page .contact-button,
.checkout-page .reset-button,
.checkout-page .pedigree-button,
.checkout-page .teleport-button {
  border: 1px solid rgba(214, 222, 235, 0.16);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
  color: #eef3fb;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.checkout-page .contact-button {
  background: linear-gradient(180deg, #465e69 0%, #394d57 100%);
}

.checkout-page .contact-button:hover {
  background: linear-gradient(180deg, #516b77 0%, #425964 100%);
  border-color: rgba(183, 206, 214, 0.34);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.checkout-page .pedigree-button,
.checkout-page .teleport-button {
  background: linear-gradient(180deg, #585363 0%, #46414f 100%);
}

.checkout-page .pedigree-button:hover,
.checkout-page .teleport-button:hover {
  background: linear-gradient(180deg, #645e70 0%, #504a5a 100%);
  border-color: rgba(201, 194, 216, 0.32);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.checkout-page .reset-button {
  background: linear-gradient(180deg, #4c505b 0%, #3c414a 100%);
}

.checkout-page .reset-button:hover {
  background: linear-gradient(180deg, #595e6b 0%, #474c56 100%);
  border-color: rgba(194, 200, 212, 0.3);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.checkout-page .checkout-actions .contact-button,
.checkout-page .checkout-actions .reset-button,
.checkout-page .checkout-actions .pedigree-button,
.checkout-page .checkout-actions .teleport-button,
.checkout-page .checkout-item-actions .reset-button {
  min-height: 48px;
}

.checkout-page .checkout-actions .contact-button,
.checkout-page .checkout-actions .reset-button,
.checkout-page .checkout-actions .pedigree-button,
.checkout-page .checkout-actions .teleport-button {
  min-width: 168px;
  padding: 0 22px;
}

.checkout-page .checkout-item-actions .reset-button {
  min-width: 132px;
}

.checkout-page .checkout-item-actions .reset-button {
  background: linear-gradient(180deg, #715252 0%, #5c4141 100%);
}

.checkout-page .checkout-item-actions .reset-button:hover {
  background: linear-gradient(180deg, #805d5d 0%, #6a4b4b 100%);
  border-color: rgba(220, 185, 185, 0.34);
}

.owner-send-panel {
  max-width: 560px;
  margin: 18px auto 0 auto;
  background: rgba(0,0,0,0.2);
  border-radius: 14px;
  padding: 16px;
  text-align: left;
}

.owner-send-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  margin-bottom: 12px;
}

.owner-send-toggle input[type="checkbox"] {
  width: auto;
}

.owner-send-field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.owner-send-field input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.owner-delivery-status {
  max-width: 560px;
  margin: 18px auto 0 auto;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(26, 188, 156, 0.14);
  border: 1px solid rgba(26, 188, 156, 0.45);
  font-weight: 700;
}

.owner-storage-tools {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 140px 280px 280px;
  justify-content: center;
  align-items: stretch;
  gap: 8px;
}

.owner-sort-form {
  margin: 0;
  display: flex;
  align-items: stretch;
}

.owner-sort-form-inline {
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.owner-sort-select {
  width: 140px;
  height: 52px;
  min-height: 52px;
  box-sizing: border-box;
  padding: 0 36px 0 14px;
  border-radius: 5px;
  border: 1px solid rgba(243, 156, 18, 0.55);
  background: #fff86a;
  color: #111;
  font-weight: 600;
  cursor: pointer;
  margin: 0;
  line-height: 50px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #111 50%), linear-gradient(135deg, #111 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 12px) 20px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  vertical-align: middle;
}

.owner-sort-select-inline {
  width: 180px !important;
  min-width: 180px;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 42px 0 18px !important;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background-color: #181818;
  background-image:
    linear-gradient(135deg, rgba(24, 24, 24, 0.98), rgba(42, 42, 42, 0.96)),
    linear-gradient(45deg, transparent 50%, #ffd451 50%),
    linear-gradient(135deg, #ffd451 50%, transparent 50%);
  background-position:
    0 0,
    calc(100% - 22px) 20px,
    calc(100% - 16px) 20px;
  background-size:
    100% 100%,
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
  color: #ffffff;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
}

.owner-sort-select-inline:hover {
  background-image:
    linear-gradient(135deg, rgba(44, 44, 44, 0.98), rgba(64, 64, 64, 0.96)),
    linear-gradient(45deg, transparent 50%, #ffd451 50%),
    linear-gradient(135deg, #ffd451 50%, transparent 50%);
}

.owner-sort-select-inline option {
  background: #141414;
  color: #f3f5f8;
}

.owner-storage-tools .owner-storage-check-button,
.owner-storage-tools .owner-sales-overview-button,
.owner-storage-tools .owner-sort-select {
  height: 52px;
  min-height: 52px;
}

.owner-storage-tools .owner-storage-check-button,
.owner-storage-tools .owner-sales-overview-button {
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1;
}

.owner-storage-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1420;
}

.owner-storage-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  z-index: 1430;
  background: rgba(30, 30, 46, 0.98);
  border: 1px solid rgba(52, 152, 219, 0.35);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  padding: 20px;
}

.owner-storage-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.owner-storage-modal-header h2 {
  margin: 0;
}

.owner-storage-modal-body {
  text-align: center;
}

.owner-sales-overview-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 280px;
  height: 48px;
  margin-top: 0;
  box-sizing: border-box;
  padding: 0 18px;
}

.owner-admin-panel {
  max-width: 760px;
  margin: 0 auto 16px auto;
}

.owner-admin-panel[open] {
  background: rgba(30, 30, 46, 0.72);
  border: 1px solid rgba(243, 156, 18, 0.28);
  border-radius: 16px;
  padding: 0 0 12px 0;
}

.owner-admin-panel-toggle {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 280px;
  margin: 0 auto;
  padding: 12px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(30, 30, 46, 0.98), rgba(52, 73, 94, 0.95));
  border: 1px solid rgba(243, 156, 18, 0.45);
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.owner-admin-panel-toggle::-webkit-details-marker {
  display: none;
}

.owner-admin-panel-toggle::before {
  content: "+";
  font-size: 1.1rem;
  line-height: 1;
  color: var(--accent);
}

.owner-admin-panel[open] .owner-admin-panel-toggle {
  margin-top: 10px;
  background: linear-gradient(135deg, rgba(243, 156, 18, 0.24), rgba(52, 73, 94, 0.95));
}

.owner-admin-panel[open] .owner-admin-panel-toggle::before {
  content: "−";
}

.owner-admin-panel-body {
  padding: 18px 18px 0 18px;
}

.owner-admin-panel-body h2 {
  margin-top: 0;
}

.owner-admin-bulk-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto 16px auto;
  text-align: left;
}

.owner-admin-bulk-form label {
  font-weight: 700;
}

.owner-admin-bulk-form input[type="text"],
.owner-admin-bulk-form input[type="number"],
.owner-admin-bulk-form input[type="file"],
.owner-admin-bulk-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--muted);
  background: #111;
  color: var(--text);
}

.owner-admin-bulk-form textarea {
  min-height: 180px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

.owner-rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.owner-rich-editor-button,
.owner-rich-editor-select,
.owner-rich-editor-color {
  min-height: 44px;
}

.owner-rich-editor-select,
.owner-rich-editor-color {
  border-radius: 10px;
  border: 1px solid var(--muted);
  background: #111;
  color: var(--text);
  padding: 10px 12px;
}

.owner-rich-editor-color {
  width: 56px;
  padding: 6px;
}

.owner-rich-editor-surface {
  width: 100%;
  min-height: 220px;
  box-sizing: border-box;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--muted);
  background: #111;
  color: var(--text);
  text-align: left;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.owner-rich-editor-surface:focus {
  outline: 2px solid rgba(26, 188, 156, 0.45);
  outline-offset: 2px;
}

.owner-admin-bulk-form .contact-button {
  align-self: center;
}

.owner-bulk-remove-form {
  margin-top: 14px;
  width: 100%;
}

.owner-maintenance-form {
  margin-top: 14px;
}

.owner-top-controls {
  --control-surface: #11131d;
  --control-line: rgba(244, 189, 84, .5);
  display: flex;
  align-items: center;
  gap: 18px;
  box-sizing: border-box;
  width: min(850px, 100%);
  max-width: 850px;
  margin: 0 auto;
  padding: 12px 16px;
  border: 1px solid var(--control-line);
  border-radius: 14px;
  background: var(--control-surface);
}

.design-theme-modern .owner-top-controls {
  --control-surface: #08182b;
  --control-line: rgba(116, 197, 246, .4);
}

body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) .owner-top-controls {
  --control-surface: var(--variant-deep);
  --control-line: var(--modern-line);
}

.owner-top-controls .owner-maintenance-form {
  flex: 1 1 330px;
  max-width: none;
  margin: 0;
}

.owner-page .owner-top-controls .owner-maintenance-toggle-button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.owner-page .owner-top-controls .owner-maintenance-toggle-button:hover {
  background: transparent;
  box-shadow: none;
}

.owner-theme-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 390px;
  min-width: 0;
  text-align: left;
}

.owner-theme-form label {
  flex: 0 0 auto;
  margin: 0;
  color: var(--text);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.owner-theme-form .theme-picker,
.owner-theme-form #design-theme { flex: 1 1 0; min-width: 0; }

@media (max-width: 650px) {
  .owner-top-controls { flex-wrap: wrap; gap: 8px; }
  .owner-top-controls .owner-maintenance-form,
  .owner-theme-form { flex: 1 1 100%; }
}

@media (max-width: 420px) {
  .owner-theme-form { flex-wrap: wrap; gap: 6px; }
  .owner-theme-form label,
  .owner-theme-form .theme-picker,
  .owner-theme-form #design-theme { flex: 1 1 100%; }
}

.owner-maintenance-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 280px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(243,156,18,0.45);
  background: rgba(30, 30, 46, 0.95);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
}

.owner-maintenance-toggle-button.enabled {
  border-color: rgba(243, 156, 18, 0.6);
}

.owner-maintenance-toggle-button.disabled {
  border-color: rgba(26, 188, 156, 0.45);
}

.owner-maintenance-toggle-pill {
  width: 56px;
  height: 30px;
  border-radius: 999px;
  position: relative;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

.owner-maintenance-toggle-button.enabled .owner-maintenance-toggle-pill {
  background: rgba(243, 156, 18, 0.9);
}

.owner-maintenance-toggle-button.disabled .owner-maintenance-toggle-pill {
  background: rgba(26, 188, 156, 0.85);
}

.owner-maintenance-toggle-knob {
  position: absolute;
  top: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  transition: left 0.2s ease;
}

.owner-maintenance-toggle-button.enabled .owner-maintenance-toggle-knob {
  left: 29px;
}

.owner-maintenance-toggle-button.disabled .owner-maintenance-toggle-knob {
  left: 3px;
}

.owner-maintenance-status {
  max-width: 760px;
  margin: 14px auto 0 auto;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
}

.owner-maintenance-status.enabled {
  background: rgba(243, 156, 18, 0.18);
  border: 1px solid rgba(243, 156, 18, 0.48);
  color: #ffe7b0;
}

.owner-maintenance-status.disabled {
  background: rgba(26, 188, 156, 0.14);
  border: 1px solid rgba(26, 188, 156, 0.45);
}

.owner-storage-check-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 280px;
  height: 48px;
  box-sizing: border-box;
  padding: 0 18px;
}

.owner-storage-result {
  max-width: 760px;
  margin: 14px auto 0 auto;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(52, 152, 219, 0.14);
  border: 1px solid rgba(52, 152, 219, 0.45);
  font-weight: 700;
}

.owner-storage-result.success {
  background: rgba(26, 188, 156, 0.14);
  border-color: rgba(26, 188, 156, 0.45);
}

.owner-storage-result.warning {
  background: rgba(243, 156, 18, 0.18);
  border-color: rgba(243, 156, 18, 0.48);
  color: #ffe7b0;
}

.nest-missing-in-storage {
  border: 2px solid #ff7b7b;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2), 0 12px 28px rgba(0,0,0,0.28);
}

.nest-missing-in-storage::before {
  content: "Missing In Storage";
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(231, 76, 60, 0.18);
  color: #ffb3b3;
  font-weight: 700;
}

.owner-missing-remove-form {
  display: none;
  margin-top: 12px;
}

.nest-missing-in-storage .owner-missing-remove-form {
  display: block;
}

.checkout-item-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.checkout-page .checkout-item-actions .pedigree-button,
.checkout-page .checkout-item-actions .reset-button {
  min-width: 148px;
}

.checkout-parents-button {
  text-decoration: none;
}

.sib-set-select-label {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(24, 28, 45, 0.92);
  border: 1px solid rgba(255,255,255,0.14);
  color: #eef3fb;
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 3;
}

.nest.has-owner-delete .sib-set-select-label {
  top: 56px;
}

.sib-set-select-label[hidden] {
  display: none !important;
}

.sib-set-select-checkbox {
  width: 16px;
  height: 16px;
  margin: 0;
}

.owner-sib-set-bar {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 1195;
  width: min(760px, calc(100vw - 32px));
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(243, 156, 18, 0.96);
  color: #111;
  border: 1px solid rgba(255, 214, 120, 0.75);
  box-shadow: 0 16px 34px rgba(0,0,0,0.32);
}

.owner-sib-set-summary {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 12px;
}

.owner-sib-set-form {
  display: flex;
  gap: 12px;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
}

.owner-sib-set-form input[type="text"] {
  min-width: 320px;
  max-width: 460px;
}

.owner-sib-set-form textarea {
  width: min(100%, 920px);
  min-width: 320px;
  min-height: 92px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(17, 17, 17, 0.18);
  background: rgba(255, 247, 224, 0.94);
  color: #111;
  font: inherit;
  resize: both;
  box-sizing: border-box;
  overflow: auto;
  flex: 1 1 100%;
}

.owner-sib-set-bar .contact-button,
.owner-sib-set-bar .reset-button {
  margin-top: 0;
}

/* The editor is independent from the card so its unsaved changes survive filtering and pagination. */
.owner-sib-set-edit-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 18px;
  border: 1px solid rgba(255, 184, 45, 0.7);
  border-radius: 16px;
  background: #202136;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.5);
}

.owner-sib-set-edit-header,
.owner-sib-set-edit-actions,
.owner-sib-set-edit-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.owner-sib-set-edit-header,
.owner-sib-set-edit-actions {
  justify-content: space-between;
}

.owner-sib-set-edit-header {
  margin-bottom: 14px;
  color: #f4c04f;
  font-size: 1.08rem;
}

.owner-sib-set-edit-form > label {
  display: block;
  margin: 12px 0 6px;
  font-weight: 700;
}

.owner-sib-set-edit-form input[type="text"],
.owner-sib-set-edit-form textarea {
  width: 100%;
  box-sizing: border-box;
}

.owner-sib-set-edit-form textarea {
  min-height: 82px;
  resize: vertical;
}

.owner-sib-set-edit-members,
.owner-sib-set-edit-additions {
  margin-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.owner-sib-set-edit-members > strong,
.owner-sib-set-edit-additions > strong {
  display: block;
  margin: 12px 0 5px;
  color: #f4c04f;
}

.owner-sib-set-edit-member-row {
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.owner-sib-set-edit-member-details {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.owner-sib-set-edit-member-details small {
  overflow-wrap: anywhere;
  color: rgba(239, 243, 251, 0.62);
}

.owner-sib-set-edit-member-row.is-marked-for-removal {
  opacity: 0.55;
  text-decoration: line-through;
}

.owner-sib-set-edit-member-row .reset-button {
  margin-top: 0;
  flex: 0 0 auto;
  padding: 7px 10px;
  font-size: 0.8rem;
}

.owner-sib-set-edit-actions {
  margin-top: 18px;
  flex-wrap: wrap;
}

.owner-sib-set-edit-actions .contact-button,
.owner-sib-set-edit-actions .pedigree-button {
  margin-top: 0;
}

/* While editing, the cards are only used to manage set membership. */
.sib-set-edit-mode .nest-price,
.sib-set-edit-mode .add-to-cart-button,
.sib-set-edit-mode .sibling-set-info-button {
  display: none !important;
}

.sib-set-add-mode .sibling-set-nest {
  display: none;
}

/* Only storage-barrel nests can be delivered as part of a sibling set. */
.sib-set-add-mode .nest[data-portal-nest="0"] {
  display: none;
}

.sibling-set-add-member-button[hidden] {
  display: none !important;
}

.sib-set-add-mode .sibling-set-add-member-button:not([hidden]) {
  display: inline-flex;
}

/* Adding members reserves a fixed right sidebar and leaves two full card columns on the left. */
.sib-set-add-mode .owner-sib-set-edit-panel {
  position: fixed;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: min(30vw, 580px);
  max-height: none;
  margin: 0;
  z-index: 1200;
  display: flex;
  overflow: hidden;
}

.sib-set-add-mode .owner-sib-set-edit-form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}

.sib-set-add-mode .owner-sib-set-edit-members,
.sib-set-add-mode .owner-sib-set-edit-additions {
  max-height: none;
  overflow-y: auto;
  padding-right: 6px;
}

.sib-set-add-mode .owner-sib-set-edit-members {
  flex: 1 1 auto;
  min-height: 0;
}

.sib-set-add-mode .owner-sib-set-edit-additions:not(:empty) {
  flex: 0 1 30%;
  min-height: 0;
}

.sib-set-add-mode #nests {
  width: calc(100% - min(30vw, 580px) - 32px);
  box-sizing: border-box;
  margin-left: 0;
  margin-right: auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sib-set-add-mode .nest:not(.sibling-set-nest) {
  min-height: 0;
  padding: 10px;
}

.sib-set-add-mode .nest-delete-toggle-form,
.sib-set-add-mode .nest-highlight-toggle-form,
.sib-set-add-mode .nest-offer-toggle-form,
.sib-set-add-mode .teleport-button,
.sib-set-add-mode .nest-actions .pedigree-button:not(.sibling-set-add-member-button),
.sib-set-add-mode .owner-inline-price-form,
.sib-set-add-mode .owner-offer-nest-label {
  display: none !important;
}

.sib-set-add-mode .nest-actions {
  margin-top: 8px;
}

@media (max-width: 900px) {
  .sib-set-add-mode .owner-sib-set-edit-panel {
    position: static;
    width: min(100% - 24px, 680px);
    max-height: 55vh;
    margin: 12px auto 18px;
  }

  .sib-set-add-mode #nests {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
}

.sibling-set-info-actions {
  margin-top: 10px;
}

.sibling-set-info-modal {
  max-width: 680px;
}

.sibling-set-info-body {
  white-space: pre-wrap;
  line-height: 1.7;
  text-align: left;
  padding: 8px 4px;
  max-height: calc(1.7em * 15);
  overflow-y: auto;
  overflow-x: hidden;
}

.sib-set-selection-mode .nest:not(.sibling-set-nest) {
  box-shadow: 0 0 0 1px rgba(255, 216, 120, 0.12), 0 12px 28px rgba(0,0,0,0.3);
}

/* Keep nest selection controls clear while creating a sibling set. */
.sib-set-selection-mode .nest-delete-toggle-form,
.sib-set-selection-mode .nest-highlight-toggle-form,
.sib-set-selection-mode .nest-offer-toggle-form {
  display: none;
}

.sibling-set-nest {
  background: linear-gradient(180deg, rgba(41, 42, 67, 0.98) 0%, rgba(29, 31, 52, 0.98) 100%);
}

.sibling-set-nest .nest-highlight-badge {
  background: linear-gradient(180deg, #5f5a9c 0%, #494480 100%);
  border-color: rgba(178, 171, 255, 0.45);
  color: #efeaff;
}

.sibling-set-carousel {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
}

.sibling-set-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.sibling-set-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: #f4f7fd;
  text-align: center;
}

.sibling-set-edit-toggle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(180deg, #43495a 0%, #353b4a 100%);
  color: #eef3fb;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(0,0,0,0.24);
}

.sibling-set-edit-toggle:hover {
  transform: translateY(-1px);
}

.owner-sibling-set-management-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.owner-sibling-set-management-actions .owner-sibling-set-break-form {
  margin: 0;
}

.sibling-set-edit-button {
  background: linear-gradient(180deg, #f39c12 0%, #c87808 100%) !important;
  border-color: rgba(255, 210, 125, 0.72) !important;
  color: #fff !important;
}

.sibling-set-edit-button:hover {
  background: linear-gradient(180deg, #ffad22 0%, #d88908 100%) !important;
}

.owner-sibling-set-title-form {
  margin-top: 10px;
}

.owner-sibling-set-title-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
}

.owner-sibling-set-title-actions input[type="text"] {
  min-width: 260px;
  max-width: 420px;
}

.owner-sibling-set-title-actions textarea {
  width: min(100%, 520px);
  min-height: 78px;
  resize: vertical;
}

.owner-sibling-set-members-editor {
  margin: 14px auto;
  max-width: 620px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 12px 16px 14px;
}

.owner-sibling-set-members-editor legend {
  padding: 0 8px;
  font-weight: 800;
  color: #f4c04f;
}

.owner-sibling-set-members-editor p {
  margin: 0 0 10px;
  text-align: center;
  color: rgba(239, 243, 251, 0.78);
}

.owner-sibling-set-member-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 0;
  text-align: left;
  cursor: pointer;
}

.owner-sibling-set-member-option + .owner-sibling-set-member-option {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.owner-sibling-set-member-option input {
  margin-top: 3px;
}

.owner-sibling-set-member-option small {
  display: block;
  margin-top: 2px;
  color: rgba(239, 243, 251, 0.62);
  overflow-wrap: anywhere;
}

.owner-sibling-set-title-actions .contact-button {
  margin-top: 0;
}

.sibling-set-meta {
  margin-top: 6px;
  text-align: center;
  font-weight: 700;
  color: rgba(239, 243, 251, 0.88);
}

.sibling-set-members {
  min-width: 0;
}

.sibling-set-member-card {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  display: none;
}

.sibling-set-member-card.active {
  display: block;
}

.sibling-set-member-id {
  margin-bottom: 10px;
  font-weight: 700;
  color: #f1f5fb;
  overflow-wrap: anywhere;
}

.sibling-set-member-card p {
  margin: 0 0 6px 0;
}

.sibling-set-member-actions {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.sibling-set-member-parents {
  min-width: 180px;
}

.main-page .sibling-set-member-parents,
.main-page .sibling-set-info-button {
  border: 1px solid rgba(214, 222, 235, 0.18);
  border-radius: 10px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
  color: #eef3fb;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, #4d4654 0%, #3c3642 100%);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.main-page .sibling-set-member-parents:hover,
.main-page .sibling-set-info-button:hover {
  background: linear-gradient(180deg, #585060 0%, #463f4b 100%);
  border-color: rgba(214, 222, 235, 0.28);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

.sibling-set-nav {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(180deg, #43495a 0%, #353b4a 100%);
  color: #eef3fb;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0,0,0,0.24);
}

.sibling-set-nav:hover {
  transform: translateY(-1px);
}

.main-page .sibling-set-nav {
  border: 1px solid rgba(214, 222, 235, 0.18);
  background: linear-gradient(180deg, #4d4654 0%, #3c3642 100%);
  color: #eef3fb;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.main-page .sibling-set-nav:hover {
  background: linear-gradient(180deg, #585060 0%, #463f4b 100%);
  border-color: rgba(214, 222, 235, 0.28);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.28);
}

.sibling-set-inline-carousel {
  margin-top: 0;
}

.checkout-sibling-set .sibling-set-member-card,
.cart-preview-stats .sibling-set-member-card {
  background: rgba(0, 0, 0, 0.18);
}

.checkout-sibling-set .sibling-set-member-actions,
.cart-preview-stats .sibling-set-member-actions {
  margin-top: 12px;
}

.checkout-sibling-set .sibling-set-counter,
.cart-preview-stats .sibling-set-counter {
  margin-top: 10px;
  text-align: center;
  font-weight: 700;
}

.checkout-page .checkout-sibling-set .pedigree-button,
.cart-modal .sibling-set-member-parents {
  border: 1px solid rgba(214, 222, 235, 0.16);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
  color: #eef3fb;
  font-weight: 600;
  background: linear-gradient(180deg, #585363 0%, #46414f 100%);
}

.checkout-page .checkout-sibling-set .pedigree-button:hover,
.cart-modal .sibling-set-member-parents:hover {
  background: linear-gradient(180deg, #645e70 0%, #504a5a 100%);
  border-color: rgba(201, 194, 216, 0.32);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.checkout-page .checkout-sibling-set .sibling-set-nav,
.cart-modal .sibling-set-nav {
  border: 1px solid rgba(214, 222, 235, 0.16);
  background: linear-gradient(180deg, #585363 0%, #46414f 100%);
  color: #eef3fb;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
}

.checkout-page .checkout-sibling-set .sibling-set-nav:hover,
.cart-modal .sibling-set-nav:hover {
  background: linear-gradient(180deg, #645e70 0%, #504a5a 100%);
  border-color: rgba(201, 194, 216, 0.32);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
}

.sibling-set-counter {
  margin-top: 10px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(239, 243, 251, 0.8);
}

.owner-sibling-set-break-form {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

.sales-shell {
  max-width: 760px;
}

.sales-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.sales-summary-card,
.sales-order-card {
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid rgba(243,156,18,0.28);
  box-shadow: 0 8px 24px rgba(0,0,0,0.28);
}

.sales-summary-card {
  padding: 18px;
}

.sales-summary-card strong {
  display: block;
  color: var(--accent);
  margin-bottom: 8px;
}

.sales-summary-card span {
  font-size: 1.4rem;
  font-weight: 700;
}

.sales-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 24px;
}

.sales-list-grid {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  align-items: start;
  justify-content: center;
  width: 100%;
}

.sales-section-heading {
  margin-top: 28px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  text-align: left;
}

.sales-filter-form {
  margin: 8px 0 24px 0;
}

.sales-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
  text-align: left;
}

.sales-filter-grid input[type="date"] {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--muted);
  background: #111;
  color: var(--text);
}

.sales-order-card {
  padding: 20px;
  text-align: left;
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  width: fit-content;
  max-width: 100%;
}

.sales-list-grid .sales-order-card {
  display: flex;
  width: auto;
}

.failed-cart-modal {
  width: min(92vw, 920px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

#sales-nest-modal {
  padding-top: 18px;
  padding-bottom: 18px;
}

.sales-nest-trigger {
  background: transparent;
  border: none;
  padding: 0;
  color: #9fd0ff;
  text-decoration: underline;
  font-weight: 700;
  cursor: pointer;
  overflow-wrap: anywhere;
  text-align: left;
}

.sales-nest-trigger:hover {
  color: #c4e2ff;
}

.sales-nest-layout {
  display: flex;
  justify-content: center;
}

.sales-nest-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
}

.sales-nest-stats-lines {
  width: min(620px, 100%);
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  box-sizing: border-box;
  margin: 0 auto;
}

.sales-nest-stats-lines p {
  margin: 0 0 10px;
}

.sales-nest-stats-lines p:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .sales-nest-stats-lines {
    width: 100%;
    max-width: 620px;
  }
}

.sales-force-deliver-form {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sales-force-deliver-input {
  min-width: 280px;
}

.sales-order-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.sales-order-title {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.sales-order-head h2 {
  margin: 0;
  font-size: 1.1rem;
  overflow-wrap: anywhere;
}

.sales-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  text-transform: capitalize;
  background: rgba(52, 152, 219, 0.18);
  border: 1px solid rgba(52, 152, 219, 0.45);
}

.sales-status-delivered {
  background: rgba(26, 188, 156, 0.18);
  border-color: rgba(26, 188, 156, 0.45);
}

.sales-status-paid {
  background: rgba(243, 156, 18, 0.18);
  border-color: rgba(243, 156, 18, 0.45);
}

.sales-order-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.sales-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
  color: #eef3fb;
  line-height: 1.3;
  max-width: 100%;
}

.sales-meta-chip strong {
  color: #fff7df;
}

.sales-nest-list strong {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
}

.sales-nest-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: auto;
  max-width: 100%;
  margin-bottom: 14px;
}

.sales-nest-item {
  display: inline-block;
  width: auto;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 8px;
  overflow-wrap: anywhere;
  text-align: left;
}

.sales-nest-details {
  width: auto;
  max-width: 100%;
}

.sales-nest-summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  color: #cfe2ff;
  cursor: pointer;
  font-weight: 600;
  user-select: none;
  list-style: none;
}

.sales-nest-summary::-webkit-details-marker {
  display: none;
}

.sales-nest-details-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 8px;
}

.sales-order-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
}

.sales-order-actions-wrap {
  flex-wrap: wrap;
}

.sales-delete-form {
  margin-top: 0;
  text-align: right;
}

.sales-failed-delete-form {
  position: absolute;
  top: 14px;
  right: 14px;
  margin: 0;
}

.sales-failed-delete-button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(231, 76, 60, 0.55);
  background: linear-gradient(180deg, #7a2e2b 0%, #5e2422 100%);
  color: #ffe6e2;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0,0,0,0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.sales-failed-delete-button:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #8d3733 0%, #6f2b28 100%);
  border-color: rgba(255, 128, 113, 0.7);
  box-shadow: 0 14px 26px rgba(0,0,0,0.28);
}

.sales-shell .contact-button,
.sales-shell .reset-button,
.sales-shell .pedigree-button,
.sales-shell .teleport-button {
  border: 1px solid rgba(214, 222, 235, 0.16);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
  color: #eef3fb;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.sales-shell .contact-button {
  background: linear-gradient(180deg, #4f6855 0%, #405346 100%);
}

.sales-shell .contact-button:hover {
  background: linear-gradient(180deg, #5a765f 0%, #49604f 100%);
  border-color: rgba(183, 214, 193, 0.32);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.sales-order-head-error {
  padding-right: 44px;
}

.sales-shell .pedigree-button,
.sales-shell .teleport-button {
  background: linear-gradient(180deg, #4a5a72 0%, #3c495d 100%);
}

.sales-shell .pedigree-button:hover,
.sales-shell .teleport-button:hover {
  background: linear-gradient(180deg, #566883 0%, #46556b 100%);
  border-color: rgba(189, 204, 227, 0.32);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.sales-shell .reset-button {
  background: linear-gradient(180deg, #7a5454 0%, #694646 100%);
}

.sales-shell .reset-button:hover {
  background: linear-gradient(180deg, #896060 0%, #755050 100%);
  border-color: rgba(232, 186, 186, 0.34);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.sales-shell .sales-back-owner-button {
  background: linear-gradient(180deg, #8a4d4d 0%, #733f3f 100%);
}

.sales-shell .sales-back-owner-button:hover {
  background: linear-gradient(180deg, #985959 0%, #804848 100%);
  border-color: rgba(239, 191, 191, 0.36);
}

.sales-shell .checkout-actions .contact-button,
.sales-shell .checkout-actions .reset-button,
.sales-shell .checkout-actions .pedigree-button,
.sales-shell .checkout-actions .teleport-button,
.sales-shell .sales-force-deliver-form .pedigree-button,
.sales-shell .sales-force-deliver-form .contact-button {
  min-height: 48px;
}

.sales-force-deliver-input {
  min-height: 48px;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(214, 222, 235, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0 14px;
}

.owner-admin-button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 16px auto 0 auto;
}

.owner-admin-danger-form {
  margin: 0;
}

.owner-admin-danger-button {
  min-width: 280px;
}

.owner-unlisted-summary {
  margin: 6px auto 16px auto;
  font-weight: 700;
  color: var(--accent);
}

.owner-unlisted-list {
  width: min(100%, 620px);
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 auto 18px auto;
}

.owner-unlisted-item {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: monospace;
  word-break: break-all;
}

.owner-unlisted-send-form {
  width: min(100%, 620px);
}

.owner-inventory-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 0 auto 18px auto;
}

.inventory-action-button {
  min-width: 248px;
}

.inventory-action-resync {
  background: linear-gradient(135deg, rgba(60, 92, 132, 0.98), rgba(86, 114, 148, 0.95));
  border-color: rgba(146, 183, 221, 0.45);
}

.inventory-action-resync:hover {
  background: linear-gradient(135deg, rgba(78, 113, 156, 0.98), rgba(105, 137, 175, 0.95));
}

.owner-inventory-actions .inventory-action-listed {
  background: linear-gradient(135deg, rgba(120, 96, 44, 0.98), rgba(166, 133, 58, 0.95)) !important;
  border-color: rgba(244, 205, 96, 0.48) !important;
}

.owner-inventory-actions .inventory-action-listed:hover {
  background: linear-gradient(135deg, rgba(141, 113, 53, 0.98), rgba(187, 149, 68, 0.95)) !important;
}

.owner-inventory-actions .inventory-action-unlisted {
  background: linear-gradient(135deg, rgba(78, 58, 116, 0.98), rgba(110, 82, 158, 0.95)) !important;
  border-color: rgba(190, 165, 244, 0.42) !important;
}

.owner-inventory-actions .inventory-action-unlisted:hover {
  background: linear-gradient(135deg, rgba(92, 68, 136, 0.98), rgba(124, 93, 177, 0.95)) !important;
}

.owner-settings-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  margin-bottom: 4px;
  cursor: pointer;
  user-select: none;
}

.owner-settings-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.owner-settings-switch-pill {
  position: relative;
  width: 58px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(58, 66, 92, 0.98), rgba(42, 49, 70, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.24);
  transition: background 0.18s ease, border-color 0.18s ease;
  flex-shrink: 0;
}

.owner-settings-switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff 0%, #d9e0eb 100%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease;
}

.owner-settings-switch input:checked + .owner-settings-switch-pill {
  background: linear-gradient(135deg, rgba(78, 121, 76, 0.98), rgba(106, 164, 97, 0.96));
  border-color: rgba(170, 229, 160, 0.42);
}

.owner-settings-switch input:checked + .owner-settings-switch-pill .owner-settings-switch-knob {
  transform: translateX(26px);
}

.owner-settings-switch-label {
  font-weight: 600;
  color: var(--text);
}

.owner-admin-button-row .owner-admin-panel-toggle {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 280px;
  min-height: 48px;
  box-sizing: border-box;
  margin: 0;
  padding: 12px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(30, 30, 46, 0.98), rgba(52, 73, 94, 0.95));
  border: 1px solid rgba(243, 156, 18, 0.45);
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}

.owner-admin-button-row .owner-sort-form-inline {
  display: inline-flex;
  align-items: center;
}

.owner-admin-button-row .owner-admin-panel-toggle::before {
  content: "+";
  font-size: 1.1rem;
  line-height: 1;
  color: var(--accent);
}

.owner-admin-button-row .owner-admin-panel-toggle:hover {
  background: linear-gradient(135deg, rgba(243, 156, 18, 0.24), rgba(52, 73, 94, 0.95));
}

@media (min-width: 1200px) {
  .owner-admin-button-row { flex-wrap: nowrap; gap: 6px; }
  .owner-admin-button-row .owner-admin-panel-toggle {
    flex: 0 1 auto;
    width: auto;
    min-width: max-content;
    padding: 10px 9px;
    font-size: 0.78rem;
    gap: 4px;
    white-space: nowrap;
  }
  .owner-admin-button-row .owner-sort-form-inline { flex: 0 0 120px; min-width: 0; }
  .owner-admin-button-row .owner-sort-select-inline { width: 120px !important; min-width: 0; }
  .owner-admin-button-row .owner-admin-danger-form { flex: 0 0 105px; min-width: 0; }
  .owner-admin-button-row .owner-admin-danger-button { width: 100%; min-width: 0; padding-inline: 6px; }
}

.owner-theme-form #design-theme {
  appearance: none;
  width: 100%;
  max-width: none;
  min-height: 44px;
  box-sizing: border-box;
  padding: 10px 42px 10px 14px;
  border: 1px solid rgba(243, 156, 18, 0.45);
  border-radius: 10px;
  background: linear-gradient(45deg, transparent 50%, #f4bd54 50%) calc(100% - 21px) center / 6px 6px no-repeat,
              linear-gradient(135deg, #f4bd54 50%, transparent 50%) calc(100% - 15px) center / 6px 6px no-repeat,
              #11131d;
  color: #eef3fb;
  font: inherit;
  cursor: pointer;
}

.owner-theme-form #design-theme option { background: #11131d; color: #eef3fb; }

.design-theme-modern .owner-theme-form #design-theme {
  border-color: rgba(116, 197, 246, 0.35);
  background: linear-gradient(45deg, transparent 50%, #69dfc5 50%) calc(100% - 21px) center / 6px 6px no-repeat,
              linear-gradient(135deg, #69dfc5 50%, transparent 50%) calc(100% - 15px) center / 6px 6px no-repeat,
              #08182b;
  color: #e9f3ff;
}

.owner-theme-form #design-theme.theme-picker-native { display: none; }
.owner-theme-form .theme-picker {
  --picker-surface: #11131d;
  --picker-hover: #292537;
  --picker-ink: #eef3fb;
  --picker-line: rgba(244, 189, 84, .5);
  --picker-accent: #f4bd54;
  --picker-selected-ink: #19130b;
  position: relative;
  width: 100%;
  margin: 0;
  font-family: inherit;
}
.owner-theme-form .theme-picker-trigger,
.owner-theme-form .theme-picker-option {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: var(--picker-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.owner-theme-form .theme-picker-trigger {
  padding-right: 42px;
  border: 1px solid var(--picker-line);
  border-radius: 12px;
  background: var(--picker-surface);
}
.owner-theme-form .theme-picker-trigger::after {
  content: '';
  position: absolute;
  right: 17px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--picker-accent);
  border-bottom: 2px solid var(--picker-accent);
  transform: translateY(-2px) rotate(45deg);
}
.owner-theme-form .theme-picker-trigger[aria-expanded="true"]::after {
  transform: translateY(3px) rotate(225deg);
}
.owner-theme-form .theme-picker-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  max-height: min(360px, 70vh);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--picker-line);
  border-radius: 12px;
  background: var(--picker-surface);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .42);
}
.owner-theme-form .theme-picker-menu[hidden] { display: none !important; }
.owner-page .owner-admin-shell:has(.theme-picker-menu:not([hidden])) {
  position: relative;
  z-index: 50;
}
.owner-theme-form .theme-picker-option { border-radius: 8px; }
.owner-theme-form .theme-picker-option:hover,
.owner-theme-form .theme-picker-option:focus-visible { background: var(--picker-hover); outline: 2px solid var(--picker-accent); outline-offset: -2px; }
.owner-theme-form .theme-picker-option[aria-selected="true"] {
  background: var(--picker-accent);
  color: var(--picker-selected-ink);
  font-weight: 700;
}
.owner-theme-form .theme-picker-trigger::before,
.owner-theme-form .theme-picker-option::before {
  content: '';
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.5);
  background: var(--option-color, #f4bd54);
}
.owner-theme-form [data-theme="modern"] { --option-color: #54d6ff; }
.owner-theme-form [data-theme="modern-red"] { --option-color: #e83d35; }
.owner-theme-form [data-theme="modern-orange"] { --option-color: #f58a42; }
.owner-theme-form [data-theme="modern-yellow"] { --option-color: #e9bd43; }
.owner-theme-form [data-theme="modern-pink"] { --option-color: #ec65ad; }
.owner-theme-form [data-theme="modern-green"] { --option-color: #43c986; }
.owner-theme-form [data-theme="classic"] { --option-color: #f4bd54; }
.design-theme-modern .owner-theme-form .theme-picker {
  --picker-surface: #08182b;
  --picker-hover: #193149;
  --picker-ink: #e9f3ff;
  --picker-line: rgba(116, 197, 246, .4);
  --picker-accent: #54d6ff;
  --picker-selected-ink: #07111f;
}
body.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green) .owner-theme-form .theme-picker {
  --picker-surface: var(--variant-deep);
  --picker-hover: var(--variant-soft);
  --picker-ink: var(--modern-ink);
  --picker-line: var(--modern-line);
  --picker-accent: var(--variant-button);
  --picker-selected-ink: var(--variant-button-ink);
}

.owner-admin-link-button:visited,
.owner-admin-link-button:active {
  color: var(--text);
}

.owner-admin-button-row .owner-sales-overview-button {
  background: linear-gradient(135deg, rgba(126, 106, 46, 0.98), rgba(168, 143, 67, 0.95));
  border-color: rgba(244, 204, 96, 0.55);
}

.owner-admin-button-row .owner-sales-overview-button::before {
  color: #fff1b1;
}

.owner-admin-button-row .owner-sales-overview-button:hover {
  background: linear-gradient(135deg, rgba(144, 121, 54, 0.98), rgba(184, 158, 76, 0.95));
}

.owner-settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1400;
}

.owner-reload-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2200;
  padding: 16px;
}

.owner-reload-overlay[hidden] {
  display: none !important;
}

.owner-reload-modal {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  box-sizing: border-box;
  overflow-y: auto;
  background: #151826;
  border: 1px solid rgba(243, 156, 18, 0.45);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.48);
  padding: 18px 22px;
  text-align: center;
  font-size: clamp(12px, 0.9vw, 14px);
  line-height: 1.3;
}

.owner-reload-modal h2 {
  margin: 0 0 8px;
  color: #f4c04f;
  font-size: clamp(21px, 1.7vw, 25px);
}

.owner-reload-modal h3 {
  margin: 10px 0 5px;
  font-size: clamp(15px, 1.1vw, 17px);
}

.owner-reload-modal ul {
  margin: 0 auto 7px;
  max-width: 700px;
  padding-left: 20px;
  text-align: left;
}

.owner-reload-modal li {
  margin: 0 0 5px;
}

.owner-reload-modal p {
  margin: 0 0 6px;
}

.owner-reload-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  justify-content: center;
}

.owner-reload-actions {
  position: sticky;
  bottom: calc(clamp(10px, 1.5vw, 16px) * -1);
  margin-top: 8px;
  padding: 7px 0 1px;
  background: #151826;
  display: flex;
  justify-content: center;
}

.owner-settings-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  z-index: 1410;
  background: rgba(30, 30, 46, 0.98);
  border: 1px solid rgba(243, 156, 18, 0.35);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  padding: 20px;
}

.owner-settings-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.owner-settings-modal-header h2 {
  margin: 0;
}

.owner-settings-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#owner-force-delivery-modal {
  width: min(980px, calc(100vw - 32px));
}

#owner-force-delivery-modal .owner-admin-bulk-form {
  width: min(100%, 760px);
  max-width: 760px;
}

#owner-force-delivery-modal input[type="text"] {
  min-width: 0;
  width: 100%;
}

#owner-force-delivery-modal textarea {
  width: 100%;
  min-height: 180px;
  white-space: pre;
}

.owner-settings-close {
  margin-top: 0;
}

@media (max-width: 600px) {
  #nests {
    grid-template-columns: 1fr;
  }

  #search-bar {
    width: 100%;
  }

  #search-bar-container {
    flex-direction: column;
  }

  .sib-set-filter-toggle {
    width: min(100%, 420px);
    justify-content: center;
  }

  #search-button,
  #copy-link-button {
    margin-left: 0;
    margin-top: 10px;
  }

  .static-message {
    font-size: 1rem;
    padding: 15px;
  }

  .special-ad-button {
    width: 100%;
    max-width: 260px;
  }

  .quick-search-button {
    width: 100%;
    max-width: 260px;
  }

  .cart-widget {
    top: 10px;
    right: 10px;
    padding: 8px 12px;
  }

  .cart-banner {
    top: 62px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .modal-actions,
  .checkout-actions {
    flex-direction: column;
  }

  .sales-summary-grid,
  .sales-filter-grid {
    grid-template-columns: 1fr;
  }

  .sales-list-grid {
    grid-template-columns: 1fr;
  }

  .sales-order-actions {
    align-items: stretch;
    justify-content: stretch;
  }

  .sales-order-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .owner-storage-tools {
    grid-template-columns: 1fr;
  }
}

/* Final owner control layout overrides */
.owner-storage-tools {
  display: flex !important;
  justify-content: center;
  align-items: stretch;
  gap: 8px;
}

.owner-sort-form {
  margin: 0;
  display: flex;
  align-items: stretch;
}

.owner-sort-select {
  height: 52px !important;
  min-height: 52px !important;
  box-sizing: border-box;
}

.owner-sort-select {
  width: 140px !important;
  padding: 0 36px 0 14px;
  line-height: 50px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #111 50%), linear-gradient(135deg, #111 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 12px) 20px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.owner-storage-remove-form {
  margin-top: 16px;
}

.sib-set-selection-mode .nest[data-portal-nest="0"]:not(.sibling-set-nest) {
  display: none !important;
}

.owner-storage-missing-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.owner-storage-missing-item {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.owner-storage-missing-title {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.owner-storage-missing-id {
  color: #ffb3b3;
  overflow-wrap: anywhere;
  font-size: 0.95rem;
}

.owner-storage-progress {
  margin: 0 auto 16px auto;
  max-width: 760px;
}

.owner-storage-progress-bar {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
}

.owner-storage-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #3ccfc7 0%, #5dd39e 100%);
  transition: width 0.25s ease;
}

.owner-storage-progress-text {
  margin-top: 10px;
  font-weight: 700;
  color: var(--text);
}

.owner-removed-empty {
  padding: 18px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  text-align: center;
}

.owner-removed-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.owner-removed-item {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.owner-removed-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.owner-removed-id {
  margin-top: 4px;
  color: #ffb3b3;
  overflow-wrap: anywhere;
}

.owner-removed-reason,
.owner-removed-time {
  margin-top: 8px;
  color: rgba(255,255,255,0.82);
}

.owner-removed-lines {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0,0,0,0.16);
}

.owner-removed-lines p {
  margin: 0 0 6px;
}

.owner-removed-lines p:last-child {
  margin-bottom: 0;
}

.owner-removed-restore-form {
  margin-top: 14px;
}

.owner-access-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
}

.owner-access-card {
  width: min(680px, calc(100vw - 32px));
  padding: 34px 30px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(30,30,46,0.98), rgba(24,24,36,0.98));
  border: 1px solid rgba(243, 156, 18, 0.38);
  box-shadow: 0 24px 54px rgba(0,0,0,0.46);
  text-align: center;
}

.owner-access-badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(243, 156, 18, 0.16);
  border: 1px solid rgba(243, 156, 18, 0.28);
  color: #ffd38c;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.owner-access-card h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 2.8rem);
}

.owner-access-text {
  margin: 12px auto 0;
  max-width: 520px;
  line-height: 1.7;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.9);
}

.owner-access-note {
  color: #a9bed0;
}
.owner-admin-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1700;
  width: min(560px, calc(100vw - 32px));
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(34, 39, 61, 0.98), rgba(58, 68, 104, 0.96));
  border: 1px solid rgba(243, 156, 18, 0.5);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.38);
  color: #f5f7fb;
  text-align: center;
  font-weight: 700;
  opacity: 1;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.owner-admin-toast.is-hiding {
  opacity: 0;
  transform: translateX(-50%) translateY(-8px);
  pointer-events: none;
}

.offer-shortlink { width: min(100%, 440px); box-sizing: border-box; padding: 10px; border: 1px solid #6e8ead; border-radius: 7px; background: #11131a; color: #dff5ff; text-align: center; }






.owner-update-donation-note {
  color: #f4c04f;
  font-weight: 700;
  margin-top: 12px !important;
}

.owner-update-pickup-note {
  margin-bottom: 5px !important;
}

.owner-update-teleport-button {
  min-width: 132px;
  min-height: 38px;
  margin: 0 auto 6px;
}

.owner-update-teleport-wrap {
  display: flex;
  justify-content: center;
  margin: 0 0 8px;
}

.owner-update-teleport-button {
  margin: 0;
}

.owner-reload-actions .owner-reload-checkbox {
  margin: 0;
  white-space: nowrap;
}

.owner-reload-actions {
  gap: 12px;
  align-items: center;
}

/* Keep owner dialogs and the separate sales page in the selected modern palette. */
body.design-theme-modern .owner-sib-set-edit-panel,
body.design-theme-modern .owner-rich-editor-toolbar,
body.design-theme-modern .owner-settings-modal,
body.design-theme-modern .owner-storage-modal,
body.design-theme-modern .cart-modal,
body.design-theme-modern .sales-summary-card,
body.design-theme-modern .sales-order-card,
body.design-theme-modern .sales-filter-form {
  background: var(--modern-card);
  border-color: var(--modern-line);
  color: var(--modern-ink);
}

body.design-theme-modern .owner-sib-set-edit-header,
body.design-theme-modern .owner-sib-set-edit-members > strong,
body.design-theme-modern .owner-sib-set-edit-additions > strong,
body.design-theme-modern .sales-section-heading,
body.design-theme-modern .sales-summary-card strong {
  color: var(--modern-accent);
}

body.design-theme-modern .owner-sib-set-edit-form input,
body.design-theme-modern .owner-sib-set-edit-form textarea,
body.design-theme-modern .sales-filter-grid input[type="date"],
body.design-theme-modern .sales-force-deliver-input {
  background: var(--modern-card);
  border-color: var(--modern-line);
  color: var(--modern-ink);
}

body.design-theme-modern .sales-meta-chip {
  background: var(--modern-card);
  border-color: var(--modern-line);
  color: var(--modern-ink);
}

body.design-theme-modern .sales-meta-chip strong { color: var(--modern-accent); }
body.design-theme-modern .sales-shell :is(.contact-button, .pedigree-button, .teleport-button) {
  background: var(--modern-accent);
  border-color: var(--modern-line);
  color: #10131c;
}
body.design-theme-modern .sales-shell .reset-button,
body.design-theme-modern .sales-shell .sales-back-owner-button {
  background: var(--modern-card);
  border-color: var(--modern-line);
  color: var(--modern-ink);
}
body.design-theme-modern .sales-shell :is(.contact-button, .pedigree-button, .teleport-button):hover {
  background: var(--modern-teal);
  border-color: var(--modern-accent);
}

/* Seasonal colorways share the modern layout without changing the classic theme. */
body.design-theme-modern.design-theme-halloween-fog {
  --modern-ink: #f0edf5; --modern-muted: #b7abc3; --modern-line: rgba(192, 160, 218, .27);
  --modern-accent: #d9b4fa; --modern-teal: #9b78bd; --modern-warm: #f8b86a;
  --variant-surface: #1c1725; --variant-deep: #100e18; --variant-card: #251b30;
  --variant-soft: #34263e; --variant-button: #ae84d0; --variant-button-ink: #140e1b;
  --variant-glow: rgba(179, 117, 222, .25); --halloween-mist: rgba(201, 173, 225, .14);
  --halloween-sky: #0c0a12;
}
body.design-theme-modern.design-theme-halloween-ember {
  --modern-ink: #fff1df; --modern-muted: #c5aa93; --modern-line: rgba(255, 154, 80, .29);
  --modern-accent: #ffa34e; --modern-teal: #dc723d; --modern-warm: #ffd27d;
  --variant-surface: #241812; --variant-deep: #130d0a; --variant-card: #302018;
  --variant-soft: #422a1b; --variant-button: #ef7e31; --variant-button-ink: #211006;
  --variant-glow: rgba(255, 108, 34, .27); --halloween-mist: rgba(230, 103, 38, .16);
  --halloween-sky: #100b08;
}
body.design-theme-modern.design-theme-halloween-witch {
  --modern-ink: #eaf3df; --modern-muted: #adbea2; --modern-line: rgba(158, 207, 105, .25);
  --modern-accent: #b8e675; --modern-teal: #78bd66; --modern-warm: #d9e5a0;
  --variant-surface: #182119; --variant-deep: #0b110d; --variant-card: #233026;
  --variant-soft: #304435; --variant-button: #95c768; --variant-button-ink: #0c170a;
  --variant-glow: rgba(136, 208, 100, .23); --halloween-mist: rgba(134, 207, 126, .12);
  --halloween-sky: #090e0b;
}
body.design-theme-modern.design-theme-halloween-blood-moon {
  --modern-ink: #f8e8e7; --modern-muted: #c1a5a7; --modern-line: rgba(226, 112, 113, .27);
  --modern-accent: #ef8582; --modern-teal: #bd565b; --modern-warm: #f7a67f;
  --variant-surface: #241519; --variant-deep: #120b0e; --variant-card: #301b21;
  --variant-soft: #43252b; --variant-button: #d85b62; --variant-button-ink: #fff7f4;
  --variant-glow: rgba(227, 77, 81, .27); --halloween-mist: rgba(212, 83, 92, .13);
  --halloween-sky: #10090c;
}

body.design-theme-modern:is(.design-theme-halloween-fog, .design-theme-halloween-ember, .design-theme-halloween-witch, .design-theme-halloween-blood-moon) {
  --modern-card: var(--variant-card);
  background: radial-gradient(circle at 80% 2%, var(--halloween-mist), transparent 28rem),
              radial-gradient(circle at 8% 75%, var(--variant-glow), transparent 40rem),
              var(--halloween-sky);
  background-size: 140% 120%, 130% 140%, auto;
  animation: halloween-fog-drift 36s ease-in-out infinite alternate;
}
body.design-theme-modern:is(.design-theme-halloween-fog, .design-theme-halloween-ember, .design-theme-halloween-witch, .design-theme-halloween-blood-moon)::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 46% 18% at 18% 83%, var(--halloween-mist), transparent 90%),
              radial-gradient(ellipse 36% 16% at 76% 70%, var(--halloween-mist), transparent 95%);
  filter: blur(22px);
  opacity: .7;
  animation: halloween-mist-pulse 22s ease-in-out infinite alternate;
}
body.design-theme-modern:is(.design-theme-halloween-fog, .design-theme-halloween-ember, .design-theme-halloween-witch, .design-theme-halloween-blood-moon) :is(.header-wrap, #search-container, #nests, .checkout-shell) {
  position: relative;
  z-index: 1;
}
body.design-theme-modern:is(.design-theme-halloween-fog, .design-theme-halloween-ember, .design-theme-halloween-witch, .design-theme-halloween-blood-moon) :is(.static-message, #search-bar-container, #dropdowns-container, .owner-settings-modal, .owner-storage-modal, .cart-modal, .sales-summary-card, .sales-order-card) {
  background: var(--variant-surface);
  border-color: var(--modern-line);
  color: var(--modern-ink);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .38), 0 0 28px var(--variant-glow);
}
body.design-theme-modern:is(.design-theme-halloween-fog, .design-theme-halloween-ember, .design-theme-halloween-witch, .design-theme-halloween-blood-moon) .nest {
  background: linear-gradient(145deg, var(--variant-card), var(--variant-deep));
  border-color: var(--modern-line);
  color: var(--modern-ink);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .43), inset 0 1px 0 var(--modern-line);
}
body.design-theme-modern:is(.design-theme-halloween-fog, .design-theme-halloween-ember, .design-theme-halloween-witch, .design-theme-halloween-blood-moon) .nest:hover {
  box-shadow: 0 26px 55px rgba(0, 0, 0, .5), 0 0 30px var(--variant-glow);
}
body.design-theme-modern:is(.design-theme-halloween-fog, .design-theme-halloween-ember, .design-theme-halloween-witch, .design-theme-halloween-blood-moon) :is(#search-bar, .dropdown-group select, .owner-settings-modal input, .owner-settings-modal textarea, .owner-settings-modal select, .sales-filter-grid input[type="date"]) {
  background: var(--variant-deep);
  border-color: var(--modern-line);
  color: var(--modern-ink);
}
body.design-theme-modern:is(.design-theme-halloween-fog, .design-theme-halloween-ember, .design-theme-halloween-witch, .design-theme-halloween-blood-moon) :is(.site-title, .nest-price, .nest-highlighted-trait) {
  color: var(--modern-accent) !important;
  text-shadow: 0 0 20px var(--variant-glow);
}
body.design-theme-modern:is(.design-theme-halloween-fog, .design-theme-halloween-ember, .design-theme-halloween-witch, .design-theme-halloween-blood-moon) .owner-admin-panel-toggle::before {
  color: var(--modern-accent);
}
body.design-theme-modern:is(.design-theme-halloween-fog, .design-theme-halloween-ember, .design-theme-halloween-witch, .design-theme-halloween-blood-moon) :is(.dropdown-group label, .nest-file-id, .owner-settings-help, .sib-set-filter-toggle-label) {
  color: var(--modern-muted);
}
body.design-theme-modern:is(.design-theme-halloween-fog, .design-theme-halloween-ember, .design-theme-halloween-witch, .design-theme-halloween-blood-moon) :is(#search-button, .nest-actions .contact-button, .contact-button, .pagination .current-page, .cart-count) {
  background: var(--variant-button);
  border-color: var(--modern-line);
  color: var(--variant-button-ink);
}
body.design-theme-modern:is(.design-theme-halloween-fog, .design-theme-halloween-ember, .design-theme-halloween-witch, .design-theme-halloween-blood-moon) :is(#copy-link-button, .reset-button, .pagination a, .pagination span, .owner-admin-panel-toggle, .sib-set-filter-toggle) {
  background: var(--variant-soft);
  border-color: var(--modern-line);
  color: var(--modern-ink);
}
body.design-theme-modern:is(.design-theme-halloween-fog, .design-theme-halloween-ember, .design-theme-halloween-witch, .design-theme-halloween-blood-moon) .owner-top-controls {
  --control-surface: var(--variant-deep);
  --control-line: var(--modern-line);
}
body.design-theme-modern:is(.design-theme-halloween-fog, .design-theme-halloween-ember, .design-theme-halloween-witch, .design-theme-halloween-blood-moon) .owner-theme-form .theme-picker {
  --picker-surface: var(--variant-deep);
  --picker-hover: var(--variant-soft);
  --picker-accent: var(--modern-accent);
  --picker-line: var(--modern-line);
}
.owner-theme-form [data-theme="halloween-fog"] { --option-color: #d9b4fa; }
.owner-theme-form [data-theme="halloween-ember"] { --option-color: #ffa34e; }
.owner-theme-form [data-theme="halloween-witch"] { --option-color: #b8e675; }
.owner-theme-form [data-theme="halloween-blood-moon"] { --option-color: #ef8582; }

@keyframes halloween-fog-drift {
  from { background-position: 0% 0%, 100% 100%, 0 0; }
  to { background-position: 100% 12%, 0% 75%, 0 0; }
}
@keyframes halloween-mist-pulse {
  from { opacity: .4; transform: translateX(-2%) scale(1); }
  to { opacity: .78; transform: translateX(3%) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  body.design-theme-modern:is(.design-theme-halloween-fog, .design-theme-halloween-ember, .design-theme-halloween-witch, .design-theme-halloween-blood-moon),
  body.design-theme-modern:is(.design-theme-halloween-fog, .design-theme-halloween-ember, .design-theme-halloween-witch, .design-theme-halloween-blood-moon)::before {
    animation: none;
  }
}

.null-types-group { position: relative; min-width: 120px; }
.null-types-filter { width: 120px; color: var(--text); }
.null-types-filter summary { cursor: pointer; list-style: none; padding: 5px 24px 5px 8px; border: 1px solid var(--muted); border-radius: 4px; background: var(--surface); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.null-types-filter summary::-webkit-details-marker { display: none; }
.null-types-filter summary::after { content: '⌄'; position: absolute; right: 8px; top: 2px; }
.null-types-options { position: absolute; z-index: 100001; top: 100%; right: 0; width: 230px; max-height: 260px; overflow-y: auto; margin-top: 4px; padding: 8px; border: 1px solid var(--muted); border-radius: 4px; background: var(--surface); box-shadow: 0 12px 24px #0009; }
.null-types-group:has(.null-types-filter[open]) { z-index: 100001; }
#search-form:has(.null-types-filter[open]),
#search-container:has(.null-types-filter[open]),
#dropdowns-container:has(.null-types-filter[open]) { position: relative !important; z-index: 100000 !important; overflow: visible !important; }
.design-theme-modern .null-types-group { min-width: 108px; }
.design-theme-modern .null-types-filter { width: 108px; }
.design-theme-modern .null-types-filter summary { min-height: 34px; padding: 6px 25px 6px 10px; border: 1px solid var(--modern-line); border-radius: 10px; background: #0a1a2e; color: #dbeaff; font-size: .8rem; }
.design-theme-modern .null-types-options { border-color: var(--modern-line); background: #0a1a2e; color: #dbeaff; }
.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green, .design-theme-halloween-fog, .design-theme-halloween-ember, .design-theme-halloween-witch, .design-theme-halloween-blood-moon) .null-types-filter summary,
.design-theme-modern:is(.design-theme-modern-red, .design-theme-modern-orange, .design-theme-modern-yellow, .design-theme-modern-pink, .design-theme-modern-green, .design-theme-halloween-fog, .design-theme-halloween-ember, .design-theme-halloween-witch, .design-theme-halloween-blood-moon) .null-types-options { background: var(--modern-surface, #0a1a2e); color: var(--modern-ink, #dbeaff); border-color: var(--modern-line); }
.null-types-options label { display: flex; align-items: center; gap: 8px; padding: 4px 2px; cursor: pointer; font-size: .82rem; }
.null-types-options input { accent-color: var(--accent, #d69438); }
