/* 管理画面（AdminLTE 3）のテーマ。色・フォントは LP とお客様向け画面（mypage.css）と揃える */
:root {
  --paper: #f5f8f6;
  --surface: #ffffff;
  --tint: #f1faf5;
  --ink: #17231d;
  --muted: #5b6d64;
  --line: #e2ebe6;
  --line-strong: #cfdcd5;
  --green: #0a8a45;
  --brand: #13ad5b;
  --green-deep: #0e8f4a;
  --green-soft: #e3f6ec;
  --stamp: #f2b01e;
  --stamp-soft: #fff4d6;
  --stamp-ink: #9a6700;
  --danger: #c2410c;
  --danger-soft: #fdebe1;
  --info: #2563eb;
  --info-soft: #e7efff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(23 35 29 / .04), 0 8px 24px -14px rgb(19 80 50 / .18);
  --font-display: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  --font-body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

/* ---- 土台 ---- */
body, .content-wrapper, .main-footer {
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
body { background: var(--paper); font-size: .95rem; }
.content-wrapper { background: var(--paper); }
a { color: var(--green); }
a:hover { color: var(--green-deep); }
.text-muted { color: var(--muted) !important; }
.text-red { color: var(--stamp-ink) !important; }
.text-primary { color: var(--green) !important; }
.text-danger { color: var(--danger) !important; }
.bg-primary { background-color: var(--brand) !important; }
hr { border-top-color: var(--line); }

/* ---- 上部バー ---- */
.main-header.navbar {
  background: rgb(255 255 255 / .85);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  min-height: 60px;
}
.main-header .nav-link { color: var(--muted); height: auto; padding-top: .7rem; padding-bottom: .7rem; }
.main-header .nav-link:hover { color: var(--ink); }
.main-header .dropdown-menu { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; }
.main-header .dropdown-item { border-radius: 8px; }

/* ---- サイドバー ---- */
.main-sidebar, .main-sidebar::before { background: var(--surface) !important; box-shadow: none !important; border-right: 1px solid var(--line); }
.brand-link {
  display: flex !important; align-items: center; gap: 10px;
  height: 60px; padding: 0 18px !important;
  border-bottom: 1px solid var(--line) !important;
  color: var(--ink) !important;
}
.brand-link .brand-image { float: none; margin: 0 !important; max-height: 34px; width: 34px; height: 34px; border-radius: 10px; box-shadow: none !important; opacity: 1 !important; }
.brand-link .brand-text { font: 900 1.15rem/1 var(--font-display) !important; letter-spacing: .02em; }
.sidebar { padding: 12px 10px; }
.nav-sidebar > .nav-item { margin-bottom: 2px; }
.nav-sidebar .nav-link {
  display: flex; align-items: center; gap: 4px;
  border-radius: var(--radius-sm) !important;
  padding: .62rem .85rem;
  color: var(--muted) !important; font-weight: 500;
  transition: background-color .12s ease, color .12s ease;
}
.nav-sidebar .nav-link .nav-icon { color: inherit; font-size: 1rem !important; width: 1.6rem; margin-right: .35rem !important; }
.nav-sidebar .nav-link p { color: inherit; }
.nav-sidebar .nav-link:hover { background: var(--tint) !important; color: var(--ink) !important; }
.nav-sidebar .nav-link.active, .sidebar-light-success .nav-sidebar > .nav-item > .nav-link.active {
  background: var(--green-soft) !important; color: var(--green) !important; box-shadow: none !important; font-weight: 700;
}
.nav-sidebar .nav-header { color: var(--muted); font-size: .72rem; letter-spacing: .08em; padding: 1rem .85rem .4rem; }
.sidebar-mini.sidebar-collapse .main-sidebar:not(:hover) .brand-link { padding: 0 13px !important; }

/* ---- ページ見出し ---- */
.content-wrapper > .content-header { padding: 28px var(--page-x, .5rem) 10px; }
.content-wrapper > .content { padding: 0 var(--page-x, .5rem) 40px; }
@media (min-width: 768px) { .content-wrapper { --page-x: 1.25rem; } }
.content-header h1 { font: 700 1.55rem/1.35 var(--font-body); letter-spacing: .01em; color: var(--ink); }
@media (max-width: 575px) { .content-header h1 { font-size: 1.3rem; } }
.content > .container-fluid > .container, .content .container { max-width: 1080px; margin-left: 0; padding-left: 0; padding-right: 0; }

/* ---- カード ---- */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}
.card-outline { border-top: 1px solid var(--line) !important; }
.card-header { background: transparent; border-bottom: 1px solid var(--line); padding: 1rem 1.25rem; }
.card-header h3, .card-header h4, .card-header h5, .card-title { font-weight: 700; font-size: 1.05rem; margin: 0; color: var(--ink); }
.card-body { padding: 1.25rem; }
.card-footer { background: var(--tint); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius) !important; padding: .85rem 1.25rem; }

