:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-soft: #eef3f5;
  --ink: #1d2730;
  --muted: #5f6e7a;
  --line: #d8e0e6;
  --input-bg: #fbfcfd;
  --input-inner: #ffffff;
  --selected-bg: #edf7f6;
  --warning-bg: #fffafa;
  --teal: #0f766e;
  --blue: #2563eb;
  --green: #2e7d32;
  --amber: #b7791f;
  --red: #b42318;
  --topbar-bg: rgba(255, 255, 255, 0.92);
  --shadow: 0 18px 50px rgba(29, 39, 48, 0.09);
}

body[data-theme="tech"] {
  --bg: #eef7fb;
  --surface: #ffffff;
  --surface-soft: #e4f1f6;
  --ink: #142937;
  --muted: #526b78;
  --line: #c8dce5;
  --input-bg: #f6fbfd;
  --input-inner: #ffffff;
  --selected-bg: #e4f5f8;
  --warning-bg: #fffafa;
  --teal: #047f91;
  --blue: #1d4ed8;
  --green: #16803d;
  --amber: #a46112;
  --red: #b42318;
  --topbar-bg: rgba(248, 253, 255, 0.94);
  --shadow: 0 18px 50px rgba(4, 86, 110, 0.12);
}

body[data-theme="retail"] {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --surface-soft: #f2eee6;
  --ink: #2d271f;
  --muted: #74695d;
  --line: #ded3c2;
  --input-bg: #fffaf2;
  --input-inner: #ffffff;
  --selected-bg: #f3eadc;
  --warning-bg: #fff8f4;
  --teal: #8a5a21;
  --blue: #315f9b;
  --green: #3d7a3a;
  --amber: #a86518;
  --red: #a33b2f;
  --topbar-bg: rgba(255, 252, 247, 0.94);
  --shadow: 0 18px 50px rgba(88, 63, 34, 0.12);
}

body[data-theme="fresh"] {
  --bg: #f0f8f3;
  --surface: #ffffff;
  --surface-soft: #e5f2ea;
  --ink: #172b22;
  --muted: #557063;
  --line: #c9ded1;
  --input-bg: #f8fcf9;
  --input-inner: #ffffff;
  --selected-bg: #e6f5eb;
  --warning-bg: #fffafa;
  --teal: #16724f;
  --blue: #2563eb;
  --green: #2e7d32;
  --amber: #a86d12;
  --red: #b42318;
  --topbar-bg: rgba(250, 255, 252, 0.94);
  --shadow: 0 18px 50px rgba(24, 95, 61, 0.11);
}

body[data-theme="midnight"] {
  --bg: #111820;
  --surface: #1b2630;
  --surface-soft: #253341;
  --ink: #eef6fb;
  --muted: #a7bac7;
  --line: #344757;
  --input-bg: #24313c;
  --input-inner: #1b2630;
  --selected-bg: #213d42;
  --warning-bg: #2e2426;
  --teal: #43c6b5;
  --blue: #7aa2ff;
  --green: #77c98a;
  --amber: #efbd64;
  --red: #ff8b7f;
  --topbar-bg: rgba(24, 35, 44, 0.94);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  letter-spacing: 0;
}

body[data-background="grid"] {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(95, 110, 122, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 110, 122, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
}

body[data-background="stripes"] {
  background-color: var(--bg);
  background-image: repeating-linear-gradient(
    135deg,
    rgba(95, 110, 122, 0.10) 0,
    rgba(95, 110, 122, 0.10) 1px,
    transparent 1px,
    transparent 18px
  );
}

body[data-background="paper"] {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.12)),
    repeating-linear-gradient(0deg, rgba(95, 110, 122, 0.08) 0, rgba(95, 110, 122, 0.08) 1px, transparent 1px, transparent 44px);
}

