/* ===== CCN ENGLISH Library mockups — shared utilities ===== */
/* All 8 styles import brand.css then override per their visual identity */

* { box-sizing: border-box; margin: 0; padding: 0; }
body { -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Style banner (top label across all 8 mockups) */
.style-banner { background: var(--ink); color: var(--paper); padding: 6px 20px; font-size: 11px; letter-spacing: 0.15em; text-align: center; font-family: -apple-system, "Hiragino Kaku Gothic ProN", sans-serif; }
.style-banner em { font-style: normal; color: var(--turquoise); }

/* Bottom switcher common to all 8 styles */
.style-switch { padding: 18px 20px; background: var(--cream); border-top: 1px solid var(--line); font-family: -apple-system, sans-serif; }
.style-switch-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.style-switch-label { font-size: 11px; color: var(--ink-soft); letter-spacing: 0.05em; margin-right: 4px; }
.style-switch a { display: inline-flex; align-items: center; gap: 6px; background: var(--paper); border: 1px solid var(--line); padding: 6px 11px; border-radius: 14px; font-size: 11px; font-weight: 700; transition: all 0.15s; text-decoration: none; color: var(--ink); }
.style-switch a:hover { border-color: var(--ink); }
.style-switch a.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.style-switch a .num { font-family: "Iowan Old Style", "Charter", serif; font-style: italic; font-size: 10px; color: var(--turquoise-deep); margin-right: 2px; font-weight: 700; }
.style-switch a.current .num { color: var(--turquoise); }
.style-switch a.settings { background: var(--cream); border-style: dashed; }

/* Global nav (top-right floating) — appears on every page */
.lib-globalnav {
  position: fixed; top: 12px; right: 12px;
  z-index: 1000;
  display: flex; gap: 6px; align-items: center;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 100px;
  padding: 6px 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", sans-serif;
}
.lib-globalnav a {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none;
  padding: 5px 10px; border-radius: 100px;
  transition: all 0.15s;
  white-space: nowrap;
}
.lib-globalnav a:hover { background: var(--ink); color: var(--paper); }
.lib-globalnav a.search { background: var(--cream); border: 1px solid var(--line); }
.lib-globalnav a.scheduler { background: var(--turquoise-pale); color: var(--ink); }
.lib-globalnav a.scheduler:hover { background: var(--turquoise-deep); color: var(--paper); }
.lib-globalnav .sep { width: 1px; height: 14px; background: var(--line); }
@media (max-width: 720px) {
  .lib-globalnav { top: auto; right: 12px; bottom: 12px; padding: 4px 6px; }
  .lib-globalnav a { font-size: 10px; padding: 4px 8px; }
  .lib-globalnav a span.label { display: none; }
}

/* Common footer */
.lib-foot { padding: 24px 20px; text-align: center; font-family: -apple-system, sans-serif; font-size: 11px; color: var(--ink-soft); letter-spacing: 0.05em; background: var(--paper); border-top: 1px solid var(--line); }

/* ============================================================
   ACCOUNT FAB (round avatar) + DRAWER (right slide-in)
   Inspired by Genny Settings layout
   ============================================================ */

/* Hide the old floating pill nav and per-page user widget — replaced by .account-fab */
.lib-globalnav { display: none !important; }
.appbar .me { display: none !important; }

/* Reserve clearance on the right of EVERY top header so the floating
   .account-fab (top:16px right:16px, 42px wide) never sits over header
   content. 76px = FAB(42) + margin(16+18). Covers all known header
   classes used across the 8 home styles + scheduler + onboarding. */
.appbar,
.hd,
.top-bar,
.masthead-inner,
.topbar { padding-right: 76px !important; }
@media (max-width: 720px) {
  .appbar,
  .hd,
  .top-bar,
  .masthead-inner,
  .topbar { padding-right: 64px !important; }
}

/* Round avatar floating button at top-right */
.account-fab {
  position: fixed;
  top: 16px; right: 16px;
  z-index: 1000;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: linear-gradient(135deg, var(--turquoise) 0%, var(--pink) 100%);
  box-shadow: 0 4px 18px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.06);
  cursor: pointer;
  display: grid; place-items: center;
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", sans-serif;
  color: #fff;
  padding: 0;
  transition: transform 0.15s, box-shadow 0.15s;
}
.account-fab:hover { transform: scale(1.06); box-shadow: 0 6px 24px rgba(0,0,0,0.28); }
.account-fab .initial {
  font-size: 16px; font-weight: 900;
  text-shadow: 0 1px 2px rgba(0,0,0,0.18);
  line-height: 1;
}

