/* Wang Console — admin CMS styles
   Aesthetic: warm-black bg, cream parchment text, deep red accent,
   bronze gold + bamboo green. Dense, typographically alive admin look. */

/* ============ Tokens ============ */
.wc-app {
  /* Wang dark (default) */
  --wc-bg:        #0F0A0A;
  --wc-bg-2:      #16100F;  /* panels */
  --wc-bg-3:      #1D1614;  /* row hover, inputs */
  --wc-bg-4:      #25201D;  /* deeper input */
  --wc-line:      rgba(201, 168, 118, 0.14);
  --wc-line-2:    rgba(201, 168, 118, 0.22);
  --wc-text:      #DCC09C;   /* primary cream */
  --wc-text-dim:  #94806A;
  --wc-text-faint:#5E5346;
  --wc-text-hi:   #F2E2C2;
  --wc-red:       #B82A2A;
  --wc-red-soft:  #C13A36;
  --wc-bronze:    #C89A6A;
  --wc-bamboo:    #6BA372;
  --wc-paper:     #F2E2C2;

  --wc-font-display: "Cormorant Garamond", "Times New Roman", serif;
  --wc-font-body:    "Inter", system-ui, -apple-system, sans-serif;
  --wc-font-zh:      "Noto Serif SC", "Songti SC", "SimSun", serif;
  --wc-font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* density-driven */
  --wc-row-h: 56px;
  --wc-row-pad: 12px;

  position: fixed; inset: 0;
  display: grid;
  grid-template-columns: 252px 1fr;
  background: var(--wc-bg);
  color: var(--wc-text);
  font-family: var(--wc-font-body);
  font-size: 13.5px;
  line-height: 1.4;
  letter-spacing: 0.005em;
  overflow: hidden;
}

.wc-app.theme-parchment {
  --wc-bg:        #F4ECD8;
  --wc-bg-2:      #EBE1C8;
  --wc-bg-3:      #E2D6B7;
  --wc-bg-4:      #D8C9A4;
  --wc-line:      rgba(70, 50, 30, 0.16);
  --wc-line-2:    rgba(70, 50, 30, 0.26);
  --wc-text:      #2A2018;
  --wc-text-dim:  #6B5B47;
  --wc-text-faint:#9A8970;
  --wc-text-hi:   #120D08;
}
.wc-app.theme-utility {
  --wc-bg:        #FAFAF8;
  --wc-bg-2:      #FFFFFF;
  --wc-bg-3:      #F1F0EC;
  --wc-bg-4:      #E7E5DF;
  --wc-line:      rgba(20, 20, 20, 0.08);
  --wc-line-2:    rgba(20, 20, 20, 0.14);
  --wc-text:      #1B1916;
  --wc-text-dim:  #5C564F;
  --wc-text-faint:#9A948B;
  --wc-text-hi:   #000;
  --wc-paper:     #FFFFFF;
  --wc-bronze:    #8B6F47;
}

.wc-app.density-compact { --wc-row-h: 44px; --wc-row-pad: 8px; font-size: 13px; }
.wc-app.density-cozy    { --wc-row-h: 56px; --wc-row-pad: 12px; }
.wc-app.density-comfy   { --wc-row-h: 72px; --wc-row-pad: 16px; font-size: 14px; }

/* When the editor is open, give it room — but cap so center pane stays usable */
.wc-app:has(.wc-drawer) {
  grid-template-columns: 252px minmax(440px, 1fr) clamp(460px, 38vw, 600px);
}
@media (max-width: 1280px) {
  .wc-app:has(.wc-drawer) {
    grid-template-columns: 252px minmax(380px, 1fr) clamp(420px, 42vw, 540px);
  }
}

/* Reset basics inside the app */
.wc-app, .wc-app * { box-sizing: border-box; }
.wc-app button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
.wc-app input, .wc-app textarea, .wc-app select { font: inherit; color: inherit; }
.wc-app a { color: inherit; text-decoration: none; }
.wc-app code { font-family: var(--wc-font-mono); font-size: 0.92em; }

/* ============ Sidebar ============ */
.wc-sidebar {
  background: var(--wc-bg-2);
  border-right: 1px solid var(--wc-line);
  display: flex; flex-direction: column;
  min-height: 0; overflow: hidden;
  padding: 18px 0 0;
}

.wc-brand { padding: 6px 14px 14px; margin: 0 14px; border-bottom: 1px solid var(--wc-line); margin-bottom: 0; }

/* Splittable region */
.wc-sidebar-split {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
}
.wc-sidebar-top, .wc-sidebar-bot {
  min-height: 60px;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.wc-sidebar-top-inner {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 14px 14px 8px;
}
.wc-sidebar-bot-inner {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 4px 14px 14px;
}

/* Splitter */
.wc-splitter {
  position: relative;
  flex: 0 0 12px;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  background: var(--wc-bg);
  border-top: 1px solid var(--wc-line);
  border-bottom: 1px solid var(--wc-line);
  cursor: row-resize;
  user-select: none;
  transition: background 0.15s;
}
.wc-splitter:hover, body.wc-resizing .wc-splitter {
  background: var(--wc-bg-3);
}
.wc-splitter-grip {
  display: grid;
  grid-template-columns: repeat(3, 3px);
  grid-template-rows: repeat(2, 3px);
  gap: 2px;
}
.wc-splitter-grip span {
  width: 3px; height: 3px;
  background: var(--wc-text-faint);
  border-radius: 50%;
  opacity: 0.6;
}
.wc-splitter:hover .wc-splitter-grip span { background: var(--wc-bronze); opacity: 1; }
.wc-splitter-lbl {
  font-family: var(--wc-font-mono); font-size: 9.5px;
  color: var(--wc-text-faint);
  text-transform: uppercase; letter-spacing: 0.16em;
}
.wc-splitter:hover .wc-splitter-lbl { color: var(--wc-bronze); }

body.wc-resizing {
  cursor: row-resize !important;
  user-select: none;
}
body.wc-resizing * { cursor: row-resize !important; }

.wc-sidebar-foot {
  margin-top: 0;
  padding: 12px 14px;
  border-top: 1px solid var(--wc-line);
  background: var(--wc-bg-2);
}
.wc-brand-mark {
  display: flex; align-items: baseline; gap: 10px;
}
.wc-brand-zh {
  font-size: 30px; color: var(--wc-red);
  letter-spacing: -0.02em; line-height: 1;
}
.wc-brand-divider {
  width: 1px; height: 22px; background: var(--wc-line-2); align-self: center;
}
.wc-brand-name {
  font-size: 22px; letter-spacing: 0.04em; color: var(--wc-text-hi);
  font-weight: 500; line-height: 1;
}
.wc-brand-sub {
  margin-top: 8px; color: var(--wc-text-faint);
}

/* nav sections */
.wc-nav-section { margin-bottom: 18px; }
.wc-nav-section-h {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 0 6px 8px;
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 10px;
  color: var(--wc-text-faint);
}

.wc-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; margin: 1px 0;
  border-radius: 4px;
  color: var(--wc-text-dim);
  font-size: 13px;
}
.wc-nav-item:hover { background: var(--wc-bg-3); color: var(--wc-text); }
.wc-nav-item.is-on {
  background: var(--wc-bg-3);
  color: var(--wc-text-hi);
  box-shadow: inset 2px 0 0 var(--wc-red);
}
.wc-nav-icon { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.85; }
.wc-nav-icon svg { width: 100%; height: 100%; }
.wc-nav-lbl { flex: 1; font-family: var(--wc-font-mono); font-size: 12.5px; }
.wc-nav-count { color: var(--wc-text-faint); }
.wc-nav-item.is-on .wc-nav-count { color: var(--wc-bronze); }

.wc-cat-item {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center; gap: 8px;
  width: 100%;
  padding: 6px 8px; margin: 1px 0;
  border-radius: 4px;
  color: var(--wc-text-dim);
  text-align: left; line-height: 1.15;
}
.wc-cat-item:hover { background: var(--wc-bg-3); color: var(--wc-text); }
.wc-cat-item.is-on {
  background: var(--wc-bg-3);
  box-shadow: inset 2px 0 0 var(--wc-red);
  color: var(--wc-text-hi);
}
.wc-cat-item.is-inactive { opacity: 0.45; }
.wc-cat-num {
  font-family: var(--wc-font-mono); font-size: 10.5px;
  color: var(--wc-text-faint);
  text-align: right;
}
.wc-cat-name { display: flex; flex-direction: column; min-width: 0; }
.wc-cat-en { font-size: 13px; }
.wc-cat-de { font-size: 11px; color: var(--wc-text-faint); }
.wc-cat-item.is-on .wc-cat-en { color: var(--wc-text-hi); }
.wc-cat-count { color: var(--wc-text-faint); }

.wc-sidebar-foot { padding-top: 12px; }

