:root {
  --navy: #192538;
  --ink: #1c293b;
  --soft: #617085;
  --paper: #fff;
  --background: #f5f7f9;
  --line: #e2e8ee;
  --accent: #b94b20;
  --orange: #ffad6f;
  --warm: #fff1e6;
  --warm-ink: #953d17;
  --warm-hover: #ffe3cf;
  --tint: #edf2f8;
  --nav-label: #d4deec;
  --nav-hover: #344359;
  --primary-ink: #fff;
  --nav-active-ink: #fff;
  --link: #28486c;
  --hero-bg: #0e192a;
  --hero-fade: #0e192aad;
  --hero-highlight: #ffb87f;
  --hero-label: #e5eaf3;
  --progress-start: #d2683b;
  --progress-end: #efae74;
  color: var(--ink);
  background: var(--background);
  font: 16px/1.55 system-ui, "Nirmala UI", "Noto Sans Devanagari", "Microsoft YaHei", "PingFang SC", sans-serif;
}

/* Text stays live rather than baked into locale-specific banners. */
.language-picker { display: inline-flex; align-items: center; gap: 7px; font-size: .875rem; max-width: 100%; }
.language-picker select { appearance: none; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 7px 28px 7px 10px; max-width: 185px; min-height: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23516074' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.language-picker select:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.topline .shell { flex-wrap: wrap; padding-block: 6px; }
.header-actions { flex-wrap: wrap; justify-content: flex-end; }
.product-meta h3, .panel, .subhead, .category-panel button { overflow-wrap: anywhere; }
.product-actions .btn, .admin-actions .btn { white-space: normal; }
html[lang^="hi"] { line-height: 1.7; }
html[lang^="hi"] .hero h1 { line-height: 1.4; }
html[lang^="hi"] .brand { letter-spacing: normal; }
.locale-fields { border: 1px solid var(--line); border-radius: 9px; padding: 12px; margin-block: 12px; min-width: 0; }
.locale-fields > summary { cursor: pointer; font-weight: 650; }
.locale-fields .field { margin-top: 10px; }
* { box-sizing: border-box; }
body { min-width: 300px; margin: 0; }
body[data-theme] { min-height: 100vh; color: var(--ink); background: var(--background); }
[data-theme^="festival"], [data-theme-preview^="festival"] {
  --navy: #b74611;
  --ink: #372219;
  --soft: #6f5547;
  --background: #fff8ef;
  --line: #eedfd1;
  --accent: #aa2922;
  --link: #215b94;
  --orange: #ffcb4f;
  --warm: #ffe5a5;
  --warm-ink: #552d13;
  --warm-hover: #ffda7f;
  --tint: #fff0df;
  --nav-label: #fff7ec;
  --nav-hover: #923612;
  --nav-indicator: #ffc75d;
  --hero-bg: #9d2e17;
  --hero-fade: #a63017b5;
  --hero-highlight: #ffdb79;
  --hero-label: #fff4dd;
  --progress-start: #da6022;
  --progress-end: #f0b632;
}
[data-theme="festival-red"], [data-theme-preview="festival-red"] {
  --navy: #b4232b;
  --background: #fff7f4;
  --tint: #fff0e8;
  --nav-hover: #8c2128;
  --hero-bg: #932229;
  --hero-fade: #96252aad;
  --progress-start: #c82f35;
}
[data-theme="festival-yellow"], [data-theme-preview="festival-yellow"] {
  --navy: #ffc83d;
  --primary-ink: #3c280a;
  --nav-active-ink: #3c280a;
  --nav-label: #493214;
  --nav-hover: #f6b92c;
  --nav-indicator: #215b94;
  --badge-ink: #493214;
  --winner-ink: #493214;
  --hero-bg: #813611;
  --hero-fade: #8a4015ba;
  --background: #fffbef;
  --tint: #fff3d2;
}
[data-theme="plum"], [data-theme-preview="plum"] {
  --navy: #402064;
  --ink: #291b3c;
  --soft: #63536f;
  --background: #f8f5fc;
  --line: #e8deef;
  --accent: #793d25;
  --orange: #ffc45a;
  --warm: #ffe6ad;
  --warm-ink: #523219;
  --warm-hover: #ffda8b;
  --tint: #efe7f8;
  --nav-label: #f0e4fd;
  --nav-hover: #5b3580;
  --hero-bg: #2e174a;
  --hero-fade: #391653b8;
  --hero-highlight: #ffd174;
  --hero-label: #f2e7fc;
  --progress-start: #7542a1;
  --progress-end: #d9892d;
}
[data-theme="blue"], [data-theme-preview="blue"] {
  --navy: #193b98;
  --ink: #1a2b51;
  --soft: #4b5c7f;
  --background: #f4f7ff;
  --line: #e0e8fc;
  --accent: #234a9f;
  --orange: #ffdb62;
  --warm: #fff1b3;
  --warm-ink: #4e3912;
  --warm-hover: #ffe58f;
  --tint: #e9efff;
  --nav-label: #e1e9ff;
  --nav-hover: #3050a6;
  --hero-bg: #122760;
  --hero-fade: #153381ad;
  --hero-highlight: #ffe680;
  --hero-label: #eaf0ff;
  --progress-start: #385dbb;
  --progress-end: #c38b19;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
.shell { width: min(1200px, calc(100% - 54px)); margin-inline: auto; }
.topline { background: var(--tint); color: var(--soft); font-size: .875rem; }
.topline .shell { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 32px; }
.header { background: white; }
.masthead { min-height: 79px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 32px; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; font-size: 1.36rem; font-weight: 850; letter-spacing: .06em; white-space: nowrap; }
.brand-name { min-width: 0; max-width: min(27ch, 50vw); overflow: hidden; text-overflow: ellipsis; }
.brand-icon { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 10px; color: var(--badge-ink,var(--hero-highlight)); background: var(--navy); font-size: 1.25rem; line-height: 1; }
.search { display: flex; max-width: 475px; width: 100%; justify-self: center; }
.search input { min-width: 0; width: 100%; padding: 7px 11px; border-radius: 9px 0 0 9px; border: 1px solid var(--line); background: #f9fafc; }
.search button { padding: 5px 17px; border: 0; border-radius: 0 9px 9px 0; background: var(--navy); color: var(--primary-ink); font-size: .9rem; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: .9rem; }
.header-actions .quiet, .topline .quiet { color: inherit; padding: 0; border: 0; background: transparent; }
.header-actions .quiet:hover, .topline .quiet:hover { text-decoration: underline; }
.nav-band { background: var(--navy); color: var(--nav-label); }
.nav-content { display: flex; gap: 7px; align-items: stretch; flex-wrap: wrap; min-height: 45px; }
.nav-content a { display: flex; align-items: center; padding: 6px 19px; font-size: .92rem; }
.nav-content a:hover, .nav-content a[aria-current] { background: var(--nav-hover); color: var(--nav-active-ink); }
.nav-content a[aria-current] { box-shadow: inset 0 -3px var(--nav-indicator,var(--orange)); }
.btn { min-height: 36px; display: inline-flex; justify-content: center; align-items: center; gap: 6px; padding: 6px 13px; border: 1px solid transparent; border-radius: 8px; font-size: .9rem; font-weight: 740; white-space: nowrap; }
.btn.primary { background: var(--navy); color: var(--primary-ink); }
.btn.primary:hover { background: var(--nav-hover); }
.btn.warm { background: var(--warm); color: var(--warm-ink); }
.btn.warm:hover { background: var(--warm-hover); }
.btn.outline { color: var(--ink); border-color: var(--line); background: white; }
.btn.outline:hover { background: var(--tint); }
.number { color: var(--accent); font-weight: 780; font-variant-numeric: tabular-nums; }
.notice-link { color: var(--link); font-weight: 720; }
.muted { color: var(--soft); }
.small { font-size: .875rem; }
.layout { min-height: 65vh; padding-block: 20px 36px; }
.announcement { background: var(--warm); color: var(--warm-ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: .875rem; overflow-wrap: anywhere; }
.hero-grid { display: grid; grid-template-columns: 214px minmax(0, 1fr); gap: 14px; }
.category-panel, .record, .product, .panel { background: white; border: 1px solid var(--line); border-radius: 12px; }
.category-panel { padding: 13px 9px; }
.category-panel h2 { font-size: 1rem; margin: 3px 9px 8px; }
.category-panel button { display: flex; gap: 9px; align-items: center; text-align: left; width: 100%; background: transparent; border: 0; border-radius: 7px; min-height: 33px; padding: 5px 9px; color: var(--soft); font-size: .92rem; }
.category-panel button:hover, .category-panel button[aria-pressed="true"] { color: var(--ink); background: var(--tint); font-weight: 740; }
.category-panel button span { color: var(--accent); width: 16px; text-align: center; }
.hero { position: relative; overflow: hidden; isolation: isolate; min-height: 310px; border-radius: 13px; background: var(--hero-bg); color: white; display: flex; align-items: center; }
.hero img { position: absolute; z-index: -2; inset: 0 0 0 auto; height: 100%; width: 66%; object-fit: cover; object-position: center 54%; }
.hero::after { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, var(--hero-bg) 31%, var(--hero-fade) 51%, transparent 82%); }
.hero-content { padding: 27px 0 30px 5.2%; width: 60%; }
.hero h1 { font-size: clamp(1.9rem, 4.2vw, 3.45rem); line-height: 1.14; margin-bottom: 11px; overflow-wrap: anywhere; }
.hero h1 span { display: block; color: var(--hero-highlight); }
.hero p { color: var(--hero-label); margin-top: 8px; max-width: 360px; font-size: .92rem; white-space: pre-line; overflow-wrap: anywhere; }
.hero .btn { margin-top: 17px; background: var(--orange); color: var(--warm-ink); white-space: normal; }
.hero .btn:hover { background: var(--hero-highlight); }
.result-bar { display: flex; align-items: center; gap: 9px; margin-top: 13px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--tint); font-size: .875rem; }
.result-bar strong { white-space: nowrap; }
.result-bar a { margin-left: auto; white-space: nowrap; }
.activity-panel { margin-top: 10px; padding: 9px 12px; }
.activity-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 7px; }
.activity-heading h2 { margin: 0; font-size: .98rem; }
.activity-heading a { margin-left: auto; font-size: .85rem; }
.activity-state, .region-chip { display: inline-flex; align-items: center; gap: 5px; color: var(--link); background: #eff6ff; border-radius: 5px; padding: 1px 6px; font-size: .75rem; }
.activity-state::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.activity-example { color: var(--warm-ink); background: var(--warm); }
.activity-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; list-style: none; margin: 0; padding: 0; }
.activity-expanded { grid-template-columns: repeat(2,minmax(0,1fr)); }
.activity-item { display: flex; align-items: center; gap: 8px; min-height: 47px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 7px; }
.activity-item:hover { background: var(--background); }
.activity-info { display: grid; flex: 1; min-width: 0; font-size: .84rem; }
.activity-person, .activity-product { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-person time { color: var(--soft); font-size: .77rem; font-variant-numeric: tabular-nums; margin-left: 3px; }
.activity-product { color: var(--link); }
.activity-shares { color: var(--accent); white-space: nowrap; font-size: .78rem; font-weight: 750; }
.list-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 23px 0 11px; }
.list-heading h2 { font-size: 1.35rem; }
.filters { display: inline-flex; gap: 3px; flex-wrap: wrap; padding: 3px; border-radius: 8px; background: var(--tint); }
.filters button { padding: 5px 9px; border: 0; background: transparent; border-radius: 6px; color: var(--soft); font-size: .83rem; }
.filters button[aria-pressed="true"] { background: white; color: var(--ink); font-weight: 750; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; }
.product { overflow: hidden; }
.product:hover { box-shadow: 0 3px 12px #13273a14; }
.product-image, .detail-photo, .tile-photo { display: block; background-image: url('prizes.webp'); background-repeat: no-repeat; background-size: 200% 200%; }
.photo-phone { background-position: left top; }
.photo-phones { background-position: right top; }
.photo-controller { background-position: left bottom; }
.photo-speaker { background-position: right bottom; }
.catalog-photo { background-size: 400% 300%; background-position: var(--tile-x,0%) var(--tile-y,0%); }
.catalog-photo[data-collection="tech"] { background-image: url('catalog-tech.webp'); }
.catalog-photo[data-collection="home"] { background-image: url('catalog-home.webp'); }
.catalog-photo:is([data-slot="2"],[data-slot="6"],[data-slot="10"]) { --tile-x: 33.333%; }
.catalog-photo:is([data-slot="3"],[data-slot="7"],[data-slot="11"]) { --tile-x: 66.667%; }
.catalog-photo:is([data-slot="4"],[data-slot="8"],[data-slot="12"]) { --tile-x: 100%; }
.catalog-photo:is([data-slot="5"],[data-slot="6"],[data-slot="7"],[data-slot="8"]) { --tile-y: 50%; }
.catalog-photo:is([data-slot="9"],[data-slot="10"],[data-slot="11"],[data-slot="12"]) { --tile-y: 100%; }
.uploaded { background: #edf1f5; overflow: hidden; padding: 0; }
.media-cover { width: 100%; height: 100%; object-fit: cover; }
.product-image { width: 100%; aspect-ratio: 1.56; border: 0; }
.product-visual { position: relative; display: block; }
.unit-badge { display: inline-flex; border-radius: 6px; background: var(--navy); color: var(--primary-ink); padding: 4px 8px; font-size: .78rem; font-weight: 750; }
.product-visual > .unit-badge { position: absolute; top: 9px; left: 9px; }
.product-meta { padding: 12px 12px 13px; }
.product-meta h3 { font-size: 1rem; white-space: normal; overflow-wrap: anywhere; }
.product-meta .small { margin-top: 2px; }
.progress { margin-top: 12px; }
.progress > div { margin-bottom: 4px; }
.progress-caption { display: flex; justify-content: space-between; gap: 4px 8px; flex-wrap: wrap; }
.progress progress { display: block; appearance: none; width: 100%; height: 7px; border: 0; border-radius: 10px; overflow: hidden; background: var(--line); }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: linear-gradient(90deg,var(--progress-start),var(--progress-end)); }
progress::-moz-progress-bar { background: var(--progress-start); }
.progress p { display: flex; justify-content: space-between; gap: 6px; margin-top: 5px; }
.product-actions { display: flex; gap: 5px; margin-top: 11px; }
.product-actions .btn { flex: 1; padding-inline: 6px; }
.product-actions .quick-cart { flex: 0 0 40px; font-size: 1rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--soft); font-size: .875rem; margin-bottom: 12px; }
.breadcrumbs a, .text-button { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumbs span::before { content: '/'; margin-right: 8px; color: var(--soft); }
.text-button { border: 0; padding: 0; background: transparent; text-align: start; }
.round-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.5fr); gap: clamp(15px,3vw,32px); align-items: start; }
.round-gallery > .detail-photo { aspect-ratio: 1.38; background-color: var(--background); }
.round-gallery .media-cover { object-fit: contain; }
.gallery-thumbs { display: flex; gap: 7px; margin-top: 8px; }
.gallery-thumbs button { width: 73px; border: 2px solid var(--line); border-radius: 8px; padding: 2px; background: white; }
.gallery-thumbs button[aria-pressed="true"] { border-color: var(--navy); }
.round-summary { display: grid; gap: 12px; align-content: start; }
.round-summary > .unit-badge { justify-self: start; }
.round-summary .subhead { margin: 0; }
.round-summary h1 { overflow-wrap: anywhere; }
.round-description { color: var(--soft); white-space: pre-line; overflow-wrap: anywhere; }
.round-live-status, .weight-rule { display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 7px 9px; border-radius: 6px; background: var(--tint); color: var(--soft); font-size: .85rem; }
.weight-rule { display: block; margin-top: 9px; }
.round-live-status strong, .weight-rule strong { color: var(--accent); }
.round-summary .progress, .participation .product-actions { margin-top: 0; }
.quantity-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.quantity-stepper { display: inline-flex; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: white; }
.quantity-stepper :is(button,input) { border: 0; text-align: center; min-height: 34px; }
.quantity-stepper button { min-width: 32px; background: var(--tint); }
.quantity-stepper input { width: 55px; appearance: textfield; }
.quantity-stepper input::-webkit-inner-spin-button { appearance: none; }
.quantity-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.quantity-presets button { min-width: 50px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: white; font-size: .875rem; }
.quantity-presets button[aria-pressed="true"] { color: var(--link); background: #eff6ff; border-color: var(--link); font-weight: 750; }
.winner-banner { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 12px 16px; border-radius: 9px; background: var(--navy); color: var(--primary-ink); }
.winner-banner strong { color: var(--winner-ink,var(--hero-highlight)); font-size: clamp(1.6rem,4vw,2.15rem); font-variant-numeric: tabular-nums; letter-spacing: .02em; line-height: 1; }
.winner-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px; border-radius: 9px; background: var(--tint); }
.member-avatar { display: grid; place-items: center; width: 50px; height: 50px; background: var(--tint); color: var(--link); border-radius: 10px; font-weight: 780; font-size: 1.3rem; }
.winner-avatar { background: var(--warm); color: var(--warm-ink); }
.small-avatar { width: 32px; height: 32px; border-radius: 7px; font-size: .92rem; }
.winner-equation, .latest-period { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px; padding: 9px 12px; background: var(--background); border-radius: 8px; }
.round-history { margin-top: 13px; }
.round-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.round-tabs button { padding: 7px 12px; border: 0; color: var(--soft); border-radius: 6px; background: transparent; }
.round-tabs button[aria-pressed="true"] { background: var(--tint); color: var(--link); font-weight: 750; }
.round-history > .round-tabs { padding-bottom: 9px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.section-header { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; margin-bottom: 9px; }
.section-header h2 { margin: 0; }
.timeline-source { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-left: auto; }
.timeline-source button { padding: 4px 9px; background: white; border: 1px solid var(--line); border-radius: 6px; font-size: .82rem; }
.timeline-source button[aria-pressed="true"] { background: var(--tint); color: var(--link); border-color: var(--link); }
.timeline-columns { display: grid; grid-template-columns: 105px minmax(0,1fr); padding: 5px 0; border-radius: 6px; background: var(--background); color: var(--soft); font-size: .82rem; }
.timeline-columns span { padding-left: 8px; }
.participation-timeline { display: grid; }
.timeline-row { display: grid; grid-template-columns: 105px minmax(0,1fr); }
.timeline-row > time { display: block; padding: 9px 5px 8px 8px; border-right: 1px solid var(--line); color: var(--soft); font-variant-numeric: tabular-nums; font-size: .85rem; }
.timeline-event { position: relative; display: flex; align-items: flex-start; gap: 9px; padding: 8px 0 8px 17px; }
.timeline-event::before { position: absolute; content: ''; width: 8px; height: 8px; top: 17px; left: -5px; border: 2px solid var(--navy); border-radius: 50%; background: white; }
.timeline-event .small-avatar { flex: 0 0 32px; }
.timeline-entry { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 3px 9px; padding-top: 3px; font-size: .87rem; }
.timeline-entry p { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 6px; }
.timeline-entry p strong { color: var(--link); }
.timeline-event details { color: var(--soft); font-size: .82rem; }
.timeline-event summary { color: var(--link); }
.timeline-empty { padding: 10px 0; }
.timeline-empty a { margin-left: 7px; }
summary { cursor: pointer; }
.number-chips, .period-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.number-chips span { padding: 3px 7px; border-radius: 5px; background: var(--tint); font-size: .85rem; font-variant-numeric: tabular-nums; }
.pagination { margin-top: 14px; display: flex; align-items: center; justify-content: end; flex-wrap: wrap; gap: 5px; }
.pagination .btn { min-height: 30px; padding: 4px 9px; }
.formula { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 8px; }
.formula-cell { min-width: 110px; display: grid; gap: 2px; text-align: center; padding: 6px 8px; border-radius: 7px; background: var(--tint); }
.formula-cell:first-child { background: var(--warm); color: var(--warm-ink); }
.formula-cell span { font-size: .8rem; }
.verification-details { margin-block: 12px; padding: 9px; border: 1px solid var(--line); border-radius: 7px; font-size: .85rem; }
.verification-details code { display: block; color: var(--link); overflow-wrap: anywhere; }
.proof-cutoff { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 10px; margin-top: 11px; padding: 6px 9px; border-radius: 6px; background: var(--warm); color: var(--warm-ink); font-size: .85rem; }
.proof-cutoff span { margin-left: auto; }
.proof-cutoff time, .proof-records td:first-child { font-variant-numeric: tabular-nums; }
.proof-records td:first-child { white-space: nowrap; }
.proof-arrow { margin-inline: 7px; color: var(--accent); }
.proof-alias { color: var(--link); }
.proof-example > p:last-child { margin-top: 8px; }
.profile-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.personal-product { display: grid; grid-template-columns: 54px minmax(145px,1fr); align-items: center; gap: 8px; }
.secondary-image { padding: 8px; border: 1px solid var(--line); border-radius: 7px; }
.secondary-image .image-picker { margin-top: 6px; }
.subhead { margin-bottom: 15px; }
.subhead h1 { font-size: clamp(1.5rem,3vw,2rem); }
.subhead p { color: var(--soft); }
.stack { display: grid; grid-template-columns: minmax(0,1fr); gap: 9px; }
.stack > *, .admin-grid > section, .columns > * { min-width: 0; }
.record { display: grid; align-items: center; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; padding: 10px; }
.tile-photo { aspect-ratio: 1.45; border-radius: 7px; }
.record p { color: var(--soft); font-size: .875rem; overflow-wrap: anywhere; }
.panel { padding: 14px; }
.panel h2 { font-size: 1.08rem; margin-bottom: 7px; }
.dashboard { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }
.dashboard .panel strong { display: block; font-size: 1.45rem; }
.columns { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 13px; align-items: start; }
.cart-row { display: grid; align-items: center; grid-template-columns: minmax(0, 1fr) 83px 73px auto; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.cart-row input { width: 75px; }
.field { display: grid; gap: 4px; font-size: .875rem; }
.field input, .field select, .field textarea, .cart-row input { min-height: 36px; border: 1px solid var(--line); border-radius: 7px; background: white; padding: 6px 8px; }
.field input, .field select, .field textarea { width: 100%; }
.field textarea { min-height: 77px; resize: vertical; }
.form { display: grid; gap: 10px; }
.form-footer { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.wide { width: 100%; }
.review-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.footer { border-top: 1px solid var(--line); color: var(--soft); background: white; }
.footer .shell { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-block: 13px; font-size: .875rem; }
dialog { width: min(550px,calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 13px; box-shadow: 0 14px 58px #0d1a3370; color: var(--ink); }
dialog::backdrop { background: #0e1929a0; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 9px; position: sticky; top: 0; z-index: 1; background: white; padding: 10px 13px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 1.1rem; }
.modal-head button { width: 34px; height: 34px; line-height: 1; border: 0; border-radius: 8px; background: #edf1f5; font-size: 1.45rem; }
.modal-body { display: grid; gap: 10px; padding: 13px; }
.detail-photo { aspect-ratio: 1.9; border-radius: 8px; }
.error { color: #95241c; font-size: .875rem; }
#notice { position: fixed; z-index: 30; bottom: 20px; left: 50%; transform: translateX(-50%); padding: 8px 13px; border-radius: 8px; background: var(--navy); color: white; max-width: calc(100% - 24px); font-size: .9rem; }
#notice:empty { display: none; }
.admin-header { background: var(--navy); color: white; }
.admin-header .shell { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; min-height: 57px; }
.admin-header .btn { color: white; border-color: #5a6980; background: transparent; }
.admin-grid { display: grid; grid-template-columns: 192px minmax(0,1fr); gap: 15px; align-items: start; }
.admin-menu { display: grid; gap: 4px; }
.admin-menu button { text-align: left; border: 0; background: transparent; padding: 7px 10px; border-radius: 6px; }
.admin-menu button[aria-pressed="true"] { background: #e8eff7; font-weight: 750; }
.admin-login { width: min(430px,100%); margin: 38px auto; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.settings-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; align-items: start; }
.settings-columns h2 { margin: 0; }
.theme-preview { display: flex; gap: 6px; }
.theme-preview span { width: 42px; height: 23px; border: 1px solid var(--line); border-radius: 6px; background: var(--navy); }
.theme-preview span:nth-child(2) { background: var(--orange); }
.theme-preview span:nth-child(3) { background: var(--link); }
.theme-preview span:nth-child(4) { background: var(--background); }
.editor-image { max-width: 100%; border-radius: 8px; overflow: hidden; }
.editor-image img { width: 100%; max-height: 180px; object-fit: contain; background: var(--background); }
.image-picker[data-image-picker="product"] .editor-image { width: 180px; }
.table-wrap { overflow-x: auto; margin-top: 10px; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: .875rem; }
th, td { border-bottom: 1px solid var(--line); padding: 7px 8px; vertical-align: top; }
th { color: #516074; background: #eff3f7; white-space: nowrap; }
td .btn { min-height: 29px; padding: 3px 6px; margin: 2px 3px 2px 0; font-size: .78rem; }
@media (max-width: 900px) {
  .shell { width: calc(100% - 30px); }
  .masthead { gap: 13px; }
  .hero-grid { grid-template-columns: 155px minmax(0,1fr); gap: 9px; }
  .hero { min-height: 270px; }
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-grid { grid-template-columns: 140px minmax(0,1fr); }
}
@media (max-width: 590px) {
  .shell { width: calc(100% - 20px); }
  .masthead { min-height: 48px; padding-block: 7px; grid-template-columns: 1fr auto; }
  .search { grid-column: 1/-1; grid-row: 2; max-width: none; }
  .nav-content { min-height: 37px; gap: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .nav-content a { flex: none; padding-inline: 7px; font-size: .8rem; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero { min-height: 223px; grid-row: 1; }
  .hero-content { width: 74%; }
  .hero-content h1 { font-size: 1.8rem; }
  .category-panel { display: flex; flex-wrap: wrap; gap: 2px; padding: 5px; }
  .category-panel h2 { display: none; }
  .category-panel button { width: auto; min-height: 29px; padding: 3px 6px; font-size: .78rem; }
  .category-panel button span { display: none; }
  .product-grid { gap: 7px; }
  .product-meta { padding: 7px; }
  .product-actions { flex-wrap: wrap; }
  .product-actions .btn { font-size: .76rem; min-height: 31px; }
  .columns, .admin-grid, .settings-columns { grid-template-columns: 1fr; }
  .round-layout { grid-template-columns: 1fr; }
  .round-gallery > .detail-photo { aspect-ratio: 1.65; }
  .winner-card { grid-template-columns: auto 1fr; }
  .winner-card > :last-child { grid-column: 2; }
  .timeline-row, .timeline-columns { grid-template-columns: 85px minmax(0,1fr); }
  .timeline-source { width: 100%; margin: 7px 0 0; }
  .proof-cutoff span { margin-left: 0; }
  .activity-list { grid-template-columns: 1fr; }
  .activity-list:not(.activity-expanded) li:nth-child(n+3) { display: none; }
  .admin-menu { display: flex; flex-wrap: wrap; }
  .dashboard { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .record { grid-template-columns: 65px minmax(0,1fr); }
  .record > .btn { grid-column: 2; justify-self: start; }
  .cart-row { grid-template-columns: minmax(0,1fr) 60px auto; }
  .cart-row input { width: 58px; }
  .cart-row > :first-child { grid-column: 1/-1; }
  .header-actions .balance-label { display: none; }
}

@media (max-width: 590px) {
  .language-picker > span { display: none; }
  .language-picker select { max-width: 145px; }
  .header-actions { gap: 8px; }
  .masthead { grid-template-columns: minmax(0,1fr); }
  .masthead .header-actions { grid-row: 2; justify-content: flex-start; }
  .masthead .search { grid-row: 3; }
  .nav-content a, .category-panel button, .product-actions .btn, td .btn { font-size: .875rem; }
  .brand-name { max-width: 100%; }
  .hero-content { padding-right: 10px; }
  .admin-header > .shell { flex-wrap: wrap; gap: 10px; }
}
