/* Clean Arcade Theme (v0.6.0)
 * overview.css (= v0.3.15 clean UI) の上に重ねるテーマ層。外せば v0.3.15 の見た目に戻る。
 * 線の強弱: 濃紺の太枠＋押しボタン影は「大枠カード・ロゴ・タブ・選択中・保存」だけ。
 *           未選択のキーや各段の箱は細線＋白で、数字と文字を先に読ませる。
 * 傾きは操作しない飾り（ロゴ・1組目タグ・試験運用）だけ。押すボタンは真っすぐ。
 */
:root {
  --ca-ink: #1c2541;
  --ca-ink-2: #4a5578;
  --ca-muted: #8790a8;
  --ca-line: #dde2ee;
  --ca-key-edge: #cdd4e4;
  --ca-bg: #f3f5fa;
  --ca-orange: #ff7a1a;
  --ca-orange-deep: #d65a00;
  --ca-orange-soft: #fff0e2;
  --ca-yellow: #ffd23f;
  --ca-yellow-edge: #f0b400;
  --ca-yellow-soft: #fff8dc;
  --ca-cyan: #2ccbec;
  --ca-cyan-soft: #e3f8fd;
  --ca-pink: #f5228a;
  --ca-pink-deep: #c40f6a;
  --ca-pink-soft: #ffe8f3;
  --ca-mint: #2fd69a;
  --ca-mint-deep: #0f9a68;
  --ca-mint-soft: #ddf8ec;
  --ca-red: #ff4b2b;
  --ca-gold: #f1c04a;
  --ca-hard: 0 4px 0 var(--ca-ink);
  --ca-hard-sm: 0 3px 0 var(--ca-ink);
  --ca-key: 0 2px 0 var(--ca-key-edge);
  --ca-star: polygon(50% 0, 62% 36%, 100% 38%, 70% 61%, 80% 100%, 50% 77%, 20% 100%, 30% 61%, 0 38%, 38% 36%);
}