body[data-background="panel"] {
  background-color: var(--bg);
  background-image:
    linear-gradient(90deg, rgba(95, 110, 122, 0.11) 1px, transparent 1px),
    linear-gradient(180deg, rgba(95, 110, 122, 0.08) 1px, transparent 1px);
  background-size: 96px 96px;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 14px 28px;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #16313b;
  color: #fff;
  font-weight: 800;
}

.brand-text {
  display: grid;
  gap: 1px;
}

.brand-text strong {
  font-size: 18px;
}

.brand-text span {
  color: var(--muted);
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sync-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.sync-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(46, 125, 50, 0.13);
}

.ghost-button,
.outline-button {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0 14px;
}

.view-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 38px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.switch-button {
  min-width: 62px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-weight: 800;
}

.switch-button.is-active {
  background: var(--surface);
  color: var(--teal);
  box-shadow: 0 2px 10px rgba(29, 39, 48, 0.12);
}

.ghost-button:hover,
.outline-button:hover {
  border-color: #aab8c2;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 22px;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px 28px 40px;
}

.inventory-area {
  min-width: 0;
}

.control-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.55fr) minmax(0, 0.85fr) minmax(0, 0.95fr);
  align-items: end;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.search-field,
.select-field,
.range-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.search-field input,
.select-field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--ink);
  padding: 0 12px;
  outline: none;
  min-width: 0;
  max-width: 100%;
}

.search-field input:focus,
.select-field select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 42px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.segment {
  min-width: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  min-height: 36px;
  padding: 4px 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  white-space: normal;
}

.segment.is-active {
  background: var(--surface);
  color: var(--teal);
  box-shadow: 0 2px 10px rgba(29, 39, 48, 0.12);
}

.toggle-field {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.toggle-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.range-field {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.range-field input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--teal);
}

.range-field strong {
  color: var(--ink);
  font-size: 13px;
}

.summary-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.summary-card {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.summary-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.summary-card strong {
  font-size: 28px;
}

.results-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0 14px;
}

.results-head h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
}

.results-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.product-card {
  position: relative;
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  min-height: 238px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(29, 39, 48, 0.06);
}

.product-card.is-selected {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.13), 0 10px 28px rgba(29, 39, 48, 0.08);
}

.card-hit {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  background: transparent;
}

.product-image {
  width: 100%;
  height: 100%;
  min-height: 238px;
  object-fit: cover;
  background: var(--surface-soft);
}

.product-body {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 16px;
}

.product-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.product-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.product-title-row h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.status-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-available {
  background: #e8f5ec;
  color: var(--green);
}

.status-low {
  background: #fff3dd;
  color: var(--amber);
}

.status-wait {
  background: #fdecec;
  color: var(--red);
}

.spec-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  margin: 0;
}

.spec-list div {
  min-width: 0;
}

.spec-list dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.spec-list dd {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.stock-line,
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stock-line span,
.delivery {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stock-line strong,
.price {
  font-weight: 800;
  white-space: nowrap;
}

.meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf1;
}

.meter span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--teal);
}

.detail-panel {
  position: sticky;
  top: 96px;
  align-self: start;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-view {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 24px 28px 40px;
}

.store-info-view {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 24px 28px 40px;
}

.store-info-hero {
  margin-bottom: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.store-info-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 42px);
}

.store-info-hero p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.store-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 16px;
}

.store-info-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow);
}

.store-info-card h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.store-info-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.store-info-list div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.store-info-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.store-info-list dd {
  margin: 0;
  color: var(--ink);
  line-height: 1.6;
}

.store-sns-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.calendar-head {
  margin-bottom: 10px;
  color: var(--ink);
  font-weight: 800;
}

.store-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-weekday,
.calendar-day {
  min-height: 48px;
  border-radius: 8px;
  text-align: center;
}

.calendar-weekday {
  min-height: 28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.calendar-day {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  background: var(--input-bg);
}

.calendar-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
}

.calendar-day.is-open {
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(15, 118, 110, 0.08);
}

.calendar-day.is-closed {
  color: var(--muted);
  border-color: rgba(184, 92, 92, 0.35);
  background: rgba(148, 68, 68, 0.08);
}