/* ============ Notepad (torn-page) ============ */
.wc-notepad {
  position: relative;
  margin: 6px 0 16px;
  padding-top: 6px;
}
.wc-notepad-tape {
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 56px; height: 14px;
  background: rgba(220, 192, 156, 0.34);
  border: 1px solid rgba(220, 192, 156, 0.5);
  border-radius: 1px;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.35),
    inset 0 -1px 0 rgba(255, 255, 255, 0.18);
  z-index: 3;
  pointer-events: none;
}
.wc-notepad-tape::before, .wc-notepad-tape::after {
  content: "";
  position: absolute; top: 1px; bottom: 1px; width: 1px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255,255,255,0.18) 0 2px,
    transparent 2px 4px
  );
}
.wc-notepad-tape::before { left: 4px; }
.wc-notepad-tape::after  { right: 4px; }

/* Paper itself — cream with torn top + bottom edges (CSS mask) */
.wc-notepad-paper {
  position: relative;
  background: linear-gradient(180deg, #F2E2C2 0%, #E8D5B0 100%);
  color: #2A2018;
  padding: 14px 12px 12px;
  transform: rotate(-0.4deg);
  display: flex; flex-direction: column;
  min-height: 100%;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.15) inset,
    0 8px 16px rgba(0, 0, 0, 0.45),
    0 2px 4px rgba(0, 0, 0, 0.3);
  /* Torn top + bottom edges, drawn with SVG mask */
  --tear-top: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 8' preserveAspectRatio='none'><path d='M0 8 L0 5 L6 3 L12 6 L18 2 L26 5 L34 3 L42 6 L50 2 L58 5 L66 3 L74 5 L82 3 L92 5 L100 2 L108 6 L116 3 L124 5 L132 2 L140 5 L148 3 L156 6 L164 3 L172 5 L180 2 L188 6 L196 3 L204 5 L212 3 L220 6 L228 3 L240 5 L240 8 Z' fill='black'/></svg>");
  --tear-bot: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 8' preserveAspectRatio='none'><path d='M0 0 L0 3 L8 5 L16 2 L24 6 L32 3 L40 5 L48 2 L56 6 L64 3 L72 5 L80 2 L88 6 L96 3 L104 5 L112 3 L120 6 L128 2 L136 5 L144 3 L152 6 L160 3 L168 5 L176 2 L184 6 L192 3 L200 5 L208 2 L216 6 L224 3 L232 5 L240 3 L240 0 Z' fill='black'/></svg>");
  -webkit-mask:
    linear-gradient(180deg, #000 0 0) center / 100% calc(100% - 14px) no-repeat,
    var(--tear-top) top    / 100% 7px no-repeat,
    var(--tear-bot) bottom / 100% 7px no-repeat;
          mask:
    linear-gradient(180deg, #000 0 0) center / 100% calc(100% - 14px) no-repeat,
    var(--tear-top) top    / 100% 7px no-repeat,
    var(--tear-bot) bottom / 100% 7px no-repeat;
}

.wc-notepad {
  height: 100%;
  display: flex; flex-direction: column;
}

/* Subtle ruled lines on the paper */
.wc-notepad-paper::after {
  content: "";
  position: absolute;
  inset: 32px 6px 14px 6px;
  background-image:
    linear-gradient(180deg, transparent 0, transparent 17px, rgba(140, 100, 60, 0.22) 17px, rgba(140, 100, 60, 0.22) 18px, transparent 18px);
  background-size: 100% 18px;
  pointer-events: none;
}

.wc-notepad-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 6px;
  padding-bottom: 4px;
  border-bottom: 1px dashed rgba(140, 100, 60, 0.4);
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}
.wc-notepad-title {
  font-family: "Caveat", "Cormorant Garamond", cursive;
  font-size: 17px; font-weight: 600;
  color: #6B3A1A;
  letter-spacing: 0.01em;
  line-height: 1;
}
.wc-notepad-date {
  font-family: var(--wc-font-mono); font-size: 10px;
  color: rgba(70, 50, 30, 0.55);
  letter-spacing: 0.04em;
}

.wc-notepad-area {
  position: relative; z-index: 1;
  width: 100%;
  min-height: 70px;
  background: transparent;
  border: 0; outline: none; resize: none;
  font-family: "Caveat", cursive;
  font-size: 15px;
  line-height: 18px;
  color: #2A201A;
  padding: 0 2px;
  caret-color: var(--wc-red);
  /* fill all remaining height so dragging expands the writing area */
  flex: 1; height: 100%;
}
.wc-notepad-area::placeholder {
  color: rgba(70, 50, 30, 0.4);
  font-style: italic;
}
.wc-notepad-area:focus { outline: none; }

/* In light themes, soften shadows */
.theme-parchment .wc-notepad-paper,
.theme-utility .wc-notepad-paper {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 6px 12px rgba(0, 0, 0, 0.18),
    0 2px 4px rgba(0, 0, 0, 0.1);
}
.wc-user {
  display: flex; align-items: center; gap: 10px;
  padding: 4px;
}
.wc-user-av {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--wc-red); color: var(--wc-text-hi);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--wc-font-display); font-size: 16px; font-weight: 600;
}
.wc-user-info { flex: 1; min-width: 0; }
.wc-user-name { font-size: 12.5px; color: var(--wc-text); }

.wc-icon-btn {
  width: 26px; height: 26px; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--wc-text-dim);
}
.wc-icon-btn:hover { background: var(--wc-bg-3); color: var(--wc-text); }
.wc-icon-btn svg { width: 14px; height: 14px; }

/* ============ Main pane ============ */
.wc-main {
  min-width: 0; min-height: 0;
  display: flex; flex-direction: column;
  background: var(--wc-bg);
  overflow: hidden;
}

/* schema strip */
.wc-schema-strip {
  background: var(--wc-bg-2);
  border-bottom: 1px solid var(--wc-line);
  font-family: var(--wc-font-mono); font-size: 11.5px;
}
.wc-schema-strip.is-collapsed {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 16px; cursor: pointer;
  color: var(--wc-text-faint);
}
.wc-schema-strip.is-collapsed:hover { color: var(--wc-text); }
.wc-schema-strip-row { display: flex; gap: 8px; }
.wc-mono-tag {
  font-family: var(--wc-font-mono); font-size: 10.5px;
  padding: 2px 7px; border: 1px solid var(--wc-line-2); border-radius: 3px;
  color: var(--wc-text-dim);
}
.wc-schema-strip-spacer { flex: 1; }
.wc-schema-hint { color: var(--wc-text-faint); }
.wc-schema-strip-h {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 16px; border-bottom: 1px solid var(--wc-line);
}
.wc-schema-strip-grid {
  display: grid; grid-template-columns: 1fr 2fr; gap: 0;
  padding: 0;
}
.wc-schema-col { padding: 12px 16px; border-right: 1px solid var(--wc-line); }
.wc-schema-col:last-child { border-right: 0; }
.wc-schema-col-h {
  font-family: var(--wc-font-mono); font-size: 11px;
  color: var(--wc-bronze); text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.wc-schema-col ul { list-style: none; padding: 0; margin: 0; columns: 1; }
.wc-schema-col li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 2px 0; color: var(--wc-text-dim);
}
.wc-schema-col li b { color: var(--wc-text); font-weight: 500; }
.wc-schema-col li span { color: var(--wc-text-faint); font-size: 10.5px; }

/* toolbar */
.wc-toolbar {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 16px 22px 12px;
  gap: 14px 18px;
  border-bottom: 1px solid var(--wc-line);
  flex-wrap: wrap;
}
.wc-toolbar-left { min-width: 220px; flex: 1 1 220px; }
.wc-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--wc-font-mono); font-size: 11.5px;
  color: var(--wc-text-faint); margin-bottom: 6px;
}
.wc-breadcrumb-sep { color: var(--wc-text-faint); opacity: 0.6; }
.wc-breadcrumb-cur { color: var(--wc-text); }
.wc-breadcrumb-cat { color: var(--wc-bronze); }
.wc-list-count {
  font-family: var(--wc-font-display); font-size: 26px; color: var(--wc-text-hi);
  letter-spacing: 0.01em; line-height: 1.1;
  white-space: nowrap;
}
.wc-list-count strong { font-weight: 600; }
.wc-list-count span { color: var(--wc-text-dim); font-size: 22px; white-space: nowrap; }
.wc-list-count em { color: var(--wc-bronze); font-style: italic; }