/* Drawer backdrop */
.account-drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.42);
  z-index: 1099;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.account-drawer-backdrop.open { opacity: 1; pointer-events: auto; }

/* Drawer (slide from right) */
.account-drawer {
  /* CCN-252: パネルは常に白のため、テーマ変数をドロワー内でライト値に固定
     （/start/ 等ダーク系ページで --ink が白＝白文字on白パネルになる不具合の恒久対策） */
  --ink: #2A2A2A; --ink-soft: #555555; --muted: #888888;
  --line: #E5E5E2; --line-soft: #F0F0EC; --cream: #FAF8F2; --paper: #FFFFFF;
  --turquoise: #7EE5DD; --turquoise-deep: #4FC8C0; --turquoise-pale: #DFF7F4;
  --pink: #F8C9F0; --pink-deep: #E89BD9; --pink-pale: #FBE5F6;
  --yellow: #FFD93D; --yellow-pale: #FFF4C2;
  position: fixed;
  top: 0; right: 0;
  width: 400px; max-width: 100vw;
  height: 100vh;
  background: #FFFFFF;
  z-index: 1100;
  box-shadow: -8px 0 36px rgba(0,0,0,0.18);
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 13px;
  color: var(--ink);
  letter-spacing: 0;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}
.account-drawer.open { transform: translateX(0); }

