:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --surface-2: #faf8f4;
  --ink: #23201c;
  --ink-2: #5b554c;
  --ink-3: #8a8378;
  --line: #e4ded3;
  --line-2: #d3cbbd;
  --brand: #0d6e72;        /* 奄美の海 */
  --brand-ink: #0a5559;
  --brand-soft: #e3f1f0;
  --accent: #6b3f2a;       /* 大島紬の泥染め */
  --accent-soft: #f4ebe4;
  --ok: #2f7d4a;
  --ok-soft: #e5f3e9;
  --warn: #9a6400;
  --warn-soft: #fdf2d9;
  --err: #b3261e;
  --err-soft: #fbe8e6;
  --req: #c2410c;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(35, 32, 28, .06), 0 4px 16px rgba(35, 32, 28, .05);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", "Noto Sans JP", system-ui, sans-serif;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); min-height: 100vh; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.35; margin: 0; }
h1 { font-size: 1.4rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
[hidden] { display: none !important; }
.muted { color: var(--ink-3); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }

/* ---------- ヘッダー ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px; height: 60px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px; background: var(--brand);
  display: grid; place-items: center; color: #fff; font-size: 16px;
}
.brand small { display: block; font-weight: 400; font-size: .72rem; color: var(--ink-3); line-height: 1.2; }
.topbar nav { display: flex; gap: 4px; margin-left: 12px; }
.topbar nav a {
  padding: 8px 14px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 500;
}
.topbar nav a:hover { background: var(--surface-2); }
.topbar nav a.active { background: var(--brand-soft); color: var(--brand-ink); }
.topbar .spacer { flex: 1; }
.userchip { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: .9rem; }
.role-badge { font-size: .72rem; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }

main.page { max-width: 1180px; margin: 0 auto; padding: 28px 24px 80px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .grow { flex: 1; min-width: 240px; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; font-size: .92rem;
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .choice:focus-within {
  outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: 1px;
}
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-ink); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { filter: brightness(.92); }
.btn.danger { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, white); }
.btn.danger:hover { background: var(--err-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 5px 11px; font-size: .84rem; }
.btn.lg { padding: 13px 26px; font-size: 1rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- カード ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 24px; }
.card-head { padding: 18px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }

/* ---------- テーブル ---------- */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list th { font-size: .8rem; color: var(--ink-3); font-weight: 600; background: var(--surface-2); }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.clickable { cursor: pointer; }
table.list tr.clickable:hover td { background: var(--surface-2); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

.status { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.status.draft { background: #eeebe5; color: var(--ink-2); }
.status.submitted { background: var(--brand-soft); color: var(--brand-ink); }
.status.returned { background: var(--warn-soft); color: var(--warn); }
.status.approved { background: var(--ok-soft); color: var(--ok); }
.status.inactive { background: var(--err-soft); color: var(--err); }

.empty { text-align: center; padding: 56px 24px; color: var(--ink-2); }
.empty .big { font-size: 2.2rem; }

/* ---------- フォーム ---------- */
.field { margin-bottom: 22px; }
.field > label, .field > .label {
  display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 6px; font-size: .95rem;
}
.req, .opt { font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 4px; }
.req { background: var(--req); color: #fff; }
.opt { background: #ece8e0; color: var(--ink-3); }
.help { font-size: .84rem; color: var(--ink-2); margin: -2px 0 8px; }
.help b { color: var(--ink); }
.example { font-size: .8rem; color: var(--ink-3); margin-top: 5px; }
input[type=text], input[type=number], input[type=password], input[type=date], input[type=email], input[type=tel], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 8px; background: #fff;
}
input::placeholder, textarea::placeholder { color: #b3ab9f; }
textarea { min-height: 96px; resize: vertical; }
input[readonly] { background: var(--surface-2); color: var(--ink-2); }
.invalid input, .invalid select, .invalid textarea, input.invalid { border-color: var(--err); background: #fffafa; }
.err-msg { color: var(--err); font-size: .82rem; margin-top: 4px; }
.with-unit { display: flex; align-items: center; gap: 8px; }
.with-unit input { max-width: 220px; }
.with-unit .unit { color: var(--ink-2); white-space: nowrap; }
.grid { display: grid; gap: 0 20px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; cursor: pointer;
  font-weight: 500; user-select: none;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:hover { border-color: var(--brand); }
.choice.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.choice.on::before { content: "✓"; font-weight: 700; }

.counter { font-size: .8rem; color: var(--ink-3); margin-top: 4px; display: flex; gap: 12px; }
.counter.over { color: var(--err); font-weight: 700; }
.counter.near { color: var(--warn); }

.callout { border-radius: 8px; padding: 12px 16px; margin: 12px 0; font-size: .9rem; border: 1px solid; }
.callout.info { background: var(--brand-soft); border-color: #b9dcda; color: var(--brand-ink); }
.callout.warn { background: var(--warn-soft); border-color: #f0d796; color: #6d4700; }
.callout.err { background: var(--err-soft); border-color: #f1c1bc; color: var(--err); }
.callout.ok { background: var(--ok-soft); border-color: #b8dcc3; color: var(--ok); }
.callout b { font-weight: 700; }

.section-title { display: flex; align-items: center; gap: 10px; margin: 30px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.section-title:first-child { margin-top: 0; }
.section-title .num { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 700; }

/* ---------- ログイン ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-hero {
  background: linear-gradient(160deg, #0d6e72 0%, #0a4f52 60%, #3d2a1e 140%);
  color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
}
.login-hero h1 { font-size: 2rem; margin-top: 16px; }
.login-hero p { opacity: .85; max-width: 440px; }
.login-hero ul { padding-left: 1.2em; opacity: .9; }
.login-hero .pattern {
  height: 10px; border-radius: 4px; opacity: .35;
  background: repeating-linear-gradient(90deg, #fff 0 6px, transparent 6px 12px, #d8b98a 12px 18px, transparent 18px 30px);
}
.login-form { display: grid; place-items: center; padding: 40px 24px; }
.login-form form { width: 100%; max-width: 380px; }
.login-form h2 { font-size: 1.4rem; margin-bottom: 6px; }
@media (max-width: 860px) { .login-wrap { grid-template-columns: 1fr; } .login-hero { padding: 32px 24px; } }

/* ---------- エディタ ---------- */
.editor { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .editor { grid-template-columns: 1fr; } }
.steps { position: sticky; top: 80px; padding: 10px; }
.steps ol { list-style: none; margin: 0; padding: 0; }
.steps li button {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 10px 12px; border: 0; background: none; border-radius: 8px; cursor: pointer; font: inherit; color: var(--ink-2);
}
.steps li button:hover { background: var(--surface-2); }
.steps li.active button { background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.steps .dot {
  flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2);
  display: grid; place-items: center; font-size: .78rem; font-weight: 700; background: #fff;
}
.steps li.active .dot { border-color: var(--brand); color: var(--brand); }
.steps li.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.warn .dot { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.steps .sub { display: block; font-size: .72rem; color: var(--ink-3); font-weight: 400; line-height: 1.3; }
.save-state { font-size: .8rem; color: var(--ink-3); padding: 10px 12px 2px; border-top: 1px solid var(--line); margin-top: 8px; }
.save-state.saving { color: var(--warn); }
.save-state.saved { color: var(--ok); }
.save-state.error { color: var(--err); }

.step-head { margin-bottom: 20px; }
.step-head h2 { font-size: 1.3rem; }
.step-head p { margin: 4px 0 0; color: var(--ink-2); }
.step-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }

/* 類型カード */
.ruikei-list { display: grid; gap: 10px; }
.ruikei {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 14px; align-items: center;
  padding: 12px 16px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; background: #fff;
}
.ruikei:hover { border-color: var(--brand); }
.ruikei.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.ruikei .code { font-weight: 800; font-size: 1.05rem; color: var(--accent); }
.ruikei .desc { font-size: .88rem; }
.ruikei .desc small { display: block; color: var(--ink-3); font-size: .78rem; margin-top: 2px; }
.ruikei .tag { font-size: .72rem; padding: 2px 8px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-weight: 700; white-space: nowrap; }
details.more summary { cursor: pointer; color: var(--brand); font-weight: 600; margin: 12px 0; }

.guide { background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 10px; padding: 16px 18px; margin-bottom: 18px; }
.guide .q { font-weight: 700; margin-bottom: 8px; }

/* 原材料テーブル */
table.mat { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
table.mat th { font-size: .78rem; color: var(--ink-3); text-align: left; padding: 4px 6px; font-weight: 600; }
table.mat td { padding: 4px 6px; vertical-align: top; }
table.mat td.pct { width: 90px; text-align: right; font-weight: 700; padding-top: 12px; color: var(--brand-ink); }
table.mat td.del { width: 40px; }
.sum-bar { display: flex; height: 26px; border-radius: 6px; overflow: hidden; background: #eee; margin: 10px 0 6px; font-size: .78rem; font-weight: 700; }
.sum-bar .a { background: var(--brand); color: #fff; display: grid; place-items: center; }
.sum-bar .b { background: var(--accent); color: #fff; display: grid; place-items: center; }

.meter { padding: 18px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.meter .val { font-size: 2rem; font-weight: 800; }
.meter .bar { height: 12px; border-radius: 6px; background: #e8e3da; position: relative; margin: 10px 0; overflow: hidden; }
.meter .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ok); border-radius: 6px; }
.meter .bar.bad i { background: var(--err); }
.meter .bar::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: var(--ink); }
.formula { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .85rem; color: var(--ink-2); }

/* 確認画面 */
.review { display: grid; gap: 16px; }
.review dl { display: grid; grid-template-columns: 200px 1fr; margin: 0; }
.review dt, .review dd { padding: 8px 12px; border-bottom: 1px solid var(--line); margin: 0; font-size: .9rem; }
.review dt { color: var(--ink-3); background: var(--surface-2); }
.review dd { white-space: pre-wrap; word-break: break-word; }
.review dd.empty-val { color: var(--ink-3); }
.review dd.missing { color: var(--err); font-weight: 600; }
.download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.dl-card { border: 1px solid var(--line); border-radius: 10px; padding: 18px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.dl-card .ico { font-size: 1.6rem; }
.dl-card h3 { font-size: .98rem; }
.dl-card p { margin: 0; font-size: .82rem; color: var(--ink-2); flex: 1; }
.dl-card.disabled { opacity: .55; }

.allergen-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.allergen-grid .choice { padding: 6px 12px; font-size: .88rem; }

/* モーダル */
.modal-back { position: fixed; inset: 0; background: rgba(35, 32, 28, .45); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 640px; max-height: calc(100vh - 40px); overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal header { padding: 18px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal header h2 { flex: 1; }
.modal .body { padding: 22px 24px; }
.modal footer { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

/* トースト */
.toast-area { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: .9rem; box-shadow: var(--shadow); animation: pop .2s ease-out; }
.toast.err { background: var(--err); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; }
.stat .n { font-size: 1.6rem; font-weight: 800; }
.stat .l { font-size: .8rem; color: var(--ink-3); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters input, .filters select { width: auto; min-width: 180px; padding: 8px 10px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button { border: 0; background: none; padding: 10px 16px; font: inherit; color: var(--ink-2); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--brand-ink); border-bottom-color: var(--brand); font-weight: 700; }
.timeline { list-style: none; padding: 0; margin: 0; font-size: .85rem; }
.timeline li { padding: 6px 0; border-bottom: 1px dashed var(--line); }

/* 商品画像 */
.img-list { display: grid; gap: 16px; }
.img-card { border: 1px solid var(--line-2); border-radius: 12px; background: #fff; padding: 16px 18px; transition: border-color .15s, box-shadow .15s; }
.img-card.has { border-color: #b8dcc3; }
.img-card.drag { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.img-card.busy { opacity: .6; pointer-events: none; }
.img-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.img-no { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; }
.img-title { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.img-body { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }
@media (max-width: 760px) { .img-body { grid-template-columns: 1fr; } }
.img-drop {
  aspect-ratio: 4 / 3; border: 2px dashed var(--line-2); border-radius: 10px; background: var(--surface-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 12px; cursor: pointer; color: var(--ink-2);
}
.img-drop:hover { border-color: var(--brand); background: var(--brand-soft); }
.img-drop .big { font-size: 2rem; }
.img-preview { display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #eee; border: 1px solid var(--line); }
.img-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-tips { margin: 0 0 10px; padding-left: 1.2em; font-size: .85rem; color: var(--ink-2); }
.upload-status { margin-top: 8px; font-size: .85rem; }
.thumb-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 14px; }
.thumb { margin: 0; }
.thumb img, .thumb-empty { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; background: var(--surface-2); color: var(--err); font-weight: 600; font-size: .85rem; }
.thumb figcaption { font-size: .8rem; color: var(--ink-2); margin-top: 4px; }
.agree { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font-size: .88rem; margin-bottom: 10px; }
@media (max-width: 760px) { .thumb-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.muni { display: inline-block; padding: 2px 10px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-ink); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.muni-filter { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .88rem; }
.muni-filter select { min-width: 160px; }
.size-table { border-collapse: collapse; margin-top: 6px; font-size: .82rem; }
.size-table th, .size-table td { border: 1px solid var(--line); padding: 3px 12px; text-align: left; }
.size-table th { background: var(--surface-2); color: var(--ink-3); font-weight: 600; }
.size-table tr.on td { background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.muni-fixed { display: flex; align-items: center; gap: 8px; }
.muni-list { display: flex; flex-wrap: wrap; gap: 4px; }
.audit-action { display: inline-block; padding: 1px 8px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.audit-action.bad { background: var(--err-soft); border-color: #f1c1bc; color: var(--err); }
.tpl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-block { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; background: var(--surface-2); }
.tpl-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.tpl-head h4 { flex: 1; margin: 0; font-size: .95rem; }
.tpl-input { font-family: inherit; }
textarea.tpl-input { font-size: .88rem; line-height: 1.6; }
.mail-preview { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.mail-subject { background: var(--surface-2); padding: 10px 14px; font-weight: 700; border-bottom: 1px solid var(--line); }
.mail-preview pre { margin: 0; padding: 14px; white-space: pre-wrap; font-family: inherit; font-size: .9rem; line-height: 1.7; }
.import-steps { margin: 0 0 16px; padding-left: 1.3em; display: grid; gap: 12px; }
tr.row-error td { background: #fffafa; }
.noimg-badge { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 99px; background: var(--warn-soft); color: var(--warn); border: 1px solid #f0d796; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.size-guide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 8px; }
@media (max-width: 760px) { .size-guide { grid-template-columns: 1fr; } }
.size-guide-col { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fff; }
.size-guide-col.active { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.size-guide-head { font-weight: 700; margin-bottom: 4px; }
.size-guide .size-table { width: 100%; }

/* 商品画像：最初に答える質問（見落とし防止） */
.ask-box { border: 2px solid var(--brand); background: var(--brand-soft); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 18px; }
.ask-box.unanswered { border-color: var(--err); background: var(--err-soft); box-shadow: 0 0 0 4px rgba(179, 38, 30, .08); }
.ask-box .ask-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ask-box .field { margin: 0; }
.ask-box .choice { font-size: 1rem; padding: 12px 18px; background: var(--surface); }
.ask-box .choice.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.ask-box .ask-alert { margin-top: 10px; color: var(--err); font-weight: 700; font-size: .9rem; }

/* 一括表示（複数枚） */
.label-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.label-thumb { margin: 0; width: 100px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.label-thumb img { width: 100px; height: 100px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.label-thumb figcaption { font-size: .75rem; color: var(--ink-2); }
.img-drop.disabled { opacity: .55; cursor: not-allowed; }

/* ヘッダーのメニュー：項目が増えても文字を折り返さず、狭い画面では横にスクロールする */
.topbar nav { min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.topbar nav a, .topbar .userchip, .brand { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 1100px) { .brand small { display: none; } .topbar { gap: 10px; padding: 0 14px; } .topbar nav a { padding: 8px 10px; } }
