:root {
  --bg: #f6efe4;
  --panel: #fff8ee;
  --panel-2: #ffffff;
  --line: #ead7c4;
  --text: #3d2918;
  --muted: #8a684c;
  --accent: #d4522a;
  --accent-2: #b56a14;
  --ok: #4f8a38;
  --danger: #c4453c;
  --on-accent: #fffaf5;
  --hover: #f8e3d2;
  --input: #fffdf9;
  --topbar: #fff6ea;
  --shadow: 0 8px 24px rgba(90, 48, 16, 0.08);
  --mask: rgba(61, 41, 24, 0.38);
  --radius: 12px;
  --radius-input: 8px;
  --topbar-edge: 3px solid var(--accent);
  color-scheme: light;
}
html[data-theme="menu"] {
  --bg: #efe4cc;
  --panel: #f7eed8;
  --panel-2: #fffaf0;
  --line: #d2c19a;
  --text: #2a2116;
  --muted: #74624a;
  --accent: #5d7340;
  --accent-2: #b85a1a;
  --ok: #4a7a38;
  --danger: #b33a32;
  --on-accent: #f7f4ea;
  --hover: #e6d7b4;
  --input: #fffdf6;
  --topbar: #f4ead4;
  --shadow: 0 10px 28px rgba(70, 48, 16, 0.1);
  --mask: rgba(42, 33, 22, 0.42);
  --radius: 8px;
  --radius-input: 6px;
  --topbar-edge: 1px solid var(--line);
}
html[data-theme="jam"] {
  --bg: #fde8ee;
  --panel: #fff4f7;
  --panel-2: #ffffff;
  --line: #f2c9d2;
  --text: #4a1826;
  --muted: #a05668;
  --accent: #c81e4a;
  --accent-2: #d97706;
  --ok: #3d8b4a;
  --danger: #c81e4a;
  --on-accent: #fff7f9;
  --hover: #f8d5de;
  --input: #fffafa;
  --topbar: #fff0f4;
  --shadow: 0 10px 28px rgba(160, 40, 70, 0.1);
  --mask: rgba(74, 24, 38, 0.4);
  --radius: 16px;
  --radius-input: 10px;
  --topbar-edge: 3px solid var(--accent);
}
html[data-theme="citrus"] {
  --bg: #f3f0b8;
  --panel: #fbf8d4;
  --panel-2: #fffeef;
  --line: #ddd47a;
  --text: #3a370e;
  --muted: #7d7430;
  --accent: #e07a00;
  --accent-2: #4f8a22;
  --ok: #4d8c2e;
  --danger: #c4453c;
  --on-accent: #fffaf0;
  --hover: #ece68a;
  --input: #fffee8;
  --topbar: #f8f5c4;
  --shadow: 0 10px 26px rgba(90, 80, 10, 0.1);
  --mask: rgba(58, 55, 14, 0.4);
  --radius: 14px;
  --radius-input: 8px;
  --topbar-edge: 3px solid var(--accent-2);
}
html[data-theme="night"] {
  --bg: #1c1612;
  --panel: #2a221c;
  --panel-2: #332a22;
  --line: #4a3c30;
  --text: #f3e6d4;
  --muted: #b8a089;
  --accent: #e8a54b;
  --accent-2: #f0c14b;
  --ok: #7cb342;
  --danger: #e06c75;
  --on-accent: #2a1c10;
  --hover: #3d3228;
  --input: #231c16;
  --topbar: #14110e;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  --mask: rgba(0, 0, 0, 0.62);
  --radius: 10px;
  --radius-input: 8px;
  --topbar-edge: 1px solid var(--line);
  color-scheme: dark;
}
html[data-theme="ink"] {
  --bg: #f4ead6;
  --panel: #f8f1e2;
  --panel-2: #fffdf6;
  --line: #e0d0b4;
  --text: #2a2218;
  --muted: #8b7355;
  --accent: #c41e3a;
  --accent-2: #8b5a2b;
  --ok: #3d6b3a;
  --danger: #c41e3a;
  --on-accent: #fff8f4;
  --hover: #ead9b8;
  --input: #fffef8;
  --topbar: #f7f0e0;
  --shadow: 0 8px 22px rgba(80, 40, 20, 0.08);
  --mask: rgba(42, 34, 24, 0.4);
  --radius: 6px;
  --radius-input: 4px;
  --topbar-edge: 4px solid var(--accent);
}
html[data-theme="matcha"] {
  --bg: #e7f0d8;
  --panel: #f1f6e6;
  --panel-2: #fbfdf6;
  --line: #c3d4aa;
  --text: #2a3a1a;
  --muted: #6a7d4e;
  --accent: #5a8a38;
  --accent-2: #b8862a;
  --ok: #4a7a32;
  --danger: #c4453c;
  --on-accent: #f6faf0;
  --hover: #d7e6c2;
  --input: #f8fbf2;
  --topbar: #ebf2de;
  --shadow: 0 8px 24px rgba(60, 80, 30, 0.1);
  --mask: rgba(42, 58, 26, 0.4);
  --radius: 12px;
  --radius-input: 8px;
  --topbar-edge: 3px solid var(--accent);
  color-scheme: light;
}
html[data-theme="cocoa"] {
  --bg: #efe3d4;
  --panel: #f6ebe0;
  --panel-2: #fbf6f0;
  --line: #d4c0a8;
  --text: #3a2618;
  --muted: #8a6a4e;
  --accent: #7a4a28;
  --accent-2: #c48a3a;
  --ok: #5a7a38;
  --danger: #c4453c;
  --on-accent: #fff8f0;
  --hover: #e6d4c0;
  --input: #faf6f0;
  --topbar: #f3e8dc;
  --shadow: 0 8px 24px rgba(80, 48, 24, 0.1);
  --mask: rgba(58, 38, 24, 0.42);
  --radius: 10px;
  --radius-input: 8px;
  --topbar-edge: 1px solid var(--line);
  color-scheme: light;
}
html[data-theme="wine"] {
  --bg: #1a1216;
  --panel: #2a1c22;
  --panel-2: #332228;
  --line: #5a3844;
  --text: #f3e4ea;
  --muted: #c49aa8;
  --accent: #c45a78;
  --accent-2: #e8b87a;
  --ok: #7cb342;
  --danger: #e06c75;
  --on-accent: #2a1018;
  --hover: #3d2830;
  --input: #22141a;
  --topbar: #140e12;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.42);
  --mask: rgba(0, 0, 0, 0.64);
  --radius: 10px;
  --radius-input: 8px;
  --topbar-edge: 1px solid var(--line);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  display: flex;
  flex-direction: column;
}
html {
  scrollbar-width: thin;
  scrollbar-color: var(--muted) var(--panel);
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--muted) var(--panel);
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: var(--panel);
}
*::-webkit-scrollbar-thumb {
  background: var(--muted);
  border-radius: 999px;
  border: 2px solid var(--panel);
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}
*::-webkit-scrollbar-corner {
  background: var(--panel);
}
body {
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
button, input, textarea, select {
  font-family: inherit;
  font-size: 14px;
}
a { color: var(--accent-2); }

.topbar {
  height: 56px;
  flex: 0 0 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: var(--topbar);
  border-bottom: var(--topbar-edge);
}
.topbar-right { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.who-btn {
  background: transparent;
  border: 0;
  color: var(--text);
  padding: 0 var(--btn-pad-x, 12px);
  cursor: pointer;
}
.who-btn:hover { color: var(--accent-2); }

.ui-popup-root {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
}
.ui-popup-mask {
  position: absolute;
  inset: 0;
  background: var(--mask);
}
.ui-popup-box {
  position: relative;
  z-index: 1;
  width: min(400px, 92vw);
  max-height: 86vh;
  overflow: auto;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0 16px 16px;
}
.ui-popup-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin: 0 -16px 10px;
  padding: 8px 40px 8px 12px;
  border-bottom: 1px solid var(--line);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.ui-popup-x {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
}
.ui-popup-body .card { box-shadow: none; }

.ui-menu {
  position: fixed;
  z-index: 90;
  min-width: 160px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px;
  box-shadow: var(--shadow);
}
.ui-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 6px;
  padding: 0 var(--btn-pad-x, 12px);
}
.ui-menu-item:hover { background: var(--hover); }

.rightbar textarea.suggest-input { min-height: 140px; }
.admin-link {
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  padding: 0 var(--btn-pad-x, 12px);
  line-height: 1;
  height: calc(1em + var(--btn-extra, 8px));
  border-radius: 6px;
}
.ghost, .nav-btn, button {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  line-height: 1;
  height: calc(1em + var(--btn-extra, 8px));
  min-height: 0;
  padding: 0 var(--btn-pad-x, 12px);
  cursor: pointer;
}
.ghost:hover, .nav-btn:hover, button:not(.primary):not(.ok):not(.danger):hover {
  background: var(--hover);
}
button.primary, .login-card button[type="submit"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  width: 100%;
}
button.primary:hover, .login-card button[type="submit"]:hover,
button.ok:hover, button.danger:hover {
  filter: brightness(1.06);
}
button.ok { background: var(--ok); border-color: var(--ok); color: var(--on-accent); }
button.danger { background: var(--danger); border-color: var(--danger); color: var(--on-accent); }

.layout {
  display: grid;
  grid-template-columns: var(--layout-left) var(--layout-split) minmax(0, 1fr) var(--layout-split) var(--layout-right);
  flex: 1 1 auto;
  min-height: 0;
}
.layout-main {
  grid-template-columns: minmax(0, 1fr) var(--layout-split) var(--layout-right);
}
.app-bar {
  flex: 0 0 48px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 8px;
  background: var(--topbar);
  border-bottom: var(--topbar-edge);
}
#member-welcome {
  margin-right: auto;
  font-size: 16px;
  font-weight: 700;
}
#member-welcome[hidden] { display: none; }
.hamburger {
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 11px 9px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 0;
}
.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 1px;
}
.cs-desk {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}
.cs-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--panel);
  border-right: 1px solid var(--line);
}
.cs-close { margin-bottom: 16px; }
.cs-close .danger { width: auto; }
.cs-main { overflow: auto; padding: 16px; min-width: 0; min-height: 0; }
.cs-main table { width: 100%; border-collapse: collapse; }
.cs-main .settings-table th, .cs-main .settings-table td { padding: 2px 6px; }
.cs-main th, .cs-main td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cs-main tr.cs-person td { border-bottom: 0; }
.cs-contact { white-space: nowrap; }
@media (max-width: 980px) {
  .cs-desk { grid-template-columns: 1fr; }
  .cs-nav { flex-direction: row; flex-wrap: wrap; }
}
.sheet-back {
  align-self: flex-start;
  width: auto;
  margin: 0 0 8px;
  padding: 0 var(--btn-pad-x, 12px);
  border: 0;
  background: transparent;
  color: var(--accent-2);
  font-size: 28px;
  line-height: 1;
}
.site-icp {
  flex: 0 0 auto;
  text-align: center;
  padding: 8px 12px 10px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: var(--topbar);
}
.site-icp a {
  color: var(--muted);
  text-decoration: none;
}
.site-icp a:hover {
  color: var(--accent-2);
  text-decoration: underline;
}
.ui-split {
  background: var(--line);
  user-select: none;
}
.layout.king-drag .ui-split {
  cursor: col-resize;
}
.layout.king-drag .ui-split:hover,
.layout.king-dragging .ui-split {
  background: var(--accent-2);
}
.leftbar, .rightbar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rightbar { border-right: 0; border-left: 1px solid var(--line); overflow: auto; }
.center { overflow: auto; padding: 18px 22px 40px; }
.nav-btn { text-align: left; }
.nav-btn.active {
  background: var(--hover);
  border-color: var(--accent);
  color: var(--accent);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px;
  margin: 0 0 14px;
  border-bottom: 1px solid var(--line);
}
.tabs button.tab {
  background: transparent;
  border: 0;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  height: auto;
  min-height: 0;
  width: auto;
  line-height: 1.3;
  padding: 6px 0 5px;
  margin: 0;
  box-shadow: none;
}
.tabs button.tab:hover {
  background: transparent;
  color: var(--text);
}
.tabs button.tab.active,
.tabs button.tab.active:hover {
  background: transparent;
  color: var(--accent);
  border: 0;
  border-bottom: 2px solid var(--accent);
  font-weight: 700;
}