.acc-drawer-head {
  padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.acc-drawer-head h2 {
  font-size: 17px; font-weight: 800; letter-spacing: -0.01em;
  margin: 0;
}
.acc-drawer-close {
  background: transparent; border: 0;
  width: 34px; height: 34px; border-radius: 8px;
  font-size: 22px; cursor: pointer;
  color: var(--ink-soft);
  font-family: -apple-system, sans-serif;
  display: grid; place-items: center;
  line-height: 1;
}
.acc-drawer-close:hover { background: var(--cream); color: var(--ink); }

.acc-drawer-body {
  flex: 1; overflow-y: auto;
  padding: 0;
}

/* User card */
.acc-user-card {
  padding: 26px 20px 22px;
  background: linear-gradient(180deg, #FAF8F2 0%, #FFFFFF 100%);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.acc-avatar-wrap {
  position: relative;
  display: inline-block;
  margin: 0 auto 14px;
}
.acc-avatar {
  width: 76px; height: 76px; border-radius: 50%;
  background: linear-gradient(135deg, var(--turquoise) 0%, var(--pink) 100%);
  display: flex; align-items: center; justify-content: center;
  border: 3px solid #fff;
  box-shadow: 0 6px 20px rgba(232,155,217,0.30);
  overflow: hidden;
}
.acc-avatar.lg .lg-initial {
  font-size: 32px; font-weight: 900; color: #fff;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
img.acc-avatar.lg.has-img { object-fit: cover; }
.acc-avatar-edit {
  position: absolute;
  bottom: 4px; right: -8px;
  background: var(--ink); color: #fff;
  border: 2px solid #fff;
  border-radius: 99px;
  font-size: 10px; font-weight: 800;
  padding: 4px 10px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  letter-spacing: 0.05em;
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", sans-serif;
}
.acc-avatar-edit:hover { background: var(--turquoise-deep); }
img.fab-img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block;
}
.acc-name {
  font-size: 17px; font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.acc-email {
  font-size: 12px; color: var(--ink-soft);
  margin-top: 4px; word-break: break-all;
}
.acc-tier-badge {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 12px;
  padding: 5px 12px; border-radius: 99px;
  font-size: 10px; font-weight: 900; letter-spacing: 0.14em;
  color: #fff;
}
.acc-tier-badge.tier-line_free { background: #06C755; }
.acc-tier-badge.tier-trial     { background: var(--pink-deep); }
.acc-tier-badge.tier-salon     { background: var(--turquoise-deep); }
.acc-tier-badge.tier-core      { background: var(--ink); }
.acc-tier-badge.tier-student   { background: #C9A93A; color: #2A1810; }

/* Section block */
.acc-section-block {
  padding: 22px 20px 20px;
  border-bottom: 1px solid var(--line);
}
.acc-section-block h3 {
  font-size: 11px; letter-spacing: 0.18em; font-weight: 800;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin: 0 0 14px 0;
}

.acc-info-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.acc-info-row {
  display: grid; grid-template-columns: 110px 1fr;
  gap: 12px; align-items: baseline;
  font-size: 13px;
}
.acc-info-row .lbl {
  color: var(--ink-soft); font-size: 11px;
  letter-spacing: 0.05em; font-weight: 700;
}
.acc-info-row .val { font-weight: 700; color: var(--ink); }
.acc-info-row .val em { color: var(--ink-soft); font-style: normal; font-weight: 500; }
.acc-info-row .val a { color: var(--turquoise-deep); font-weight: 700; }

.acc-cta-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ink); color: var(--paper);
  padding: 9px 18px;
  border-radius: 7px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.04em;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  margin-top: 14px;
  transition: opacity 0.15s, transform 0.1s;
  font-family: inherit;
}
.acc-cta-btn:hover { opacity: 0.86; }
.acc-cta-btn:active { transform: translateY(1px); }
.acc-cta-btn.secondary {
  background: var(--cream); color: var(--ink);
  border: 1px solid var(--line);
}
.acc-cta-btn.secondary:hover { background: #fff; border-color: var(--ink); opacity: 1; }

/* Billing history table */
.acc-bill-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.acc-bill-table th, .acc-bill-table td {
  padding: 9px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}
.acc-bill-table th {
  font-size: 10px; letter-spacing: 0.1em; font-weight: 800;
  color: var(--ink-soft);
  background: var(--cream);
  text-transform: uppercase;
}
.acc-bill-table td.amount { font-weight: 800; }
.acc-bill-table .status {
  display: inline-block;
  background: #E8F5E9; color: #2E7D32;
  padding: 2px 8px; border-radius: 99px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.05em;
}

/* Quick links list */
.acc-link-list {
  display: flex; flex-direction: column;
  gap: 0;
}
.acc-link {
  display: grid;
  grid-template-columns: 24px 1fr 14px;
  align-items: center; gap: 12px;
  padding: 12px 8px;
  margin: 0 -8px;
  font-size: 13px; font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  border: 0;
  background: transparent;
  font-family: inherit;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 6px;
  transition: background 0.15s, color 0.15s, padding-left 0.15s;
}
.acc-link:last-child { border-bottom: 0; }
.acc-link .icn { font-size: 16px; text-align: center; }
.acc-link .chev { font-size: 18px; color: var(--ink-soft); line-height: 1; transition: color 0.15s; }
.acc-link.logout { color: #C72020; }

/* PC hover（マウスあり端末のみ） */
@media (hover: hover) and (pointer: fine) {
  .acc-link:hover {
    background: rgba(79, 200, 192, 0.10);
    color: var(--turquoise-deep);
    padding-left: 16px;
  }
  .acc-link:hover .chev { color: var(--turquoise); }
  .acc-link.logout:hover {
    background: rgba(199, 32, 32, 0.07);
    color: #C72020;
    padding-left: 16px;
  }
}

/* スマホ：タップ中だけ色が出る（スティッキーホバー防止） */
.acc-link:active {
  background: rgba(79, 200, 192, 0.15);
  color: var(--turquoise-deep);
}
.acc-link.logout:active {
  background: rgba(199, 32, 32, 0.10);
  color: #C72020;
}

/* Mobile */
@media (max-width: 540px) {
  .account-drawer { width: 100vw; }
  .acc-info-row { grid-template-columns: 100px 1fr; }
  .account-fab { top: 12px; right: 12px; width: 38px; height: 38px; }
}

/* Brand link cursor */
.appbar .brand[role="link"] { cursor: pointer; }
.appbar .brand[role="link"]:hover { opacity: 0.78; }

/* ============================================================
   CCN-108: 初回学習計画モーダル (First Plan Wizard)
   ============================================================ */
.fpw-backdrop {
  position: fixed; inset: 0;
  background: rgba(20,20,20,0.55);
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 100000;
}
.fpw-backdrop.open { opacity: 1; pointer-events: auto; }

.fpw {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  z-index: 100001;
  pointer-events: none;
}
.fpw-card {
  background: var(--paper); color: var(--ink);
  width: 100%; max-width: 760px;
  max-height: 90vh;
  border-radius: 6px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
  overflow: hidden;
  display: flex; flex-direction: column;
  transform: translateY(20px) scale(0.97); opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: auto;
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", sans-serif;
}
.fpw.open .fpw-card { transform: translateY(0) scale(1); opacity: 1; }

.fpw-head {
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--cream);
}
.fpw-head .step {
  font-family: "Iowan Old Style", "Charter", serif;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
}
.fpw-head .step em { color: var(--turquoise-deep); font-weight: 800; font-style: italic; }
.fpw-close {
  background: transparent; border: 0;
  font-size: 22px; line-height: 1;
  color: var(--ink-soft); cursor: pointer;
  padding: 4px 8px;
}
.fpw-close:hover { color: var(--ink); }

.fpw-body {
  padding: 32px 36px 24px;
  overflow-y: auto;
}
.fpw-body h2 {
  font-family: "Iowan Old Style", "Charter", serif;
  font-size: 26px; font-weight: 900; letter-spacing: -0.02em;
  line-height: 1.4;
  margin-bottom: 12px;
}
.fpw-body h2 em {
  color: var(--turquoise-deep); font-style: italic;
}
.fpw-body .lead {
  font-size: 14px; color: var(--ink-soft);
  line-height: 1.85;
  margin-bottom: 22px;
}

.fpw-foot {
  padding: 18px 28px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; background: var(--cream);
  position: relative;
}
.fpw-back {
  background: transparent; border: 0;
  font-size: 13px; font-weight: 800; color: var(--ink-soft);
  padding: 8px 4px; cursor: pointer;
  letter-spacing: 0.05em;
}
.fpw-back:hover { color: var(--ink); }

.fpw-next {
  position: relative;
  background: var(--ink); color: var(--paper);
  border: 0; padding: 13px 28px;
  font-size: 13px; font-weight: 800; letter-spacing: 0.08em;
  cursor: pointer;
}
.fpw-next:hover { background: var(--turquoise-deep); }
.fpw-next:disabled {
  background: var(--line); color: var(--muted); cursor: not-allowed;
}
.fpw-next.fpw-cta-go {
  background: var(--turquoise-deep);
  color: var(--paper);
  padding: 14px 30px; font-size: 14px;
  box-shadow: 0 6px 18px rgba(79,200,192,0.32);
}
.fpw-next.fpw-cta-go:hover { background: var(--ink); }

/* 点滅指マーク（ボタンを上から下へ指す） */
.fpw-next.pulse::before {
  content: "👇";
  position: absolute;
  top: -34px; left: 50%;
  transform: translateX(-50%);
  font-size: 26px;
  animation: fpw-pulse 1.1s ease-in-out infinite;
  pointer-events: none;
}
@keyframes fpw-pulse {
  0%, 100% { transform: translateX(-50%) translateY(0);    opacity: 0.85; }
  50%      { transform: translateX(-50%) translateY(6px);  opacity: 1; }
}

/* Mode 選択（自動・手動・あとで） */
.fpw-mode-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 8px;
}
.fpw-mode {
  background: var(--paper); border: 1px solid var(--line);
  padding: 24px 20px;
  cursor: pointer; transition: all 0.18s;
  text-align: left;
  font-family: inherit;
  border-radius: 4px;
}
.fpw-mode:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.fpw-mode.primary { border-top: 3px solid var(--turquoise-deep); }
.fpw-mode .ico { font-size: 30px; margin-bottom: 10px; display: block; }
.fpw-mode h3 {
  font-family: "Iowan Old Style", serif;
  font-size: 17px; font-weight: 900;
  margin-bottom: 6px;
}
.fpw-mode p {
  font-size: 12px; color: var(--ink-soft); line-height: 1.7;
}

/* レベル選択 6 カード */
.fpw-level-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.fpw-level {
  background: var(--paper); border: 1px solid var(--line);
  border-top: 3px solid var(--turquoise);
  padding: 20px 18px;
  cursor: pointer; transition: all 0.18s;
  text-align: left;
  font-family: inherit;
  position: relative;
}
.fpw-level:hover { border-color: var(--ink); transform: translateY(-2px); }
.fpw-level.selected {
  background: var(--ink); color: var(--paper);
  border-color: var(--ink); border-top-color: var(--turquoise);
}
.fpw-level .num-it {
  font-family: "Iowan Old Style", "Charter", serif;
  font-style: italic;
  font-size: 12px; font-weight: 800;
  color: var(--turquoise-deep);
  letter-spacing: 0.05em;
}
.fpw-level.selected .num-it { color: var(--turquoise); }
.fpw-level h4 {
  font-family: "Iowan Old Style", serif;
  font-size: 18px; font-weight: 900;
  margin: 8px 0 4px;
}
.fpw-level .age {
  font-size: 11px; color: var(--ink-soft);
  margin-bottom: 8px;
}
.fpw-level.selected .age { color: rgba(255,255,255,0.7); }
.fpw-level .desc {
  font-size: 11px; line-height: 1.7;
  color: var(--ink);
}
.fpw-level.selected .desc { color: rgba(255,255,255,0.85); }
.fpw-level .check {
  position: absolute; top: 10px; right: 10px;
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--ink);
  display: none;
  align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
}
.fpw-level.selected .check {
  display: flex; background: var(--turquoise);
  border-color: var(--turquoise);
}

/* "迷っている方への目安" */
.fpw-hints {
  margin-top: 22px;
  padding: 18px 22px;
  background: var(--cream);
  border-left: 3px solid var(--ink);
  font-size: 12px; line-height: 1.95;
}
.fpw-hints h4 {
  font-size: 11px; letter-spacing: 0.18em;
  font-weight: 800; color: var(--ink-soft);
  margin-bottom: 10px;
  text-transform: uppercase;
}
.fpw-hints ul { list-style: none; padding: 0; margin: 0; }
.fpw-hints li { padding: 3px 0; color: var(--ink); }
.fpw-hints li b { color: var(--turquoise-deep); font-weight: 800; }

.fpw-note {
  margin-top: 14px;
  padding: 10px 14px;
  font-size: 11px; color: var(--muted);
  border-top: 1px dashed var(--line);
  line-height: 1.7;
}

/* 開始日 / ペース */
.fpw-options {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.fpw-opt {
  background: var(--paper); border: 1px solid var(--line);
  padding: 18px 12px;
  text-align: center;
  cursor: pointer; transition: all 0.18s;
  font-family: inherit;
}
.fpw-opt:hover { border-color: var(--ink); transform: translateY(-1px); }
.fpw-opt.selected {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}
.fpw-opt .ttl {
  font-family: "Iowan Old Style", serif;
  font-size: 15px; font-weight: 900;
}
.fpw-opt .desc {
  font-size: 10px; color: var(--ink-soft);
  margin-top: 4px;
}
.fpw-opt.selected .desc { color: rgba(255,255,255,0.7); }

.fpw-date-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--ink);
  font-size: 14px;
  font-family: inherit;
  margin-top: 8px;
}

/* 完了画面 */
.fpw-done {
  text-align: center;
  padding: 28px 12px;
}
.fpw-done .icn {
  font-size: 60px; margin-bottom: 14px;
  display: block;
}
.fpw-done h2 { margin-bottom: 14px; }
.fpw-done .summary {
  background: var(--cream);
  padding: 18px 22px;
  text-align: left;
  border-left: 3px solid var(--turquoise-deep);
  margin: 18px auto;
  max-width: 480px;
  font-size: 13px;
  line-height: 1.85;
}
.fpw-done .summary b { color: var(--turquoise-deep); }

@media (max-width: 720px) {
  .fpw-body { padding: 22px 20px 18px; }
  .fpw-mode-grid, .fpw-level-grid { grid-template-columns: 1fr; }
  .fpw-options { grid-template-columns: 1fr 1fr; }
  .fpw-body h2 { font-size: 20px; }
}

/* ============================================================
   CCN-116: Plan C 共通スタイル — ccn-fab-host slot + 8 menu-rows + Netflix-style modal
   各 home は --ccn-accent / --ccn-fab-bg/border/color の上書きで個別化
   ============================================================ */

/* defaults — 各 home で override */
:root {
  --ccn-accent: #000;
  --ccn-fab-bg: #000;
  --ccn-fab-border: #fff;
  --ccn-fab-color: #fff;
  --ccn-fab-shadow: rgba(0,0,0,0.35);
  --ccn-modal-bg: #141414;
  --ccn-modal-text: #fff;
}

/* FAB host slot — header 埋め込み（全スタイル統一）
   ccn-fab-host が appbar 内にある場合は position:static でフロー配置。
   host がない fallback（body 直下）の場合のみ fixed を維持。 */
.ccn-fab-host { display: contents; }
.appbar { position: relative; }
.ccn-fab-host .account-fab {
  position: absolute !important;
  top: 50% !important;
  right: 14px !important;
  transform: translateY(-50%) !important;
  z-index: 10 !important;
  margin: 0 !important;
  background-image: none !important;
  background-color: var(--ccn-fab-bg, #000) !important;
  border: 2px solid var(--ccn-fab-border, #fff) !important;
  color: var(--ccn-fab-color, #fff) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25) !important;
}
/* fallback: ccn-fab-host なしで body 直下に置かれた場合のみ fixed */
html body > .account-fab {
  position: fixed !important;
  top: 12px !important;
  right: 12px !important;
  z-index: 1000 !important;
  margin: 0 !important;
}

/* 8 main menu rows — Plan C ハイブリッドの 8 軸セクション */
.menu-rows { padding: 24px 24px 12px; max-width: 1280px; margin: 0 auto; }
.menu-rows .row-section { margin-bottom: 28px; }
.menu-rows .row-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid rgba(0,0,0,0.06); }
.menu-rows .row-h .row-emoji { font-size: 22px; }
.menu-rows .row-h h2 { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.menu-rows .row-h .view-all {
  margin-left: auto;
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer;
  background: transparent; border: 1px solid var(--ccn-accent); color: var(--ccn-accent);
  padding: 4px 11px; border-radius: 3px; transition: all 0.18s;
  font-family: inherit;
}
.menu-rows .row-h .view-all:hover { background: var(--ccn-accent); color: var(--ccn-fab-color, #fff); }
.menu-rows .row-h .locked-tag { font-size: 9px; font-weight: 800; letter-spacing: 0.18em; color: rgba(0,0,0,0.4); background: rgba(0,0,0,0.05); padding: 3px 8px; border-radius: 3px; }
.menu-rows .scroller { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; }
.menu-rows .scroller::-webkit-scrollbar { height: 0; }
.menu-rows .tile {
  flex: 0 0 220px; aspect-ratio: 16/9;
  position: relative; border-radius: 5px; overflow: hidden;
  cursor: pointer; text-decoration: none; color: inherit;
  transition: all 0.2s cubic-bezier(.4,0,.2,1);
  scroll-snap-align: start;
  background: rgba(0,0,0,0.05);
}
.menu-rows .tile:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 8px 22px rgba(0,0,0,0.25); z-index: 2; }
.menu-rows .tile.locked { cursor: not-allowed; opacity: 0.45; filter: grayscale(0.5); }
.menu-rows .tile.locked:hover { transform: none; box-shadow: none; }
.menu-rows .tile .grad-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.menu-rows .tile .grad-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,0.85) 100%); }
.menu-rows .tile .ep-icn { position: absolute; right: 12px; top: 12px; font-size: 26px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4)); }
.menu-rows .tile .ep-info { position: absolute; left: 12px; right: 12px; bottom: 10px; }
.menu-rows .tile .ep-tag { font-size: 9px; letter-spacing: 0.16em; color: #fff; font-weight: 800; text-transform: uppercase; opacity: 0.85; }
.menu-rows .tile .ep-title { font-size: 13px; font-weight: 700; color: #fff; line-height: 1.3; margin-top: 2px; }

/* Netflix-style modal */
.nfx-modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,0.85); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.nfx-modal.open { display: flex; }
.nfx-modal .panel {
  position: relative;
  width: min(920px, 92vw); max-height: 88vh;
  background: var(--ccn-modal-bg); color: var(--ccn-modal-text);
  border-radius: 6px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7);
}
.nfx-modal .banner { position: relative; width: 100%; height: 320px; background: linear-gradient(135deg, #0A2540, #1A0510) center/cover no-repeat; flex-shrink: 0; }
.nfx-modal .banner::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 140px; background: linear-gradient(180deg, transparent, var(--ccn-modal-bg)); }
.nfx-modal .close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(20,20,20,0.85); color: #fff; font-size: 20px;
  cursor: pointer; display: grid; place-items: center; font-weight: 700;
  transition: background 0.2s; z-index: 5;
}
.nfx-modal .close:hover { background: var(--ccn-accent); }
.nfx-modal .b-meta { position: absolute; left: 32px; bottom: 24px; z-index: 3; max-width: 80%; }
.nfx-modal .b-tag { font-size: 11px; color: var(--ccn-accent); font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.nfx-modal .b-emoji { font-size: 22px; }
.nfx-modal .b-title { font-family: "Iowan Old Style", "Charter", serif; font-size: 38px; font-weight: 900; letter-spacing: -0.03em; color: #fff; text-shadow: 0 4px 12px rgba(0,0,0,0.7); }
.nfx-modal .body { padding: 22px 32px 28px; overflow-y: auto; }
.nfx-modal .desc { font-size: 13px; color: rgba(255,255,255,0.65); margin-bottom: 18px; line-height: 1.6; }
.nfx-modal .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.nfx-modal .item {
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px; background: rgba(0,0,0,0.55); border-radius: 5px;
  text-decoration: none; color: inherit;
  transition: all 0.2s; border: 1px solid transparent;
}
.nfx-modal .item:hover { background: rgba(255,255,255,0.06); border-color: var(--ccn-accent); transform: translateY(-2px); }
.nfx-modal .item.locked { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.nfx-modal .item .it-emoji { font-size: 24px; }
.nfx-modal .item .it-name { font-size: 13px; font-weight: 700; color: #fff; }
.nfx-modal .item .it-meta { font-size: 10px; color: rgba(255,255,255,0.4); letter-spacing: 0.06em; text-transform: uppercase; }

@media (max-width: 720px) {
  .nfx-modal .panel { width: 100vw; max-height: 92vh; border-radius: 0; }
  .nfx-modal .banner { height: 200px; }
  .nfx-modal .b-meta { left: 22px; bottom: 16px; }
  .nfx-modal .b-title { font-size: 26px; }
  .nfx-modal .body { padding: 18px 22px 22px; }
  .menu-rows { padding: 18px 16px 8px; }
  .menu-rows .tile { flex: 0 0 65%; }
}

/* ============================================================
   CCN-116: ホームスタイル ピッカー（Settings ドロワーから起動）
   ============================================================ */
.ccn-style-picker { position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center; padding: 24px; }
.ccn-style-picker.open { display: flex; }
.ccn-sp-backdrop { position: absolute; inset: 0; background: rgba(20,20,20,0.65); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ccn-sp-panel {
  position: relative;
  width: min(960px, 100%);
  max-height: 90vh;
  background: #FFFCF5;
  color: #222;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
  overflow: hidden;
  display: flex; flex-direction: column;
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}
.ccn-sp-close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff; color: #222; border: 1px solid #E5E5E2;
  font-size: 20px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; font-weight: 700; z-index: 5;
  transition: all 0.18s;
}
.ccn-sp-close:hover { background: #1A1A1A; color: #fff; border-color: #1A1A1A; }
.ccn-sp-head {
  padding: 28px 32px 20px;
  border-bottom: 1px solid #E5E5E2;
  text-align: center;
}
.ccn-sp-head .kicker { font-size: 11px; letter-spacing: 0.3em; color: #4FC8C0; font-weight: 800; margin-bottom: 8px; }
.ccn-sp-head h3 { font-family: "Iowan Old Style", "Hiragino Mincho ProN", serif; font-size: 28px; font-weight: 900; letter-spacing: -0.02em; margin-bottom: 6px; }
.ccn-sp-head p { font-size: 13px; color: #666; line-height: 1.7; }
.ccn-sp-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  padding: 22px 28px 18px;
  overflow-y: auto;
}
.ccn-sp-card {
  display: block; text-align: left;
  background: #fff; border: 1px solid #E5E5E2; border-top: 4px solid var(--sw-bg);
  padding: 18px 18px 16px; border-radius: 8px; cursor: pointer;
  transition: all 0.18s;
  font-family: inherit; color: inherit;
  position: relative;
}
.ccn-sp-card:hover { transform: translateY(-3px); border-color: #1A1A1A; box-shadow: 0 6px 16px rgba(0,0,0,0.08); }
.ccn-sp-card .num {
  font-family: "Iowan Old Style", serif; font-style: italic; font-weight: 900;
  font-size: 26px; line-height: 1; color: var(--sw-bg);
  letter-spacing: -0.02em; margin-bottom: 8px;
}
.ccn-sp-card .swatch {
  display: inline-block; width: 22px; height: 22px; border-radius: 50%;
  background: var(--sw-bg); border: 2px solid var(--sw-bd);
  vertical-align: -5px; margin-right: 6px;
}
.ccn-sp-card .name {
  display: inline-block;
  font-family: "Iowan Old Style", "Hiragino Mincho ProN", serif;
  font-size: 16px; font-weight: 800; letter-spacing: -0.01em; color: #1A1A1A;
}
.ccn-sp-card .sub { font-size: 11px; color: #666; line-height: 1.55; margin-top: 6px; padding-top: 6px; border-top: 1px dashed #E5E5E2; }
.ccn-sp-foot { padding: 14px 28px 22px; font-size: 11px; color: #999; text-align: center; letter-spacing: 0.04em; }

@media (max-width: 760px) {
  .ccn-sp-panel { max-height: 100vh; border-radius: 0; }
  .ccn-sp-grid { grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 18px 12px; }
  .ccn-sp-head { padding: 22px 22px 16px; }
  .ccn-sp-head h3 { font-size: 22px; }
  .ccn-sp-card { padding: 14px 14px 12px; }
  .ccn-sp-card .name { font-size: 14px; }
}