.wc-toolbar-right {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; justify-content: flex-end;
  flex-shrink: 0;
}
.wc-search {
  position: relative;
  display: flex; align-items: center;
  background: var(--wc-bg-3);
  border: 1px solid var(--wc-line);
  border-radius: 4px;
  height: 32px; width: 260px; max-width: 100%;
  padding: 0 8px 0 30px;
}
.wc-app:has(.wc-drawer) .wc-search { width: 200px; }
.wc-app:has(.wc-drawer) .wc-toolbar-btn span:last-child { display: none; }
.wc-search:focus-within { border-color: var(--wc-line-2); }
.wc-search-icon {
  position: absolute; left: 8px; width: 14px; height: 14px;
  color: var(--wc-text-faint);
}
.wc-search-icon svg { width: 100%; height: 100%; }
.wc-search-input {
  flex: 1; min-width: 0; background: none; border: 0; outline: none;
  font-size: 13px; color: var(--wc-text);
}
.wc-search-input::placeholder { color: var(--wc-text-faint); }
.wc-search-clear {
  width: 18px; height: 18px; color: var(--wc-text-faint);
  display: inline-flex; align-items: center; justify-content: center;
}
.wc-search-clear:hover { color: var(--wc-text); }
.wc-search-clear svg { width: 10px; height: 10px; }

.wc-toolbar-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  background: var(--wc-bg-3); border: 1px solid var(--wc-line);
  border-radius: 4px; color: var(--wc-text-dim);
  font-size: 12.5px;
}
.wc-toolbar-btn:hover { color: var(--wc-text); border-color: var(--wc-line-2); }
.wc-toolbar-btn svg { width: 14px; height: 14px; }

.wc-view-toggle {
  display: inline-flex;
  background: var(--wc-bg-3); border: 1px solid var(--wc-line); border-radius: 4px;
  overflow: hidden;
}
.wc-view-toggle button {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--wc-text-faint);
}
.wc-view-toggle button svg { width: 14px; height: 14px; }
.wc-view-toggle button:hover { color: var(--wc-text); }
.wc-view-toggle button.is-on { background: var(--wc-bg-4); color: var(--wc-text-hi); }

.wc-btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px;
  background: var(--wc-red); color: #FFF4D8;
  border-radius: 4px; font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.02em;
}
.wc-btn-primary svg { width: 13px; height: 13px; }
.wc-btn-primary:hover { background: var(--wc-red-soft); }

.wc-btn-ghost {
  height: 32px; padding: 0 14px;
  background: var(--wc-bg-3); border: 1px solid var(--wc-line);
  border-radius: 4px; color: var(--wc-text); font-size: 12.5px;
}
.wc-btn-ghost:hover { border-color: var(--wc-line-2); background: var(--wc-bg-4); }

.wc-btn-danger {
  width: 100%; height: 36px;
  background: transparent; border: 1px dashed rgba(184, 42, 42, 0.5);
  color: var(--wc-red-soft); border-radius: 4px;
  font-size: 12.5px; letter-spacing: 0.02em;
}
.wc-btn-danger:hover { background: rgba(184, 42, 42, 0.08); border-style: solid; }

/* ============ Table ============ */
.wc-table { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.wc-table-head, .wc-row {
  display: grid;
  grid-template-columns:
    20px       /* drag */
    52px       /* thumb */
    minmax(180px, 1.5fr)
    minmax(120px, 0.8fr)
    80px       /* price */
    48px       /* spicy */
    minmax(100px, 0.6fr)
    52px       /* avail */
    48px       /* sort */
    72px;      /* id */
  align-items: center;
  gap: 10px;
  padding: 0 22px;
  min-width: 0;
}

/* When the drawer is open, hide low-value columns so the table stays readable */
.wc-app:has(.wc-drawer) .wc-table-head,
.wc-app:has(.wc-drawer) .wc-row {
  grid-template-columns:
    52px                       /* thumb */
    minmax(160px, 1.5fr)       /* name */
    minmax(100px, 0.7fr)       /* cat */
    78px                       /* price */
    44px                       /* spicy */
    minmax(90px, 0.55fr)       /* allergens */
    48px;                      /* avail */
  gap: 8px;
  padding: 0 18px;
}
.wc-app:has(.wc-drawer) .wc-row-handle,
.wc-app:has(.wc-drawer) .wc-row-sort,
.wc-app:has(.wc-drawer) .wc-row-id,
.wc-app:has(.wc-drawer) .wc-table-head > :nth-child(1),
.wc-app:has(.wc-drawer) .wc-table-head > :nth-child(9),
.wc-app:has(.wc-drawer) .wc-table-head > :nth-child(10) {
  display: none;
}
.wc-table-head {
  height: 32px;
  background: var(--wc-bg-2);
  border-bottom: 1px solid var(--wc-line);
  font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--wc-text-faint);
  position: sticky; top: 0; z-index: 2;
}
.wc-table-head .wc-th-sub { color: var(--wc-text-faint); opacity: 0.7; font-weight: 400; margin-left: 4px; text-transform: none; letter-spacing: 0.05em; }
.wc-th-right { text-align: right; }

.wc-table-body { flex: 1; min-height: 0; overflow-y: auto; }

.wc-row {
  min-height: var(--wc-row-h);
  border-bottom: 1px solid var(--wc-line);
  cursor: pointer;
  transition: background 0.12s;
  padding-top: var(--wc-row-pad); padding-bottom: var(--wc-row-pad);
}
.wc-row:hover { background: var(--wc-bg-2); }
.wc-row.is-selected {
  background: var(--wc-bg-3);
  box-shadow: inset 2px 0 0 var(--wc-red);
}
.wc-row.is-86 .wc-row-name { opacity: 0.45; }

.wc-row-handle {
  color: var(--wc-text-faint); cursor: grab; opacity: 0;
  transition: opacity 0.12s;
}
.wc-row:hover .wc-row-handle { opacity: 1; }
.wc-row-handle svg { width: 14px; height: 14px; }

.wc-row-thumb { min-width: 0; }

.wc-row-name { min-width: 0; line-height: 1.2; }
.wc-row-cn {
  font-family: var(--wc-font-zh);
  font-size: 14px; color: var(--wc-text-hi);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 1px;
}
.wc-row-en {
  font-size: 13px; color: var(--wc-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wc-row-de {
  font-size: 11.5px; color: var(--wc-text-faint); font-style: italic;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.density-compact .wc-row-de { display: none; }

.wc-row-cat { font-size: 11.5px; color: var(--wc-text-dim); display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; min-width: 0; }
.wc-row-cat-num { font-family: var(--wc-font-mono); color: var(--wc-text-faint); font-size: 10.5px; }
.wc-row-cat-en { color: var(--wc-text); }
.wc-row-cat-sub { color: var(--wc-text-faint); font-style: italic; }

.wc-row-price {
  font-family: var(--wc-font-mono);
  display: flex; align-items: baseline; gap: 3px; justify-content: flex-end;
  color: var(--wc-text-hi);
}
.wc-row-price-cur { font-size: 10.5px; color: var(--wc-text-faint); }
.wc-row-price-val { font-size: 14px; font-variant-numeric: tabular-nums; }

.wc-row-sort { text-align: right; color: var(--wc-text-faint); }

.wc-row-id { font-family: var(--wc-font-mono); color: var(--wc-text-faint); }

/* ============ Allergens / spicy / toggle / image slot ============ */
.wc-allergens { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.wc-allergen {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--wc-bg-4);
  border: 1px solid var(--wc-line);
  border-radius: 3px;
  font-family: var(--wc-font-mono); font-weight: 500;
  color: var(--wc-bronze);
  letter-spacing: 0;
}
.wc-muted-tiny { color: var(--wc-text-faint); font-size: 11px; font-style: italic; }

.wc-spicy { display: inline-flex; align-items: center; gap: 2px; }
.wc-spicy-dot {
  display: inline-flex; opacity: 0.18;
  color: var(--wc-text-faint);
}
.wc-spicy-dot.is-on { opacity: 1; color: var(--wc-red); }
.wc-spicy-dot svg { width: 100%; height: 100%; fill: currentColor; }
.wc-spicy-label {
  margin-left: 6px; font-family: var(--wc-font-mono); font-size: 11px;
  color: var(--wc-text-dim);
}

.wc-toggle {
  position: relative; border-radius: 99px;
  background: var(--wc-bg-4);
  transition: background 0.18s;
  flex-shrink: 0;
  border: 1px solid var(--wc-line);
}
.wc-toggle.is-on { background: var(--wc-bamboo); border-color: var(--wc-bamboo); }
.wc-toggle-thumb {
  position: absolute; top: 1px; left: 1px;
  background: var(--wc-text-dim); border-radius: 50%;
  transition: transform 0.18s, background 0.18s;
}
.wc-toggle.is-on .wc-toggle-thumb { background: #FFF4D8; transform: translateX(calc(100% + 1px)); }

.wc-img-slot {
  position: relative; border-radius: 4px; overflow: hidden;
  background: var(--wc-bg-4);
  border: 1px solid var(--wc-line);
}
.wc-img-slot.has-image img { width: 100%; height: 100%; }
.wc-img-slot.is-empty {
  background:
    repeating-linear-gradient(
      135deg,
      var(--wc-bg-3) 0 6px,
      var(--wc-bg-4) 6px 12px
    );
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--wc-text-faint);
  gap: 4px;
}
.wc-img-slot.is-empty.is-compact {
  background:
    repeating-linear-gradient(
      135deg,
      var(--wc-bg-3) 0 3px,
      var(--wc-bg-4) 3px 6px
    );
  gap: 0;
}
.wc-img-slot.is-empty.is-compact .wc-img-empty-mark { opacity: 0.55; }
.wc-img-empty-mark { opacity: 0.45; }
.wc-img-empty-cap {
  font-family: var(--wc-font-mono); font-size: 10px; letter-spacing: 0.04em;
  text-transform: lowercase;
}
.wc-img-clear {
  position: absolute; top: 6px; right: 6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.wc-img-clear:hover { background: var(--wc-red); }

/* ============ Cards view ============ */
.wc-cards {
  flex: 1; min-height: 0; overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  padding: 18px 22px;
}
.wc-card {
  background: var(--wc-bg-2);
  border: 1px solid var(--wc-line);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.12s, transform 0.12s;
}
.wc-card:hover { border-color: var(--wc-line-2); }
.wc-card.is-selected { border-color: var(--wc-red); }
.wc-card.is-86 { opacity: 0.55; }

.wc-card-img {
  position: relative; aspect-ratio: 4 / 3;
  background: var(--wc-bg-4);
  overflow: hidden;
}
.wc-card-img img { width: 100%; height: 100%; object-fit: cover; }
.wc-card-img-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--wc-text-dim);
  background:
    radial-gradient(circle at 30% 20%, rgba(184, 42, 42, 0.10), transparent 60%),
    repeating-linear-gradient(135deg, var(--wc-bg-3) 0 8px, var(--wc-bg-4) 8px 16px);
}
.wc-card-cn-big { font-size: 38px; color: var(--wc-text); }
.wc-card-toggle { position: absolute; top: 8px; right: 8px; }
.wc-card-star {
  position: absolute; top: 8px; left: 8px;
  font-size: 10px; padding: 3px 7px;
  background: rgba(0,0,0,0.6); color: var(--wc-bronze);
  border-radius: 2px; letter-spacing: 0.06em; text-transform: uppercase;
  font-family: var(--wc-font-mono);
}
.wc-card-body { padding: 10px 12px 12px; }
.wc-card-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px; color: var(--wc-text-faint);
  text-transform: uppercase; letter-spacing: 0.1em;
  font-family: var(--wc-font-mono);
  margin-bottom: 6px;
}
.wc-card-meta-sep { opacity: 0.5; }
.wc-card-cn { font-size: 16px; color: var(--wc-text-hi); margin-bottom: 1px; }
.wc-card-en { font-size: 13px; color: var(--wc-text); margin-bottom: 8px; }
.wc-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px dashed var(--wc-line); padding-top: 8px; margin-top: 2px;
}
.wc-card-price {
  font-family: var(--wc-font-mono); font-size: 13px;
  color: var(--wc-text-hi); font-variant-numeric: tabular-nums;
}

