/* ===== テーマ ===== */
:root, [data-theme="sakura"] {
  --primary: #d6336c; --primary-ink: #fff; --primary-weak: #fff0f6;
  --bg: #fbf6f8; --surface: #fff; --surface-2: #f8f1f4; --text: #2b2a2c; --muted: #7d7880; --border: #eee3e8;
}
[data-theme="mint"]       { --primary: #0ca678; --primary-weak: #e6fcf5; --bg: #f4faf7; --surface-2: #eef7f2; --border: #dcefe6; }
[data-theme="ocean"]      { --primary: #1c7ed6; --primary-weak: #e7f5ff; --bg: #f4f7fb; --surface-2: #edf2f8; --border: #dde6f0; }
[data-theme="terracotta"] { --primary: #d9480f; --primary-weak: #fff4e6; --bg: #fbf7f3; --surface-2: #f6efe8; --border: #eee2d6; }
[data-theme="lavender"]   { --primary: #7048e8; --primary-weak: #f3f0ff; --bg: #f7f6fc; --surface-2: #f0eef9; --border: #e4e0f3; }
[data-theme="kraft"]      { --primary: #8d6e46; --primary-weak: #f6efe4; --bg: #f7f3ec; --surface: #fffdf8; --surface-2: #f1ebe0; --border: #e6dccb; --text: #3b3127; }
[data-theme="dark"], [data-theme="admin"] {
  --primary: #4dabf7; --primary-ink: #0b1622; --primary-weak: #1b2a3a;
  --bg: #12151a; --surface: #1b1f26; --surface-2: #232933; --text: #e6e8eb; --muted: #9aa3ad; --border: #2e3540;
}
[data-theme="admin"] { --primary: #fab005; --primary-weak: #2e2716; }
:root {
  --danger: #e03131; --ok: #2f9e44; --warn: #f08c00;
  --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  --sidebar: 220px; --topbar: 56px; --bottombar: 64px;
}

/* ===== ベース ===== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.35rem; margin: 0; }
h2 { font-size: 1.02rem; margin: 0 0 .8rem; display: flex; align-items: center; gap: .5rem; }
h3 { font-size: .95rem; margin: 0 0 .6rem; }
.ico { width: 20px; height: 20px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.mt { margin-top: 1rem; }
.grow { flex: 1 1 auto; min-width: 0; }
.inline { display: inline; }
.neg { color: var(--danger); }
.hp { position: absolute; left: -9999px; }
[hidden] { display: none !important; }
code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: .85em; word-break: break-all; }

/* ===== レイアウト ===== */
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--text); min-width: 0; }
.brand .ico { color: var(--primary); }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: .5rem; }
.shell { display: flex; min-height: calc(100vh - var(--topbar)); }
.sidebar {
  width: var(--sidebar); flex: none; padding: 12px; background: var(--surface); border-right: 1px solid var(--border);
  position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar)); overflow-y: auto;
}
.sidebar a {
  display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border-radius: 10px; color: var(--text); margin-bottom: 2px;
}
.sidebar a:hover { background: var(--surface-2); text-decoration: none; }
.sidebar a.on { background: var(--primary-weak); color: var(--primary); font-weight: 700; }
.content { flex: 1; min-width: 0; padding: 20px 24px 40px; max-width: 1280px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.bottombar { display: none; }

@media (max-width: 899px) {
  .sidebar { display: none; }
  .content { padding: 14px 16px calc(var(--bottombar) + 24px + env(safe-area-inset-bottom)); }
  .hide-sm { display: none; }
  .bottombar {
    display: flex; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
    height: calc(var(--bottombar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface); border-top: 1px solid var(--border);
  }
  .bottombar > a, .bottombar summary {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    font-size: .7rem; color: var(--muted); list-style: none; cursor: pointer; height: var(--bottombar);
  }
  .bottombar summary::-webkit-details-marker { display: none; }
  .bottombar .on { color: var(--primary); font-weight: 700; }
  .bottombar > a:hover { text-decoration: none; }
  .more { flex: 1; display: flex; }
  .more-sheet {
    position: fixed; right: 8px; bottom: calc(var(--bottombar) + 8px + env(safe-area-inset-bottom)); min-width: 200px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 30px rgba(0,0,0,.18); padding: 6px;
  }
  .more-sheet a { display: flex; align-items: center; gap: .6rem; padding: .7rem .8rem; color: var(--text); border-radius: 8px; }
  .more-sheet a:hover { background: var(--surface-2); text-decoration: none; }
}

/* ===== パーツ ===== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card, .grid-2 + .card, .card + .grid-2, .grid-2 + .grid-2, .kpis + .card, .kpis + .grid-2 { margin-top: 16px; }
.narrow { max-width: 640px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-2.inner { gap: 20px; align-items: center; }
.grid-2 > .card, .grid-2 > * + * { margin-top: 0 !important; }
@media (max-width: 899px) { .grid-2 { grid-template-columns: 1fr; } }
.row { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; }
.empty { color: var(--muted); text-align: center; padding: 1.2rem; }
.link-sm { font-size: .8rem; font-weight: 400; margin-left: auto; }
.hint { color: var(--muted); font-size: .82rem; margin: .3rem 0 .8rem; }
.req { font-size: .7rem; color: var(--danger); margin-left: .3rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  padding: .55rem 1rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: .92rem; cursor: pointer; white-space: nowrap; line-height: 1.3; text-decoration: none !important;
  -webkit-tap-highlight-color: transparent; transition: filter .1s, transform .05s;
}
.btn:hover { filter: brightness(.97); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-weight: 700; }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { padding: .32rem .7rem; font-size: .82rem; border-radius: 8px; }
.btn-lg { padding: .9rem 1rem; font-size: 1.08rem; }
.btn-block { display: flex; width: 100%; }

.form { display: flex; flex-direction: column; gap: .8rem; }
label { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: .5rem; color: var(--text); font-size: .9rem; }
input, select, textarea {
  font: inherit; font-size: 16px; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: .55rem .7rem; width: 100%; min-width: 0;
}
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
input[type="color"] { width: 44px; height: 40px; padding: 2px; flex: none; }
input[readonly] { background: var(--surface-2); }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--primary) 35%, transparent); border-color: var(--primary); }
.w-qty { width: 90px; flex: none; }
.w-sort { width: 70px; flex: none; }
.form-actions { display: flex; justify-content: space-between; gap: .6rem; margin-top: .4rem; }
fieldset { border: 1px solid var(--border); border-radius: 10px; padding: .8rem; margin: 0; display: flex; flex-direction: column; gap: .7rem; }
legend { font-size: .8rem; color: var(--muted); padding: 0 .3rem; }

.alert { padding: .75rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: .92rem; border: 1px solid; }
.alert ul { margin: 0; padding-left: 1.2rem; }
.alert-success { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.alert-error { background: color-mix(in srgb, var(--danger) 9%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.alert-warn { background: color-mix(in srgb, var(--warn) 11%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.alert-info { background: var(--primary-weak); border-color: color-mix(in srgb, var(--primary) 30%, transparent); }

.badge { display: inline-block; font-size: .72rem; padding: 1px 8px; border-radius: 99px; background: var(--primary-weak); color: var(--primary); white-space: nowrap; }
.badge-ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.badge-ng { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.badge-warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.badge-muted { background: var(--surface-2); color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .4rem; flex: none; vertical-align: 0; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1099px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.kpi-label { font-size: .8rem; color: var(--muted); }
.kpi-value { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: .76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 499px) { .kpi-value { font-size: 1.3rem; } .kpi { padding: 12px; } }

/* リスト・テーブル */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
.card.table-wrap { padding: 4px 8px; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .6rem .55rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table thead th { font-size: .78rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.table tfoot th { border-bottom: 0; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions > * { margin-left: 4px; }
.table.small th, .table.small td { padding: .4rem; }
@media (max-width: 699px) {
  .table.responsive thead { display: none; }
  .table.responsive tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; padding: .7rem .3rem; border-bottom: 1px solid var(--border); }
  .table.responsive td { border: 0; padding: 0; text-align: left !important; }
  .table.responsive td[data-label]::before { content: attr(data-label); display: block; font-size: .7rem; color: var(--muted); }
  .table.responsive td.actions, .table.responsive td.cb { grid-column: 1 / -1; text-align: left !important; margin-top: .4rem; }
  .table.responsive td.actions > * { margin: 0 4px 0 0; }
}
.ratio { display: inline-block; width: 60px; height: 6px; background: var(--surface-2); border-radius: 3px; margin-right: 6px; vertical-align: middle; overflow: hidden; }
.ratio span { display: block; height: 100%; }
.matrix td.heat { background: color-mix(in srgb, var(--primary) calc(var(--heat) * 60%), transparent); }
.matrix td small { display: block; font-size: .7rem; color: var(--muted); }

.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1rem 0; font-size: .85rem; color: var(--muted); }
.summary-bar { display: flex; gap: 1rem; align-items: baseline; justify-content: flex-end; margin: 12px 4px; color: var(--muted); }
.summary-bar strong { color: var(--text); font-size: 1.2rem; }
.bulk-bar { display: flex; gap: .5rem; align-items: center; padding: .5rem .3rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.bulk-bar select { width: auto; padding: .35rem .5rem; font-size: .85rem; }

/* フィルター */
.filter { margin-bottom: 16px; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.filter-actions { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .7rem; flex-wrap: wrap; }
.presets { display: flex; gap: 2px; flex-wrap: wrap; }

/* グラフ */
.chart-box { position: relative; height: 260px; }
.chart-box.tall { height: 320px; }

/* 種類編集 */
.cat-edit { list-style: none; padding: 0; margin: 0 0 1rem; }
.cat-edit li { display: flex; gap: .5rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--border); background: var(--surface); }
.cat-edit li input[type="color"] { width: 38px; height: 38px; }
@media (max-width: 599px) { .cat-edit li .nowrap { display: none; } .cat-edit li { gap: .35rem; } }
.cat-edit .drag { cursor: grab; touch-action: none; user-select: none; font-size: 1.3rem; line-height: 1; color: var(--muted); padding: .4rem .3rem; }
.cat-edit .drag:active { cursor: grabbing; }
.cat-edit .sortable-ghost { opacity: .35; }
.cat-edit .sortable-chosen { box-shadow: 0 4px 16px rgba(0,0,0,.12); border-radius: 10px; }
.drag-hint { font-weight: 700; }
.sort-status { margin-left: .6rem; }

/* テーマ選択 */
.theme-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .5rem; }
.theme-opt { display: flex; align-items: center; gap: .5rem; padding: .6rem .7rem; border: 2px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.theme-opt.on { border-color: var(--primary); font-weight: 700; }
.swatch { width: 22px; height: 22px; border-radius: 50%; flex: none; }

/* はじめに */
.steps ol { margin: 0; padding-left: 1.3rem; }
.steps li { margin: .3rem 0; }
.steps li.done { text-decoration: line-through; color: var(--muted); }

/* ===== 売上登録（POS） ===== */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.pos-main { display: flex; flex-direction: column; gap: 16px; }
.pos-main .card + .card { margin-top: 0; }
.pos-cart { position: sticky; top: calc(var(--topbar) + 16px); }
.pos-stats { display: flex; gap: .4rem 1.2rem; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin-top: .7rem; align-items: center; }
.pos-stats strong { color: var(--text); }
@media (max-width: 899px) {
  .pos { grid-template-columns: 1fr; }
  .pos-cart { position: sticky; bottom: calc(var(--bottombar) + env(safe-area-inset-bottom)); top: auto; z-index: 10; box-shadow: 0 -6px 24px rgba(0,0,0,.08); }
  .pos-cart {
    display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center;
    padding: 10px 12px; margin: 0 -8px; border-radius: 16px 16px 0 0;
  }
  .pos-cart h2, .pos-cart details, .cart-lines li.empty { display: none; }
  .pos-cart .cart-lines { grid-column: 1 / -1; max-height: 26vh; overflow-y: auto; margin: 0; }
  .pos-cart .cart-lines:empty { display: none; }
  .pos-cart .cart-total { padding: 0; flex-direction: column; gap: 0; }
  .pos-cart .cart-total span { font-size: .72rem; color: var(--muted); }
  .pos-cart .cart-total strong { font-size: 1.35rem; }
  .pos-cart #pos-checkout { margin: 0; }
  .pos-cart .cart-lines { display: none; }
  .pos-cart.open .cart-lines { display: block; }
  .pos-cart .cart-toggle { grid-column: 1; margin: 0; padding: .2rem; justify-self: start; }
  .pos-cart #cart-clear { grid-column: 2; margin: 0; padding: .2rem; justify-self: end; width: auto; }
  .pos-head .row > label { flex: 1 1 140px; }
}
.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 12px; margin-bottom: 1rem; }
.tab { flex: 1; border: 0; background: transparent; padding: .55rem; border-radius: 9px; font: inherit; font-size: .9rem; color: var(--muted); cursor: pointer; }
.tab.on { background: var(--surface); color: var(--text); font-weight: 700; box-shadow: var(--shadow); }
.tab-pane { display: none; flex-direction: column; gap: .8rem; }
.tab-pane.on { display: flex; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  --chip: #868e96; border: 2px solid color-mix(in srgb, var(--chip) 40%, transparent); background: var(--surface);
  color: var(--text); border-radius: 99px; padding: .45rem .9rem; font: inherit; font-size: .9rem; cursor: pointer;
}
.chip.on { background: var(--chip); border-color: var(--chip); color: #fff; font-weight: 700; }
.quick-prices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
#free-price { font-size: 1.4rem; font-weight: 700; text-align: right; }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; max-height: 60vh; overflow-y: auto; }
.prod-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  padding: .6rem .7rem; border: 1px solid var(--border); border-left: 4px solid var(--c, #adb5bd); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit; cursor: pointer; min-height: 64px;
}
.prod-btn:active { background: var(--primary-weak); }
.prod-btn .n { font-size: .88rem; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.prod-btn .p { font-weight: 700; font-size: .95rem; margin-top: auto; }
.prod-btn .c { font-size: .7rem; color: var(--muted); }
.cart-lines { list-style: none; padding: 0; margin: 0 0 .5rem; }
.cart-lines li { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: .5rem 0; border-bottom: 1px dashed var(--border); align-items: center; }
.cart-lines li.empty { display: block; padding: .8rem; }
.cart-lines .nm { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-lines .amt { font-weight: 700; text-align: right; }
.cart-lines .ctl { grid-column: 1 / -1; display: flex; gap: 4px; align-items: center; }
.cart-lines .ctl input { width: 90px; padding: .25rem .4rem; font-size: 15px; text-align: right; }
.cart-lines .ctl button { width: 32px; height: 32px; padding: 0; }
.cart-lines .ctl .q { min-width: 28px; text-align: center; font-weight: 700; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; padding: .4rem 0 .8rem; }
.cart-total strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.pos-cart .btn + .btn { margin-top: 6px; }
.cart-toggle { display: none; }
@media (max-width: 899px) { .cart-toggle:not([hidden]) { display: flex; } }
.free-row { flex-wrap: nowrap; }
.free-row label.grow { flex: 1 1 0; min-width: 0; }
.free-row .w-qty { width: 64px; }
.free-row .free-add { flex: none; height: 44px; }
.free-row input { height: 44px; }

/* 会計シート */
.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; padding: 16px; }
.sheet[hidden] { display: none; }
.sheet-panel { width: 100%; max-width: 460px; background: var(--surface); border-radius: 18px; padding: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.3); max-height: calc(100vh - 32px); overflow-y: auto; }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .8rem; }
.sheet-total { font-size: 1.8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.co-label { font-size: .8rem; color: var(--muted); margin: .9rem 0 .4rem; }
.sheet .chip { padding: .6rem 1rem; font-size: .95rem; }
body.sheet-open { overflow: hidden; }
@media (max-width: 899px) {
  .sheet { align-items: flex-end; padding: 0; }
  .sheet-panel { max-width: none; border-radius: 18px 18px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
}

/* ===== 認証画面 ===== */
.auth-body { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-wrap { width: 100%; max-width: 420px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: .5rem; font-weight: 800; font-size: 1.15rem; margin-bottom: 1rem; }
.auth-brand .ico { color: var(--primary); width: 26px; height: 26px; }
.auth-card { padding: 24px; }
.auth-card h1 { margin-bottom: 1rem; text-align: center; }
.auth-links { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; font-size: .88rem; flex-wrap: wrap; }
.otp-input { font-size: 1.8rem !important; letter-spacing: .4em; text-align: center; font-weight: 700; }
.checklist { list-style: none; padding: 0; font-size: .9rem; }
.checklist .ok { color: var(--ok); } .checklist .ng { color: var(--danger); }
.strength { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: -.4rem; }
.strength i { display: block; height: 100%; transition: width .2s; }

/* 管理画面 */
details.menu, details.danger-zone { display: inline-block; position: relative; text-align: left; }
details.menu > summary, details.danger-zone > summary { list-style: none; }
details.menu > summary::-webkit-details-marker, details.danger-zone > summary::-webkit-details-marker { display: none; }
.menu-body, details.danger-zone > form {
  position: absolute; right: 0; z-index: 15; margin-top: 4px; width: 230px; display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.3); white-space: normal;
}
@media (max-width: 699px) { .menu-body, details.danger-zone > form { left: 0; right: auto; } }