.card, .login-card, .goods-card, .suggest-card, .apply-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.goods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--goods-card-width, 228px), var(--goods-card-width, 228px)));
  gap: 10px;
  align-items: stretch;
  margin-bottom: 12px;
}
.goods-card {
  width: var(--goods-card-width, 228px);
  padding: 8px;
  box-shadow: none;
  border: 1px solid var(--muted);
  display: flex;
  flex-direction: column;
}
.goods-card.is-selected {
  outline: none;
  border: 1px solid var(--accent);
}
.goods-card img {
  width: var(--goods-image-width, 96px);
  height: var(--goods-image-height, 96px);
  max-height: none;
  object-fit: cover;
  border-radius: 6px;
  background: var(--hover);
  flex: 0 0 auto;
}
.goods-head {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.goods-head img {
  width: var(--goods-image-width, 96px);
  height: var(--goods-image-height, 96px);
  max-height: none;
}
.goods-head-main { flex: 1; min-width: 0; }
.goods-head-main h3 { margin: 0 0 6px; font-size: 14px; line-height: 1.3; }
.goods-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--goods-steps, 3), minmax(0, 1fr));
  margin-top: 4px;
}
.goods-progress-rail {
  position: absolute;
  left: calc(100% / var(--goods-steps, 3) / 2);
  right: calc(100% / var(--goods-steps, 3) / 2);
  top: 13px;
  height: 2px;
  background: var(--line);
  z-index: 0;
}
.goods-step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.goods-progress-arrow {
  width: 0;
  height: 0;
  margin-bottom: 2px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid transparent;
}
.goods-step.is-here .goods-progress-arrow { border-top-color: var(--accent-2); }
.goods-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  border: 2px solid var(--panel-2);
}
.goods-dot.is-done { background: var(--accent); }
.goods-dot.is-here { background: var(--accent-2); }
.goods-step-label {
  margin-top: 4px;
  width: 100%;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.2;
  word-break: break-all;
}
.goods-step.is-here .goods-step-label { color: var(--accent-2); font-weight: 700; }
.goods-desc {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--card-desc-lines, 3);
  line-clamp: var(--card-desc-lines, 3);
  overflow: hidden;
  min-height: calc(1.4em * var(--card-desc-lines, 3));
}
.goods-reviews { margin-top: 14px; }
.goods-reviews-title { font-weight: 700; margin-bottom: 8px; }
.taste-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.taste-item:last-child { border-bottom: 0; }
.taste-score-line {
  display: flex;
  align-items: center;
  font-size: 14px;
  line-height: 1.5;
}
.taste-score-text { min-width: 0; }
.name-id { display: inline; }
.thread-list { margin: 8px 0 0; padding: 0; }
.thread-reply { margin: 8px 0; padding: 6px 0; border-bottom: 1px solid var(--line); }
.thread-reply .reply-bubble-btn { display: block; text-align: left; }
.quote-open { display: inline-block; margin-top: 0; padding: 0; border: 0; background: none; color: var(--muted, #666); cursor: pointer; font-size: 11px; }
.reply-bubble-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 0 var(--btn-pad-x, 12px);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reply-bubble-btn:hover { color: var(--accent-2); }
.ui-bubble {
  position: fixed;
  z-index: 90;
  width: min(320px, 90vw);
  background: var(--panel-2);
  border: 1px solid var(--accent-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
}
.ui-bubble-body .bubble-who { font-weight: 700; color: var(--accent-2); }
.ui-bubble-body .bubble-text { margin: 8px 0; white-space: pre-wrap; }
.ui-bubble-body textarea { min-height: 72px; }
.ui-ghost.is-ghost, input.is-ghost, textarea.is-ghost { color: var(--muted); }
.login-stack { display: grid; justify-items: center; gap: 10px; }
.cs-login-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--accent-2);
  border-radius: 999px;
  padding: 0 var(--btn-pad-x, 12px);
  cursor: pointer;
}
.admin-goods {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(240px, 320px);
  gap: 16px;
  align-items: start;
}
.admin-goods-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--goods-card-width, 228px), var(--goods-card-width, 228px)));
  gap: 10px;
  align-items: start;
}
.admin-goods-editor { position: sticky; top: 12px; }
.settings-layout { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: start; }
.settings-cats { display: flex; flex-direction: column; gap: 6px; }
.settings-table { width: 100%; }
.settings-table.is-hidden { display: none; }
.settings-table th, .settings-table td { padding: 2px 6px; }
.settings-table td input, .settings-table td select {
  margin-top: 0;
  padding: 3px 8px;
  height: 28px;
  min-height: 0;
  border-radius: 4px;
}
.settings-name { white-space: nowrap; color: var(--accent-2); font-family: ui-monospace, monospace; font-size: 12px; }
.goods-desc-input { min-height: 72px; }
.goods-group { margin-top: 8px; }
.goods-group + .goods-group { margin-top: 18px; }
.goods-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}
.goods-group-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-2);
  background: none;
  border: 0;
  padding: 0;
  width: auto;
  cursor: pointer;
}
h3.goods-group-title { cursor: default; }
.goods-add-plus {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.kill-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--kill-size, 14px);
  height: var(--kill-size, 14px);
  margin-right: var(--kill-gap, 6px);
  flex: 0 0 var(--kill-size, 14px);
  vertical-align: middle;
}
.kill-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #c0392b;
  color: #fff;
  font-size: calc(var(--kill-size, 14px) - 2px);
  line-height: 1;
  cursor: pointer;
}
.kill-x:hover { background: #e74c3c; }
.kill-col {
  width: var(--kill-size, 14px);
  padding-right: 0;
}

.ui-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--muted);
}
.ui-switch-track {
  position: relative;
  width: 42px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--line);
}
.ui-switch.is-on .ui-switch-track { background: var(--ok); }
.ui-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.15s linear;
}
.ui-switch.is-on .ui-switch-knob { left: 22px; }