.calendar-day.is-today {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.calendar-day.is-empty {
  border-color: transparent;
  background: transparent;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calendar-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal);
}

.calendar-day .calendar-dot {
  width: 7px;
  height: 7px;
}

.calendar-dot.is-open {
  background: var(--teal);
}

.calendar-dot.is-closed {
  background: #b85c5c;
}

.store-event-card,
.store-inquiry-card {
  margin-top: 16px;
}

.store-event-list {
  display: grid;
  gap: 10px;
}

.store-event-item {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
  overflow: hidden;
}
.store-event-item.has-image {
  grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
  align-items: start;
}

.store-event-image-button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 0;
  cursor: zoom-in;
  overflow: hidden;
}

.store-event-image-button:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.28);
  outline-offset: 3px;
}

.store-event-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
  background: var(--line);
}

.store-event-body {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.store-event-item h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
}

.store-event-meta {
  margin: 0;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}


.store-event-item p {
  margin: 0;
  line-height: 1.7;
}

.store-inquiry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.store-inquiry-message {
  grid-column: 1 / -1;
}

.is-hidden {
  display: none !important;
}

.admin-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-heading h1,
.admin-list-head h2,
.store-editor-head h3,
.editor-top h2 {
  margin: 0;
}

.admin-heading h1 {
  font-size: 28px;
  line-height: 1.25;
}

.admin-heading p {
  margin: 4px 0 0;
  color: var(--muted);
}

.admin-heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.admin-tab {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.admin-tab.is-active {
  background: var(--surface);
  color: var(--teal);
  box-shadow: 0 2px 10px rgba(29, 39, 48, 0.12);
}

.admin-section {
  display: block;
}

.admin-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-list-panel,
.admin-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-list-panel {
  position: sticky;
  top: 96px;
  overflow: hidden;
}

.admin-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.admin-list-head h2 {
  font-size: 18px;
}

.admin-list {
  display: grid;
  gap: 0;
  max-height: calc(100vh - 190px);
  overflow: auto;
}

.admin-product-button {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 78px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
}

.admin-product-button:hover,
.admin-product-button.is-selected {
  background: var(--selected-bg);
}

.admin-product-button img {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-soft);
}

.admin-product-button span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-product-button strong,
.admin-product-button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-product-button small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-form {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.editor-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.photo-uploader {
  display: grid;
  grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
  gap: 16px;
  align-items: end;
}

.photo-preview {
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-soft);
}

.photo-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.photo-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.photo-gallery-editor {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.photo-gallery-item {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.photo-thumb-button {
  display: grid;
  gap: 6px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--ink);
  padding: 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.photo-gallery-item.is-main .photo-thumb-button {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.photo-thumb-button img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  object-fit: cover;
}

.photo-remove-button {
  min-height: 32px;
  border: 1px solid #efc6c1;
  border-radius: 8px;
  background: var(--surface);
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--teal);
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  padding: 0 16px;
  font-weight: 800;
  cursor: pointer;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

.form-field.is-wide {
  grid-column: 1 / -1;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.check-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  padding: 0 12px;
  font-weight: 800;
}

.check-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.store-editor {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.store-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.store-editor-head h3 {
  font-size: 18px;
}

.store-edit-list {
  display: grid;
  gap: 10px;
}

.store-edit-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(110px, 0.6fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
}

.store-remove-button {
  min-height: 44px;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.danger-button {
  border-color: #efc6c1;
  color: var(--red);
}

.danger-button:hover {
  border-color: var(--red);
}

.management-card {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow);
}

.management-card + .management-card {
  margin-top: 16px;
}

.management-card h2,
.management-card p {
  margin: 0;
}

.management-card p {
  color: var(--muted);
  line-height: 1.6;
}

.management-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}


.filter-manager-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.filter-manager-block {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.compact-head {
  align-items: center;
}

.compact-head h3 {
  margin: 0;
  font-size: 15px;
}

.manager-list {
  display: grid;
  gap: 10px;
}

.weekday-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.weekday-check-grid .check-field {
  min-height: 42px;
  padding-inline: 12px;
}

.manager-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
}

.manager-row input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-inner);
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

.manager-row input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.warning-card {
  border-color: #efc6c1;
  background: var(--warning-bg);
}

.import-button {
  width: fit-content;
}

.sync-card {
  gap: 18px;
}

.sync-check-field {
  align-self: end;
  width: fit-content;
}

.sync-status-box {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--muted);
  padding: 13px 14px;
  font-weight: 800;
}