/* ============ Empty ============ */
.wc-empty {
  padding: 80px 0;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: var(--wc-text-dim);
}
.wc-empty-glyph {
  font-family: var(--wc-font-zh); font-size: 84px;
  color: var(--wc-text-faint); opacity: 0.4; line-height: 0.9;
}

.wc-mono-small {
  font-family: var(--wc-font-mono); font-size: 10.5px;
  color: var(--wc-text-faint);
  letter-spacing: 0.02em;
}

/* ============ Drawer (dish editor) ============ */
.wc-drawer {
  background: var(--wc-bg-2);
  border-left: 1px solid var(--wc-line);
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
  overflow: hidden;
  animation: drawerIn 0.24s ease-out;
}
@keyframes drawerIn {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

.wc-drawer-head {
  padding: 16px 22px 0;
  border-bottom: 1px solid var(--wc-line);
}
.wc-drawer-id {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--wc-font-mono); font-size: 11px;
  color: var(--wc-text-faint);
}
.wc-pb-id {
  padding: 1px 6px; border: 1px solid var(--wc-line-2); border-radius: 2px;
  color: var(--wc-bronze);
}
.wc-pb-collection { color: var(--wc-text-dim); }
.wc-drawer-sep { color: var(--wc-text-faint); opacity: 0.5; }

.wc-drawer-title-row {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 4px 0 4px;
}
.wc-drawer-title {
  flex: 1; font-size: 28px; font-weight: 500;
  color: var(--wc-text-hi); letter-spacing: 0.005em; line-height: 1.15;
  margin: 0;
}

.wc-drawer-subhead {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: var(--wc-text-dim);
  padding-bottom: 14px;
}
.wc-drawer-spacer { flex: 1; }
.wc-drawer-avail { display: inline-flex; align-items: center; font-family: var(--wc-font-mono); font-size: 11px; color: var(--wc-text-dim); }
.wc-drawer-price { font-family: var(--wc-font-mono); color: var(--wc-text); }

.wc-cat-badge {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 2px 7px; border: 1px solid var(--wc-line-2); border-radius: 2px;
}
.wc-cat-badge .wc-cat-num { font-family: var(--wc-font-mono); font-size: 10px; }
.wc-cat-badge .wc-cat-en { font-size: 11.5px; color: var(--wc-text); }