/* ---------- 背景: 外周だけにうっすらハーフトーン ---------- */
body { background: var(--ca-bg); color: var(--ca-ink); }
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle, #1c2541 1.1px, transparent 1.6px) 0 0 / 14px 14px;
  opacity: .09;
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 46%, transparent 62%, #000 100%);
  mask-image: radial-gradient(ellipse 70% 62% at 50% 46%, transparent 62%, #000 100%);
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(420px 300px at -60px -40px, #ff7a1a1c, transparent 70%),
    radial-gradient(420px 320px at calc(100% + 60px) calc(100% + 40px), #2ccbec1f, transparent 70%);
}

/* ---------- ロゴ ---------- */
.brandline { align-items: center; }
.brandmark {
  display: grid; place-items: center; flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--ca-orange); border: 2.5px solid var(--ca-ink);
  box-shadow: var(--ca-hard-sm); transform: rotate(-6deg);
}
.brandmark svg { width: 28px; height: 28px; display: block; }
.brand h1 {
  color: var(--ca-orange); font-weight: 900; letter-spacing: .02em;
  -webkit-text-stroke: 5px var(--ca-ink); paint-order: stroke fill;
  text-shadow: 0 3px 0 var(--ca-ink);
}
.brandline .brandsub {
  padding: 3px 11px; border-radius: 9px;
  background: var(--ca-yellow); color: var(--ca-ink); border: 2px solid var(--ca-ink);
  box-shadow: 0 2px 0 var(--ca-ink);
  font-size: 13px; font-weight: 900; letter-spacing: .04em; transform: rotate(-3deg);
}
.brandline .scope, .scope {
  padding: 3px 9px; border-radius: 999px;
  background: var(--ca-mint); color: var(--ca-ink); border: 2px solid var(--ca-ink);
  font-size: 11px; font-weight: 800; transform: rotate(3deg);
}
.brandline .scope.out, .scope.out { background: #ffd9d2; color: #9b2c1b; }
.sheetlink {
  border: 2px solid var(--ca-ink); background: #fff; color: #1f8a55;
  box-shadow: var(--ca-hard-sm); transition: transform .08s, box-shadow .08s;
}
.sheetlink:hover { border-color: var(--ca-ink); background: #f3fbf6; }
.sheetlink:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ca-ink); }
.syncpill { border: 2px solid var(--ca-ink); font-weight: 800; }

/* ---------- タブ ---------- */
.tabs {
  padding: 4px; border: 2.5px solid var(--ca-ink); border-radius: 16px;
  background: #fff; box-shadow: var(--ca-hard);
}
.tabs button { color: var(--ca-ink-2); font-weight: 800; transition: color .15s, background .15s; }
.tabs button:not(.active):hover { background: var(--ca-yellow-soft); }
.tabs button.active { background: var(--ca-ink); color: #fff; box-shadow: none; }

/* ---------- 営業日 / 受付担当者 ---------- */
.compactdate, .stafftrigger {
  border: 2px solid var(--ca-line); background: #fff; box-shadow: 0 2px 0 var(--ca-line);
}
.compactdate:hover { border-color: var(--ca-key-edge); }
.compactdate:focus-within { border-color: var(--ca-ink); box-shadow: 0 0 0 3px #ffd23f66; }
.datelabel, .stafflabel {
  padding: 3px 9px; border-radius: 999px;
  background: var(--ca-ink); color: #fff; font-weight: 800;
}
.compactdate input { color: var(--ca-ink); font-weight: 800; }
.staffavatar { background: var(--ca-cyan-soft); color: #0f7f98; }
#staffName { color: var(--ca-ink); font-weight: 800; }
.staffchange { color: var(--ca-ink-2); font-weight: 750; }
.stafftrigger { transition: border-color .15s, box-shadow .15s, background .15s, transform .08s; }
.stafftrigger:hover { border-color: var(--ca-key-edge); }
.stafftrigger:active { transform: translateY(2px); box-shadow: none; }

/* 「次はここ」= 枠線と外光だけをくっきり点滅（枠内は清潔な白のまま） */
.stafftrigger.next, .fieldblock.next, .wizard .sourcechoice.next {
  border: 2.5px solid #ff6a00; background: #fff;
  box-shadow: 0 0 0 4px #ffd23fc8, 0 0 20px #ff7a1a66;
  animation: ca-next-pulse 1.05s ease-in-out infinite;
}
@keyframes ca-next-pulse {
  0%, 100% {
    border-color: #f3d778;
    box-shadow: 0 0 0 1px #ffd23f22, 0 0 2px #ff7a1a14;
  }
  50% {
    border-color: #ff5e00;
    box-shadow: 0 0 0 5px #ffd23fe0, 0 0 22px #ff7a1a88;
  }
}
.stafftrigger.next .staffavatar { background: var(--ca-yellow); color: var(--ca-ink); }
.stafftrigger.next .staffchange { color: var(--ca-ink); }
.stafftrigger.done {
  border: 2.5px solid var(--ca-ink); background: var(--ca-yellow);
  box-shadow: var(--ca-hard-sm);
}
.stafftrigger.done .staffavatar { background: #fff; color: var(--ca-ink); }
.stafftrigger.done .staffchange { color: var(--ca-ink); font-weight: 850; }

/* ---------- 入力カード（主役: 太枠＋押しボタン影） ---------- */
#wizard.wizard {
  position: relative; margin-top: 14px;
  border: 3px solid var(--ca-ink); background: #fff;
  box-shadow: 0 6px 0 var(--ca-ink);
}
.wizardhead { min-height: 18px; padding-bottom: 8px; }
.wizardhead > span:first-child {
  position: absolute; top: -16px; left: 14px; z-index: 1;
  padding: 4px 12px; border-radius: 9px;
  background: var(--ca-orange); color: #fff; border: 2.5px solid var(--ca-ink);
  box-shadow: var(--ca-hard-sm);
  font-size: 14px; font-weight: 900; letter-spacing: .03em;
  text-shadow: 0 1.5px 0 var(--ca-ink); transform: rotate(-4deg);
}
/* 進捗: 4 マスのゲージ */
.completiondots { margin-left: auto; gap: 4px; }
.completiondots i {
  width: 20px; height: 9px; border-radius: 3px;
  background: #fff; border: 1.5px solid var(--ca-key-edge); transition: background .2s, border-color .2s;
}
.completiondots i.done { background: var(--ca-mint); border-color: var(--ca-ink); }

/* ---------- 質問（きっかけ） ---------- */
.wizard .sourcechoice, .wizard .sourcechoice.on {
  border: 2px solid transparent; background: #fff; color: var(--ca-ink);
  padding: 8px 10px;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.sourcequestion {
  position: relative; display: flex; align-items: center; justify-content: flex-start; gap: 7px;
  margin-left: -7px; width: calc(100% + 7px);
  padding: 6px 12px 6px 7px; border-radius: 999px;
  background: var(--ca-ink); color: #fff; font-weight: 800; text-align: left;
}
.sourcequestion::before {
  content: 'Q'; display: inline-grid; place-items: center; flex-shrink: 0; order: 0;
  width: 21px; height: 21px; border-radius: 50%;
  background: var(--ca-yellow); color: var(--ca-ink);
  font: 900 12px/1 "Avenir Next", "Hiragino Sans", sans-serif;
}
.sourcequestion::after {
  content: ''; position: absolute; left: 42px; bottom: -6px;
  border: 7px solid transparent; border-bottom: 0; border-top-color: var(--ca-ink);
}
.sourcetext { order: 1; }
.wizard .sourcechoice.done .sourcequestion::before { background: var(--ca-mint); }
#sourceCheck { order: -1; margin: 0; }
.wizard .sourcechoice:not(.done) #sourceCheck {
  background: #27355d; border-color: #6f7fa8;
}
.wizard .sourcechoice.locked #sourceCheck {
  background: #b1b8ca; border-color: #d7dce9;
}

.sourceoptions button {
  position: relative;
  border: 2px solid var(--ca-line); background: #fff; color: var(--ca-ink-2);
  box-shadow: var(--ca-key);
  transition: transform .08s, box-shadow .08s, background .15s, border-color .15s;
}
.sourceoptions button:hover:not(:disabled) { border-color: var(--ca-key-edge); }
.sourceoptions button strong { color: var(--ca-ink); font-weight: 900; }
.sourceoptions button span { font-weight: 650; }
.sourceoptions button:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.sourceoptions #sourceYes[aria-pressed="true"] {
  background: var(--ca-yellow); border: 2.5px solid var(--ca-ink); color: var(--ca-ink);
  box-shadow: var(--ca-hard-sm);
}
.sourceoptions #sourceNo[aria-pressed="true"] {
  background: var(--ca-pink); border: 2.5px solid var(--ca-ink); color: #fff;
  box-shadow: var(--ca-hard-sm);
}
.sourceoptions #sourceYes[aria-pressed="true"] strong { color: var(--ca-ink); }
.sourceoptions #sourceNo[aria-pressed="true"] strong { color: #fff; text-shadow: 0 1.5px 0 var(--ca-pink-deep); }
/* おすすめ獲得: ピンクのしぶき＋星（飾り） */
.sourceoptions #sourceNo[aria-pressed="true"]::before {
  content: ''; position: absolute; top: -11px; right: -7px; width: 34px; height: 30px;
  background:
    radial-gradient(circle at 55% 55%, var(--ca-pink) 0 8px, transparent 8.5px),
    radial-gradient(circle at 92% 18%, var(--ca-pink) 0 3px, transparent 3.5px),
    radial-gradient(circle at 18% 12%, var(--ca-pink) 0 2.5px, transparent 3px),
    radial-gradient(circle at 96% 78%, var(--ca-pink) 0 2px, transparent 2.5px);
  animation: ca-pop .4s cubic-bezier(.3, 1.6, .5, 1) both;
}
.sourceoptions #sourceNo[aria-pressed="true"]::after {
  content: ''; position: absolute; top: -8px; right: 2px; width: 18px; height: 18px;
  background: var(--ca-yellow); clip-path: var(--ca-star);
  filter: drop-shadow(0 1.5px 0 var(--ca-ink));
  animation: ca-twinkle .45s cubic-bezier(.3, 1.6, .5, 1) .05s both;
}
@keyframes ca-twinkle { from { transform: scale(0) rotate(-40deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes ca-pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- 各段（箱は細く、見出しで区切る） ---------- */
.fieldblock { border: 2px solid transparent; padding: 8px 10px; }
.fieldheading { gap: 7px; }
.fieldheading h2 { color: var(--ca-ink); font-weight: 900; }
.fieldnumber {
  border: 0; background: var(--ca-ink); color: #fff;
  font-weight: 800; font-family: "Avenir Next", sans-serif;
}
.fieldblock.next .fieldnumber { background: var(--ca-ink); color: var(--ca-yellow); }
.fieldblock.done .fieldnumber { background: var(--ca-mint); color: var(--ca-ink); }
.fieldnote { color: #e5222f; font-weight: 800; }
.fieldcheck, .stepcheck {
  display: inline-grid; place-items: center; flex-shrink: 0; margin-left: 0;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 2px solid #cfd6e6; box-shadow: none;
  color: transparent; text-shadow: none;
  font-size: 11px; font-weight: 900; line-height: 1;
  opacity: 1; transform: scale(1);
  transition: background .16s, border-color .16s, color .16s, transform .2s cubic-bezier(.3, 1.6, .5, 1);
}
.locked .fieldcheck {
  background: #f5f7fb; border-color: #e0e5f0; color: transparent;
}
.fieldblock.done .fieldcheck,
.stafftrigger.done #staffCheck,
.wizard .sourcechoice.done #sourceCheck {
  opacity: 1; transform: scale(1);
  background: var(--ca-mint); border: 2px solid var(--ca-ink);
  box-shadow: 0 2px 0 var(--ca-ink);
  color: #fff; text-shadow: 0 1px 0 var(--ca-mint-deep);
}
.stafftrigger .staffchange { margin-left: auto; }
.fieldblock.done .fieldcheck.just-done,
.stafftrigger.done #staffCheck.just-done,
.wizard .sourcechoice.done #sourceCheck.just-done {
  animation: ca-stamp .42s cubic-bezier(.3, 1.6, .5, 1) both;
}
@keyframes ca-stamp {
  0% { opacity: 0; transform: scale(1.75) rotate(-14deg); }
  60% { opacity: 1; transform: scale(.86) rotate(4deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

/* ---------- 未選択のキー: 細線＋白（数字を先に読ませる） ---------- */
.visualplan, .peoplegrid button, .timechoice {
  border: 2px solid var(--ca-line); box-shadow: var(--ca-key);
  transition: transform .08s, box-shadow .08s, background .15s, border-color .15s;
}
.peoplegrid button, .timechoice { background: #fff; }
.peoplegrid button:hover:not(:disabled):not(.selected),
.timechoice:hover:not(:disabled):not(.selected) { border-color: var(--ca-key-edge); background: #fafbfe; }
.visualplan:active:not(:disabled), .peoplegrid button:active:not(:disabled), .timechoice:active:not(:disabled) {
  transform: translateY(2px); box-shadow: none;
}
.peoplegrid strong { color: var(--ca-ink); font-weight: 800; }
.peoplegrid .otherpeople .otherlabel { color: var(--ca-ink-2); font-weight: 800; }
.timechoice strong { color: var(--ca-ink); font-weight: 800; }
.timechoice span { color: var(--ca-ink-2); font-weight: 700; }

/* 選択中: 基本はイエロー統一（プラン固有色とおすすめピンクは特別色として維持） */
.peoplegrid button.selected {
  background: var(--ca-yellow); border: 2.5px solid var(--ca-ink); color: var(--ca-ink);
  box-shadow: var(--ca-hard-sm);
}
.peoplegrid button.selected strong, .peoplegrid .otherpeople.selected .otherlabel { color: var(--ca-ink); text-shadow: none; }
.peoplegrid .otherpeople.selected span { color: var(--ca-ink-2); }
.timechoice.selected {
  background: var(--ca-yellow); border: 2.5px solid var(--ca-ink); color: var(--ca-ink);
  box-shadow: var(--ca-hard-sm);
}
.timechoice.selected strong { color: var(--ca-ink); }
.timechoice.selected span { color: var(--ca-ink-2); }

/* プラン: 未選択は淡色、選択でアーケード色に */
.visualplan strong { font-weight: 900; }
.visualplan.light:not(.selected) { background: var(--ca-orange-soft); border-color: #ffd0a8; color: #b44a00; box-shadow: 0 2px 0 #ffd0a8; }
.visualplan.basic:not(.selected) { background: var(--ca-cyan-soft); border-color: #a9e6f4; color: #0a6c84; box-shadow: 0 2px 0 #a9e6f4; }
.visualplan.premium:not(.selected) { background: #f3f2f6; border-color: #e3d39f; color: var(--ca-ink); box-shadow: 0 2px 0 #e3d39f; }
.visualplan:not(.selected) .planart { opacity: .7; filter: saturate(.85); }
.visualplan.selected { border: 3px solid var(--ca-ink); box-shadow: var(--ca-hard); }
.visualplan.light.selected { background: var(--ca-orange); color: #fff; --drink: #ffd23f; --glow: #ffe88f; }
.visualplan.light.selected strong { text-shadow: 0 2px 0 var(--ca-ink); }
.visualplan.basic.selected { background: var(--ca-cyan); color: var(--ca-ink); --drink: #ffffff; --glow: #ffffff; }
.visualplan.premium.selected {
  background: var(--ca-ink); color: var(--ca-gold);
  box-shadow: inset 0 0 0 3px var(--ca-ink), inset 0 0 0 5px var(--ca-gold), var(--ca-hard);
}
.pickmark { background: #fff; color: var(--ca-ink); border: 2px solid var(--ca-ink); font-weight: 900; box-shadow: none; }
.visualplan.premium.selected .pickmark { background: var(--ca-gold); }

/* ---------- まだ押せない段 ---------- */
.fieldblock.locked, .wizard .sourcechoice.locked { background: #f6f7fb; border-color: transparent; box-shadow: none; }
.locked .fieldheading h2 { color: #9aa3b8; }
.wizard .sourcechoice.locked .sourcequestion { background: #c5cbda; color: #fff; }
.wizard .sourcechoice.locked .sourcequestion::after { border-top-color: #c5cbda; }
.wizard .sourcechoice.locked .sourcequestion::before { background: #e7eaf2; color: #9aa3b8; }
.locked .fieldnote { color: #eb9aa1; }
.locked .fieldnumber { background: #d3d8e4; color: #fff; }
#wizard .locked button:disabled,
#wizard .locked .visualplan:disabled {
  background: #fbfbfd; border: 2px solid #e6e9f1; color: #a5adc0; box-shadow: none; transform: none;
}
#wizard .locked button:disabled strong,
#wizard .locked button:disabled span,
#wizard .locked .otherpeople .otherlabel { color: #a5adc0; text-shadow: none; }
#wizard .locked .visualplan .planart { opacity: .35; filter: grayscale(.7); }
#wizard .locked .pickmark, #wizard .sourcechoice.locked #sourceNo::before, #wizard .sourcechoice.locked #sourceNo::after { display: none; }

/* ---------- 次の組 / 保存 ---------- */
.basket:empty { display: none; margin: 0; }
.basket:not(:empty) { margin-top: 14px; }
.add {
  margin-top: 16px;
  border: 2px solid var(--ca-key-edge); background: #fff; color: var(--ca-ink); font-weight: 800;
  box-shadow: var(--ca-key); transition: transform .08s, box-shadow .08s, border-color .15s;
}
.add:hover:not(:disabled) { border-color: var(--ca-ink); }
.add:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.add:disabled { border: 2px dashed #dfe3ec; color: #a5adc0; background: #f7f8fb; box-shadow: none; }

.savebar, .savebar.ready {
  display: block; margin-top: 16px; padding: 0; border: 0; background: transparent; box-shadow: none;
  animation: none;
}
.savebar span { margin: 0; color: inherit; }
.savewrap {
  display: block; width: 100%;
  padding: 4px 4px 9px 4px; margin: 0;
  border-radius: 22px; border: 2.5px solid transparent;
  transition: border-color .15s, box-shadow .15s;
}
@keyframes ca-save-pulse {
  0%, 100% {
    border-color: #7ee8c1;
    box-shadow: 0 0 0 1px #2fd69a28, 0 0 3px #2fd69a18;
  }
  50% {
    border-color: var(--ca-mint-deep);
    box-shadow: 0 0 0 4.5px #ffd23fd4, 0 0 22px #2fd69a99;
  }
}
.savebar.ready .savewrap {
  border: 2.5px solid var(--ca-mint-deep); background: #fff;
  box-shadow: 0 0 0 4px #ffd23fd0, 0 0 20px #2fd69a88;
  animation: ca-save-pulse 1.05s ease-in-out infinite;
}
.savebar .primary.savecardbtn {
  -webkit-appearance: none; appearance: none;
  display: block; width: 100%; min-width: 0; min-height: 0; padding: 0; margin: 0;
  font: inherit; border-radius: 17px; overflow: hidden; letter-spacing: normal; text-align: center;
  transition: transform .08s, box-shadow .08s, filter .15s;
}
.savebar .primary.savecardbtn:disabled {
  opacity: 1; background: #eceff5; border: 2px solid #d7dde9; color: #8c95ab;
  box-shadow: none; animation: none; cursor: default;
}
.savebar .primary.savecardbtn:not(:disabled),
.savebar.ready .primary.savecardbtn:not(:disabled) {
  background: transparent;
  border: 3px solid var(--ca-ink); color: #fff;
  box-shadow: 0 5px 0 var(--ca-ink);
  animation: none;
}
.savebar .primary.savecardbtn:active:not(:disabled) {
  transform: translateY(4px); box-shadow: 0 1px 0 var(--ca-ink);
}
.savecard-inner {
  display: flex; flex-direction: column; align-items: stretch;
  width: 100%; margin: 0; border-radius: 14px; overflow: hidden;
}
.savecard-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 0;
  width: 100%; box-sizing: border-box; margin: 0; padding: 8px 14px;
  background: #f5f7fb; border-bottom: 2px solid #dfe4ef;
}
.savebar.ready .savecard-head {
  background: #dff9ee; border-bottom: 2.5px solid var(--ca-ink);
}
.savebar .savesum-item {
  display: inline-flex; align-items: center; margin: 0; padding: 0 11px;
  color: #7c869d; font-size: 13px; font-weight: 850; line-height: 1.3; white-space: nowrap;
}
.savebar.ready .savesum-item { color: var(--ca-ink); }
.savebar .savesum-item + .savesum-item { border-left: 1.5px solid #cfd6e4; }
.savebar.ready .savesum-item + .savesum-item { border-left: 1.5px solid #96d8bc; }
.savebar .savesum-item.bold { font-weight: 900; }
.savebar .savesum-item.muted { font-weight: 750; color: #8f98ae; }
.savebar .savesum-item b {
  font-size: 16px; font-weight: 900; color: #6c768e; margin: 0 1px;
  font-variant-numeric: tabular-nums;
}
.savebar.ready .savesum-item b { color: var(--ca-ink); }
.savecard-body {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; box-sizing: border-box; margin: 0; padding: 9px 16px;
  background: #eceff5;
}
.savebar.ready .savecard-body {
  background: linear-gradient(180deg, #43e5ab 0%, var(--ca-mint) 55%, #19bf85 100%);
}
.savearrows-up {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 18px; height: 28px; margin: 0; flex-shrink: 0;
}
.savearrows-up i {
  display: block; width: 7.5px; height: 7.5px; margin: -.5px 0;
  border-top: 2.5px solid #fff; border-left: 2.5px solid #fff;
  transform: rotate(45deg); opacity: .28;
  animation: ca-arrow-up 1.08s ease-in-out infinite;
}
.savearrows-up i:nth-child(3) { animation-delay: 0s; }
.savearrows-up i:nth-child(2) { animation-delay: .16s; }
.savearrows-up i:nth-child(1) { animation-delay: .32s; }
@keyframes ca-arrow-up {
  0%, 100% { opacity: .26; transform: translateY(2px) rotate(45deg) scale(.88); border-color: #ffffffcc; }
  45% { opacity: 1; transform: translateY(-2.5px) rotate(45deg) scale(1.18); border-color: var(--ca-yellow); filter: drop-shadow(0 0 5px #ffd23fe0); }
}
.savebar .savecard-lead {
  font-size: 14.5px; font-weight: 900; color: #fff;
  text-shadow: 0 1.5px 0 var(--ca-mint-deep); letter-spacing: .04em; white-space: nowrap;
}
.savebar .savecard-cta {
  font-size: 21px; font-weight: 900; letter-spacing: .12em; line-height: 1.05;
  color: #9ba4b8; text-shadow: none;
}
.savebar.ready .savecard-cta {
  color: #fff; text-shadow: 0 2px 0 var(--ca-mint-deep);
}

/* ---------- 一時保存の組 ---------- */
.basketrow { border: 2px solid var(--ca-line); background: #fff; box-shadow: 0 2px 0 var(--ca-line); }
.basketnumber { color: var(--ca-orange-deep); font: 900 13px "Avenir Next", sans-serif; font-variant-numeric: tabular-nums; }
.basketedit strong { color: var(--ca-ink); font-weight: 900; }
.suggestdot { background: var(--ca-pink-soft); color: var(--ca-pink-deep); font-weight: 800; }
.basketremove:hover { color: var(--ca-pink-deep); }

/* プラン色のバッジ（入力・履歴共通） */
.badge { font-weight: 800; }
.badge.light { background: var(--ca-orange-soft); color: #b44a00; }
.badge.basic { background: var(--ca-cyan-soft); color: #0a6c84; }
.badge.premium { background: var(--ca-ink); color: var(--ca-gold); }

/* ---------- 合言葉認証ゲート ---------- */
.authgate {
  min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px;
}
.authcard {
  width: min(100%, 380px); padding: 28px 22px 24px; text-align: center;
  border-radius: 24px; border: 3px solid var(--ca-ink); background: #fff;
  box-shadow: 0 7px 0 var(--ca-ink), 0 22px 50px #1c254122;
}
.authbrand {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.authbrand > div { display: flex; align-items: center; gap: 6px; }
.authbrand strong { font-size: 22px; font-weight: 900; color: var(--ca-ink); }
.authbrand span {
  font-size: 12px; font-weight: 900; padding: 3px 9px; border-radius: 9px;
  background: var(--ca-yellow); border: 2px solid var(--ca-ink); color: var(--ca-ink);
  box-shadow: 0 2px 0 var(--ca-ink);
}
.authcard h2 { margin: 0 0 6px; font-size: 20px; font-weight: 900; color: var(--ca-ink); }
.authlead { margin: 0 0 18px; font-size: 12.5px; font-weight: 750; color: var(--ca-ink-2); line-height: 1.5; }
.authform { display: grid; gap: 10px; }
.authform input {
  min-height: 48px; text-align: center; font-size: 18px; font-weight: 850; letter-spacing: .18em;
  border: 2.5px solid var(--ca-ink); border-radius: 14px; background: #f8fafe; color: var(--ca-ink);
}
.authform input:focus { outline: 0; background: #fff; box-shadow: 0 0 0 4px #ffd23f80; }
.authform .primary {
  min-height: 48px; border-radius: 999px; font-size: 16px; font-weight: 900;
  background: linear-gradient(180deg, #ffe26a 0%, #ffd026 100%);
  border: 2.5px solid var(--ca-ink); color: var(--ca-ink); box-shadow: 0 4px 0 var(--ca-ink);
}
.authform .primary:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--ca-ink); }
.autherror {
  margin: 12px 0 0; padding: 8px 10px; border-radius: 10px;
  background: #fff0f2; border: 1.5px solid #f7b2be; color: #c40f3a; font-size: 12px; font-weight: 850;
}

/* ---------- 集計 / 履歴 ---------- */
.sumheader {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 10px;
}
.subtabs {
  display: inline-grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  border-radius: 14px; background: #fff; border: 2.5px solid var(--ca-ink); box-shadow: var(--ca-hard-sm);
}
.subtabs button {
  min-height: 36px; min-width: 96px; padding: 0 14px; border: 0; border-radius: 10px;
  font-size: 13px; font-weight: 900; color: var(--ca-ink-2); background: transparent;
}
.subtabs button.active {
  background: var(--ca-yellow); color: var(--ca-ink);
  border: 2px solid var(--ca-ink); box-shadow: 0 2px 0 var(--ca-ink);
}
.summarytop h2 { color: var(--ca-ink); font-weight: 900; }
.refreshbtn {
  border: 2px solid var(--ca-key-edge); background: #fff; color: var(--ca-ink); font-weight: 800;
  box-shadow: var(--ca-key); transition: transform .08s, box-shadow .08s, border-color .15s;
}
.refreshbtn:hover { border-color: var(--ca-ink); }
.refreshbtn:active { transform: translateY(2px); box-shadow: none; }
.filters { gap: 4px; padding: 4px; border-radius: 14px; background: #fff; border: 2px solid var(--ca-line); margin-bottom: 12px; }
.filters button { min-height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--ca-ink-2); font-weight: 800; }
.filters button:not(.active):hover { background: var(--ca-yellow-soft); }
.filters button.active { background: var(--ca-ink); color: #fff; }

.sheetcard, .storecard {
  background: #fff; border: 3px solid var(--ca-ink); border-radius: 22px;
  padding: 14px 14px 16px; box-shadow: 0 6px 0 var(--ca-ink);
}
.sheetcap {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 10px; padding: 0 4px;
}
.sheetcap h3 { margin: 0; font-size: 14px; font-weight: 900; color: var(--ca-ink); }
.sheetcap span { font-size: 11px; font-weight: 800; color: var(--ca-ink-2); }
.sheettbl { border: 2px solid var(--ca-ink); border-radius: 14px; overflow: hidden; }
.srow {
  display: grid;
  grid-template-columns: minmax(84px, 1.05fr) minmax(88px, 1.02fr) minmax(94px, 1.1fr) 48px 48px 48px 22px;
  align-items: center; width: 100%; border: 0; border-radius: 0; text-align: left;
  background: #fff; color: var(--ca-ink); padding: 0; min-height: 46px;
  font-variant-numeric: tabular-nums;
}
.srow.shead {
  min-height: 34px; background: #e8eef6; border-bottom: 2px solid var(--ca-ink);
  font-size: 11px; font-weight: 900; color: var(--ca-ink); cursor: default;
}
.srow.sitem { border-bottom: 1px solid #e3e8f2; cursor: pointer; transition: background .12s; }
.srow.sitem:last-child { border-bottom: 0; }
.srow.sitem:nth-child(odd):not(.is-me) { background: #fbfcfe; }
.srow.sitem.is-me { background: #fff9d6; }
.srow.sitem:hover { background: #f2f6fd; }
.srow > span {
  padding: 8px 6px; display: flex; align-items: center; height: 100%;
  border-right: 1px solid #e7ebf4;
}
.srow.shead > span { padding: 5px 6px; justify-content: center; border-right: 1px solid #d1dae8; }
.srow.shead > span:first-child { justify-content: flex-start; padding-left: 10px; }
.srow > span:last-child { border-right: 0; justify-content: center; }
.scol-name {
  padding-left: 10px !important; gap: 5px; font-size: 13.5px; font-weight: 900; color: var(--ca-ink);
  white-space: nowrap; overflow: hidden;
}
.scol-nametxt { overflow: hidden; text-overflow: ellipsis; }
.scol-me {
  flex-shrink: 0; font-size: 9.5px; font-weight: 900; padding: 1px 5px; border-radius: 6px;
  background: var(--ca-yellow); border: 1.5px solid var(--ca-ink);
}
.scol-tot {
  justify-content: center; gap: 3px; font-size: 13.5px; font-weight: 900; color: var(--ca-ink);
}
.scol-tot small { font-size: 10.5px; font-weight: 800; color: var(--ca-ink-2); }
.scol-sug {
  justify-content: center; gap: 3px; background: #fff2f8;
  font-weight: 900; font-size: 14px; color: var(--ca-pink-deep);
}
.shead .scol-sug { background: #ffd8eb; color: #9c0750; }
.scol-sug small { font-size: 10.5px; font-weight: 800; color: var(--ca-ink-2); }
.scol-plan { justify-content: center; font-size: 12.5px; font-weight: 850; }
.scol-plan.l { background: #fff7ef; color: #b44a00; }
.scol-plan.b { background: #effafd; color: #0a6c84; }
.scol-plan.p { background: #f2f3f8; color: var(--ca-ink); }
.shead .scol-plan.l { background: #ffe4ca; color: #8c3800; }
.shead .scol-plan.b { background: #cdeff8; color: #085164; }
.shead .scol-plan.p { background: #263254; color: #f6d57a; }
.scol-go { font-size: 15px; font-weight: 900; color: #96a2b8; }
.srow.is-me .scol-go { color: var(--ca-ink); }

/* 個人カードモーダル＆店舗全体サマリー共通カード */
dialog.staffcardmodal {
  width: min(calc(100vw - 28px), 440px); padding: 20px 20px 18px; text-align: left;
}
.scm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.scm-who { display: flex; align-items: center; gap: 10px; }
.scm-ava {
  width: 36px; height: 36px; border-radius: 50%; background: var(--ca-yellow);
  border: 2.5px solid var(--ca-ink); display: grid; place-items: center;
  font-size: 15px; font-weight: 900; color: var(--ca-ink); box-shadow: 0 2px 0 var(--ca-ink);
}
.scm-who h2 { margin: 0; font-size: 20px; font-weight: 900; color: var(--ca-ink); }
.scm-period { font-size: 11px; font-weight: 850; color: var(--ca-ink-2); }
.scm-close {
  width: 36px; min-height: 36px; border-radius: 50%; border: 2px solid var(--ca-line);
  background: #fff; font-size: 20px; font-weight: 900; color: var(--ca-ink-2);
}
.scm-close:hover { border-color: var(--ca-ink); color: var(--ca-ink); }
.myhero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; margin-bottom: 12px; }
.herobox-sug {
  padding: 12px 14px; border-radius: 16px;
  background: linear-gradient(145deg, #fff2f8 0%, #ffe0ef 100%);
  border: 2.5px solid var(--ca-ink); box-shadow: 0 4px 0 var(--ca-ink);
}
.herobox-lbl {
  display: inline-flex; padding: 2px 9px; border-radius: 999px;
  background: var(--ca-pink); color: #fff; font-size: 11px; font-weight: 900;
  border: 1.5px solid var(--ca-ink);
}
.herobox-num { display: flex; align-items: baseline; gap: 6px; margin-top: 7px; }
.herobox-num strong { font-size: 32px; font-weight: 900; color: var(--ca-pink-deep); line-height: 1; }
.herobox-num small { font-size: 12.5px; font-weight: 900; color: var(--ca-ink); }
.herobox-sub { font-size: 11px; font-weight: 800; color: var(--ca-ink-2); margin-top: 5px; }
.herobox-tot {
  padding: 12px 13px; border-radius: 16px;
  background: #f8fafe; border: 2px solid var(--ca-line);
  display: flex; flex-direction: column; justify-content: space-between;
}
.herobox-tot-lbl { font-size: 11.5px; font-weight: 900; color: var(--ca-ink-2); }
.herobox-tot-val { font-size: 25px; font-weight: 900; color: var(--ca-ink); line-height: 1.1; }
.herobox-tot-val small { font-size: 12px; margin-left: 2px; font-weight: 800; color: var(--ca-ink-2); }
.herobox-sub2 { font-size: 11px; font-weight: 800; color: var(--ca-ink-2); }
.plancard-ca {
  background: #fff; border: 2px solid var(--ca-line); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 12px;
}
.storecard .plancard-ca { margin-bottom: 0; }
.plancard-ca h3 { margin: 0 0 8px; font-size: 13px; font-weight: 900; color: var(--ca-ink); }
.pbar-row { margin-bottom: 8px; }
.pbar-row:last-child { margin-bottom: 0; }
.pbar-top { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 850; margin-bottom: 4px; color: var(--ca-ink); }
.pbar-top .pcode-badge { margin-right: 6px; padding: 2px 6px; border-radius: 6px; font-size: 10px; font-weight: 900; }
.pbar-track { height: 9px; border-radius: 999px; background: #eef2f8; overflow: hidden; }
.pbar-track i { display: block; height: 100%; border-radius: 999px; }
.stampbox {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 9px 11px; border-radius: 12px; background: #fffbe8; border: 2px dashed #e7c95c;
}
.stamp-title { font-size: 11px; font-weight: 900; color: #8c6900; margin-right: 2px; }
.stamp {
  display: inline-flex; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 900;
  background: var(--ca-yellow); border: 2px solid var(--ca-ink); color: var(--ca-ink);
  box-shadow: 0 2px 0 var(--ca-ink);
}
.stamp.next { background: #fff; border-style: dashed; border-color: #c7b887; color: #8b7b4e; box-shadow: none; }

.card, .historyrow { border: 2px solid var(--ca-line); box-shadow: 0 2px 0 var(--ca-line); }
.sectionhead h3 { color: var(--ca-ink); font-weight: 900; }
.historyrow strong { font-weight: 900; }
.historyrow button {
  border: 2px solid var(--ca-key-edge); background: #fff; color: var(--ca-ink); font-weight: 800;
  box-shadow: var(--ca-key);
}
.historyrow button:hover { border-color: var(--ca-ink); }
.historyrow button:active { transform: translateY(2px); box-shadow: none; }
.historyrow.deleted { background: #f2f3f8; }
.historydate input { border: 2px solid var(--ca-line); color: var(--ca-ink); font-weight: 800; }
.historydate label { color: var(--ca-ink-2); font-weight: 800; }

/* ---------- ダイアログ（主役: 太枠＋押しボタン影） ---------- */
dialog, dialog.savedmodal, dialog.peopledialog, dialog.staffdialog, dialog.gasdialog {
  border: 3px solid var(--ca-ink); background: #fff;
  box-shadow: 0 7px 0 var(--ca-ink), 0 26px 60px #1c254133;
}
dialog::backdrop, .savedmodal::backdrop, .peopledialog::backdrop { background: #1c25416b; backdrop-filter: blur(3px); }
dialog h2 { color: var(--ca-ink); font-weight: 900; }
.dialoghead button {
  border: 2px solid var(--ca-line); background: #fff; color: var(--ca-ink-2); font-weight: 800;
}
.dialoghead button:hover { border-color: var(--ca-ink); color: var(--ca-ink); }
.staffoption, .calckey {
  border: 2px solid var(--ca-line); background: #fff; color: var(--ca-ink);
  box-shadow: var(--ca-key); font-weight: 800;
  transition: transform .08s, box-shadow .08s, background .12s, border-color .12s;
}
.staffoption:hover { background: var(--ca-yellow-soft); border-color: var(--ca-yellow-edge); }
.calckey:hover { border-color: var(--ca-key-edge); }
.staffoption:active, .calckey:active { transform: translateY(2px); box-shadow: none; }
/* 人数電卓: スコア表示風の画面 */
.calcbadge { background: var(--ca-pink); color: #fff; border: 2px solid var(--ca-ink); font-weight: 900; }
.calcdisplay { border: 3px solid var(--ca-ink); background: var(--ca-ink); box-shadow: inset 0 2px 10px #00000040; }
.calcvalue { color: var(--ca-yellow); font-weight: 900; }
.calcvalue[data-empty="true"] { color: #6f7a9b; }
.calcunit { color: #c9d0e3; font-weight: 800; }
.calckey.is-clear { background: var(--ca-pink-soft); border-color: #ffc2df; color: var(--ca-pink-deep); }
.calckey.is-back { background: #f1f3f8; border-color: var(--ca-line); color: var(--ca-ink-2); }
.calcreset { border: 2px solid var(--ca-line); background: #fff; color: var(--ca-ink-2); font-weight: 800; }
.calcactions .primary:not(:disabled) {
  background: var(--ca-pink); border: 3px solid var(--ca-ink); color: #fff; font-weight: 900;
  text-shadow: 0 1.5px 0 var(--ca-pink-deep); box-shadow: var(--ca-hard);
}
.gasdialog .dialogactions .primary {
  background: var(--ca-ink); border: 3px solid var(--ca-ink); color: #fff; font-weight: 900;
  box-shadow: 0 4px 0 #0b1024;
}
.savedactions { display: flex; align-items: center; gap: 10px; }
.savedactions .primary { flex: 1; min-width: 0; }
.savedmodal .primary {
  border-radius: 999px; font-weight: 900;
  background: linear-gradient(180deg, #ffe26a 0%, #ffd026 100%);
  border: 2.5px solid var(--ca-ink); color: var(--ca-ink);
  box-shadow: 0 3px 0 var(--ca-ink);
}
.savedmodal .primary:disabled {
  background: #f1f4fa; border: 2px solid #d5dceb; color: #8c96ae;
  box-shadow: none; font-weight: 800; opacity: 1;
}
.calcactions .primary, .savedmodal .primary, .gasdialog .dialogactions .primary { transition: transform .08s, box-shadow .08s; }
.calcactions .primary:disabled { background: #eceff5; border: 2px solid #dde1ea; color: #a1a9bc; box-shadow: none; }
.calcactions .primary:not(:disabled):active, .savedmodal .primary:not(:disabled):active, .gasdialog .dialogactions .primary:active {
  transform: translateY(3px); box-shadow: 0 0 0 var(--ca-ink);
}
.savedmodal .secondary { border: 2px solid var(--ca-key-edge); background: #fff; color: var(--ca-ink); font-weight: 800; box-shadow: var(--ca-key); }
.savedmodal .secondary.sheetsbtn {
  width: 52px; height: 52px; min-width: 52px; min-height: 52px; padding: 0;
  display: grid; place-items: center; flex-shrink: 0; border-radius: 50%;
  border: 2.5px solid var(--ca-ink); background: #fff; color: #1f8a55;
  box-shadow: 0 3px 0 var(--ca-ink); transition: transform .08s, box-shadow .08s, background .14s;
}
.savedmodal .secondary.sheetsbtn:hover { background: #f0fbf5; border-color: var(--ca-ink); }
.savedmodal .secondary.sheetsbtn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ca-ink); }
.savedmodal .secondary.sheetsbtn svg { width: 22px; height: 22px; display: block; }
.dialogactions button:not(.primary):not(.danger) { border: 2px solid var(--ca-key-edge); background: #fff; color: var(--ca-ink); font-weight: 800; }
.danger { background: #d8303a; border: 3px solid var(--ca-ink); color: #fff; font-weight: 900; box-shadow: var(--ca-hard-sm); }
.gasdialog input[type="url"] { border: 2px solid var(--ca-line); }

/* 保存中: グラデーションゲージ / 保存完了: チェックがポンっと出て輪が広がる */
.savedmodal { width: min(calc(100vw - 32px), 390px); padding: 26px 22px 22px; }
.savedicon { position: relative; margin-bottom: 14px; background: var(--ca-mint); color: var(--ca-ink); border: 3px solid var(--ca-ink); box-shadow: var(--ca-hard-sm); }
#savedDialog[data-state="saving"] .savedicon { display: none; }
#savedDialog[data-state="saving"] h2 { font-size: 18px; line-height: 1.35; letter-spacing: .01em; }
.savegauge {
  display: none; position: relative;
  width: 100%; height: 24px; margin: 8px auto 18px; padding: 3px;
  border-radius: 999px; border: 2.5px solid var(--ca-ink);
  background: #eef2f8; box-shadow: 0 3px 0 var(--ca-ink);
  overflow: hidden;
}
#savedDialog[data-state="saving"] .savegauge { display: block; }
.savegauge-fill {
  position: relative; display: block; height: 100%; width: 22%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff7a1a, #ffd23f, #2fd69a, #2ccbec, #f5228a, #ff7a1a);
  background-size: 220% 100%;
  animation: ca-gauge-charge 2.4s cubic-bezier(.22, .68, .28, 1) forwards, ca-gauge-flow 1.2s linear infinite;
}
.savegauge-fill::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(105deg, transparent 25%, #ffffffaa 50%, transparent 75%);
  background-size: 180% 100%;
  animation: ca-gauge-shine 1.1s linear infinite;
}
@keyframes ca-gauge-charge {
  0% { width: 14%; }
  45% { width: 68%; }
  100% { width: 92%; }
}
@keyframes ca-gauge-flow {
  0% { background-position: 0% 50%; }
  100% { background-position: -220% 50%; }
}
@keyframes ca-gauge-shine {
  0% { background-position: 180% 0; }
  100% { background-position: -120% 0; }
}
#savedDialog[data-state="saved"] .savedicon { animation: ca-pop .45s cubic-bezier(.3, 1.5, .5, 1) both; }
#savedDialog[data-state="saved"] .savedicon::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  border: 3px solid var(--ca-yellow);
  animation: ca-ring .8s ease-out .1s both;
}
#savedDialog[data-state="saved"] .checkicon path {
  stroke-dasharray: 30; stroke-dashoffset: 30;
  animation: ca-draw .4s ease-out .15s forwards;
}
@keyframes ca-ring { from { transform: scale(1); opacity: .9; } to { transform: scale(1.7); opacity: 0; } }
@keyframes ca-draw { to { stroke-dashoffset: 0; } }
.savedmodal p { color: var(--ca-ink-2); font-weight: 800; }
.savedsummary {
  display: grid; gap: 5px; margin: 14px 0 18px; padding: 11px 14px;
  border-radius: 14px; border: 1.5px solid #cde5da; background: #effbf5;
  text-align: left; max-height: 44dvh; overflow-y: auto;
}
.savedsum-line {
  display: grid; grid-template-columns: 56px 1fr; align-items: baseline; gap: 8px;
  font-size: 13px; line-height: 1.45;
}
.savedsum-lbl {
  font-size: 11px; font-weight: 900; color: var(--ca-mint-deep); white-space: nowrap;
}
.savedsum-val {
  font-weight: 850; color: var(--ca-ink);
}
.savedsum-sep {
  border-top: 1px dashed #b9decb; margin: 2px 0;
}
@media (max-width: 540px) {
  .savedmodal { padding: 22px 16px 18px; }
  #savedDialog[data-state="saving"] h2 { font-size: 16.5px; }
  .savedsummary { padding: 10px 12px; margin: 12px 0 16px; }
  .savedsum-line { grid-template-columns: 50px 1fr; font-size: 12px; gap: 6px; }
  .savedsum-lbl { font-size: 10.5px; }
}

#toast { border: 2px solid var(--ca-ink); box-shadow: var(--ca-hard-sm); font-weight: 800; }

/* ---------- 画面幅ごとの微調整 ---------- */
@media (max-width: 540px) {
  .brandmark { width: 32px; height: 32px; border-radius: 10px; }
  .brandmark svg { width: 24px; height: 24px; }
  .brandline .brandsub { font-size: 11px; padding: 2px 8px; }
  .brandline .scope { font-size: 9px; padding: 2px 7px; }
  .tabs { border-radius: 14px; }
  .datelabel, .stafflabel { padding: 2px 7px; }
  #wizard.wizard { margin-top: 16px; }
  .wizardhead > span:first-child { top: -15px; left: 10px; font-size: 12px; padding: 3px 10px; }
  .completiondots i { width: 15px; height: 8px; }
  .wizard .sourcechoice, .wizard .sourcechoice.on { padding: 8px 8px; }
  .fieldblock { padding: 8px 8px; }
  .sourcequestion { gap: 6px; padding: 5px 10px 5px 6px; margin-left: -6px; width: calc(100% + 6px); }
  .sourcequestion::before { width: 19px; height: 19px; font-size: 11px; }
  .fieldcheck, .stepcheck { width: 18px; height: 18px; font-size: 10px; }
  .stafftrigger { padding-left: 18px; }
  .add { margin-top: 14px; }
  .savebar, .savebar.ready { margin-top: 14px; padding: 0; }
  .savebar span { margin: 0; }
  .savewrap { margin: 0; padding: 3px 3px 8px 3px; border-radius: 20px; }
  .savecard-head { gap: 4px 14px; margin: 0; padding: 7px 10px; }
  .savebar .savesum-item,
  .savebar .savesum-item + .savesum-item,
  .savebar.ready .savesum-item + .savesum-item {
    border-left: 0; margin: 0; padding: 0; font-size: 12px;
  }
  .savebar .savesum-item b { font-size: 14px; }
  .savecard-body { margin: 0; padding: 9px 12px; gap: 8px; }
  .savebar .savecard-lead { font-size: 13px; }
  .savebar .savecard-cta { font-size: 19px; }
  .filters button { min-height: 36px; font-size: 12px; }
  .subtabs button { min-width: 78px; padding: 0 10px; font-size: 12px; }
  .sheetcard, .storecard { padding: 10px 8px 12px; border-radius: 18px; }
  .srow {
    grid-template-columns: minmax(68px, 1.05fr) minmax(56px, .9fr) minmax(64px, 1fr) 30px 30px 30px 14px;
    min-height: 42px;
  }
  .srow > span, .srow.shead > span { padding: 5px 3px; font-size: 10.5px; }
  .scol-name { padding-left: 7px !important; font-size: 11.5px !important; gap: 3px; }
  .scol-me { display: none; }
  .scol-tot, .scol-sug { flex-direction: column; gap: 0; line-height: 1.15; font-size: 12px !important; }
  .scol-tot small, .scol-sug small { font-size: 9px; }
  .scol-plan { font-size: 11px !important; }
  .scol-go { font-size: 12px !important; }
  .myhero-grid { grid-template-columns: 1fr; }
}
@media (min-width: 600px) {
  .brand { margin-bottom: 9px; }
}
@media (min-width: 600px) and (min-height: 920px) {
  #wizard.wizard { margin-top: 16px; }
  .add { margin-top: 14px; }
  .savebar, .savebar.ready { margin-top: 14px; }
  .brandline .brandsub { font-size: 14px; }
}

/* ---------- ドーパミン演出: 発光グロウ・光線シマー・キラキラ星・光の波紋 ---------- */
.just-picked {
  animation: ca-bounce .54s cubic-bezier(.22, 1.4, .36, 1) both;
}
@keyframes ca-bounce {
  0% { transform: scale(.92) translateY(2px); filter: brightness(1.08); }
  45% { transform: scale(1.06) translateY(-2px); filter: brightness(1.25); }
  100% { transform: scale(1) translateY(0); filter: brightness(1); }
}
.completiondots i.just-lit {
  animation: ca-bar-lit .65s cubic-bezier(.3, 1.5, .5, 1) both;
}
@keyframes ca-bar-lit {
  0% { transform: scaleY(.6) scaleX(.75); filter: brightness(1.6); }
  50% { transform: scaleY(1.55) scaleX(1.15); box-shadow: 0 0 14px #2fd69aee, 0 0 6px #fff; }
  100% { transform: scale(1); }
}
.arcfx-layer {
  position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden;
}
.arcfx-glowbox {
  position: fixed; overflow: hidden; pointer-events: none;
  border: 2.5px solid #fff;
  box-shadow: 0 0 18px var(--clr, #ffd23f), inset 0 0 16px #ffffffcc;
  animation: ca-glowbox .9s cubic-bezier(.16, 1, .3, 1) forwards;
}
@keyframes ca-glowbox {
  0% { opacity: .98; transform: scale(1); box-shadow: 0 0 26px var(--clr, #ffd23f), inset 0 0 22px #fff; }
  45% { opacity: .85; transform: scale(1.05); box-shadow: 0 0 34px var(--clr, #ffd23f), 0 0 10px #fff; }
  100% { opacity: 0; transform: scale(1.14); box-shadow: 0 0 0 transparent; }
}
.arcfx-shine {
  position: absolute; top: -40%; left: -75%; width: 55%; height: 180%;
  background: linear-gradient(105deg, transparent 20%, #ffffffb8 50%, transparent 80%);
  transform: skewX(-20deg);
  animation: ca-shine .68s cubic-bezier(.22, .61, .36, 1) forwards;
}
@keyframes ca-shine {
  0% { left: -75%; opacity: 0; }
  20% { opacity: 1; }
  100% { left: 140%; opacity: 0; }
}
.arcfx-dot {
  position: fixed; width: var(--sz, 12px); height: var(--sz, 12px);
  margin: calc(var(--sz, 12px) / -2) 0 0 calc(var(--sz, 12px) / -2);
  opacity: 0;
  animation: ca-burst 1.05s cubic-bezier(.16, .88, .32, 1) var(--delay, 0ms) forwards;
}
.arcfx-dot.is-orb {
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #fff 28%, var(--clr, #ffd23f) 65%, transparent 100%);
  box-shadow: 0 0 12px var(--clr, #ffd23f), 0 0 4px #fff;
}
.arcfx-dot.is-spark {
  background: radial-gradient(circle, #fff 0%, var(--clr, #ffd23f) 75%);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  filter: drop-shadow(0 0 6px var(--clr, #ffd23f)) drop-shadow(0 0 3px #fff);
}
@keyframes ca-burst {
  0% { opacity: 0; transform: translate(0, 0) scale(.35) rotate(0deg); }
  18% { opacity: 1; transform: translate(calc(var(--dx) * .38), calc(var(--dy) * .38)) scale(1.25) rotate(calc(var(--rot) * .3)); }
  65% { opacity: .9; transform: translate(calc(var(--dx) * .85), calc(var(--dy) * .85 + 6px)) scale(.95) rotate(calc(var(--rot) * .75)); }
  100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 14px)) scale(.15) rotate(var(--rot)); }
}
.arcfx-ring {
  position: fixed; width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border-radius: 50%; border: 3px solid #fff;
  box-shadow: 0 0 18px var(--clr, #ffd23f), inset 0 0 12px var(--clr, #ffd23f);
  animation: ca-fx-ring .9s cubic-bezier(.16, .84, .32, 1) forwards;
}
.arcfx-ring.is-outer {
  border: 2px solid var(--clr, #ffd23f);
  box-shadow: 0 0 24px var(--clr, #ffd23f);
  animation: ca-fx-ring 1.08s cubic-bezier(.16, .84, .32, 1) .08s forwards;
}
@keyframes ca-fx-ring {
  0% { opacity: .95; transform: scale(.35); }
  55% { opacity: .65; }
  100% { opacity: 0; transform: scale(2.7); }
}
.arcfx-pop {
  position: fixed; transform: translate(-50%, 0);
  padding: 3px 11px; border-radius: 999px;
  background: var(--pop-bg, #fff7b2); color: var(--ca-ink);
  border: 2px solid #fff;
  box-shadow: 0 0 16px #ffd23fcc, 0 3px 10px #1c254130;
  font: 900 12px/1.3 "Avenir Next", "Hiragino Sans", sans-serif;
  white-space: nowrap;
  animation: ca-pop-float 1.15s cubic-bezier(.2, 1.1, .35, 1) forwards;
}
@keyframes ca-pop-float {
  0% { opacity: 0; transform: translate(-50%, 6px) scale(.65); }
  20% { opacity: 1; transform: translate(-50%, -14px) scale(1.12); }
  75% { opacity: 1; transform: translate(-50%, -30px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -44px) scale(.92); }
}

/* 保存完了モーダル内 光のシャワー */
dialog.savedmodal { overflow: visible; }
.confettilayer {
  position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 2;
}
.confettipiece {
  position: absolute; left: 50%; top: 24%;
  opacity: 0;
  animation: ca-confetti 1.65s cubic-bezier(.15, .8, .3, 1) var(--delay, 0ms) forwards;
}
.confettipiece.is-orb {
  width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, var(--clr, #ffd23f) 65%, transparent 100%);
  box-shadow: 0 0 14px var(--clr, #ffd23f), 0 0 4px #fff;
}
.confettipiece.is-spark {
  width: 20px; height: 20px; margin: -10px 0 0 -10px;
  background: radial-gradient(circle, #fff 0%, var(--clr, #ffd23f) 78%);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  filter: drop-shadow(0 0 8px var(--clr, #ffd23f)) drop-shadow(0 0 3px #fff);
}
@keyframes ca-confetti {
  0% { opacity: 0; transform: translate(0, 0) scale(.35) rotate(0deg); }
  18% { opacity: 1; transform: translate(calc(var(--cx) * .52), calc(var(--cy) * .52)) scale(1.25) rotate(calc(var(--rot) * .3)); }
  78% { opacity: .92; transform: translate(var(--cx), calc(var(--cy) + 32px)) scale(.95) rotate(calc(var(--rot) * .8)); }
  100% { opacity: 0; transform: translate(var(--cx), calc(var(--cy) + 60px)) scale(.35) rotate(var(--rot)); }
}

@media (prefers-reduced-motion: reduce) {
  .stafftrigger.next, .fieldblock.next, .wizard .sourcechoice.next,
  .savebar.ready .savewrap, .savearrows-up i,
  .savegauge-fill, .savegauge-fill::after,
  .sourceoptions #sourceNo[aria-pressed="true"]::before,
  .sourceoptions #sourceNo[aria-pressed="true"]::after,
  .just-picked, .just-done, .just-lit,
  .arcfx-glowbox, .arcfx-shine, .arcfx-dot, .arcfx-ring, .arcfx-pop, .confettipiece,
  #savedDialog[data-state="saved"] .savedicon,
  #savedDialog[data-state="saved"] .savedicon::after,
  #savedDialog[data-state="saved"] .checkicon path { animation: none !important; }
  #savedDialog[data-state="saved"] .checkicon path { stroke-dashoffset: 0; }
}