.sync-actions {
  justify-content: flex-start;
}

button:disabled {
  cursor: progress;
  opacity: 0.64;
}

.detail-media-frame {
  position: relative;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

.detail-media-button {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 8px 8px 0 0;
  background: var(--surface-soft);
  padding: 0;
  cursor: zoom-in;
}

.detail-media {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--surface-soft);
  transition: transform 180ms ease;
}

.detail-media-button:hover .detail-media {
  transform: scale(1.02);
}

.detail-slide-button {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 8px;
  background: rgba(13, 22, 30, 0.58);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-50%);
}

.detail-slide-button.is-prev {
  left: 10px;
}

.detail-slide-button.is-next {
  right: 10px;
}

.detail-photo-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  border-radius: 999px;
  background: rgba(13, 22, 30, 0.68);
  color: #fff;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.detail-photo-button {
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 0;
}

.detail-photo-button.is-active {
  border-color: var(--teal);
}

.detail-photo-button img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.detail-body {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.detail-kicker {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-body h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

.detail-price {
  margin: 6px 0 0;
  font-size: 22px;
  font-weight: 900;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.primary-button,
.secondary-button {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--teal);
  padding: 0 12px;
  font-weight: 800;
}

.primary-button {
  background: var(--teal);
  color: #fff;
}

.secondary-button {
  background: #f4fbfa;
  color: var(--teal);
}

.store-list,
.detail-specs {
  display: grid;
  gap: 8px;
}

.store-row,
.detail-spec {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.store-row:last-child,
.detail-spec:last-child {
  border-bottom: 0;
}

.store-row span,
.detail-spec span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.store-row strong,
.detail-spec strong {
  text-align: right;
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 24px;
  border: 1px dashed #b8c4cc;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  text-align: center;
}

.modal-open {
  overflow: hidden;
}

.contact-modal,
.image-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.image-modal {
  z-index: 90;
}

.contact-modal.is-hidden,
.image-modal.is-hidden {
  display: none;
}

.contact-backdrop,
.image-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 32, 0.46);
}

.image-backdrop {
  background: rgba(10, 16, 22, 0.78);
}

.image-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  width: min(1040px, 100%);
  max-height: calc(100vh - 48px);
}

.image-preview {
  display: block;
  width: 100%;
  max-height: calc(100vh - 118px);
  object-fit: contain;
  border-radius: 8px;
  background: #111820;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

.image-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 62px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 8px;
  background: rgba(13, 22, 30, 0.72);
  color: #fff;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-50%);
}

.image-nav.is-prev {
  left: 12px;
}

.image-nav.is-next {
  right: 12px;
}

.image-counter {
  position: absolute;
  left: 12px;
  bottom: 42px;
  z-index: 2;
  margin: 0;
  border-radius: 999px;
  background: rgba(13, 22, 30, 0.72);
  color: #fff;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.image-caption {
  margin: 0;
  color: #fff;
  font-weight: 800;
  text-align: center;
}

.image-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 8px;
  background: rgba(13, 22, 30, 0.72);
  color: #fff;
  font-size: 22px;
}

.contact-dialog {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(21, 31, 41, 0.24);
}

.contact-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.contact-head h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.contact-close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 20px;
}