.wc-tabs {
  display: flex; align-items: stretch;
  margin: 6px -22px 0;
  padding: 0 16px;
  border-bottom: 1px solid var(--wc-line);
}
.wc-app .wc-tab {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px 10px;
  font-family: var(--wc-font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wc-text-faint);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.12s, background 0.12s;
}
.wc-app .wc-tab + .wc-tab::before {
  content: "";
  position: absolute; left: 0; top: 30%; bottom: 30%;
  width: 1px; background: var(--wc-line);
}
.wc-app .wc-tab:hover { color: var(--wc-text); background: var(--wc-bg-3); }
.wc-app .wc-tab.is-on {
  color: var(--wc-text-hi);
  border-bottom-color: var(--wc-red);
  background: var(--wc-bg);
}
.wc-tab-num {
  font-size: 9.5px;
  color: var(--wc-text-faint);
  font-weight: 500;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.wc-app .wc-tab.is-on .wc-tab-num { color: var(--wc-red-soft); }
.wc-tab-lbl { letter-spacing: 0.12em; }
.wc-tab-meta {
  font-family: var(--wc-font-mono); font-size: 9.5px;
  color: var(--wc-text-faint); text-transform: none;
  letter-spacing: 0; opacity: 0.85;
  margin-left: 2px;
}
.wc-app .wc-tab.is-on .wc-tab-meta { color: var(--wc-bronze); }

.wc-drawer-body {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 20px 22px 24px;
  container-type: inline-size;
}
/* When drawer is narrow, collapse multi-column layouts inside it */
@container (max-width: 580px) {
  .wc-langs.layout-parallel { grid-template-columns: 1fr !important; }
  .wc-preview-row { grid-template-columns: 1fr !important; }
  .wc-settings-grid { grid-template-columns: 1fr !important; }
  .wc-allergen-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@container (min-width: 580px) and (max-width: 760px) {
  .wc-allergen-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============ Language columns ============ */
.wc-langs.layout-parallel {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px;
}
.wc-langs.layout-stacked {
  display: flex; flex-direction: column; gap: 18px;
}

.wc-lang-col {
  background: var(--wc-bg);
  border: 1px solid var(--wc-line);
  border-radius: 4px;
  padding: 12px 12px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.wc-lang-col.is-primary {
  border-color: var(--wc-line-2);
  background: linear-gradient(180deg, var(--wc-bg) 0%, var(--wc-bg-2) 100%);
}
.wc-lang-head {
  display: flex; align-items: baseline; gap: 8px;
  padding-bottom: 6px; border-bottom: 1px solid var(--wc-line);
}
.wc-lang-code {
  font-family: var(--wc-font-mono); font-size: 11px; font-weight: 500;
  background: var(--wc-bg-4); color: var(--wc-text);
  padding: 2px 6px; border-radius: 2px;
}
.wc-lang-col.is-primary .wc-lang-code { background: var(--wc-red); color: #FFF4D8; }
.wc-lang-name { font-size: 12px; color: var(--wc-text-dim); }
.wc-lang-req {
  margin-left: auto;
  font-family: var(--wc-font-mono); font-size: 9.5px;
  color: var(--wc-red-soft); text-transform: uppercase; letter-spacing: 0.08em;
}

/* ============ Fields ============ */
.wc-field { display: flex; flex-direction: column; gap: 4px; position: relative; }
.wc-field-lbl {
  font-family: var(--wc-font-mono); font-size: 10.5px;
  color: var(--wc-text-faint);
  letter-spacing: 0.02em;
  display: flex; gap: 6px; align-items: baseline;
}
.wc-field-lbl em { font-style: normal; opacity: 0.7; font-size: 10px; }

.wc-input {
  width: 100%;
  background: var(--wc-bg-3);
  border: 1px solid var(--wc-line);
  border-radius: 3px;
  padding: 7px 9px;
  outline: none; color: var(--wc-text-hi);
  transition: border-color 0.12s;
}
.wc-input:focus { border-color: var(--wc-bronze); }
.wc-textarea { resize: vertical; line-height: 1.5; min-height: 90px; }
.wc-counter {
  position: absolute; right: 6px; bottom: 4px;
  font-family: var(--wc-font-mono); font-size: 9.5px;
  color: var(--wc-text-faint); pointer-events: none;
}

.wc-select-wrap { position: relative; }
.wc-select {
  appearance: none; -webkit-appearance: none;
  padding-right: 28px;
}
.wc-select-chev {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  pointer-events: none; color: var(--wc-text-faint);
  width: 14px; height: 14px;
}
.wc-select-chev svg { width: 100%; height: 100%; }

.wc-price-wrap { position: relative; }
.wc-price-cur {
  position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
  font-family: var(--wc-font-mono); color: var(--wc-text-faint);
}
.wc-price-input {
  padding-left: 24px;
  font-family: var(--wc-font-mono); font-variant-numeric: tabular-nums;
  width: 140px;
}

/* ============ Photography tab ============ */
.wc-media-tab {}
.wc-media-grid {
  display: grid; grid-template-columns: 1fr; gap: 24px;
}
.wc-section-h {
  display: flex; align-items: baseline; justify-content: space-between;
  font-family: var(--wc-font-mono); font-size: 11px; color: var(--wc-bronze);
  text-transform: uppercase; letter-spacing: 0.12em;
  padding-bottom: 8px; border-bottom: 1px solid var(--wc-line);
  margin-bottom: 12px;
}
.wc-section-h em { font-style: normal; opacity: 0.7; }
.wc-section-sub {
  font-family: var(--wc-font-mono); font-size: 10px;
  color: var(--wc-text-faint); text-transform: none; letter-spacing: 0.04em;
}

.wc-dropzone {
  background: var(--wc-bg);
  border: 1px dashed var(--wc-line-2);
  border-radius: 4px;
  transition: border-color 0.12s, background 0.12s;
}
.wc-dropzone.is-dragging { border-color: var(--wc-bronze); background: var(--wc-bg-3); }
.wc-dropzone.has-image { border-style: solid; border-color: var(--wc-line-2); padding: 0; }

/* Upload — empty state */
.wc-upload-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 36px 24px;
  gap: 10px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.12s;
  text-align: center;
}
.wc-upload-empty:hover { background: var(--wc-bg-3); }
.wc-upload-empty-icon {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--wc-bg-3); color: var(--wc-bronze);
  border: 1px solid var(--wc-line-2);
}
.wc-upload-empty-icon svg { width: 18px; height: 18px; }
.wc-upload-empty-title {
  font-family: var(--wc-font-display); font-size: 18px;
  color: var(--wc-text-hi);
  letter-spacing: 0.005em;
}
.wc-upload-empty-title em {
  font-style: italic; color: var(--wc-bronze);
}
.wc-upload-empty-sub {
  font-size: 11.5px; color: var(--wc-text-dim);
  max-width: 360px; line-height: 1.45;
}

/* Upload — filled state */
.wc-upload-state {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
}
.wc-upload-thumb {
  width: 80px; height: 60px; border-radius: 3px; overflow: hidden;
  background: var(--wc-bg-4);
  border: 1px solid var(--wc-line);
}
.wc-upload-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wc-upload-info { min-width: 0; }
.wc-upload-name {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; color: var(--wc-text-hi);
  margin-bottom: 4px;
}
.wc-upload-check {
  width: 16px; height: 16px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--wc-bamboo); color: #FFF4D8;
}
.wc-upload-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  color: var(--wc-text-faint);
}
.wc-upload-actions {
  display: flex; flex-direction: column; gap: 4px;
  align-items: stretch;
}
@container (max-width: 580px) {
  .wc-upload-state { grid-template-columns: 64px 1fr; }
  .wc-upload-actions { grid-column: 1 / -1; flex-direction: row; }
}

.wc-btn-sm {
  height: 26px; padding: 0 10px;
  font-size: 11.5px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.wc-btn-warn {
  color: var(--wc-red-soft);
  border-color: rgba(184, 42, 42, 0.4);
}
.wc-btn-warn:hover { background: rgba(184, 42, 42, 0.08); border-color: var(--wc-red-soft); }

/* Single contextual preview */
.wc-preview-single {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 380px;
}
.wc-preview-note {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 9px 12px;
  font-size: 11.5px; color: var(--wc-text-dim);
  background: var(--wc-bg);
  border: 1px solid var(--wc-line);
  border-radius: 3px;
  line-height: 1.5;
}
.wc-preview-note em { font-style: italic; color: var(--wc-bronze); }
.wc-preview-note-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--wc-text-faint);
  margin-top: 4px; flex-shrink: 0;
}
.wc-preview-note-dot.is-on {
  background: var(--wc-bamboo);
  box-shadow: 0 0 0 3px rgba(107, 163, 114, 0.18);
}
.wc-preview-note.is-success { border-color: rgba(107, 163, 114, 0.3); }

.wc-preview-pair {}
.wc-preview-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wc-preview-col { display: flex; flex-direction: column; gap: 8px; }
.wc-preview-tag {
  font-family: var(--wc-font-mono); font-size: 10px; letter-spacing: 0.06em;
  color: var(--wc-text-faint); text-transform: uppercase;
}

/* Public-card preview (with image) */
.wc-preview-card {
  background: var(--wc-bg);
  border: 1px solid var(--wc-line);
  border-radius: 3px;
  overflow: hidden;
}
.wc-preview-card.has-image {}
.wc-preview-img {
  aspect-ratio: 4 / 3;
  background: var(--wc-bg-4);
  overflow: hidden;
}
.wc-preview-img img { width: 100%; height: 100%; object-fit: cover; }
.wc-preview-img-empty {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--wc-font-mono); font-size: 10.5px; color: var(--wc-text-faint);
  background:
    repeating-linear-gradient(135deg, var(--wc-bg-3) 0 8px, var(--wc-bg-4) 8px 16px);
}
.wc-preview-body { padding: 12px 14px; }
.wc-preview-meta {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--wc-font-mono); font-size: 10px;
  color: var(--wc-text-faint);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.wc-preview-cn { font-family: var(--wc-font-zh); font-size: 15px; color: var(--wc-text-hi); margin-bottom: 2px; }
.wc-preview-de { font-family: var(--wc-font-display); font-style: italic; font-size: 14px; color: var(--wc-text); margin-bottom: 8px; }
.wc-preview-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-top: 1px dashed var(--wc-line); padding-top: 7px;
}
.wc-preview-price {
  font-family: var(--wc-font-mono); font-size: 13px;
  color: var(--wc-text-hi); font-variant-numeric: tabular-nums;
}

/* No-image variant — "negative space" typographic */
.wc-preview-card.no-image {
  display: flex; flex-direction: column; justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(184, 42, 42, 0.06), transparent 60%),
    var(--wc-bg);
  min-height: 240px;
}
.wc-preview-typo { padding: 22px 18px; }
.wc-preview-rule {
  width: 30px; height: 1px; background: var(--wc-bronze); margin-bottom: 14px;
}
.wc-preview-cn-big {
  font-family: var(--wc-font-zh); font-size: 30px;
  color: var(--wc-text-hi); line-height: 1.1; margin-bottom: 4px;
}
.wc-preview-de-big {
  font-family: var(--wc-font-display); font-size: 18px;
  color: var(--wc-text); margin-bottom: 4px; line-height: 1.2;
}
.wc-preview-en-small {
  font-size: 11.5px; color: var(--wc-text-dim);
  font-style: italic; letter-spacing: 0.02em;
}
.wc-preview-divider {
  display: flex; align-items: center; gap: 8px;
  margin: 14px 0 10px;
}
.wc-preview-divider span { flex: 1; height: 1px; background: var(--wc-line); }
.wc-preview-divider i {
  font-family: var(--wc-font-display); font-style: italic;
  color: var(--wc-bronze); font-size: 14px;
}
.wc-preview-foot-right { display: inline-flex; align-items: center; gap: 8px; }

.wc-help {
  margin-top: 12px; font-size: 11.5px; color: var(--wc-text-dim);
  font-style: italic;
}
.wc-help code {
  background: var(--wc-bg-3); padding: 1px 5px; border-radius: 2px;
  font-style: normal; color: var(--wc-bronze);
}

/* ============ Settings tab ============ */
.wc-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.wc-settings-col { display: flex; flex-direction: column; gap: 12px; }

