/* =========================================================
   デモカレンダー — Aeon Demo pink design system
   （AIヘルプデスク helpdesk-aeon と同じトーン）
   ========================================================= */
:root {
  --pink-700: #c2006b;
  --pink-600: #e4007f;
  --pink-500: #f0308f;
  --pink-400: #ff6fae;
  --pink-200: #ffc7e1;
  --pink-100: #ffe6f1;
  --pink-50: #fff5fa;
  --plum-900: #2b0f22;
  --plum-700: #5b3550;
  --muted: #8c7484;
  --faint: #b9a5b1;
  --bg: #fbf7f9;
  --surface: #ffffff;
  --line: #f1e3eb;
  --line-strong: #e6d0dc;
  --grad: linear-gradient(135deg, #e4007f 0%, #ff4f9c 100%);
  --grad-soft: linear-gradient(135deg, #fff0f7 0%, #ffe3f0 100%);
  --teal: #12a594;
  --violet: #7c5cff;
  --amber: #e89a00;
  --danger: #d92d4a;
  --sun: #d92d4a;
  --sat: #3d6fe0;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --sh-1: 0 1px 2px rgba(91, 18, 60, .05), 0 2px 8px rgba(91, 18, 60, .04);
  --sh-2: 0 2px 6px rgba(91, 18, 60, .06), 0 12px 32px rgba(91, 18, 60, .08);
  --sh-pink: 0 8px 22px rgba(228, 0, 127, .28);
  --font: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  --font-num: "Outfit", "Zen Kaku Gothic New", sans-serif;
  font-family: var(--font);
  color: var(--plum-900);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-size: 14px; line-height: 1.65; letter-spacing: .01em;
  background:
    radial-gradient(900px 500px at 105% -10%, rgba(255, 111, 174, .16), transparent 60%),
    radial-gradient(700px 420px at -10% 110%, rgba(228, 0, 127, .07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--pink-600); }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
input, select, textarea { font-size: 16px; }
.hidden { display: none !important; }
.num { font-family: var(--font-num); font-feature-settings: "tnum"; }
::selection { background: var(--pink-200); }

/* ---------- 認証 ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 430px; background: rgba(255,255,255,.92); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--sh-2); padding: 34px 28px 28px; }
.auth-logo { width: 76px; height: 76px; display: block; margin: 0 auto 14px; filter: drop-shadow(0 10px 18px rgba(228,0,127,.3)); }
.auth-eyebrow { text-align: center; font: 600 11px var(--font-num); letter-spacing: .22em; color: var(--pink-600); }
.auth h1 { text-align: center; font-size: 22px; margin: 4px 0 4px; letter-spacing: .08em; }
.auth .sub { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 24px; }
.auth-foot { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 18px; }

/* ---------- フォーム ---------- */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 5px; color: var(--plum-700); }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.input { width: 100%; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--pink-500); box-shadow: 0 0 0 4px rgba(228,0,127,.12); }
.input.sm { padding: 8px 12px; font-size: 14px; border-radius: 10px; }
select.input { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23e4007f' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; padding-right: 34px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > .field { flex: 1 1 160px; }
.err { color: var(--danger); font-size: 13px; min-height: 1.2em; margin: 6px 0; }
.check-list { display: flex; flex-wrap: wrap; gap: 8px; }
.check-list label { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; font-size: 13.5px; background: #fff; }
.check-list input { accent-color: var(--pink-600); width: 16px; height: 16px; }
.check-list label:has(input:checked) { border-color: var(--pink-500); background: var(--pink-50); color: var(--pink-700); font-weight: 700; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 12px; padding: 10px 18px; font-weight: 700; cursor: pointer;
  background: var(--grad); color: #fff; box-shadow: var(--sh-pink); min-height: 42px; transition: transform .1s, box-shadow .15s, opacity .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn.ghost { background: #fff; color: var(--plum-900); border: 1px solid var(--line-strong); box-shadow: var(--sh-1); }
.btn.ghost:hover { border-color: var(--pink-200); color: var(--pink-700); }
.btn.soft { background: var(--pink-50); color: var(--pink-700); box-shadow: none; border: 1px solid var(--pink-100); }
.btn.danger { background: #fff; color: var(--danger); border: 1px solid #f5c6cf; box-shadow: none; }
.btn.sm { padding: 6px 12px; min-height: 34px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.link { background: none; border: 0; padding: 0; color: var(--pink-600); cursor: pointer; text-decoration: underline; font-size: 13px; }
.icon-btn { background: none; border: 0; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; color: inherit; }
.icon-btn svg { width: 22px; height: 22px; }

/* ---------- シェル ---------- */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.topbar { display: none; }
.side { position: sticky; top: 0; height: 100vh; padding: 18px 14px; display: flex; flex-direction: column; }
.side-inner { background: rgba(255,255,255,.84); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); flex: 1; display: flex; flex-direction: column; padding: 18px 12px 12px; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 18px; }
.logo { width: 42px; height: 42px; flex: none; filter: drop-shadow(0 6px 12px rgba(228,0,127,.25)); }
.brand-name { font-family: var(--font-num); font-weight: 700; font-size: 18px; letter-spacing: .02em; line-height: 1.1; }
.brand-name b { color: var(--pink-600); }
.brand-sub { font-size: 9.5px; color: var(--muted); margin-top: 3px; letter-spacing: 0; }
.nav-label { font: 600 10.5px var(--font-num); letter-spacing: .14em; color: var(--faint); padding: 12px 12px 6px; text-transform: uppercase; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; color: var(--plum-700); text-decoration: none; font-weight: 500; transition: background .15s, color .15s; }
.nav a .ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--pink-50); color: var(--pink-600); flex: none; }
.nav a svg { width: 18px; height: 18px; }
.nav a:hover { background: var(--pink-50); color: var(--plum-900); }
.nav a.active { background: var(--grad); color: #fff; box-shadow: var(--sh-pink); }
.nav a.active .ico { background: rgba(255,255,255,.2); color: #fff; }
.nav a .badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--pink-600); color: #fff; font: 600 12px/22px var(--font-num); text-align: center; }
.nav a.active .badge { background: #fff; color: var(--pink-600); }
.side-spacer { flex: 1; min-height: 16px; }
.manual-card { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1.5px dashed var(--pink-200); border-radius: 14px; text-decoration: none; color: var(--plum-900); margin-bottom: 10px; transition: background .15s; }
.manual-card:hover, .manual-card.active { background: var(--pink-50); border-color: var(--pink-400); }
.manual-ico { font-size: 22px; }
.manual-card b { display: block; font-size: 13.5px; }
.manual-card small { display: block; font-size: 11px; color: var(--muted); }
.manual-card .chev { margin-left: auto; color: var(--pink-600); font-size: 20px; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--grad-soft); }
.avatar { width: 38px; height: 38px; border-radius: 12px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.me-name { font-weight: 700; font-size: 13.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-role { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me > div:not(.avatar) { min-width: 0; flex: 1; }
.main { min-width: 0; padding: 30px 34px 60px 20px; }

/* ---------- ページ見出し ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.eyebrow { font: 600 11px var(--font-num); letter-spacing: .2em; color: var(--pink-600); text-transform: uppercase; }
.page-title { font-size: 26px; font-weight: 700; margin: 2px 0 0; letter-spacing: .1em; }
.scope-chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 700; box-shadow: var(--sh-1); }
.scope-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--pink-600); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 20px; margin-bottom: 18px; }
.card h3 { margin: 0 0 12px; font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* ---------- 件数タイル ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 15px 18px; box-shadow: var(--sh-1); }
.tile .lab { font-size: 12px; font-weight: 700; color: var(--plum-700); display: flex; align-items: center; gap: 6px; }
.tile .lab i { width: 7px; height: 7px; border-radius: 50%; background: var(--pink-600); }
.tile .val { font: 700 30px/1.15 var(--font-num); margin-top: 4px; }
.tile .val small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 3px; font-family: var(--font); }
.tile.hl { background: var(--grad); color: #fff; border: 0; box-shadow: var(--sh-pink); }
.tile.hl .lab { color: rgba(255,255,255,.9); }
.tile.hl .lab i { background: #fff; }
.tile.hl .val small { color: rgba(255,255,255,.85); }

/* ---------- ツールバー ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 12px; box-shadow: var(--sh-1); margin-bottom: 16px; }
.toolbar .grow { flex: 1 1 200px; }
.search { position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--pink-600); }
.search .input { padding-left: 36px; background: var(--pink-50); border-color: transparent; }
.month-nav { display: flex; align-items: center; gap: 6px; }
.month-title { font: 700 22px var(--font-num); min-width: 128px; text-align: center; letter-spacing: .02em; }
.month-title small { font-family: var(--font); font-size: 13px; color: var(--muted); margin-left: 2px; }
.seg { display: inline-flex; background: var(--pink-50); border-radius: 12px; padding: 3px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 9px; font-weight: 700; color: var(--muted); cursor: pointer; font-size: 13px; }
.seg button.on { background: #fff; color: var(--pink-700); box-shadow: var(--sh-1); }

/* ---------- カレンダー ---------- */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.cal { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow div { text-align: center; font: 600 11.5px var(--font-num); letter-spacing: .12em; padding: 10px 0; color: var(--muted); border-bottom: 1px solid var(--line); }
.cal-dow div:first-child { color: var(--sun); } .cal-dow div:last-child { color: var(--sat); }
.day { min-height: 116px; padding: 6px 6px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; position: relative; }
.day:nth-child(7n) { border-right: 0; }
.day:hover { background: var(--pink-50); }
.day.out { background: #fdfbfc; }
.day.out .dnum { color: #d6c8d0; }
.day.sel { background: var(--pink-50); box-shadow: inset 0 0 0 2px var(--pink-500); }
.dhead { display: flex; align-items: center; justify-content: space-between; }
.dnum { font: 600 13px var(--font-num); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.day.sun .dnum { color: var(--sun); } .day.sat .dnum { color: var(--sat); }
.day.today .dnum { background: var(--grad); color: #fff; box-shadow: var(--sh-pink); }
.dcount { font: 700 11px var(--font-num); color: var(--pink-700); background: var(--pink-100); border-radius: 999px; padding: 1px 8px; }
.chip { display: block; width: 100%; border: 0; text-align: left; margin-top: 4px; padding: 3px 7px; border-radius: 7px; font-size: 11.5px; line-height: 1.35;
  background: var(--pink-50); color: var(--plum-900); border-left: 3px solid var(--pink-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.chip:hover { background: var(--pink-100); }
.chip b { color: var(--pink-700); font-family: var(--font-num); font-weight: 600; margin-right: 3px; }
.more { font-size: 11px; color: var(--pink-700); font-weight: 700; margin-top: 3px; padding-left: 4px; }
.heat { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 4px; border-radius: 4px; background: var(--pink-100); overflow: hidden; }
.heat i { display: block; height: 100%; background: var(--grad); border-radius: 4px; }

.daypanel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); position: sticky; top: 18px; max-height: calc(100vh - 36px); display: flex; flex-direction: column; }
.daypanel-head { padding: 18px 18px 12px; border-bottom: 1px solid var(--line); }
.daypanel-head .d { font: 700 26px var(--font-num); line-height: 1; }
.daypanel-head .w { font-size: 13px; color: var(--muted); margin-left: 6px; font-weight: 700; }
.daypanel-body { padding: 10px 12px 14px; overflow-y: auto; }
.store-group { margin: 6px 0 12px; }
.store-group h4 { margin: 0 4px 6px; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.store-group h4 small { color: var(--muted); font-weight: 500; }
.demo-card { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 11px 12px; margin-bottom: 7px; cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .12s; }
.demo-card:hover { border-color: var(--pink-200); box-shadow: var(--sh-2); transform: translateY(-1px); }
.demo-time { font: 600 13px var(--font-num); color: var(--pink-700); background: var(--pink-50); border-radius: 10px; padding: 6px 8px; text-align: center; min-width: 56px; line-height: 1.2; }
.demo-time small { display: block; font-size: 10px; color: var(--muted); font-weight: 500; }
.demo-main { flex: 1; min-width: 0; }
.demo-maker { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-card .chev { color: var(--pink-400); font-size: 18px; }
.list-date { display: flex; align-items: baseline; gap: 8px; margin: 22px 4px 8px; }
.list-date .d { font: 700 20px var(--font-num); }
.list-date .w { font-size: 13px; font-weight: 700; color: var(--muted); }
.list-date .n { margin-left: auto; font-size: 12px; color: var(--pink-700); font-weight: 700; }
.empty { text-align: center; color: var(--muted); padding: 36px 12px; }
.empty .big { font-size: 34px; margin-bottom: 6px; }

/* ---------- 詳細シート ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; }
.sheet-bg { position: absolute; inset: 0; background: rgba(43, 15, 34, .38); backdrop-filter: blur(2px); }
.sheet { position: absolute; right: 14px; top: 14px; bottom: 14px; width: min(500px, calc(100% - 28px)); background: var(--bg); border-radius: 24px; overflow-y: auto; box-shadow: 0 20px 60px rgba(43,15,34,.3); animation: slideL .22s ease-out; }
.sheet-handle { display: none; }
@keyframes slideL { from { transform: translateX(30px); opacity: .5; } }
@keyframes slideU { from { transform: translateY(50px); opacity: .5; } }
.sh-head { background: var(--grad); color: #fff; padding: 22px 22px 20px; position: relative; border-radius: 24px 24px 0 0; }
.sh-close { position: absolute; right: 14px; top: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.2); color: #fff; font-size: 18px; cursor: pointer; }
.sh-date { font: 600 13px var(--font-num); letter-spacing: .06em; opacity: .92; }
.sh-title { font-size: 22px; font-weight: 700; margin: 4px 44px 8px 0; line-height: 1.35; }
.sh-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.sh-tag { background: rgba(255,255,255,.22); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; }
.sh-body { padding: 16px; }
.info { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin-bottom: 14px; }
.info-row { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row .k { width: 92px; flex: none; font-size: 12.5px; color: var(--muted); font-weight: 700; padding-top: 1px; }
.info-row .v { flex: 1; min-width: 0; word-break: break-word; white-space: pre-wrap; }
.info-row .v.big { font-size: 16px; font-weight: 700; }
.sec { font-size: 13px; font-weight: 700; margin: 18px 6px 8px; color: var(--plum-700); }

/* ---------- 表 ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fffafd; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.off td { color: var(--faint); }
.role { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: #f4eef2; color: var(--plum-700); white-space: nowrap; }
.role.hq { background: var(--grad); color: #fff; }
.role.area { background: #efeaff; color: var(--violet); }
.role.store { background: #e3f6f3; color: #0d7f72; }
.role.owner { background: var(--plum-900); color: #fff; }
.st { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.st.wait::before { background: var(--amber); }
.st.off::before { background: var(--faint); }

/* ---------- モーダル ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 40px 14px; overflow-y: auto; }
.modal-bg { position: fixed; inset: 0; background: rgba(43,15,34,.4); backdrop-filter: blur(2px); }
.modal { position: relative; width: 100%; max-width: 560px; background: #fff; border-radius: 24px; padding: 24px; box-shadow: 0 20px 60px rgba(43,15,34,.3); }
.modal h3 { margin: 0 0 16px; font-size: 18px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.copy-box { display: flex; gap: 8px; align-items: center; background: var(--pink-50); border: 1px dashed var(--pink-200); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; word-break: break-all; }
.notice { background: #fff8e6; border: 1px solid #f7dfa3; color: #7a5a00; border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }
.notice.ok { background: #e7f7f4; border-color: #b6e6dd; color: #0d6f63; }
.notice.err { background: #fdecef; border-color: #f5c6cf; color: #a01d36; }

/* ---------- マニュアル ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button { border: 1px solid var(--line-strong); background: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 700; cursor: pointer; font-size: 13.5px; }
.tabs button.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--sh-pink); }
.step { display: flex; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px; margin-bottom: 14px; box-shadow: var(--sh-1); }
.step-no { width: 44px; height: 44px; border-radius: 14px; background: var(--grad); color: #fff; display: grid; place-items: center; font: 700 20px var(--font-num); flex: none; box-shadow: var(--sh-pink); }
.step-body { flex: 1; min-width: 0; }
.step-body h4 { margin: 4px 0 6px; font-size: 16px; }
.step-body p { margin: 0 0 8px; }
.step-body img { display: block; width: 100%; max-width: 640px; border-radius: 14px; border: 1px solid var(--line); margin-top: 10px; cursor: zoom-in; box-shadow: var(--sh-1); }
.faq-q { font-weight: 700; margin: 0 0 4px; }
.faq-q::before { content: "Q. "; color: var(--pink-600); font-family: var(--font-num); }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(43,15,34,.8); display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--plum-900); color: #fff; padding: 11px 20px; border-radius: 999px; z-index: 95; font-size: 14px; box-shadow: var(--sh-2); max-width: 90%; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--pink-200); border-top-color: var(--pink-600); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- レスポンシブ ---------- */
@media (max-width: 1180px) {
  .cal-layout { grid-template-columns: 1fr; }
  .daypanel { position: static; max-height: none; }
}
@media (max-width: 860px) {
  .app { display: block; }
  .topbar { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 30; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top));
    background: rgba(255,255,255,.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .topbar-logo { width: 30px; height: 30px; }
  .topbar-title { font-weight: 700; font-size: 16px; letter-spacing: .06em; }
  .side { position: fixed; left: 0; top: 0; z-index: 40; width: 280px; transform: translateX(-105%); transition: transform .22s; }
  .side.open { transform: none; }
  .backdrop { position: fixed; inset: 0; background: rgba(43,15,34,.35); z-index: 35; }
  .main { padding: 16px 12px 50px; }
  .page-title { font-size: 21px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 12px 14px; }
  .tile .val { font-size: 24px; }
  .month-title { font-size: 19px; min-width: 104px; }
  .day { min-height: 64px; padding: 3px; }
  .dnum { width: 22px; height: 22px; font-size: 12px; }
  .chip { display: none; }
  .more { display: none; }
  .dcount { display: block; text-align: center; margin-top: 4px; font-size: 10.5px; padding: 0 4px; }
  .dhead { flex-direction: column; align-items: center; }
  .heat { left: 3px; right: 3px; bottom: 3px; }
  .sheet { left: 0; right: 0; bottom: 0; top: auto; width: 100%; max-height: 90vh; border-radius: 22px 22px 0 0; animation: slideU .22s ease-out; padding-bottom: env(safe-area-inset-bottom); }
  .sh-head { border-radius: 22px 22px 0 0; padding-top: 26px; }
  .sheet-handle { display: block; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 44px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.6); z-index: 2; }
  .modal-wrap { padding: 0; align-items: flex-end; }
  .modal { border-radius: 22px 22px 0 0; max-height: 94vh; overflow-y: auto; padding: 20px 16px; }
  .step { padding: 14px; gap: 12px; }
  .step-no { width: 36px; height: 36px; font-size: 17px; }
  .hide-sp { display: none; }
}