.ui-image-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  overflow: hidden;
  border: 1px dashed var(--muted);
  background: var(--input);
  cursor: pointer;
  position: relative;
}
.ui-image-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ui-image-slot-cross {
  width: 36%;
  height: 36%;
  flex: 0 0 auto;
  background:
    linear-gradient(var(--muted), var(--muted)) center / 100% 2px no-repeat,
    linear-gradient(var(--muted), var(--muted)) center / 2px 100% no-repeat;
}
.ui-image-slot-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
  padding: 0 6px;
  pointer-events: none;
}

.ui-inline-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
}
.ui-inline-input {
  margin: 0;
  padding: 2px 6px;
  height: 28px;
  min-height: 0;
  width: 12em;
}
.ui-pencil {
  background: transparent;
  border: 0;
  color: var(--accent-2);
  padding: 0 4px;
  width: auto;
  line-height: 1;
}

.goods-status-slot { position: relative; flex: 1; min-width: 0; }
.goods-stage { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: auto; }
.goods-face { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.goods-drop-btn.is-on { border-color: var(--danger); color: var(--danger); }
.goods-drop-btn:disabled { opacity: 0.35; }
.ui-radar { display: flex; justify-content: center; width: 100%; position: relative; }
.ui-radar svg { display: block; width: min(100%, calc(100vw - 2 * var(--radar-inset, 8px))); height: auto; }
.ui-radar-ring, .ui-radar-axis { fill: none; stroke: var(--line); stroke-width: 0.4; }
.ui-radar-fill { fill: rgba(255, 120, 160, 0.45); stroke: rgba(220, 60, 110, 0.95); stroke-width: 0.6; pointer-events: none; }
.ui-radar-dot { fill: transparent; stroke: none; cursor: pointer; }
.ui-radar-dot.is-hit { fill: transparent; stroke: none; }
.ui-radar-dot.is-on { fill: rgba(220, 60, 110, 0.95); stroke: none; }
.ui-radar:not(.is-edit) .ui-radar-dot { stroke: none; }
.ui-radar-label { font-size: 4.6px; fill: var(--text); text-anchor: middle; dominant-baseline: middle; }
.ui-radar-score { fill: rgba(220, 60, 110, 0.95); font-weight: 700; }
.ui-radar-score.is-live { font-size: 6px; }
.radar-card { margin: 12px 0; }
.radar-card .radar-who { margin: 0 0 6px; }
.radar-name {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid rgba(220, 60, 110, 0.95);
  border-radius: 6px;
  background: rgba(220, 60, 110, 0.95);
  color: var(--on-accent);
  font-weight: 700;
  line-height: 1.4;
}
.radar-comment { margin: 8px 0 0; color: var(--text); }
button.score-open {
  flex: 0 0 var(--goods-image-width, 96px);
  width: var(--goods-image-width, 96px);
  height: var(--score-btn-height, 28px);
  margin: 0;
  padding: 0 4px;
  text-align: center;
}
.score-pull { margin: 8px 0; padding: 0 16px; }
.score-comment-label { display: block; margin: 8px 0 6px; }
.score-comment { position: relative; }
.score-comment textarea {
  width: 100%;
  min-height: 96px;
  margin-top: 0;
  padding-bottom: 40px;
  box-sizing: border-box;
}
.score-comment button.score-submit {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: auto;
  height: calc(1em + var(--btn-extra, 8px));
  margin: 0;
  padding: 0 12px;
}
@media (max-width: 980px) {
  .score-pull {
    width: auto;
    margin-left: 0;
    margin-right: 0;
    padding: 8px 16px 12px;
    border-radius: 0;
  }
}
.goods-rheostat-host.is-overlay {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--panel-2);
}
.goods-rheostat-host.is-overlay.is-off {
  visibility: hidden;
  pointer-events: none;
}
.goods-rheostat-host:not(.is-overlay) {
  margin-top: 8px;
}
.ui-rheostat {
  margin-top: 0;
}
.ui-rheostat input[type="range"] {
  width: 100%;
  margin: 0;
  padding: 0;
  height: 18px;
  accent-color: var(--accent-2);
}
.ui-rheostat-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}
.ui-rheostat-labels .is-here { color: var(--accent-2); font-weight: 700; }
button.suggest-arrow {
  display: inline-block;
  margin-left: 6px;
  padding: 0 2px;
  width: auto;
  height: auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent-2);
  font-size: var(--suggest-arrow-px, 14px);
  line-height: 1;
  vertical-align: middle;
  transform: rotate(0deg);
}
.suggest-arrow.is-open { transform: rotate(180deg); }
.ui-slide-door {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}
.ui-slide-door-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: calc(100% - var(--door-gap, 48px));
  max-width: 100%;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  pointer-events: auto;
  box-sizing: border-box;
}
.ui-slide-door.is-open .ui-slide-door-panel { transform: translateX(0); }
button.ui-slide-door-close {
  flex: 0 0 40px;
  width: 40px;
  height: auto;
  align-self: stretch;
  margin: 0;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel-2);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}