.contact-product {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.contact-product span,
.contact-product small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.contact-product strong {
  color: var(--ink);
  font-size: 18px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.contact-message-field,
.delivery-choice,
.reservation-panel,
.shipping-panel {
  grid-column: 1 / -1;
}

.settings-wide-field {
  grid-column: 1 / -1;
}

.form-field textarea {
  min-height: 112px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
}

.delivery-choice {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.delivery-choice > span,
.shipping-note-box span,
.shipping-payment-box span,
.shipping-fee-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.delivery-choice-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.delivery-choice-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--ink);
  font-weight: 700;
}

.delivery-choice-option input {
  accent-color: var(--teal);
}

.reservation-schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.calendar-help {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.reservation-panel,
.shipping-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.reservation-panel.is-hidden,
.shipping-panel.is-hidden,
.contact-order-only.is-hidden {
  display: none;
}

.shipping-fee-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.shipping-fee-box strong {
  color: var(--teal);
  font-size: 18px;
}

.shipping-note-box,
.shipping-payment-box {
  display: grid;
  gap: 6px;
}

.shipping-note-box p,
.shipping-payment-box p {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.7;
}

.mail-send-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
}

.contact-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  max-width: min(360px, calc(100vw - 32px));
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  border-radius: 8px;
  background: #18242c;
  color: #fff;
  padding: 12px 14px;
  font-weight: 700;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    position: static;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-list-panel {
    position: static;
  }

  .admin-list {
    max-height: 360px;
  }

  .control-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .segmented,
  .range-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .workspace {
    padding: 18px 16px 32px;
  }

  .admin-view {
    padding: 18px 16px 32px;
  }

  .admin-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-heading-actions {
    justify-content: flex-start;
  }

  .control-strip,
  .summary-row,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .segmented,
  .range-field {
    grid-column: auto;
  }

  .segmented {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-card {
    grid-template-columns: 140px minmax(0, 1fr);
  }

  .photo-uploader,
  .form-grid,
  .store-edit-row,
  .filter-manager-grid,
  .settings-grid,
  .store-info-grid,
  .store-inquiry-grid,
  .reservation-schedule-grid,
  .data-grid {
    grid-template-columns: 1fr;
  }

  .management-head,
  .button-row {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .brand-text span,
  .sync-state {
    font-size: 11px;
  }

  .results-head {
    align-items: stretch;
    flex-direction: column;
  }

  .product-card {
    grid-template-columns: 1fr;
  }

  .product-image {
    height: 190px;
    min-height: 190px;
  }

  .product-title-row,
  .stock-line,
  .card-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .spec-list,
  .detail-actions {
    grid-template-columns: 1fr;
  }

  .topbar-actions,
  .photo-controls,
  .form-actions,
  .management-head,
  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .view-switch {
    width: 100%;
  }

  .admin-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manager-row {
    grid-template-columns: 1fr;
  }

  .detail-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .photo-gallery-editor {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .store-event-item.has-image,
  .contact-grid,
  .delivery-choice-buttons {
    grid-template-columns: 1fr;
  }

  .contact-actions {
    flex-direction: column;
  }

  .admin-heading-actions .outline-button,
  .admin-heading-actions .primary-button,
  .photo-controls .outline-button,
  .photo-controls .upload-button,
  .form-actions .outline-button,
  .form-actions .primary-button,
  .management-head .outline-button,
  .management-head .primary-button,
  .button-row .outline-button,
  .button-row .primary-button,
  .contact-actions .outline-button,
  .contact-actions .primary-button,
  .import-button {
    width: 100%;
  }
}


.settings-check-field {
  align-self: end;
  width: fit-content;
}

.estimate-box {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.estimate-result {
  display: grid;
  gap: 8px;
  min-height: 0;
}

.estimate-line,
.estimate-total {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.estimate-line span,
.estimate-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.estimate-total {
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.estimate-total strong {
  font-size: 20px;
}

.estimate-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.payment-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

@media (max-width: 560px) {
  .estimate-box,
  .estimate-actions {
    grid-template-columns: 1fr;
  }
}
