/* ハムッケ（サーバー版）モバイルファースト
   表示モード: data-theme = system / light / grey / dark（<html> 属性、クッキーで切替）
   system は端末の prefers-color-scheme に従う */

/* ---- ライト（デフォルト） ---- */
:root, :root[data-theme="light"] {
    --bg: #ffffff; --text: #1c1c1e; --link: #2f4b7c; --muted: #8a8a8e; --note: #6e6e73;
    --card-bg: #ffffff; --card-border: #e4e4e4;
    --header-bg: #ffffff; --header-border: #d9d9de; --soft-border: #e6e6e6;
    --cal-border: #dcdce0; --cal-th-bg: #f7f7f7;
    --holiday-bg: #fff1f0; --empty-bg: #f0f0f0;
    --input-bg: #ffffff; --input-border: #d9d9de;
    --btn-bg: #ffffff; --btn-border: #d9d9de; --btn-text: #1c1c1e;
    --tabs-border: #d9d9de;
    --alert-bg: #fdecea; --alert-border: #e08a80;
    --sun: #c23b2e; --sat: #2f5d8a; --holiday: #c23b2e; --special: #d6336c;
    --accent: #1c1c1e;
    --band-bg: #fbe9ec; --band-text: #7c2d3e;
    --rough-bg: #f4f4f4;
    --leave-bg: #dbe9ff; --leave-text: #2f5d8a;
    --danger: #d92d20; --danger-border: #eda49d;
    --ev-work-bg: #e9edf2; --ev-work-text: #31435c; --ev-work-bar: #8296ad;
    --ev-pv-bg: #efeaf7; --ev-pv-text: #4a3f6b; --ev-pv-bar: #9a8bc4;
    --ev-partner-bg: #fdeef1; --ev-partner-text: #83303f; --ev-partner-bar: #d98a97;
    --ev-secret-bg: #ececec; --ev-secret-text: #4d4d4d; --ev-secret-bar: #9a9a9a;
    --tg-today: #f6f6f4;
}
/* ---- グレー ---- */
:root[data-theme="grey"] {
    --bg: #e8e8ec; --text: #2c2c2e; --link: #6d5df6; --muted: #6e6e73; --note: #636368;
    --card-bg: #f7f7f9; --card-border: #cfcfd6;
    --header-bg: #f7f7f9; --header-border: #c6c6cd; --soft-border: #dcdce1;
    --cal-border: #cfcfd6; --cal-th-bg: #dedee3;
    --holiday-bg: #f3e2e0; --empty-bg: #dedee3;
    --input-bg: #ffffff; --input-border: #c6c6cd;
    --btn-bg: #f7f7f9; --btn-border: #c6c6cd; --btn-text: #2c2c2e;
    --tabs-border: #c6c6cd;
    --alert-bg: #f6e3e1; --alert-border: #cf8a83;
    --sun: #d92d20; --sat: #0071e3; --holiday: #d92d20; --special: #e91e63;
    --accent: #d92d20;
    --band-bg: #f6d3cd; --band-text: #8f1d14;
    --rough-bg: #e0e0e6;
    --leave-bg: #c9d8ee; --leave-text: #0a5dc2;
    --danger: #c92a1e; --danger-border: #cf8a83;
    --ev-work-bg: #dde4ec; --ev-work-text: #2c3e55; --ev-work-bar: #71869e;
    --ev-pv-bg: #e6def2; --ev-pv-text: #443763; --ev-pv-bar: #8d7cb8;
    --ev-partner-bg: #f7e0e4; --ev-partner-text: #772c3a; --ev-partner-bar: #c97e8c;
    --ev-secret-bg: #e0e0e0; --ev-secret-text: #454545; --ev-secret-bar: #8f8f8f;
    --tg-today: #e2e2e8;
}
/* ---- ダーク ---- */
:root[data-theme="dark"] {
    --bg: #0b0b0d; --text: #f2f2f7; --link: #a78bfa; --muted: #98989f; --note: #98989f;
    --card-bg: #1c1c1f; --card-border: #2c2c2e;
    --header-bg: #17171a; --header-border: #2c2c2e; --soft-border: #2c2c2e;
    --cal-border: #2c2c2e; --cal-th-bg: #232326;
    --holiday-bg: #2f1714; --empty-bg: #141417;
    --input-bg: #1c1c1f; --input-border: #38383a;
    --btn-bg: #1c1c1f; --btn-border: #38383a; --btn-text: #f2f2f7;
    --tabs-border: #38383a;
    --alert-bg: #3a1a17; --alert-border: #7a3a34;
    --sun: #ff453a; --sat: #0a84ff; --holiday: #ff453a; --special: #ff6482;
    --accent: #ff453a;
    --band-bg: #5a201a; --band-text: #ffb4ab;
    --rough-bg: #17171a;
    --leave-bg: #12283f; --leave-text: #6cb2ff;
    --danger: #ff453a; --danger-border: #7a3a34;
    --ev-work-bg: #22303f; --ev-work-text: #b9c9da; --ev-work-bar: #5f7a94;
    --ev-pv-bg: #2e2742; --ev-pv-text: #c9bfe8; --ev-pv-bar: #7a6ba8;
    --ev-partner-bg: #3d2129; --ev-partner-text: #f0b7c0; --ev-partner-bar: #a05a68;
    --ev-secret-bg: #2a2a2a; --ev-secret-text: #c9c9c9; --ev-secret-bar: #777777;
    --tg-today: #16161a;
}
/* ---- 自動（system）: 端末がダークのときはダーク配色 ---- */
@media (prefers-color-scheme: dark) {
    :root[data-theme="system"] {
        --bg: #0b0b0d; --text: #f2f2f7; --link: #a78bfa; --muted: #98989f; --note: #98989f;
        --card-bg: #1c1c1f; --card-border: #2c2c2e;
        --header-bg: #17171a; --header-border: #2c2c2e; --soft-border: #2c2c2e;
        --cal-border: #2c2c2e; --cal-th-bg: #232326;
        --holiday-bg: #2f1714; --empty-bg: #141417;
        --input-bg: #1c1c1f; --input-border: #38383a;
        --btn-bg: #1c1c1f; --btn-border: #38383a; --btn-text: #f2f2f7;
        --tabs-border: #38383a;
        --alert-bg: #3a1a17; --alert-border: #7a3a34;
        --sun: #ff453a; --sat: #0a84ff; --holiday: #ff453a; --special: #ff6482;
        --accent: #ff453a;
        --band-bg: #5a201a; --band-text: #ffb4ab;
        --rough-bg: #17171a;
        --leave-bg: #12283f; --leave-text: #6cb2ff;
        --danger: #ff453a; --danger-border: #7a3a34;
        --ev-work-bg: #22303f; --ev-work-text: #b9c9da; --ev-work-bar: #5f7a94;
        --ev-pv-bg: #2e2742; --ev-pv-text: #c9bfe8; --ev-pv-bar: #7a6ba8;
        --ev-partner-bg: #3d2129; --ev-partner-text: #f0b7c0; --ev-partner-bar: #a05a68;
        --ev-secret-bg: #2a2a2a; --ev-secret-text: #c9c9c9; --ev-secret-bar: #777777;
        --tg-today: #16161a;
    }
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}
a { color: var(--link); }
/* コンテナ幅: スマホ〜中幅は 720px。PC幅（900px以上）の扱いは末尾のPCレイアウト節で上書きする */
.container { max-width: 720px; margin: 0 auto; padding: 12px; }
.container.narrow { max-width: 420px; text-align: center; padding-top: 48px; }
.app-title { font-size: 2rem; margin: 0 0 4px; }
.lead { color: var(--muted); margin-top: 0; }
.note { color: var(--note); font-size: 0.85rem; }
.muted { color: var(--muted); font-size: 0.85rem; }
.alert { background: var(--alert-bg); border: 1px solid var(--alert-border); border-radius: 8px; padding: 10px; }