.ui-slide-door-body {
  flex: 1;
  min-width: 0;
  overflow: auto;
  padding: 16px;
  box-sizing: border-box;
}
.ui-slide-door-body .ui-radar svg,
.ui-slide-door-body img,
.ui-slide-door-body .review-card {
  max-width: 100%;
}
.ui-slide-door-body .ui-radar svg { width: 100%; }
.suggest-op, .suggest-reply-row {
  display: flex;
  align-items: flex-start;
}
.suggest-main, .suggest-reply-main { flex: 1; min-width: 0; }
.suggest-thread.is-hidden { display: none; }
.suggest-thread textarea { min-height: 64px; }
.suggest-reply-row {
  margin: 10px 0;
}
.reply-body { margin: 0 0 4px; font-size: 14px; color: var(--text); white-space: pre-wrap; }
.thread-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.reply-verb { font-size: 10px; }
.suggest-aim { width: auto; padding: 0 var(--btn-pad-x, 12px); font-size: 11px; }

.settings-table td, .settings-table th { padding: 3px 8px; vertical-align: middle; }
.settings-value input, .settings-value select {
  width: 200px;
  max-width: 28vw;
  height: 26px;
  margin: 0;
  padding: 2px 6px;
}
.settings-comment { white-space: normal; max-width: 46vw; color: var(--muted); font-size: 11px; line-height: 1.35; }
.ui-zoom-view {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.88);
}
.ui-zoom-view-x {
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 102;
  background: transparent;
  border: 0;
  color: #f4ead6;
  font-size: 28px;
  line-height: 1;
  padding: 0 6px;
  cursor: pointer;
}
.ui-zoom-view-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.ui-zoom-view-stage img {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 0;
  margin: 0;
  padding: 0;
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  box-shadow: none;
  background: none;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
}
.ui-zoom-view.is-dragging .ui-zoom-view-stage img { cursor: grabbing; }