/* Allergen grid */
.wc-allergen-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
}
.wc-allergen-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px;
  background: var(--wc-bg-3);
  border: 1px solid var(--wc-line);
  border-radius: 3px;
  text-align: left;
  transition: border-color 0.12s, background 0.12s;
}
.wc-allergen-chip:hover { border-color: var(--wc-line-2); }
.wc-allergen-chip.is-on {
  background: var(--wc-bg-4);
  border-color: var(--wc-bronze);
}
.wc-allergen-chip-letter {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--wc-bg-2); border: 1px solid var(--wc-line);
  border-radius: 3px;
  font-family: var(--wc-font-mono); font-size: 11px; font-weight: 500;
  color: var(--wc-text-dim);
}
.wc-allergen-chip.is-on .wc-allergen-chip-letter {
  background: var(--wc-red); color: #FFF4D8; border-color: var(--wc-red);
}
.wc-allergen-chip-name {
  font-size: 11.5px; color: var(--wc-text-dim);
}
.wc-allergen-chip.is-on .wc-allergen-chip-name { color: var(--wc-text); }

/* Spicy slider (segmented) */
.wc-spicy-slider {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}
.wc-spicy-step {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 6px;
  background: var(--wc-bg-3);
  border: 1px solid var(--wc-line);
  border-radius: 3px;
  transition: border-color 0.12s, background 0.12s;
}
.wc-spicy-step:hover { border-color: var(--wc-line-2); }
.wc-spicy-step.is-on { background: var(--wc-bg-4); border-color: var(--wc-bronze); }
.wc-spicy-step-lbl {
  font-family: var(--wc-font-mono); font-size: 10px;
  color: var(--wc-text-faint); text-transform: lowercase;
}
.wc-spicy-step.is-on .wc-spicy-step-lbl { color: var(--wc-text); }
.wc-spicy-zero {
  width: 21px; height: 11px; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--wc-font-mono); color: var(--wc-text-faint);
}

/* ============ Drawer footer ============ */
.wc-drawer-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px;
  border-top: 1px solid var(--wc-line);
  background: var(--wc-bg-2);
}
.wc-foot-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--wc-font-mono); font-size: 11px;
  color: var(--wc-text-faint);
}
.wc-foot-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--wc-bamboo);
  box-shadow: 0 0 0 3px rgba(107, 163, 114, 0.18);
}
.wc-foot-actions { display: flex; gap: 8px; }

/* ============ Scrollbar ============ */
.wc-sidebar::-webkit-scrollbar,
.wc-table-body::-webkit-scrollbar,
.wc-cards::-webkit-scrollbar,
.wc-drawer-body::-webkit-scrollbar { width: 10px; }
.wc-sidebar::-webkit-scrollbar-thumb,
.wc-table-body::-webkit-scrollbar-thumb,
.wc-cards::-webkit-scrollbar-thumb,
.wc-drawer-body::-webkit-scrollbar-thumb {
  background: var(--wc-line-2); border-radius: 6px;
  border: 2px solid transparent; background-clip: content-box;
}
.wc-sidebar::-webkit-scrollbar-track,
.wc-table-body::-webkit-scrollbar-track,
.wc-cards::-webkit-scrollbar-track,
.wc-drawer-body::-webkit-scrollbar-track { background: transparent; }

/* Hide React's overlay-positioned ResizeObserver loop fake error iframe */
iframe[id^="webpack-dev-server"] { display: none !important; }

/* ============ Categories collection ============ */
.wc-cat-head, .wc-cat-row {
  grid-template-columns:
    20px       /* drag */
    50px       /* sort */
    minmax(140px, 1.2fr)   /* en */
    minmax(140px, 1.2fr)   /* de */
    minmax(110px, 1fr)     /* zh */
    minmax(100px, 0.6fr)   /* count */
    60px                   /* active */
    72px;                  /* id */
}
.wc-app:has(.wc-drawer) .wc-cat-head,
.wc-app:has(.wc-drawer) .wc-cat-row {
  grid-template-columns:
    50px
    minmax(120px, 1.1fr)
    minmax(120px, 1.1fr)
    minmax(96px, 0.9fr)
    minmax(80px, 0.55fr)
    52px;
  gap: 8px; padding: 0 18px;
}
.wc-app:has(.wc-drawer) .wc-cat-head > :nth-child(1),
.wc-app:has(.wc-drawer) .wc-cat-head > :nth-child(8),
.wc-app:has(.wc-drawer) .wc-cat-row > :nth-child(1),
.wc-app:has(.wc-drawer) .wc-cat-row .wc-row-id {
  display: none;
}
.wc-cat-row-num { text-align: right; }
.wc-cat-row-en-cell {
  font-family: var(--wc-font-display);
  font-size: 17px; color: var(--wc-text-hi);
  letter-spacing: 0.005em; line-height: 1.2;
  min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wc-cat-row-de-cell {
  font-size: 13px; color: var(--wc-text); font-style: italic;
  min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wc-cat-row-zh-cell {
  font-size: 16px; color: var(--wc-text);
  min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wc-empty-cell { color: var(--wc-text-faint); font-style: italic; }

.wc-cat-row-count { display: flex; }
.wc-cat-count-pill {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 3px 9px;
  border: 1px solid var(--wc-line);
  border-radius: 99px;
  background: var(--wc-bg-3);
}
.wc-cat-count-lbl {
  font-size: 11px; color: var(--wc-text-dim);
}

/* ============ Category editor drawer ============ */
.wc-cat-new-badge {
  font-family: var(--wc-font-mono); font-size: 9.5px;
  padding: 2px 6px; border-radius: 2px;
  background: var(--wc-red); color: #FFF4D8;
  letter-spacing: 0.08em;
}

.wc-cat-drawer-body {
  display: flex; flex-direction: column; gap: 20px;
}

.wc-create-step {
  display: flex; flex-direction: column; gap: 12px;
}
.wc-create-step-head {
  display: grid;
  grid-template-columns: 28px auto 1fr auto;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--wc-line);
}
.wc-create-step-num {
  font-family: var(--wc-font-mono); font-size: 22px;
  color: var(--wc-bronze);
  letter-spacing: -0.02em; line-height: 1;
}
.wc-create-step-lbl {
  font-family: var(--wc-font-display); font-size: 17px;
  color: var(--wc-text-hi);
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.wc-create-step-hint {
  font-size: 11.5px; color: var(--wc-text-dim);
  font-style: italic;
}
.wc-create-step-state {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--wc-font-mono); font-size: 11px;
  color: var(--wc-text-dim);
}
.wc-step-pending { color: var(--wc-text-faint); }

.wc-cat-langs { display: flex; flex-direction: column; gap: 12px; }
.wc-cat-langs-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
@container (max-width: 580px) {
  .wc-cat-langs-row { grid-template-columns: 1fr; }
}

.wc-sort-row {
  display: grid;
  grid-template-columns: auto 1fr; gap: 16px;
  align-items: flex-start;
}
.wc-sort-hint {
  font-size: 12px; color: var(--wc-text-dim);
  line-height: 1.5; padding-top: 22px;
}
.wc-sort-hint em { color: var(--wc-bronze); font-style: italic; }

.wc-vis-row {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center;
  padding: 12px 14px;
  background: var(--wc-bg);
  border: 1px solid var(--wc-line);
  border-radius: 4px;
}
.wc-vis-copy { min-width: 0; }
.wc-vis-title { font-size: 13.5px; color: var(--wc-text-hi); margin-bottom: 2px; }
.wc-vis-sub { font-size: 11.5px; color: var(--wc-text-dim); line-height: 1.5; }

.wc-status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 99px;
  border: 1px solid var(--wc-line-2);
  font-size: 10.5px;
  font-family: var(--wc-font-mono); letter-spacing: 0.04em;
  color: var(--wc-text-faint); text-transform: uppercase;
}
.wc-status-pill.is-on {
  color: var(--wc-bamboo); border-color: var(--wc-bamboo);
}
.wc-status-pill.is-on::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--wc-bamboo);
}

.wc-foot-dot.is-pending { background: var(--wc-text-faint); box-shadow: none; }
.wc-btn-primary[disabled] {
  background: var(--wc-bg-4); color: var(--wc-text-faint);
  cursor: not-allowed;
}

.wc-mono-tag.is-on {
  background: var(--wc-bg-4); color: var(--wc-text);
  border-color: var(--wc-line-2);
}
.wc-schema-col.is-on .wc-schema-col-h { color: var(--wc-red-soft); }

/* Footer needs to allow the dramatic button to breach its top edge */
.wc-list-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  border-top: 1px solid var(--wc-line);
  background:
    linear-gradient(180deg, var(--wc-bg-2) 0%, var(--wc-bg) 100%);
  flex-shrink: 0;
  position: relative;
  overflow: visible;
  transition: background 0.18s;
}