/* ---- ボタン ---- */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 600;
  padding: .5rem 1rem;
  box-shadow: none !important;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease, transform .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: .35rem .75rem; font-size: .85rem; border-radius: 8px; }
.btn-lg { padding: .75rem 1.4rem; }
.btn-primary, .btn-success { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover, .btn-primary:focus, .btn-success:hover, .btn-success:focus,
.btn-primary:not(:disabled):not(.disabled):active { background: var(--green-deep) !important; border-color: var(--green-deep) !important; color: #fff; }
.btn-info, .btn-outline-primary { background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); }
.btn-info:hover, .btn-info:focus, .btn-outline-primary:hover { background: var(--tint) !important; border-color: var(--brand) !important; color: var(--green) !important; }
.btn-secondary, .btn-default { background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); }
.btn-secondary:hover, .btn-default:hover { background: var(--tint); color: var(--ink); border-color: var(--line-strong); }
.btn-danger { background: var(--surface); border: 1px solid #f3c7b2; color: var(--danger); }
.btn-danger:hover, .btn-danger:focus { background: var(--danger-soft) !important; border-color: var(--danger) !important; color: var(--danger) !important; }
.btn-warning { background: var(--stamp-soft); border-color: #f5d78a; color: var(--stamp-ink); }
.btn-link { color: var(--muted); font-weight: 500; }
.btn-link:hover { color: var(--ink); text-decoration: none; }
.btn-flat { border-radius: var(--radius-sm) !important; }

/* ---- フォーム ---- */
.form-control, .custom-select {
  height: calc(2.6rem + 2px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  padding: .5rem .85rem;
  transition: border-color .12s ease, box-shadow .12s ease;
}
textarea.form-control { height: auto; }
.form-control:focus, .custom-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
.form-control:disabled, .form-control[readonly] { background: var(--tint); }
.col-form-label, label { color: var(--ink); font-weight: 600; }
.form-group { margin-bottom: 1.15rem; }
.form-text { color: var(--muted) !important; }
.input-group-text { background: var(--tint); border-color: var(--line-strong); color: var(--muted); border-radius: var(--radius-sm); }
.custom-control-input:checked ~ .custom-control-label::before { background-color: var(--brand); border-color: var(--brand); }
.custom-control-input:focus ~ .custom-control-label::before { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.custom-control-label { font-weight: 500; }
.badge { font-weight: 700; padding: .3em .55em; border-radius: 6px; }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-success { background: var(--green-soft); color: var(--green); }
.badge-warning { background: var(--stamp-soft); color: var(--stamp-ink); }
.badge-secondary { background: var(--tint); color: var(--muted); }
.invalid-feedback { color: var(--danger); }
.is-invalid { border-color: var(--danger) !important; }

/* ---- 表 ---- */
.table-responsive { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.25rem; }
.table { color: var(--ink); margin-bottom: 0; }
.table thead th {
  background: var(--tint); color: var(--muted);
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  border-bottom: 1px solid var(--line) !important; border-top: 0; white-space: nowrap;
  padding: .8rem 1rem;
}
.table td { border-top: 1px solid var(--line); padding: .85rem 1rem; vertical-align: middle; }
.table-bordered, .table-bordered td, .table-bordered th { border: 0; }
.table-bordered td { border-top: 1px solid var(--line); }
.table-striped tbody tr:nth-of-type(odd) { background: transparent; }
.table tbody tr:hover { background: color-mix(in srgb, var(--tint) 70%, transparent); }
.table-responsive > .table { border-radius: var(--radius); overflow: hidden; }
@media (max-width: 767px) { .table-responsive > .table { min-width: 640px; } }

/* ---- お知らせ ---- */
.alert { border: 0; border-radius: var(--radius-sm); padding: .85rem 1.1rem; font-weight: 500; }
.alert-success { background: var(--green-soft); color: var(--green); }
.alert-danger { background: var(--danger-soft); color: var(--danger); }
.alert-warning { background: var(--stamp-soft); color: var(--stamp-ink); }
.alert-info { background: var(--info-soft); color: var(--info); }
.callout { border-radius: var(--radius-sm); box-shadow: none; border: 1px solid var(--line); border-left-width: 4px; }
.callout.callout-success { border-left-color: var(--brand); }

/* ---- ページ送り ---- */
.pagination { gap: 4px; }
.page-link { border: 1px solid var(--line); border-radius: 8px !important; color: var(--ink); }
.page-item.active .page-link { background: var(--brand); border-color: var(--brand); }

/* ---- ログイン画面 ---- */
.login-page, .register-page {
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--green-soft), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, var(--stamp-soft), transparent 55%),
    var(--paper);
}
.login-box, .register-box { width: min(420px, calc(100% - 32px)); }
.login-logo, .register-logo { margin-bottom: 18px; }
.login-logo a, .register-logo a { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font: 900 1.6rem/1 var(--font-display); }
.login-logo img, .register-logo img { height: 44px; width: 44px; border-radius: 12px; }
.login-box .card, .register-box .card { border-radius: 20px; box-shadow: 0 30px 60px -30px rgb(19 80 50 / .35); }
.login-card-body, .register-card-body { border-radius: 20px; padding: 28px; }
.login-box-msg { color: var(--muted); font-weight: 500; padding-bottom: 18px; }
.login-box .card-header, .register-box .card-header { border: 0; padding: 26px 28px 0; text-align: center; }
.login-box .card-header .card-title, .register-box .card-header .card-title { float: none; font-size: 1.1rem; }
.login-box .card-body, .register-box .card-body { padding: 22px 28px 10px; }
.login-box .card-footer, .register-box .card-footer { background: transparent; border: 0; text-align: center; padding: 0 28px 24px; }
.login-box .input-group .form-control, .register-box .input-group .form-control { border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.login-box .input-group-text, .register-box .input-group-text { background: var(--surface); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.login-box .btn, .register-box .btn { padding: .6rem 1rem; }

/* ---- 管理画面用の部品（各ビューで使う） ---- */
.page-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 1.25rem; }
.page-lead { color: var(--muted); margin: 0; flex: 1 1 360px; max-width: 640px; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.menu-card { display: grid; grid-template-rows: auto 1fr auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.menu-card-head { padding: 18px 20px 0; display: grid; gap: 6px; }
.menu-card-kind { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700; color: var(--green); letter-spacing: .04em; }
.menu-card-title { font: 700 1.1rem/1.4 var(--font-body); margin: 0; }
.menu-card-owner { font-size: .82rem; color: var(--muted); }
.menu-card-body { padding: 14px 20px 18px; display: grid; gap: 12px; align-content: start; }
.menu-price { display: flex; align-items: baseline; gap: 4px; }
.menu-price .num { font: 600 1.7rem/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.menu-price .unit { font-weight: 700; }
.menu-deal { display: inline-flex; align-items: center; gap: 10px; width: fit-content; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--stamp-soft); color: var(--stamp-ink); font-size: .85rem; }
.menu-deal b { background: var(--stamp); color: #3b2a00; border-radius: 999px; padding: 2px 8px; font-size: .78rem; }
.menu-deal s { opacity: .7; }
.menu-specs { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: .85rem; }
.menu-specs dt { color: var(--muted); font-weight: 500; }
.menu-specs dd { margin: 0; font-weight: 600; }
.menu-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--tint); }
.menu-card-foot .links { display: flex; gap: 4px; }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; color: var(--muted); font-size: .85rem; font-weight: 600; background: none; border: 0; }
.icon-btn:hover { background: var(--surface); color: var(--ink); text-decoration: none; }
.icon-btn.danger:hover { color: var(--danger); }

.empty-state { text-align: center; padding: 48px 20px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); }
.empty-state i { font-size: 2rem; color: var(--line-strong); margin-bottom: 10px; }
.empty-state h2 { font-size: 1.05rem; font-weight: 700; color: var(--ink); }

.plan-note { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--stamp-soft); color: var(--stamp-ink); font-weight: 500; }

.qr-panel { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.qr-panel .qr { padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.qr-panel .qr svg { display: block; width: 220px; height: 220px; }
@media (max-width: 640px) { .qr-panel { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

.person { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.person img, .person .avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--green-soft); flex: none; }
.person .avatar { display: grid; place-items: center; color: var(--green); font-weight: 700; }
.num-cell { font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.date-cell { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--tint); color: var(--muted); white-space: nowrap; }
.status-pill.ok { background: var(--green-soft); color: var(--green); }
.status-pill.warn { background: var(--stamp-soft); color: var(--stamp-ink); }
.status-pill.danger { background: var(--danger-soft); color: var(--danger); }

/* ---- フォームの見出し付きカード ---- */
.form-card .card-body { padding: 1.5rem 1.5rem .5rem; }
.form-card .card-footer { display: flex; justify-content: flex-end; gap: 8px; }
@media (min-width: 768px) {
  .form-card .col-form-label.text-md-right { text-align: right; }
}

/* ---- ダッシュボード ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 1.25rem; }
.stat { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat .ic { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-size: 1.1rem; }
.stat .ic.amber { background: var(--stamp-soft); color: var(--stamp-ink); }
.stat .ic.blue { background: var(--info-soft); color: var(--info); }
.stat .label { display: block; font-size: .8rem; color: var(--muted); font-weight: 500; }
.stat .value { font: 600 1.6rem/1.1 var(--font-mono); font-variant-numeric: tabular-nums; }
.stat .value small { font: 700 .85rem var(--font-body); margin-left: 2px; color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 991px) { .dash-grid { grid-template-columns: 1fr; } }
.card-header.flex { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-header.flex::after { display: none; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain > li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); }
.list-plain > li:first-child { border-top: 0; }
.list-plain .meta { font-size: .8rem; color: var(--muted); }
.news-item { display: grid !important; gap: 4px; }
.news-item .date { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.news-item b { font-weight: 700; }
.news-item p { margin: 0; font-size: .88rem; color: var(--muted); }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 1.25rem; }
.quick a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 700; transition: border-color .12s ease, transform .12s ease; }
.quick a:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-1px); }
.quick a i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--green-soft); color: var(--green); }
.quick a small { display: block; font-weight: 500; color: var(--muted); font-size: .78rem; }

/* ---- QRコード画面 ---- */
.qr-steps { margin: 14px 0 12px; padding-left: 1.3rem; display: grid; gap: 4px; font-size: .9rem; }
.qr-steps li::marker { color: var(--green); font-weight: 700; }

/* ---- プラン ---- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.plan { position: relative; display: grid; grid-template-rows: auto auto auto 1fr auto; gap: 8px; padding: 24px 22px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.plan.is-featured { border-color: var(--stamp); }
.plan.is-current { border: 2px solid var(--brand); padding: 23px 21px 21px; }
.plan-flag { position: absolute; top: -11px; left: 20px; padding: 2px 12px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; }
.plan-flag.amber { background: var(--stamp); color: #3b2a00; }
.plan-name { font: 700 1.1rem/1.4 var(--font-body); margin: 0; }
.plan-note-text { margin: 0; font-size: .82rem; color: var(--muted); }
.plan-price { display: flex; align-items: baseline; gap: 4px; margin: 6px 0 4px; }
.plan-price .per { font-size: .82rem; color: var(--muted); font-weight: 700; margin-right: 2px; }
.plan-price .num { font: 600 2rem/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.plan-price .unit { font-weight: 700; }
.plan-features { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 6px; align-content: start; font-size: .9rem; }
.plan-features i { color: var(--brand); width: 1.3rem; }
.plan-action .btn { padding: .65rem 1rem; }
.btn-secondary:disabled, .btn-secondary.disabled { background: var(--green-soft); border-color: transparent; color: var(--green); opacity: 1; }
.card-footer.d-flex::after, .form-card .card-footer::after, .card-body.d-flex::after { display: none; }

/* ---- スマホでのはみ出し対策 ---- */
.list-plain > li { min-width: 0; }
.list-plain .person { white-space: normal; min-width: 0; flex: 1 1 auto; }
.list-plain .person > span:last-child { min-width: 0; overflow: hidden; }
.list-plain .person > span:last-child, .list-plain .meta { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-plain .date-cell { flex: none; }
code { word-break: break-all; color: var(--green-deep); background: var(--tint); padding: 1px 5px; border-radius: 5px; }

/* ---- 設定画面 ---- */
.url-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--tint); }
.url-preview .d-block { flex-basis: 100%; }
.url-preview code { background: transparent; padding: 0; flex: 1 1 200px; font-size: .85rem; }
.setup-guide { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 14px; }
.setup-guide summary { cursor: pointer; padding: 12px 0; font-weight: 700; color: var(--green); list-style: none; }
.setup-guide summary::-webkit-details-marker { display: none; }
.setup-guide[open] { padding-bottom: 14px; }
.setup-guide .qr-steps { margin-top: 0; }
.form-card .card-header .card-title i { width: 1.2rem; }

/* ---- メニューの入力フォーム ---- */
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "fields preview" "actions preview"; gap: 16px; align-items: start; }
.form-layout > .form-card { grid-area: fields; }
.form-layout > .preview-card { grid-area: preview; position: sticky; top: 76px; }
.form-layout > .form-actions { grid-area: actions; display: flex; justify-content: flex-end; gap: 8px; }
.preview-card .menu-specs dd { text-align: right; font-family: var(--font-mono); }
@media (max-width: 991px) {
  .form-layout { grid-template-columns: 1fr; grid-template-areas: "fields" "preview" "actions"; }
  .form-layout > .preview-card { position: static; }
}
@media (max-width: 575px) {
  .form-layout > .form-actions { flex-direction: column-reverse; }
  .form-layout > .form-actions .btn { width: 100%; }
}
.input-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.input-row .form-control { width: auto; flex: 1 1 80px; min-width: 70px; }
.input-row select.form-control { flex: 0 1 110px; }
.input-row-text { color: var(--muted); font-weight: 500; }
.choice-list { display: grid; gap: 8px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; font-weight: 400; margin: 0; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--tint); }
.choice > input { margin-top: 4px; accent-color: var(--brand); width: 18px; height: 18px; flex: none; }
.choice b { display: block; }
.choice small { display: block; color: var(--muted); line-height: 1.5; }
input[type=number].form-control { font-variant-numeric: tabular-nums; }
/* スマホではボタンを押しやすく、フォーム下のボタンを横いっぱいに */
@media (max-width: 575px) {
  .form-card .card-footer { flex-direction: column-reverse; }
  .form-card .card-footer .btn { width: 100%; }
  .page-actions .btn { width: 100%; }
  .menu-card-foot .icon-btn { padding: 10px 12px; }
  .form-control, .custom-select { font-size: 16px; } /* iOSで入力時に拡大されないように */
}
@media (max-width: 575px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .stat .ic { width: 34px; height: 34px; border-radius: 10px; font-size: .9rem; }
  .stat .label { font-size: .7rem; line-height: 1.3; }
  .stat .value { font-size: 1.3rem; }
  .quick { gap: 8px; }
  .quick a { padding: 10px 12px; }
}
@media (max-width: 575px) { .plan.is-current { order: -1; margin-top: 8px; } }

/* ---- 停止中のメニュー ---- */
.menu-card.is-stopped { background: color-mix(in srgb, var(--surface) 70%, var(--paper)); }
.menu-card.is-stopped .menu-price, .menu-card.is-stopped .menu-deal { opacity: .55; }
.stopped-note { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-size: .82rem; line-height: 1.6; }
.stopped-note a { color: inherit; font-weight: 700; text-decoration: underline; }
.usage-bar { height: 8px; border-radius: 999px; background: var(--tint); overflow: hidden; }
.usage-bar span { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.usage-bar.is-near span { background: var(--stamp); }
.usage-bar.is-full span { background: var(--danger); }

/* ---- お客様の一覧・保有チケット ---- */
.customer-search { position: relative; display: flex; gap: 8px; margin-bottom: 16px; max-width: 520px; }
.customer-search > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.customer-search .form-control { padding-left: 38px; }
.customer-search .btn { flex: none; }
.customer-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.customer-list li + li { border-top: 1px solid var(--line); }
.customer-list a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: var(--ink); }
.customer-list a:hover { background: var(--tint); text-decoration: none; }
.customer-list .person { flex: 1 1 auto; min-width: 0; }
.customer-name { display: grid; min-width: 0; line-height: 1.35; }
.customer-name b, .customer-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-name small { color: var(--muted); font-size: .78rem; }
.customer-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.customer-head .person img, .customer-head .person .avatar { width: 48px; height: 48px; font-size: 1.2rem; }
.customer-head .person { min-width: 0; }
.customer-head .customer-name b { font-size: 1.15rem; }

.hold-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.hold-card { display: grid; gap: 12px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.hold-card.is-done { background: color-mix(in srgb, var(--surface) 70%, var(--paper)); box-shadow: none; }
.hold-card.is-done .hold-count .num { color: var(--muted); }
.hold-head { display: grid; gap: 4px; }
.hold-head .menu-card-title small { font-size: .8rem; margin-left: 4px; }
.hold-period { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.hold-count { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.hold-count .label { font-size: .85rem; color: var(--muted); font-weight: 500; }
.hold-count .num { font: 600 2.2rem/1 var(--font-mono); color: var(--green); font-variant-numeric: tabular-nums; }
.hold-count .unit { font-weight: 700; }
.hold-count .sub { flex-basis: 100%; font-size: .8rem; color: var(--muted); }
.hold-note { margin: 0; font-size: .8rem; color: var(--muted); }
.hold-action { margin: 0; }
.hold-action .btn { min-height: 48px; }
.hold-state { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--tint); color: var(--muted); font-size: .88rem; font-weight: 500; text-align: center; }
.hold-history summary { cursor: pointer; font-size: .85rem; font-weight: 700; color: var(--muted); padding: 4px 0; }
.hold-history ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; }
.hold-history li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 0; border-top: 1px dashed var(--line); }
.hold-history li form { margin: 0 0 0 auto; }
.hold-history .btn-sm { min-height: 34px; padding: 4px 12px; }
@media (max-width: 575px) {
  .hold-grid { grid-template-columns: 1fr; }
  .customer-list a { padding: 12px; gap: 8px; }
  .customer-list .status-pill { font-size: .72rem; padding: 3px 8px; }
}

/* 選択肢の中の入力欄（選んでいないときは薄く） */
.choice .input-row { display: flex; flex-wrap: nowrap; }
.choice .input-row .form-control { flex: 0 1 100px; min-width: 64px; }
.choice .is-disabled { opacity: .45; }

/* ---- 使い始めの手順（ホーム） ---- */
.onboarding { padding: 22px 24px; margin-bottom: 1.25rem; border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line)); background: linear-gradient(180deg, var(--tint), var(--surface) 120px); }
.onboarding-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 14px; }
.onboarding-head h2 { font: 700 1.2rem/1.4 var(--font-display); margin: 0 0 4px; }
.onboarding-head p { margin: 0; color: var(--muted); font-size: .9rem; }
.onboarding-progress { display: flex; align-items: center; gap: 10px; white-space: nowrap; color: var(--muted); font-size: .85rem; }
.onboarding-progress .usage-bar { width: 120px; }
.onboarding-progress b { font-size: 1.15rem; color: var(--green); }
.onboarding-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.onboarding .step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.onboarding .step[open] { border-color: var(--brand); box-shadow: var(--shadow); }
.onboarding .step summary { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; list-style: none; font-weight: 700; }
.onboarding .step summary::-webkit-details-marker { display: none; }
.onboarding .step .mark { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--brand); color: var(--green); font: 600 .95rem var(--font-mono); }
.onboarding .step.is-done .mark { background: var(--brand); color: #fff; font-size: .8rem; }
.onboarding .step.is-done .title { color: var(--muted); }
.onboarding .step .title { flex: 1; }
.onboarding .step .chev { color: var(--muted); font-size: .8rem; transition: transform .15s ease; }
.onboarding .step[open] .chev { transform: rotate(180deg); }
.onboarding .step-body { padding: 0 16px 16px 58px; }
.onboarding .step-body p { margin-bottom: 10px; }
.onboarding .step-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.onboarding .step-qr { display: flex; align-items: center; gap: 18px; }
.onboarding .step-qr .qr { flex: none; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.onboarding .step-qr .qr svg { display: block; }
.onboarding .step-options { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.onboarding .step-options li { text-align: left; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--tint); }
.onboarding .step-options li > span:not(.url-preview) { font-size: .85rem; color: var(--muted); }
.onboarding .step-options .url-preview { width: 100%; background: var(--surface); }
@media (max-width: 575px) {
  .onboarding { padding: 18px 16px; }
  .onboarding .step-body { padding-left: 16px; }
  .onboarding .step-qr { flex-direction: column; align-items: flex-start; }
}

/* ---- お店のQRコード（画面いっぱい・印刷） ---- */
.shop-qr-full { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; background: #fff; text-align: center; }
.shop-qr-full[hidden] { display: none; }
.shop-qr-full .shop { margin: 0; font-weight: 700; color: var(--muted); font-size: 1.1rem; }
.shop-qr-full .qr { padding: 18px; border: 3px solid var(--brand); border-radius: 22px; }
.shop-qr-full .qr svg { display: block; width: min(70vw, 60vh, 420px); height: min(70vw, 60vh, 420px); }
.shop-qr-full .lead { margin: 0; font: 700 1.25rem/1.6 var(--font-display); }
@media print {
  @page { size: A4 portrait; margin: 20mm; }
  body * { visibility: hidden; }
  .shop-qr-full, .shop-qr-full * { visibility: visible; }
  .shop-qr-full { display: flex !important; position: absolute; inset: 0; }
  .shop-qr-full .qr svg { width: 110mm; height: 110mm; }
  .shop-qr-full .btn { display: none; }
}