.goods-detail-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
}
.goods-back {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-2);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.goods-detail-head .goods-card { margin: 0; }
.goods-prep-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: stretch;
  overflow-x: auto;
  margin-bottom: 12px;
  padding-bottom: 0;
}
.goods-prep-strip .goods-card { flex: 0 0 var(--goods-card-width, 228px); }
.survey-goods-name { margin: 0 0 8px; font-size: 14px; }
.survey-comment { min-height: 72px; }
.meta { color: var(--muted); font-size: 11px; }
.stars { color: var(--accent-2); font-weight: 700; }
label { display: block; margin: 10px 0; color: var(--muted); }
input, textarea, select {
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: var(--radius-input);
  border: 1px solid var(--line);
  background: var(--input);
  color: var(--text);
}
textarea { min-height: 180px; resize: vertical; }
.form-error, .banner-error {
  color: var(--danger);
  white-space: pre-wrap;
}
.banner-ok { color: var(--ok); }
.dim-save-ok {
  margin: 8px 0 0;
  padding: 8px 12px;
  border: 1px solid var(--ok);
  border-radius: 8px;
  background: var(--ok);
  color: var(--on-accent);
}
.empty { color: var(--muted); padding: 24px 0; }

.login-body .login-stack {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
}
.login-card { width: min(420px, 92vw); }
.login-card h1 { margin: 0 0 8px; }
.login-kicker { color: var(--accent-2); letter-spacing: 0.2em; font-size: 12px; margin: 0; }
.login-hint { color: var(--muted); font-size: 13px; }