/* Big dramatic Edit Order button — bronze fill, RED border, breaks above the footer */
.wc-btn-foot-action {
  position: relative;
  display: inline-flex; align-items: center; gap: 12px;
  height: 64px; padding: 0 28px;
  background: linear-gradient(180deg, var(--wc-bronze) 0%, #A78050 100%);
  border: 2px solid var(--wc-red);
  border-radius: 6px;
  color: #1A120A;
  font-size: 16px; font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  /* breach the footer top by translating up */
  transform: translateY(-24px);
  margin-bottom: -24px;       /* don't claim layout space for the offset */
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 218, 0.45),
    0 0 0 4px rgba(184, 42, 42, 0.18),      /* red halo */
    0 14px 36px rgba(184, 42, 42, 0.35),    /* red-tinted drop */
    0 4px 14px rgba(0, 0, 0, 0.4);
  transition: transform 0.16s, box-shadow 0.16s, background 0.16s, filter 0.16s;
  z-index: 3;
}
.wc-btn-foot-action::after {
  content: "";
  position: absolute; inset: -6px;
  border: 1px dashed rgba(184, 42, 42, 0.35);
  border-radius: 10px;
  pointer-events: none;
  animation: wcDashSpin 22s linear infinite;
}
.wc-btn-foot-action:hover {
  background: linear-gradient(180deg, #DCAA78 0%, #B8895B 100%);
  transform: translateY(-28px);
  filter: saturate(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 218, 0.55),
    0 0 0 5px rgba(184, 42, 42, 0.26),
    0 22px 50px rgba(184, 42, 42, 0.45),
    0 6px 18px rgba(0, 0, 0, 0.5);
}
.wc-btn-foot-action:active { transform: translateY(-22px); }
.wc-btn-foot-action svg { width: 18px; height: 18px; color: #1A120A; }

/* Dish reorder rows — narrower grid (no allergens / spicy / availability) */
.wc-list-foot.is-active {
  background: linear-gradient(180deg, var(--wc-bg-2) 0%, rgba(107, 163, 114, 0.06) 100%);
  border-top-color: rgba(107, 163, 114, 0.25);
}
.wc-list-foot-hint, .wc-list-foot-status {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; color: var(--wc-text-dim);
}
.wc-list-foot-hint-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.wc-list-foot-hint-title {
  font-family: var(--wc-font-display);
  font-size: 15px; color: var(--wc-text-hi);
  letter-spacing: 0.005em;
}
.wc-list-foot-hint-sub { font-size: 11.5px; color: var(--wc-text-dim); }

.wc-foot-pulse {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--wc-bronze);
  box-shadow: 0 0 0 0 rgba(200, 154, 106, 0.6);
  animation: wcPulse 2s ease-out infinite;
  flex-shrink: 0;
}
@keyframes wcPulse {
  0%   { box-shadow: 0 0 0 0 rgba(200, 154, 106, 0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(200, 154, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(200, 154, 106, 0); }
}
.wc-list-foot-actions { display: flex; gap: 8px; }

.wc-btn-foot-action:disabled {
  background: var(--wc-bg-3);
  border-color: var(--wc-line);
  color: var(--wc-text-faint);
  box-shadow: none;
  cursor: not-allowed;
  transform: translateY(-24px);
  filter: grayscale(1) opacity(0.7);
}
.wc-btn-foot-action:disabled::after { display: none; }
.wc-btn-foot-action:disabled svg { color: var(--wc-text-faint); }

.wc-dish-reorder-head, .wc-dish-reorder-row {
  display: grid !important;
  grid-template-columns:
    24px       /* drag */
    52px       /* thumb */
    minmax(220px, 1.6fr)
    minmax(140px, 0.9fr)
    96px       /* price */
    minmax(110px, 0.6fr); /* sort change */
  align-items: center;
  gap: 10px;
  padding: 0 22px;
}
.wc-dish-reorder-row {
  min-height: 56px;
  background: var(--wc-bg-2);
  cursor: grab;
  border-left: 2px solid transparent;
  user-select: none;
  border-bottom: 1px solid var(--wc-line);
}
.wc-dish-reorder-row:hover {
  background: var(--wc-bg-3);
  border-left-color: var(--wc-bronze);
}
.wc-dish-reorder-row.is-dragging { opacity: 0.45; background: var(--wc-bg-3); }
.wc-dish-reorder-row.is-drop-target {
  border-left-color: var(--wc-bamboo);
  background: rgba(107, 163, 114, 0.08);
  box-shadow: inset 0 1px 0 var(--wc-bamboo), inset 0 -1px 0 var(--wc-bamboo);
}
.wc-row-sort-reorder { text-align: left; }

.wc-btn-save {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 16px;
  background: var(--wc-bamboo); color: #FFF4D8;
  border-radius: 4px; font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: background 0.12s, opacity 0.12s;
}
.wc-btn-save:hover:not(:disabled) { background: #7AB582; }
.wc-btn-save:disabled {
  background: var(--wc-bg-4); color: var(--wc-text-faint);
  cursor: not-allowed;
}

.wc-breadcrumb-mode {
  color: var(--wc-bamboo);
  font-family: var(--wc-font-mono);
}

/* ============ List pane (shared by dishes + categories) ============ */
.wc-list-pane {
  flex: 1; min-height: 0; min-width: 0;
  display: flex; flex-direction: column;
}

/* ============ Reorder mode rows ============ */
.wc-list-pane.is-order-mode .wc-table-body { background: var(--wc-bg); }

.wc-row-handle-static { cursor: default; }
.wc-row-handle-grab {
  cursor: grab; opacity: 1;
  color: var(--wc-bronze);
}
.wc-row-handle-grab:active { cursor: grabbing; }

.wc-cat-reorder-row {
  background: var(--wc-bg-2);
  cursor: grab;
  border-left: 2px solid transparent;
  user-select: none;
}
.wc-cat-reorder-row:hover {
  background: var(--wc-bg-3);
  border-left-color: var(--wc-bronze);
}
.wc-cat-reorder-row.is-dragging {
  opacity: 0.45;
  background: var(--wc-bg-3);
}
.wc-cat-reorder-row.is-drop-target {
  border-left-color: var(--wc-bamboo);
  background: rgba(107, 163, 114, 0.08);
  box-shadow: inset 0 1px 0 var(--wc-bamboo), inset 0 -1px 0 var(--wc-bamboo);
}

.wc-cat-row-num-reorder { text-align: left; }
.wc-sort-change {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--wc-font-mono); font-size: 11px;
}
.wc-sort-old {
  color: var(--wc-text-faint); text-decoration: line-through;
}
.wc-sort-arrow { color: var(--wc-text-faint); }
.wc-sort-new {
  color: var(--wc-bamboo); font-weight: 500;
}

.wc-cat-row-active-mark {
  font-family: var(--wc-font-mono); font-size: 10px;
  color: var(--wc-text-faint); text-transform: uppercase; letter-spacing: 0.06em;
}
.wc-cat-row-active-mark.is-on { color: var(--wc-bamboo); }

/* ============ Read-only "order info" in category editor ============ */
.wc-order-info {
  background: var(--wc-bg);
  border: 1px solid var(--wc-line);
  border-radius: 4px;
  padding: 12px 14px;
}
.wc-order-info-head {
  font-family: var(--wc-font-mono); font-size: 10px;
  color: var(--wc-text-faint);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 8px;
}
.wc-order-info-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}
.wc-order-pos {
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 14px;
  background: var(--wc-bg-3);
  border: 1px solid var(--wc-line-2);
  border-radius: 4px;
  min-width: 72px;
}
.wc-order-pos-num {
  font-family: var(--wc-font-mono); font-size: 24px;
  color: var(--wc-text-hi); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.wc-order-pos-of {
  font-family: var(--wc-font-mono); font-size: 10px;
  color: var(--wc-text-faint); margin-top: 4px;
}
.wc-order-info-text {
  font-size: 12.5px; color: var(--wc-text-dim);
  line-height: 1.55;
}
.wc-order-info-text strong {
  color: var(--wc-bronze); font-weight: 500;
}
.wc-order-info-text em { color: var(--wc-text); font-style: italic; }

/* ============================================
   PUBLISH BUTTON — sits inside each list's footer next to the
   Edit Order CTA. Three states:
     • is-clean      — brown bronze, calm, inert ("UP TO DATE")
     • is-pending    — amber, pulses, clickable ("CHANGES PENDING · N")
     • is-publishing — grey-blue, progress cursor, no pulse
   ============================================ */
.wc-app .wc-pub-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 64px;
  padding: 0 26px;
  min-width: 200px;

  border: 2px solid transparent;
  border-radius: 6px;

  font-family: var(--wc-font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;

  cursor: default;
  outline: none;
  transition:
    background  220ms ease,
    color       220ms ease,
    box-shadow  220ms ease,
    border      220ms ease,
    transform   240ms ease;
}

/* ── State: nothing to publish ── brown, calm, inert ── */
.wc-app .wc-pub-btn.is-clean {
  background: linear-gradient(180deg, #6b4d28 0%, #4d3617 100%);
  color: rgba(244, 234, 210, 0.85);
  border-color: rgba(200, 169, 115, 0.25);
}
.wc-app .wc-pub-btn.is-clean:disabled {
  opacity: 1;
  cursor: default;
}

/* ── State: pending publish ── amber, pulses, clickable ── */
.wc-app .wc-pub-btn.is-pending {
  background: linear-gradient(180deg, #f3c84a 0%, #c5921a 100%);
  color: #1c1208;
  border-color: #c5921a;
  cursor: pointer;
  box-shadow: 0 0 28px rgba(243, 200, 74, 0.4);
  animation: wc-pub-btn-pulse 2200ms ease-in-out infinite;
}

.wc-app .wc-pub-btn.is-pending.is-hover {
  background: linear-gradient(180deg, #fff0a1 0%, #d8a425 100%);
  border-color: #fff0a1;
  box-shadow: 0 0 38px rgba(243, 200, 74, 0.62);
}

/* ── State: actively publishing ── grey-blue, no pulse ── */
.wc-app .wc-pub-btn.is-publishing {
  background: linear-gradient(180deg, #6a7a85 0%, #3a4750 100%);
  color: rgba(244, 234, 210, 0.7);
  border-color: #3a4750;
  cursor: progress;
  animation: none;
}

@keyframes wc-pub-btn-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.03); }
}

@media (prefers-reduced-motion: reduce) {
  .wc-app .wc-pub-btn.is-pending { animation: none; }
}

.wc-pub-btn-lbl {
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

/* When a publish button shares the footer with the Edit Order CTA,
   group them flush-right with a small gap. flex-shrink: 0 so the
   group keeps its natural width and the .wc-list-foot-hint on the
   left wraps/truncates if there isn't enough room (rather than the
   buttons squeezing themselves into illegible widths). */
.wc-list-foot-right {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.wc-list-foot-right > .wc-btn-foot-action,
.wc-list-foot-right > .wc-pub-btn {
  flex-shrink: 0;
}

/* ============================================
   LOGIN SCREEN — shown when no PocketBase token in authStore
   ============================================ */
.wc-login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(91,48,25,0.30), transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(184,42,42,0.18), transparent 60%),
    var(--wc-bg);
}
.wc-login-card {
  background: var(--wc-bg-2);
  border: 1px solid var(--wc-line);
  border-radius: 8px;
  padding: 32px 28px;
  width: min(380px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}
.wc-login-mark {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 22px;
  color: var(--wc-text);
}
.wc-login-mark > span:first-child { font-size: 26px; }
.wc-login-divider {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--wc-bronze);
  display: inline-block;
}
.wc-login-sub {
  margin: 0 0 6px;
  font-size: 12.5px;
  color: var(--wc-text-dim);
}
.wc-login-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--wc-font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--wc-text-dim);
}
.wc-login-row .wc-input {
  font-family: var(--wc-font-ui);
  font-size: 14px;
  letter-spacing: normal;
  text-transform: none;
  padding: 10px 12px;
  background: var(--wc-bg);
  border: 1px solid var(--wc-line);
  border-radius: 4px;
  color: var(--wc-text);
}
.wc-login-row .wc-input:focus {
  outline: none;
  border-color: var(--wc-bronze);
}
.wc-login-go {
  margin-top: 4px;
  height: 44px;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.wc-login-err {
  color: var(--wc-red);
  font-size: 13px;
  text-align: center;
  margin-top: 4px;
}
.wc-login-foot {
  text-align: center;
  margin-top: 4px;
  opacity: 0.5;
}

/* ── Carousel-header editor ─────────────────────────────────────────────
   Three fixed records (eyebrow / title / subtitle) edited in vertical
   cards. No add / no delete, just per-language text fields. */
.wc-ch-pane { padding: 24px 32px; display: flex; flex-direction: column; gap: 20px; }
.wc-ch-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
}
.wc-ch-toolbar-l { display: flex; flex-direction: column; gap: 4px; }
.wc-ch-title {
  font-family: var(--wc-font-display);
  font-size: 22px; font-weight: 500;
  color: var(--wc-text);
}
.wc-ch-sub { color: var(--wc-text-dim); }
.wc-ch-cards { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.wc-ch-card {
  background: var(--wc-bg-elev);
  border: 1px solid var(--wc-line);
  border-radius: 6px;
  padding: 16px 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.wc-ch-card-head {
  display: flex; align-items: baseline; gap: 14px;
  border-bottom: 1px dashed var(--wc-line);
  padding-bottom: 10px;
}
.wc-ch-slug {
  font-family: var(--wc-font-mono); font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--wc-bronze);
}
.wc-ch-hint { color: var(--wc-text-dim); }
.wc-ch-hint code {
  font-family: var(--wc-font-mono); font-size: 11.5px;
  background: var(--wc-bg); padding: 1px 5px; border-radius: 3px;
}
.wc-ch-row {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px; align-items: start;
}
.wc-ch-lang {
  font-family: var(--wc-font-mono); font-size: 11px;
  color: var(--wc-text-dim); text-transform: uppercase;
  letter-spacing: 0.15em; padding-top: 8px;
}
.wc-ch-textarea {
  font-family: inherit; font-size: 14px; line-height: 1.4;
  resize: vertical;
  min-height: 36px;
}
.wc-ch-empty {
  padding: 32px; max-width: 600px;
  color: var(--wc-text-dim);
  display: flex; flex-direction: column; gap: 12px;
}
.wc-ch-empty code {
  font-family: var(--wc-font-mono); font-size: 12px;
  background: var(--wc-bg); padding: 1px 5px; border-radius: 3px;
  color: var(--wc-text);
}

/* ─────────────────────────────────────────────────────────────
   Publish-error popup (PublishErrorModal) — calm, not alarming.
   Warm gold + jade, big serif heading, generous emblem. The tone is a
   gentle nudge for someone editing on a long shift, not a red alarm.
   ───────────────────────────────────────────────────────────── */
.wc-pub-err-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: radial-gradient(120% 120% at 50% 0%, rgba(28, 20, 14, 0.72), rgba(8, 6, 4, 0.88));
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: wcPubErrIn 0.18s ease-out;
}
@keyframes wcPubErrIn { from { opacity: 0; } to { opacity: 1; } }

.wc-pub-err-card {
  position: relative;
  width: min(440px, 94vw);
  max-height: 90vh; overflow-y: auto;
  text-align: center;
  background:
    radial-gradient(140% 90% at 50% -10%, rgba(200, 154, 106, 0.10), transparent 60%),
    var(--wc-bg-2);
  border: 1px solid var(--wc-line);
  border-radius: 14px;
  padding: 28px 30px 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  animation: wcPubErrPop 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes wcPubErrPop {
  from { transform: translateY(10px) scale(0.98); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* Emblem — a calm steaming cup of tea. */
.wc-pub-err-emblem {
  width: 140px; height: 140px; margin: 0 auto 6px;
  display: flex; align-items: center; justify-content: center;
}
.wc-pub-err-emblem::before {
  content: "🍵"; font-size: 66px; line-height: 1; opacity: 0.92;
}

.wc-pub-err-title {
  font-family: var(--wc-font-display);
  font-size: 32px; line-height: 1.1; font-weight: 600;
  color: var(--wc-text-hi);
  margin: 2px 0 10px;
}
.wc-pub-err-leaf { font-size: 24px; }

.wc-pub-err-sub {
  font-size: 14.5px; line-height: 1.5;
  color: var(--wc-text-dim);
  margin: 0 auto 14px; max-width: 34ch;
}
.wc-pub-err-sub b { color: var(--wc-text-hi); font-weight: 600; }

.wc-pub-err-list {
  list-style: none; margin: 0 0 6px; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
  text-align: left;
}
.wc-pub-err-list li {
  display: flex; align-items: center; gap: 10px;
  background: rgba(201, 168, 118, 0.06);
  border: 1px solid var(--wc-line);
  border-left: 3px solid var(--wc-bronze);
  border-radius: 6px;
  padding: 9px 12px;
}
.wc-pub-err-tag {
  flex: none;
  font-family: var(--wc-font-mono); font-size: 11px;
  color: var(--wc-bg);
  background: var(--wc-bronze);
  padding: 2px 7px; border-radius: 999px;
  letter-spacing: 0.02em;
}
.wc-pub-err-field { color: var(--wc-text-hi); font-size: 14.5px; }
.wc-pub-err-why {
  margin-left: auto; font-style: normal;
  font-size: 12.5px; color: var(--wc-bronze);
  white-space: nowrap;
}
.wc-pub-err-more { font-size: 12px; color: var(--wc-text-faint); margin: 8px 0 0; }
.wc-pub-err-raw {
  font-family: var(--wc-font-mono); font-size: 11.5px;
  color: var(--wc-text-faint);
  background: rgba(0, 0, 0, 0.25); border-radius: 6px;
  padding: 8px 10px; margin: 4px 0 0; word-break: break-word;
}
.wc-pub-err-safe {
  font-size: 12.5px; color: var(--wc-bamboo);
  margin: 16px 0 16px;
}
.wc-pub-err-btn { min-width: 120px; font-size: 14px; }

@media (max-width: 480px) {
  .wc-pub-err-emblem { width: 104px; height: 104px; }
  .wc-pub-err-title { font-size: 26px; }
  .wc-pub-err-list li { flex-wrap: wrap; }
  .wc-pub-err-why { margin-left: 0; }
}