.site-footer {
    max-width: 720px; margin: 0 auto; padding: 12px;
    display: flex; justify-content: space-between; align-items: center;
    color: var(--muted); font-size: 0.8rem;
}

/* ロゴの長押しフィードバック（.brand-logo.pressing）はメニューバー節で定義。
   太い黒マストヘッドは本人の指示で撤回済み（2026-11-24） */
/* メンテナンスモード中の帯（状態の明示と解除導線） */
.maint-banner {
    max-width: 720px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    background: var(--text); color: var(--bg);
    padding: 8px 12px; font-size: 0.8rem;
}
.maint-off {
    background: none; border: 1px solid currentColor; color: inherit;
    border-radius: 3px; padding: 3px 10px; font-size: 0.78rem; cursor: pointer; flex: none;
}

.card {
    background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 6px;
    padding: 16px; margin-bottom: 16px;
}
.card h2 { margin-top: 0; font-size: 1.15rem; }
.card h3 { font-size: 1rem; }

.btn {
    display: inline-block; padding: 9px 16px; border: 1px solid var(--btn-border); border-radius: 4px;
    background: var(--btn-bg); color: var(--btn-text); text-decoration: none; font-size: 0.92rem; cursor: pointer;
}
.btn.primary { background: #0d2b45; border-color: #0d2b45; color: #fff; font-weight: bold; }
/* 主要ボタンの色はテーマのアクセント（グレー/ダークでは赤）を使わず紺で統一（2026-11-24 本人指示）。
   ダーク背景では少し明るい鋼紺にして視認性を保つ */
:root[data-theme="dark"] .btn.primary, :root[data-theme="dark"] .go-pill { background: #46688a; border-color: #46688a; }
@media (prefers-color-scheme: dark) {
    :root[data-theme="system"] .btn.primary, :root[data-theme="system"] .go-pill { background: #46688a; border-color: #46688a; }
}
.btn.small { padding: 4px 10px; font-size: 0.8rem; }
.btn.danger { color: var(--danger); border-color: var(--danger-border); }
.btn.block { display: block; text-align: center; }
form.inline { display: inline; }

/* カレンダー */
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-head h2 { margin: 0; }
.cal-nav { display: flex; gap: 6px; align-items: center; }
.view-switch { margin-bottom: 10px; }
/* 有休入力モードの切替バー（ビュー切替の直下・全ビュー共通） */
.paid-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; }
/* 有休モード中の日番号ボタン（リンクと同じ見た目で押せるように） */
button.daynum {
    background: none; border: none; padding: 0; margin: 0;
    font: inherit; color: inherit; cursor: pointer; text-decoration: underline dotted;
}
/* リストビューの種類フィルタ（ビュー切替とは別の小さいピル行） */
.filter-tabs { margin: 0 0 10px; align-items: center; }
.filter-tabs a { font-size: 0.78rem; padding: 4px 9px; }
.filter-label { font-size: 0.8rem; color: var(--muted); }
/* Topタブ（サマリー） */
.count-big { font-size: 2rem; font-weight: bold; margin: 4px 0 8px; }
.overdue { color: var(--danger); font-weight: bold; font-size: 0.85rem; }
.rough-note { color: var(--muted); font-size: 0.8rem; margin: 6px 0 0; }
table.calendar { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.calendar th, table.calendar td {
    border: 1px solid var(--cal-border); padding: 3px; vertical-align: top;
    font-size: 0.75rem; height: 64px; overflow: hidden;
}
table.calendar th { height: auto; text-align: center; background: var(--cal-th-bg); }
table.calendar td .daynum { font-weight: bold; }
a.daynum { color: inherit; text-decoration: none; }
table.calendar td.sun .daynum, table.calendar th.sun { color: var(--sun); }
table.calendar td.sat .daynum, table.calendar th.sat { color: var(--sat); }
table.calendar td.holiday .daynum { color: var(--holiday); }
table.calendar td.holiday { background: var(--holiday-bg); }
table.calendar td.rough-shade { background: var(--rough-bg); }
table.calendar td.paid-leave { background: var(--leave-bg); }
.hname { display: block; color: var(--holiday); font-size: 0.62rem; }
.sname { display: block; font-size: 0.62rem; color: var(--special); }
.lname {
    display: inline-block; font-size: 0.62rem; color: var(--leave-text);
    border: 1px solid var(--leave-text); border-radius: 3px; padding: 0 2px;
}
table.calendar td.today { outline: 3px solid var(--accent); outline-offset: -3px; } /* 今日は四角い枠 */
table.calendar td.empty { background: var(--empty-bg); }
/* 決まった予定の色帯（セル端まで伸ばして連続に見せる） */
.trip-band {
    display: block; background: var(--band-bg); color: var(--band-text);
    font-size: 0.62rem; line-height: 1.4; text-decoration: none;
    margin: 1px -3px; padding: 0 3px; white-space: nowrap; overflow: hidden;
}
.trip-band.band-start { border-top-left-radius: 6px; border-bottom-left-radius: 6px; margin-left: 0; }
.trip-band.band-end { border-top-right-radius: 6px; border-bottom-right-radius: 6px; margin-right: 0; }
/* 週ビューはセルを高く */
table.calendar.week td { height: 120px; }
/* 年ビュー（ミニカレンダー） */
.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 10px; }
.year-month h3 { margin: 0 0 4px; font-size: 0.9rem; }
.year-month h3 a { text-decoration: none; }
table.calendar.mini th, table.calendar.mini td {
    height: auto; font-size: 0.6rem; padding: 2px 1px; text-align: center;
}
table.calendar.mini td .daynum { font-weight: normal; }
table.calendar.mini td.trip-day { background: var(--band-bg); }
table.calendar.mini td.paid-leave { background: var(--leave-bg); }
table.calendar.mini td.special-day .daynum { color: var(--special); font-weight: bold; text-decoration: underline; }
/* 年ビュー: ハートの鼓動アニメーション（スペース版 theme.css / MiniMonth より移植） */
table.calendar.mini td { position: relative; overflow: visible; }
@keyframes heart-beat { 0%,100%: transform: scale(1) rotate(0deg); 30%: transform: scale(1.5) rotate(-8deg); 55%: transform: scale(1.08) rotate(6deg); }
.trip-heart { position:absolute; top:-6px; right:-7px; font-size:9px; line-height:1; pointer-events:none; animation: heart-beat 1.1s ease-in-out infinite; }
.trip-heart.left { left:-7px; right:auto; }
@media (prefers-reduced-motion: reduce) { .trip-heart { animation: none; } }
.year-month.rough { background: var(--rough-bg); border-radius: 8px; padding: 6px; }
/* 日ビュー */
.day-big { font-size: 1.6rem; font-weight: bold; margin: 0; }
.day-nav { display: flex; justify-content: space-between; margin-bottom: 10px; }

/* 天気 */
.weather-card p { margin: 4px 0 0; font-size: 1rem; }
.weather-card .w-temp { font-size: 1.3rem; font-weight: bold; }
.weather-card .w-place { font-size: 0.85rem; font-weight: normal; color: var(--muted); margin-left: 6px; }

/* 二人の予定 */
.special-row {
    display: flex; justify-content: space-between; gap: 8px;
    padding: 8px 0; border-bottom: 1px dashed var(--soft-border);
}
.special-row:last-of-type { border-bottom: none; }
.special-block { border-bottom: 1px solid var(--cal-border); padding-bottom: 10px; margin-bottom: 10px; }
ul.upcoming { margin: 4px 0; padding-left: 18px; font-size: 0.9rem; }
.milestone-list { margin: 4px 0 10px; font-size: 0.9rem; }
.milestone-list div { margin: 2px 0; }

/* プラン一覧 */
.list-head { display: flex; justify-content: space-between; align-items: center; }
/* タブはテキストリンク基調（細い罫＋選択中は太字と下線。CR-20261124-01） */
.tabs { display: flex; gap: 18px; margin: 12px 0; flex-wrap: wrap; border-bottom: 1px solid var(--soft-border); }
.tabs a {
    padding: 5px 1px 7px; text-decoration: none; font-size: 0.95rem; color: var(--muted);
    border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a.active { color: var(--text); font-weight: bold; border-bottom-color: var(--text); }
.trip-row {
    display: block; padding: 10px 4px; border-bottom: 1px dashed var(--soft-border);
    text-decoration: none; color: var(--text);
}
.trip-row:last-child { border-bottom: none; }

/* プラン行の編集・削除ボタン（各タブ共通） */
.trip-actions { display: inline-flex; gap: 6px; align-items: center; flex: none; }
.trip-actions form { display: inline; margin: 0; }
.trip-row-wrap { display: flex; align-items: center; gap: 8px; border-bottom: 1px dashed var(--soft-border); }
.trip-row-wrap:last-child { border-bottom: none; }
.trip-row-wrap .trip-row { flex: 1; min-width: 0; border-bottom: none; }
.rough-link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; color: var(--text); }
.sect-tabs { margin: 18px 0 12px; }
.decided-link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; color: var(--text); }

/* 詳細 */
dl.detail { display: grid; grid-template-columns: 88px 1fr; row-gap: 6px; }
dl.detail dt { color: var(--muted); font-size: 0.85rem; }
dl.detail dd { margin: 0; }

/* タスク */
.task-row { display: flex; gap: 8px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed var(--soft-border); }
.task-row.done .task-main { opacity: 0.55; text-decoration: line-through; }
.task-main { flex: 1; }
ul.checklist { margin: 4px 0 0; padding-left: 6px; font-size: 0.85rem; list-style: none; }
ul.checklist li { display: flex; gap: 6px; align-items: flex-start; padding: 2px 0; }
ul.checklist li .cl-text.cl-done { text-decoration: line-through; opacity: 0.6; }
ul.checklist .btn.cl-toggle { padding: 0 6px; font-size: 0.75rem; line-height: 1.6; }
.task-edit { border-top: 1px dashed var(--soft-border); margin-top: 8px; padding-top: 4px; }

/* 祝日管理 */
.holiday-row {
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
    padding: 6px 0; border-bottom: 1px dashed var(--soft-border);
}
.holiday-row:last-child { border-bottom: none; }
.src-tag { font-size: 0.7rem; color: var(--muted); border: 1px solid var(--tabs-border); border-radius: 3px; padding: 0 4px; }

/* フォーム */
label { display: block; margin: 10px 0; font-size: 0.95rem; }
input[type="text"], input[type="number"], input[type="date"],
select, textarea {
    display: block; width: 100%; margin-top: 4px; padding: 11px;
    border: 1px solid var(--input-border); border-radius: 8px; font-size: 1rem;
    background: var(--input-bg); color: var(--text);
}
.timing-fields { border-left: 3px solid var(--accent); padding-left: 10px; }

/* ヘッダー＋メニューバー（Mobitect型、2026-11-24 本人指示。下部タブバーは廃止） */
.site-header {
    display: flex; align-items: stretch; justify-content: space-between;
    padding: calc(env(safe-area-inset-top, 0px) + 18px) 0 0 14px; background: var(--header-bg);
    border-bottom: none; position: static;
}
.brand-logo {
    display: flex; align-items: center; padding: 12px 0 8px;
    -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
}
/* ロゴ画像（2121×484・約4.38:1、透明余白トリミング済み）。スマホでも存在感のある高さ52px（横約228px） */
.brand-logo img { height: 52px; width: auto; display: block; }
.brand-logo.pressing { opacity: 0.45; }
.header-action {
    display: flex; align-items: center; padding: 0 26px;
    background: #0d2b45; color: #ffffff; text-decoration: none;
    font-weight: 700; font-size: 0.9rem; letter-spacing: 0.14em;
}
.menubar {
    position: sticky; top: 0; z-index: 10;
    display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
    background: var(--header-bg); border-bottom: 1px solid var(--header-border);
    padding: 0 8px;
}
.menubar::-webkit-scrollbar { display: none; }
.menubar a {
    padding: 11px 9px; font-size: 0.9rem; letter-spacing: 0.06em;
    color: var(--muted); text-decoration: none; white-space: nowrap;
    border-bottom: 2px solid transparent;
}
.menubar a.active { color: var(--link); font-weight: 700; border-bottom-color: var(--link); }

/* 二人の予定: ローズのアクセント */
.special-row { border-left: 3px solid var(--special); padding-left: 10px; }

/* 季節で行きたいところ */
.season-group h3 {
    margin: 10px 0 2px; font-size: 0.95rem; color: var(--special);
    border-bottom: 1px solid var(--cal-border); padding-bottom: 2px;
}
.season-group:first-of-type h3 { margin-top: 0; }

/* リストビュー（時系列アジェンダ） */
.agenda-month { margin: 14px 0 6px; font-size: 1rem; }
.agenda-month:first-of-type { margin-top: 0; }
.agenda-item {
    display: flex; gap: 8px; align-items: baseline;
    padding: 6px 0; border-bottom: 1px dashed var(--soft-border);
}
.agenda-item:last-child { border-bottom: none; }
.agenda-item.today { outline: 2px solid var(--accent); outline-offset: -2px; }
.agenda-date { min-width: 76px; font-weight: bold; font-size: 0.85rem; }
.agenda-tag { font-size: 0.68rem; border-radius: 3px; padding: 0 4px; border: 1px solid var(--tabs-border); color: var(--muted); white-space: nowrap; }
.agenda-tag.trip { background: var(--band-bg); color: var(--band-text); border-color: transparent; }
.agenda-tag.special { color: var(--special); border-color: var(--special); }
.agenda-tag.holiday { color: var(--holiday); border-color: var(--holiday); }

/* 仕上げ */
.finish-row {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 10px 0; border-bottom: 1px dashed var(--soft-border);
}
.finish-row:last-child { border-bottom: none; }
.finish-main { flex: 1; }
.status-tag {
    display: inline-block; margin-top: 4px; font-size: 0.72rem; color: var(--muted);
    border: 1px solid var(--tabs-border); border-radius: 3px; padding: 0 4px;
}

/* タスク追加（開閉） */
.task-add { margin-top: 8px; }
.task-add summary { cursor: pointer; font-size: 0.9rem; color: var(--link); }

/* 無効ボタン（準備中など） */
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
input[type="file"] { display: block; width: 100%; margin-top: 4px; font-size: 0.9rem; color: var(--text); }
input[type="password"], input[type="url"] {
    display: block; width: 100%; margin-top: 4px; padding: 11px;
    border: 1px solid var(--input-border); border-radius: 8px; font-size: 1rem;
    background: var(--input-bg); color: var(--text);
}

/* フラッシュメッセージ（成功系） */
.flash-ok { background: var(--leave-bg); border: 1px solid var(--leave-text); border-radius: 8px; padding: 10px; }

/* 音声入力ボタン（録音中） */
#mic-btn.recording { background: #0d2b45; border-color: #0d2b45; color: #fff; }

/* プラン内チャット */
.chat-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.chat-msg {
    max-width: 85%; padding: 8px 10px; border-radius: 12px; font-size: 0.92rem;
    background: var(--rough-bg); color: var(--text);
}
.chat-msg.user { align-self: flex-end; background: var(--band-bg); color: var(--band-text); }
.chat-msg.assistant { align-self: flex-start; }
.chat-msg .chat-time { display: block; font-size: 0.68rem; color: var(--muted); margin-top: 2px; }
.chat-form label { margin-top: 0; }

/* ============================================================
   フェーズ1.7: Topページのデザイン（.top-wrap 内だけに適用）
   2026-11-24 本人指示でパステル配色を廃止し、全ページ共通の
   白基調＋細い境界＋紺（#0d2b45）見出しに統一した
   ============================================================ */
.top-wrap {
    margin: -12px; padding: 12px;
    background: transparent;
    color: var(--text);
}
.top-wrap .card {
    background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 10px;
    box-shadow: none;
    padding: 20px;
}
.top-wrap .card h2 {
    font-size: 1.15rem; margin-bottom: 10px;
    border-left: 4px solid #0d2b45; padding-left: 10px;
}
.top-wrap a { color: var(--link); }
.top-wrap .muted { color: var(--muted); }
.top-wrap .note { color: var(--note); }
.top-wrap .count-big { color: var(--text); }
.top-wrap .overdue { color: var(--danger); }
.top-wrap .btn { background: var(--btn-bg); border-color: var(--btn-border); color: var(--btn-text); }
.top-wrap .btn.primary { background: #0d2b45; border-color: #0d2b45; color: #fff; }
.top-wrap .trip-row { border-bottom-color: var(--soft-border); }

/* カップルヘッダーカード */
.couple-card { text-align: center; }
.couple-pair { display: flex; align-items: center; justify-content: center; gap: 14px; }
.couple-person { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.avatar {
    width: 64px; height: 64px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.55rem; font-weight: bold;
    box-shadow: 0 2px 6px rgba(13, 43, 69, 0.22);
}
.avatar-lav { background: #0d2b45; }
.avatar-coral { background: #5b7a99; }
.avatar { overflow: hidden; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.top-wrap .couple-card { overflow: hidden; }
.couple-bg { margin: -20px -20px 16px; }
.couple-bg img { width: 100%; height: 168px; object-fit: cover; display: block; }
.couple-name { font-size: 0.85rem; font-weight: bold; color: var(--text); }
.couple-heart { color: #5b7a99; font-size: 1.35rem; animation: heart-beat 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .couple-heart { animation: none; } }
.couple-days { margin: 12px 0 4px; font-size: 1.15rem; font-weight: bold; color: var(--text); }
.couple-next { margin: 6px 0 0; }
.chip {
    display: inline-block; background: var(--ev-work-bg); color: var(--ev-work-text);
    border: 1px solid var(--ev-work-bar);
    border-radius: 999px; padding: 4px 12px; font-size: 0.82rem; font-weight: bold;
}

/* モコの今日の質問カード */
.moko-head { display: flex; align-items: center; gap: 9px; }
.moko-badge {
    width: 40px; height: 40px; border-radius: 50%; flex: none;
    display: flex; align-items: center; justify-content: center;
    background: #0d2b45;
    color: #fff; font-weight: bold; font-size: 1.05rem;
    box-shadow: 0 2px 6px rgba(13, 43, 69, 0.25);
}
.moko-name { font-weight: bold; font-size: 0.95rem; color: var(--text); }
.moko-badge-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 2px 6px rgba(13, 43, 69, 0.25); }
.moko-question { font-size: 1.08rem; margin: 10px 0 4px; color: var(--text); }

/* ============================================================
   フェーズ1.7: アルバム／写真
   ============================================================ */
.album-month { margin: 16px 0 8px; font-size: 1rem; }
.album-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 14px; }
.album-grid.small { grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 6px; }
.album-place { font-size: 0.85em; color: var(--muted, #8a8aa3); font-weight: normal; }
.album-month-link a { color: inherit; text-decoration: none; }
.album-thumb { display: block; border-radius: 10px; overflow: hidden; background: var(--empty-bg); }
.album-thumb img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.photo-view .photo-full { display: block; width: 100%; height: auto; border-radius: 12px; }
.photo-caption { font-size: 1.05rem; margin: 10px 0 2px; }

/* フェーズ2.3: 写真は黒いフレームに収め、日時・場所をフレーム内下部に出す（ライカ風） */
.photo-frame { background: #000; border-radius: 18px; padding: 22px; margin-bottom: 12px; }
.photo-frame .photo-full { display: block; width: 100%; height: auto; border-radius: 8px; }
.photo-frame-meta { color: #f5f5f7; padding: 14px 2px 2px; line-height: 1.6; }
.photo-frame-meta .pf-date { font-weight: 700; }
.photo-frame-meta a { color: #8ec5ff; }
.photo-under .photo-caption { margin-top: 0; }

/* フェーズ2.3: ざっくりのしあげ（LP風を避け、アプリらしい部品で組む） */
.finish-head { display: flex; align-items: center; gap: 12px; padding: 6px 2px 14px; }
.finish-head-icon { font-size: 1.9rem; line-height: 1; }
.finish-head-title { font-weight: 800; font-size: 1.25rem; }
.finish-head-sub { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.sec-label { font-size: 0.8rem; font-weight: 700; color: var(--muted); letter-spacing: 0.06em; margin: 16px 2px 8px; }
.rough-card { display: flex; align-items: center; gap: 10px; background: var(--card-bg); border: 1.5px dashed var(--card-border); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; text-decoration: none; color: var(--text); }
.rough-main { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rough-chip { align-self: flex-start; background: var(--rough-bg); color: var(--text); font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.rough-title { font-weight: 800; font-size: 1.08rem; }
.rough-dest { color: var(--muted); font-size: 0.85rem; }
.go-pill { flex: none; background: #0d2b45; color: #fff; font-weight: 700; font-size: 0.85rem; padding: 8px 12px; border-radius: 999px; }
.decided-row { display: flex; align-items: center; gap: 10px; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; text-decoration: none; color: var(--text); }
.decided-badge { flex: none; background: #e7f7ee; color: #0a7a42; font-size: 0.72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
:root[data-theme="dark"] .decided-badge { background: #123324; color: #4ade80; }
.decided-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.decided-title { font-weight: 700; }
.decided-when { flex: none; color: var(--muted); font-size: 0.8rem; text-align: right; }

/* フェーズ2.3: ひとことはLINE風チャット形式（自分=右・緑、相手=左） */
.chat-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.cmt { display: flex; flex-direction: column; max-width: 88%; }
.cmt.other { align-self: flex-start; align-items: flex-start; }
.cmt.me { align-self: flex-end; align-items: flex-end; }
.cmt-who { font-size: 0.72rem; color: var(--muted); margin: 0 2px 2px; }
.cmt-row { display: flex; align-items: flex-end; gap: 6px; }
.cmt.me .cmt-row { flex-direction: row-reverse; }
.cmt-bubble { padding: 8px 12px; border-radius: 16px; line-height: 1.45; word-break: break-word; white-space: pre-wrap; }
.cmt.other .cmt-bubble { background: var(--rough-bg); color: var(--text); border-bottom-left-radius: 4px; }
.cmt.me .cmt-bubble { background: #06c755; color: #fff; border-bottom-right-radius: 4px; }
.cmt-time { font-size: 0.68rem; color: var(--muted); white-space: nowrap; }
.cmt-form { display: flex; gap: 8px; }
.cmt-form input { flex: 1; }

/* ============================================================
   フェーズ1.8: アルバム（EXIF自動入力・紐づけ提案・プラン選択ピッカー）
   ============================================================ */
.album-item .album-meta { margin: 3px 2px 0; font-size: 0.72rem; color: var(--muted, #8a8aa3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-card { border-top: 1px solid #eee; padding: 12px 0 4px; margin-top: 12px; }
.suggest-head { display: flex; gap: 12px; align-items: flex-start; }
.suggest-thumb { flex: none; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; }
.suggest-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.suggest-meta p { margin: 2px 0; }
.suggest-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.suggest-actions form { margin: 0; }
.trip-picker { margin: 8px 0; }
.tp-filters { display: flex; gap: 8px; margin-bottom: 8px; }
.tp-filters select { flex: 1; }
.tp-list { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.tp-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #e3e3ee; border-radius: 10px; background: #fff; cursor: pointer; margin: 0; }
.tp-item .tp-period { margin-left: auto; font-size: 0.8rem; color: var(--muted, #8a8aa3); white-space: nowrap; }

/* ============================================================
   フェーズ1.9: Top再設計（タイトルヘッダー＋左右カップルカード＋日数）
   ・アルバム再編（ビュー切替・複数選択・お気に入り）・ウサギチャット
   ============================================================ */
/* Topのタイトルヘッダー帯 */
.top-title-band { text-align: center; margin: 2px 0 12px; }
.top-title { font-size: 1.35rem; margin: 0; color: var(--text); letter-spacing: 0.02em; }
/* カップルエリア: 左右それぞれを小カードにして並べる */
.top-wrap .couple-person {
    background: var(--rough-bg); border: 1px solid var(--card-border); border-radius: 10px; padding: 12px 22px 10px;
}
.couple-count { margin: 14px 0 0; font-size: 1.3rem; font-weight: bold; color: var(--text); }
.top-wrap .couple-days { margin: 2px 0 4px; font-size: 0.9rem; font-weight: normal; color: var(--muted); }
/* ウサギへの質問フォーム（Topカード内） */
.usagi-ask { display: flex; gap: 8px; margin-top: 10px; }
.usagi-ask input[type="text"] { flex: 1; margin-top: 0; }
.usagi-ask .btn { flex: none; white-space: nowrap; }
/* ウサギアイコン（入力タブの見出し・チャット画面） */
.usagi-icon { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; vertical-align: -7px; }
.usagi-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 2px 6px rgba(13, 43, 69, 0.25); }
/* アルバム: 複数選択チェックとお気に入り★（サムネイル上に重ねる） */
.album-item { position: relative; }
.photo-check {
    position: absolute; top: 4px; left: 4px; z-index: 2; margin: 0;
    display: flex; align-items: center; gap: 2px;
    background: rgba(255, 255, 255, 0.92); border-radius: 999px; padding: 2px 8px 2px 4px;
    font-size: 0.75rem; color: #1c1c1e; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18); cursor: pointer;
}
.photo-check input { width: 18px; height: 18px; margin: 0; }
.fav-form { position: absolute; top: 4px; right: 4px; z-index: 2; margin: 0; }
.fav-btn {
    border: none; background: rgba(255, 255, 255, 0.92); border-radius: 50%;
    width: 30px; height: 30px; padding: 0; font-size: 1rem; line-height: 1;
    cursor: pointer; color: #b9b9c7; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
.fav-btn.on { color: #ffb400; }
.bulk-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }


/* ============================================================
   フェーズ2.0: プラン選択モーダル・カレンダーのセル全体タップ・写真件数
   ============================================================ */
/* プラン選択モーダル（シート形式の一覧から選ぶ） */
.picker-modal {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(20, 16, 40, 0.45);
    display: flex; align-items: flex-end; justify-content: center;
}
.picker-modal[hidden] { display: none; }
.picker-sheet {
    background: var(--card-bg, #fff); color: var(--text);
    width: 100%; max-width: 560px; max-height: 75vh; overflow-y: auto;
    border-radius: 16px 16px 0 0; padding: 16px;
}
.picker-title { font-weight: bold; margin: 0 0 10px; }
.picker-item {
    display: flex; align-items: center; width: 100%; text-align: left;
    padding: 10px 12px; border: 1px solid #e3e3ee; border-radius: 10px;
    background: #fff; color: #1c1c1e; margin: 0 0 6px; cursor: pointer; font-size: 1rem;
}
.picker-item .tp-period { margin-left: auto; font-size: 0.8rem; color: var(--muted, #8a8aa3); white-space: nowrap; }
/* カレンダー: 日番号リンクをセル全体に広げてタップで1日ビューへ（有給ボタンは対象外） */
.calendar td { position: relative; }
.calendar td a.daynum::after { content: ""; position: absolute; inset: 0; }
/* セル内の写真件数マーカー */
.pcount { font-size: 0.72rem; color: var(--muted, #8a8aa3); }
/* 折りたたみ（設定のGoogle連携・接続テスト） */
details.fold > summary { cursor: pointer; font-weight: 600; padding: 0.35rem 0; }
details.card.fold > summary { font-size: 1.05rem; }
details.fold > summary:hover { color: var(--link); }

/* ============================================================
   指示書05: カレンダー統合表示（連携予定の色・タイムグリッド）
   区分色は彩度を落とした配色。cat-* が付いた要素は --ev-* を切り替える
   ============================================================ */
.cat-work    { --ev-bg: var(--ev-work-bg);    --ev-text: var(--ev-work-text);    --ev-bar: var(--ev-work-bar); }
.cat-pv      { --ev-bg: var(--ev-pv-bg);      --ev-text: var(--ev-pv-text);      --ev-bar: var(--ev-pv-bar); }
.cat-partner { --ev-bg: var(--ev-partner-bg); --ev-text: var(--ev-partner-text); --ev-bar: var(--ev-partner-bar); }
.cat-secret  { --ev-bg: var(--ev-secret-bg);  --ev-text: var(--ev-secret-text);  --ev-bar: var(--ev-secret-bar); }

/* 月セルの連携予定チップ */
.ev-chip {
    display: block; background: var(--ev-bg); color: var(--ev-text);
    border-left: 3px solid var(--ev-bar);
    font-size: 0.62rem; line-height: 1.4; text-decoration: none;
    margin: 1px 0; padding: 0 3px; white-space: nowrap; overflow: hidden;
}
.ev-more { display: block; font-size: 0.62rem; color: var(--muted); padding: 0 3px; }

/* 年ビュー: 連携予定がある日のドット */
.gcal-dot {
    position: absolute; bottom: 1px; left: 50%; transform: translateX(-50%);
    width: 4px; height: 4px; border-radius: 50%; background: var(--muted);
}

/* リストビューの連携予定タグ */
.agenda-tag.gcal { background: var(--ev-bg); color: var(--ev-text); border-color: transparent; }

/* Google式タイムグリッド（週・日。時刻軸42px/時） */
.tg { border: 1px solid var(--cal-border); background: var(--card-bg); }
.tg-row { display: grid; }
.tg-n1 .tg-row { grid-template-columns: 46px 1fr; }
.tg-n7 .tg-row { grid-template-columns: 46px repeat(7, 1fr); }
.tg-headrow { border-bottom: 1px solid var(--cal-border); }
.tg-dayhead { text-align: center; padding: 4px 0 5px; border-left: 1px solid var(--soft-border); }
.tg-wd { display: block; font-size: 0.65rem; color: var(--muted); }
.tg-dayhead.sun .tg-wd, .tg-dayhead.sun .tg-daynum { color: var(--sun); }
.tg-dayhead.sat .tg-wd, .tg-dayhead.sat .tg-daynum { color: var(--sat); }
.tg-dayhead.holiday .tg-daynum { color: var(--holiday); }
.tg-daynum { font-size: 1rem; font-weight: bold; color: var(--text); text-decoration: none; }
.tg-dayhead.today .tg-daynum { background: var(--text); color: var(--card-bg); border-radius: 50%; padding: 1px 7px; }
button.tg-daynum {
    background: none; border: none; padding: 0; margin: 0;
    font: inherit; color: inherit; cursor: pointer; text-decoration: underline dotted;
}
.tg-dayhead.today button.tg-daynum { background: var(--text); color: var(--card-bg); border-radius: 50%; padding: 1px 7px; text-decoration: none; }
.tg-alldayrow { border-bottom: 1px solid var(--cal-border); }
.tg-axis-label { font-size: 0.62rem; color: var(--muted); text-align: right; padding: 3px 4px 3px 0; }
.tg-allday-cell { border-left: 1px solid var(--soft-border); padding: 2px; min-height: 22px; }
.tg-note { display: block; font-size: 0.62rem; line-height: 1.4; padding: 0 3px; }
.tg-note.holiday { color: var(--holiday); }
.tg-note.special { color: var(--special); }
.tg-note.leave { color: var(--leave-text); }
.tg-chip {
    display: block; background: var(--ev-bg); color: var(--ev-text);
    border-left: 3px solid var(--ev-bar);
    font-size: 0.62rem; line-height: 1.4; text-decoration: none;
    margin: 1px 0; padding: 0 3px; white-space: nowrap; overflow: hidden;
}
.tg-chip.trip { --ev-bg: var(--band-bg); --ev-text: var(--band-text); --ev-bar: var(--band-text); }
/* タイムグリッドの表示窓: 12時間分（初期表示 07:00〜19:00）だけ見せ、時間外はグリッド内をスクロールして見る。
   初期スクロール位置は app.js が 07:00 に合わせる。曜日ヘッダーと終日帯はこの行の外側にあるためスクロールに追随しない */
.tg-body { height: 504px; overflow-y: auto; }
.tg-axis { position: relative; height: 1008px; }
.tg-hour {
    position: absolute; right: 4px; transform: translateY(-50%);
    font-size: 0.62rem; color: var(--muted); white-space: nowrap;
}
.tg-axis .tg-hour:first-of-type { transform: translateY(0); }
.tg-col {
    position: relative; height: 1008px; border-left: 1px solid var(--soft-border);
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 41px, var(--soft-border) 41px, var(--soft-border) 42px);
}
.tg-col.today { background-color: var(--tg-today); }
.tg-ev {
    position: absolute; margin-left: 1px;
    background: var(--ev-bg); color: var(--ev-text);
    border-left: 3px solid var(--ev-bar); border-radius: 2px;
    padding: 1px 3px; font-size: 0.65rem; line-height: 1.25;
    overflow: hidden; text-decoration: none;
}
.tg-ev-time { display: block; font-size: 0.58rem; opacity: 0.75; }
.tg-ev-title { display: block; font-weight: 600; }

/* ============================================================
   トップ画面ヒーロー（2026-11-24 本人指示、LANDIC採用サイト風）
   設定で指定した写真を全面に敷き、数値・告知を白抜き/黒抜きで重ねる。
   文字色は設定値で .light-text（白）/ .dark-text（黒）を切り替える
   ============================================================ */
.hero {
    position: relative; overflow: hidden;
    height: calc(100svh - 122px); min-height: 460px;
    margin: -24px 0 14px;
    border-radius: 0;
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.hero.light-text { color: #ffffff; }
.hero.dark-text { color: #16181d; }
.hero.light-text::after { background: rgba(8, 18, 32, 0.38); }
.hero.dark-text::after { background: rgba(255, 255, 255, 0.34); }
.hero-overlay {
    position: absolute; inset: 0; z-index: 2;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 24px;
}
.hero.light-text .hero-overlay { text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55); }
.hero.dark-text .hero-overlay { text-shadow: 0 1px 6px rgba(255, 255, 255, 0.65); }
.hero-names { margin: 0 0 4px; font-size: 0.95rem; font-weight: bold; letter-spacing: 0.18em; }
.hero-days { margin: 0; font-size: clamp(3rem, 11vw, 4.6rem); font-weight: 800; line-height: 1.15; }
.hero-since { margin: 4px 0 0; font-size: 0.85rem; opacity: 0.85; }
.hero-notes { margin: 10px 0 0; padding: 0; list-style: none; font-size: 1rem; font-weight: 600; }
.hero-notes li { margin: 3px 0; }

/* ヒーローに飲み込んだ旧カード分（次の予定・直近タスク。2026-11-24 本人指示でカードから文字へ） */
.hero-overlay .muted { color: inherit; opacity: 0.85; }
.hero-trip { margin-top: 20px; }
.hero-trip p { margin: 2px 0; }
.hero-trip .ht-days { margin: 0; font-size: clamp(1.6rem, 5.5vw, 2.4rem); font-weight: 800; line-height: 1.2; }

/* 特別な日（キリ番・誕生日・記念日の当日）: 祝祭色（ゴールド〜ローズ）＋光が流れる演出 */
.special-badge {
    display: inline-block; margin: 0 0 8px; padding: 3px 12px;
    border-radius: 999px; font-size: 0.78rem; font-weight: bold; letter-spacing: 0.05em;
    background: linear-gradient(90deg, #d4a017, #e88ca0); color: #fff;
}
.hero.is-special { box-shadow: inset 0 0 0 2px rgba(212, 160, 23, 0.65); }
.hero.is-special::before {
    content: ""; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 215, 130, 0.35) 48%, rgba(232, 140, 160, 0.30) 52%, transparent 70%);
    background-size: 250% 100%;
    animation: hero-shine 3.6s ease-in-out infinite;
}
@keyframes hero-shine {
    0% { background-position: 120% 0; }
    100% { background-position: -120% 0; }
}
.couple-card.is-special {
    border-color: #d4a017;
    box-shadow: 0 0 0 1px rgba(212, 160, 23, 0.45), 0 6px 24px rgba(212, 160, 23, 0.18);
}
.couple-card.is-special .couple-heart { color: #e88ca0; }
@media (prefers-reduced-motion: reduce) { .hero.is-special::before { animation: none; } }

/* 設定: 背景写真ピッカー（サムネイルのラジオ一覧） */
.hero-picker { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 14px; }
.hero-pick { margin: 0; cursor: pointer; text-align: center; }
.hero-pick input { display: block; margin: 0 auto 4px; }
.hero-pick img {
    width: 84px; height: 84px; object-fit: cover; border-radius: 8px; display: block;
    border: 2px solid transparent;
}
.hero-pick-none {
    width: 84px; height: 84px; border-radius: 8px; padding: 4px;
    display: flex; align-items: center; justify-content: center; text-align: center;
    border: 1px dashed var(--card-border); color: var(--muted); font-size: 0.72rem;
}
.hero-pick-label { display: block; font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.hero-pick:has(input:checked) img,
.hero-pick:has(input:checked) .hero-pick-none { border-color: var(--link); outline: 2px solid var(--link); }
.hero-text-opts { margin: 4px 0 14px; }
.hero-text-opts label { display: block; margin: 6px 0; }

/* 写真ページ: 背景に設定するボタンの並び */
.photo-bg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ============================================================
   ログイン画面（2026-11-24 本人指示、LANDIC風）
   背景写真を全面に敷き、中央に白い半透明カード。写真なしは白基調＋紺のプレーン
   ============================================================ */
body.login-page {
    min-height: 100vh; margin: 0; padding: 20px 12px;
    display: flex; align-items: center; justify-content: center;
    background: #f4f6f8;
}
.login-bg {
    position: fixed; inset: 0; z-index: -1;
    background-size: cover; background-position: center;
}
.login-card {
    width: 100%; max-width: 420px; text-align: center;
    background: #ffffff; color: #1c1c1e;
    border: 1px solid #e4e4e4; border-radius: 14px;
    padding: 38px 28px 30px;
}
body.login-page.has-bg .login-card {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}
body.login-page.has-bg .login-logo {
    filter: drop-shadow(0 2px 12px rgba(13, 43, 69, 0.5));
}
body.login-page.has-bg .login-card .btn.primary {
    background: #ffffff; border-color: #ffffff; color: #0d2b45;
    font-weight: 700; box-shadow: 0 8px 28px rgba(13, 43, 69, 0.35);
}
body.login-page.has-bg .login-card .alert {
    background: rgba(255, 255, 255, 0.94);
}
.login-logo { width: 300px; max-width: 86%; height: auto; display: block; margin: 0 auto 20px; }
.login-card .btn.primary { background: #0d2b45; border-color: #0d2b45; color: #fff; }

/* ============================================================
   PCレイアウト（900px以上、2026-11-24 本人指示）
   スマホ用レイアウトを引き伸ばすのではなく、幅で切り替える。
   - 基準フォントを 18px 相当に拡大し、rem 指定全体をゆったりさせる
   - メニューバーは左サイドバー（固定・縦並び）になる
   - コンテナは 1140px、見出し・余白は大きめ
   - カレンダーのグリッド内フォントは rem 拡大分（微増）に留める
   ============================================================ */
@media (min-width: 900px) {
    html { font-size: 18px; }
    body { line-height: 1.7; padding-left: 208px; overflow-x: clip; }

    .container { max-width: 1140px; padding: 28px 36px; }
    .container.narrow { max-width: 420px; padding-top: 48px; }
    .site-footer { max-width: 1140px; }
    .maint-banner { max-width: 1140px; }

    /* ヘッダー: ロゴを大きく（高さ84px≒横368px、新ロゴ 2121×484 前提）。右端の INPUT ブロックは stretch で行の高さに追随。スマホ用の上余白（セーフエリア分）はPCでは無効化 */
    .site-header { padding-top: 0; }
    .brand-logo { padding: 6px 0; }
    .brand-logo img { height: 84px; }
    .header-action { padding: 0 34px; font-size: 0.95rem; }

    /* メニューバー → 左サイドバー（縦並び・現在地は左バー＋太字＋地色） */
    .menubar {
        position: fixed; left: 0; top: 0; bottom: 0; z-index: 30;
        width: 208px; flex-direction: column; align-items: stretch; gap: 2px;
        overflow-y: auto; overflow-x: hidden;
        border-bottom: none; border-right: 1px solid var(--header-border);
        padding: 20px 0;
    }
    .menubar a {
        padding: 13px 22px; font-size: 0.95rem; letter-spacing: 0.08em;
        border-bottom: none; border-left: 3px solid transparent;
    }
    .menubar a.active {
        color: var(--link); font-weight: 700;
        border-left-color: var(--link); background: var(--rough-bg);
    }

    /* 共通部品: 余白と見出しを大きめに */
    .card { padding: 26px 28px; margin-bottom: 24px; }
    .card h2 { font-size: 1.3rem; }
    .app-title { font-size: 2.6rem; }
    .count-big { font-size: 2.6rem; }
    .day-big { font-size: 2.1rem; }
    .tabs { gap: 26px; margin: 16px 0; }

    /* カレンダー: セルに余裕を持たせる（グリッド内フォントは rem 拡大分のみ） */
    table.calendar td { height: 96px; }
    table.calendar.week td { height: 150px; }
    .year-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }

    /* Top: ヒーローが旧カード分を飲み込み、白カードはウサギのみになったため1カラム */
    .top-wrap {
        display: grid; grid-template-columns: 1fr; gap: 24px;
        margin: 0; padding: 0;
    }
    .top-wrap .card { padding: 28px 30px; margin-bottom: 0; }
    .top-wrap .couple-card { grid-column: 1 / -1; }
    /* Topヒーロー: <main>の外に出してメイン領域の全幅＋画面いっぱい（ヘッダー分を引いた高さ）。上の空<main>のパディング分は負マージンで詰める */
    .hero { height: calc(100vh - 96px); min-height: 560px; margin: -56px 0 14px; }
    .hero-overlay { padding: 40px; }
    .hero-names { font-size: 1.05rem; }
    .hero-days { font-size: clamp(4rem, 7vw, 6rem); }
    .hero-notes { font-size: 1.1rem; }
    .top-wrap .couple-bg { margin: -28px -30px 20px; }
    .top-wrap .couple-bg img { height: 220px; }
    .top-title { font-size: 1.7rem; }
    .photo-frame { padding: 34px; }
    .avatar { width: 84px; height: 84px; font-size: 2rem; }
    .couple-count { font-size: 1.6rem; }
    .moko-question { font-size: 1.2rem; }
}