.member-badge {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-2);
  line-height: 1.4;
}
.reply-list { margin: 8px 0 0; padding-left: 14px; }
.reply-item { margin: 6px 0; color: var(--muted); }
.inline-row { display: flex; gap: 8px; align-items: flex-start; }
.inline-row textarea { min-height: 64px; }
.score-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.score-row label { margin: 0; color: var(--text); }
.score-row input { width: auto; }

.admin-wrap { display: grid; grid-template-columns: 180px 1fr; min-height: calc(100vh - 56px); }
.admin-nav { padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--panel); }
.admin-main { padding: 20px; overflow: auto; }
table { width: 100%; border-collapse: collapse; background: var(--panel-2); }
th, td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.intro-pre { white-space: pre-wrap; max-height: 160px; overflow: auto; margin: 0; color: var(--text); }
.settings-grid { display: grid; gap: 14px; max-width: 860px; }
.setting-item { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); }
.setting-item .key { color: var(--accent-2); }
.setting-item .comment { color: var(--muted); font-size: 13px; margin: 6px 0 10px; }
.need-restart { color: var(--accent); font-size: 12px; }

.ui-pw-eye {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 6px;
}
.ui-pw-eye input {
  width: 100%;
  margin-top: 0;
  padding-right: 36px;
}
.ui-pw-eye-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.ui-pw-eye-icon { width: 20px; height: 20px; display: block; }

.sent-review-line { margin: 8px 0 0; color: var(--text); }
.goods-reviews-title { display: none; }
.taste-item {
  padding: 12px 0;
  margin: 0;
  text-indent: 0;
  border-bottom: 1px solid var(--line);
}
.review-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin: 12px 0;
}
.taste-item.review-card { border-bottom: 1px solid var(--line); }
.taste-score-line {
  display: flex;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.5;
  text-indent: 0;
}
.taste-score-text { min-width: 0; white-space: normal; word-break: break-word; padding: 0; margin: 0; }
.ui-zoom-thumb {
  position: relative;
  display: block;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  width: var(--zoom-thumb-size);
  max-width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  overflow: hidden;
  background: var(--line);
  cursor: zoom-in;
}
.ui-zoom-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.ui-zoom-thumb-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 8px 10px;
  text-align: center;
  color: rgba(244, 234, 214, 0.72);
  font-size: 13px;
  line-height: 1.3;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
}
.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}
.form-actions button { width: auto; margin: 0; }

.suggest-reply-bar {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.suggest-reply-bar textarea {
  flex: 1;
  min-height: var(--suggest-submit-size, 40px);
  height: var(--suggest-submit-size, 40px);
  margin-top: 0;
  resize: vertical;
}
.suggest-submit-sq {
  flex: 0 0 var(--suggest-submit-size, 40px);
  width: var(--suggest-submit-size, 40px);
  height: var(--suggest-submit-size, 40px);
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  line-height: 1;
}

.dim-grid {
  display: grid;
  grid-template-columns: max-content max-content;
  justify-content: start;
  gap: 6px 12px;
  margin: 8px 0;
}
.dim-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}
.dim-grid .dim-row { margin: 0; min-width: 0; }
.dim-grid .dim-row input {
  flex: 0 0 auto;
  width: calc(var(--dim-input-chars, 4) * 1em + 12px);
  max-width: none;
  min-width: 0;
  padding: 2px 4px;
}
.dim-row .form-k { flex: 0 0 auto; white-space: nowrap; color: var(--muted); }
.dim-row input {
  flex: 0 1 16em;
  width: 16em;
  max-width: calc(100% - 4em);
  min-width: 0;
  margin-top: 0;
}
.cs-goods-form { max-width: 28em; }
.cs-upload { margin: 10px 0; }
.cs-upload-bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.cs-upload-fill { height: 100%; width: 0; background: var(--accent); }
.pca-row { display: flex; gap: 8px; margin: 8px 0; }
.pca-row select { flex: 1; min-width: 0; width: auto; margin-top: 0; }
.form-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
.form-row .form-k {
  flex: 0 0 auto;
  white-space: nowrap;
  color: var(--muted);
}
.form-row input, .form-row select {
  flex: 1;
  width: auto;
  min-width: 0;
  margin-top: 0;
}
.identity-line { margin: 8px 0; line-height: 1.6; }
.form-intro textarea { width: 100%; margin-top: 0; }

.member-profile { margin-top: 10px; font-size: 13px; line-height: 1.7; }
.member-profile div { text-indent: 0; }
.profile-edit-btn { margin-top: 10px; width: auto; }

@media (max-width: 980px) {
  .layout, .admin-wrap { grid-template-columns: 1fr; height: auto; }
  .layout.layout-main { grid-template-columns: minmax(0, 1fr); }
  .layout .ui-split { display: none; }
  .layout-main .rightbar { display: none; }
  body.nav-suggest .layout-main .rightbar,
  body.sheet-join .layout-main .rightbar { display: flex; }
  body.sheet-join .layout-main .center { display: none; }
  .leftbar, .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-goods { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-cats { flex-direction: row; flex-wrap: wrap; }
  .center { padding: 12px 12px 28px; }
  input, textarea, select { font-size: 16px; }
}
