:root {
  --navy: #102c46;
  --blue: #315e7b;
  --blue-soft: #e8f1f5;
  --ice: #f4f8f9;
  --gold: #b79a63;
  --gold-soft: #efe6d4;
  --ink: #1c2b36;
  --muted: #71808a;
  --line: #dce6e9;
  --white: #fff;
  --danger: #a95050;
  --shadow: 0 18px 55px rgba(30, 69, 91, 0.11);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--ice); font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 265px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 34px 22px 24px; color: white; background: linear-gradient(165deg, rgba(9,35,56,.96), rgba(33,83,111,.94)), url("../../bg_marble.png") center/cover; display: flex; flex-direction: column; z-index: 10; }
.brand-block { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 58px; height: 58px; border: 2px solid rgba(221,201,156,.8); display: grid; place-items: center; border-radius: 50%; background: white; overflow: hidden; flex: 0 0 auto; box-shadow: 0 5px 16px rgba(0,0,0,.15); }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }
.brand-block h1 { font-family: Georgia, "Yu Mincho", serif; font-size: 22px; margin: 2px 0 0; font-weight: 500; }
.eyebrow { margin: 0; color: var(--blue); font-size: 10px; letter-spacing: .18em; font-weight: 700; }
.sidebar .eyebrow { color: #c8d8df; font-size: 8px; }
.eyebrow.gold { color: var(--gold); }
.brand-message { margin: 22px 0 30px; padding-bottom: 25px; border-bottom: 1px solid rgba(255,255,255,.16); color: #dce8ec; font-family: "Yu Mincho", serif; font-size: 13px; letter-spacing: .08em; }
nav { display: grid; gap: 7px; }
.nav-item { border: 0; border-radius: 8px; background: transparent; color: #dce8ed; text-align: left; padding: 13px 14px; display: flex; align-items: center; gap: 12px; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.12); color: white; }
.nav-item.active { box-shadow: inset 2px 0 #d5ba81; }
.nav-item span { width: 18px; color: #ddc38c; text-align: center; }
.sidebar-foot { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 15px; background: rgba(255,255,255,.08); border-radius: 10px; }
.sidebar-foot strong, .sidebar-foot small { display: block; }
.sidebar-foot strong { font-size: 12px; }
.sidebar-foot small { color: #bfd0d8; font-size: 10px; margin-top: 3px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #87c5ae; box-shadow: 0 0 0 4px rgba(135,197,174,.14); }
main { min-width: 0; }
.topbar { min-height: 96px; padding: 24px 40px; background: rgba(255,255,255,.86); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 5; }
.topbar h2 { margin: 4px 0 0; font-family: "Yu Mincho", serif; font-size: 24px; font-weight: 500; }
.topbar-brand { display: flex; align-items: center; gap: 12px; }
.topbar-logo { display: none; width: 54px; height: 54px; object-fit: contain; }
.top-actions { display: flex; align-items: center; gap: 18px; }
.today { color: var(--muted); font-size: 12px; }
.mobile-menu { display: none; }
.view { display: none; padding: 32px 40px 55px; max-width: 1500px; margin: 0 auto; }
.view.active { display: block; }
.hero-panel { min-height: 315px; border-radius: 18px; overflow: hidden; background: linear-gradient(105deg, rgba(12,48,73,.97), rgba(44,92,119,.9)), url("../../bg_marble.png") center/cover; color: white; display: flex; justify-content: space-between; align-items: center; padding: 48px 55px; box-shadow: var(--shadow); position: relative; }
.hero-panel h3 { margin: 12px 0 17px; font-family: "Yu Mincho", serif; font-size: clamp(26px, 3vw, 42px); line-height: 1.5; font-weight: 500; }
.hero-panel p:not(.eyebrow) { color: #d9e5e9; max-width: 620px; line-height: 1.9; font-size: 13px; }
.hero-orbit { width: 280px; height: 230px; position: relative; flex: 0 0 auto; }
.orbit-ring { position: absolute; inset: 13px; border: 1px solid rgba(217,193,141,.4); border-radius: 50%; }
.orbit-ring::before, .orbit-ring::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.orbit-ring::before { inset: 28px; } .orbit-ring::after { inset: 60px; }
.orbit-card { position: absolute; right: 18px; top: 30px; width: 135px; height: 135px; border-radius: 50%; background: rgba(255,255,255,.96); color: var(--navy); display: grid; place-content: center; text-align: center; box-shadow: 0 16px 40px rgba(0,0,0,.18); }
.orbit-card strong { font-family: Georgia, serif; font-size: 40px; font-weight: 400; }
.orbit-card span { font-size: 10px; color: var(--muted); }
.orbit-card.small { width: 92px; height: 92px; left: 14px; top: 120px; background: #d9c295; color: #fff; }
.orbit-card.small strong { font-size: 27px; }
.orbit-card.small span { color: #fff; }
.button { border: 1px solid transparent; border-radius: 7px; padding: 10px 16px; font-weight: 700; font-size: 12px; transition: .2s; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: white; background: var(--blue); box-shadow: 0 8px 20px rgba(49,94,123,.2); }
.button.threads-button { color: white; background: #17242d; border-color: #17242d; }
.hero-panel .button.primary { background: var(--gold); margin-top: 12px; }
.button.secondary { color: var(--blue); background: white; border-color: var(--line); }
.button.danger { color: var(--danger); background: white; border-color: #e4caca; }
.button.large { min-height: 46px; }
.text-button { border: 0; background: none; color: var(--blue); font-size: 11px; font-weight: 700; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin: 20px 0; }
.stat-card { background: white; border: 1px solid var(--line); padding: 20px; border-radius: 12px; min-height: 106px; display: flex; gap: 15px; align-items: center; box-shadow: 0 8px 30px rgba(38,72,91,.05); }
.stat-card .stat-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.stat-card small, .stat-card strong { display: block; }
.stat-card small { color: var(--muted); font-size: 10px; margin-bottom: 7px; }
.stat-card strong { font-family: Georgia, "Yu Mincho", serif; font-size: 24px; color: var(--navy); font-weight: 500; }
.stat-card em { margin-left: auto; align-self: flex-end; color: var(--muted); font-size: 9px; font-style: normal; }
.dashboard-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; }
.panel { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 25px; box-shadow: 0 10px 35px rgba(38,72,91,.05); }
.panel-head, .section-toolbar, .split-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.panel h3, .section-toolbar h3, .split-heading h3 { margin: 6px 0; font-family: "Yu Mincho", serif; font-weight: 500; font-size: 22px; }
.stack-list { display: grid; gap: 3px; margin-top: 17px; }
.upcoming-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 15px; align-items: center; padding: 13px 4px; border-top: 1px solid var(--line); }
.date-tile { text-align: center; border-right: 1px solid var(--line); }
.date-tile strong { display: block; font-family: Georgia, serif; font-size: 22px; color: var(--navy); }
.date-tile span { color: var(--muted); font-size: 9px; }
.upcoming-item h4 { margin: 0 0 5px; font-size: 13px; }
.upcoming-item p { margin: 0; color: var(--muted); font-size: 10px; }
.tag { display: inline-block; padding: 5px 8px; border-radius: 20px; font-size: 9px; font-weight: 700; background: var(--blue-soft); color: var(--blue); }
.balance-chart { display: grid; gap: 17px; margin-top: 25px; }
.bar-row { display: grid; grid-template-columns: 85px 1fr 35px; gap: 10px; align-items: center; font-size: 10px; }
.bar-track { background: #eef3f4; height: 9px; border-radius: 10px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 10px; }
.hint { color: var(--muted); font-size: 10px; line-height: 1.7; margin-top: 25px; }
.insight-panel { margin-top: 20px; display: flex; gap: 18px; align-items: center; border-left: 3px solid var(--gold); }
.insight-mark { width: 45px; height: 45px; border: 1px solid var(--gold); color: var(--gold); display: grid; place-items: center; border-radius: 50%; font-family: Georgia, serif; }
.insight-panel h3 { font-size: 15px; line-height: 1.6; }
.section-toolbar { margin-bottom: 22px; }
.segmented { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.segmented button { border: 0; background: white; color: var(--muted); padding: 9px 14px; font-size: 11px; }
.segmented button.active { background: var(--blue); color: white; }
.calendar-nav { display: flex; align-items: center; gap: 18px; }
.calendar-nav button { border: 0; background: white; border-radius: 50%; width: 32px; height: 32px; color: var(--blue); }
.calendar-nav strong { min-width: 140px; text-align: center; font-family: "Yu Mincho", serif; }
.calendar-legend { display: flex; gap: 12px; flex-wrap: wrap; margin: 10px 0 15px; }
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 9px; color: var(--muted); }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: white; }
.calendar-head { padding: 12px; text-align: center; color: var(--muted); font-size: 10px; border-right: 1px solid var(--line); background: #f8fafb; }
.calendar-day { min-height: 125px; padding: 9px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); overflow: hidden; }
.calendar-day.outside { background: #fafcfc; color: #b8c2c7; }
.calendar-day.today-cell { box-shadow: inset 0 0 0 2px var(--gold); }
.day-number { font-family: Georgia, serif; font-size: 12px; margin-bottom: 7px; }
.calendar-event { display: block; border: 0; width: 100%; text-align: left; padding: 6px 7px; border-radius: 5px; margin-bottom: 5px; color: var(--navy); font-size: 9px; line-height: 1.4; border-left: 3px solid var(--blue); background: #edf4f7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.split-heading { margin-bottom: 22px; }
.split-heading > div > p:not(.eyebrow) { color: var(--muted); font-size: 12px; }
.ratio-summary { display: flex; gap: 8px; }
.ratio-summary span { background: white; border: 1px solid var(--line); padding: 12px; border-radius: 9px; color: var(--muted); font-size: 9px; text-align: center; min-width: 90px; }
.ratio-summary b { display: block; color: var(--navy); font-family: Georgia, serif; font-size: 20px; margin-bottom: 4px; }
.generator-panel { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 15px; align-items: end; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: #fbfdfd; border-radius: 7px; padding: 11px 12px; color: var(--ink); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(49,94,123,.08); }
textarea { min-height: 90px; resize: vertical; }
.theme-results { display: grid; gap: 10px; margin-top: 18px; }
.theme-card { background: white; border: 1px solid var(--line); border-radius: 11px; padding: 17px; display: grid; grid-template-columns: 60px 1fr auto; gap: 16px; align-items: center; }
.theme-day { text-align: center; color: var(--blue); }
.theme-day strong { display: block; font-family: Georgia, serif; font-size: 22px; }
.theme-card h4 { margin: 0 0 7px; font-size: 13px; }
.theme-card p { margin: 0; color: var(--muted); font-size: 10px; }
.theme-actions { display: flex; gap: 7px; }
.two-column { display: grid; grid-template-columns: 350px 1fr; gap: 20px; }
.form-panel { display: grid; gap: 17px; align-content: start; }
.script-preview { min-height: 580px; }
.script-copy-actions { display: flex; gap: 8px; align-items: center; }
.ready-script { margin: 0 0 23px; padding: 20px; border: 1px solid var(--gold-soft); border-left: 3px solid var(--gold); border-radius: 9px; background: #fffcf7; }
.ready-script > p:last-child { margin: 12px 0 0; color: var(--ink); font-size: 12px; line-height: 1.95; }
.threads-script { margin: 0 0 23px; padding: 20px; border: 1px solid #d7e0e4; border-left: 3px solid #17242d; border-radius: 9px; background: #f8fafb; }
.threads-script-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.threads-script-head h4 { margin: 5px 0 0; color: var(--ink); font-family: "Yu Mincho", serif; font-size: 16px; }
.threads-note { margin: 12px 0 0; color: var(--blue); font-size: 10px; font-weight: 700; }
.threads-script > p:last-child { margin: 15px 0 0; color: var(--ink); font-size: 12px; line-height: 1.95; }
.empty-state { min-height: 510px; display: grid; place-content: center; text-align: center; color: var(--muted); }
.empty-state span { font-size: 40px; color: #bfd0d8; }
.empty-state h3 { color: var(--navy); }
.script-section { border-bottom: 1px solid var(--line); padding: 0 0 18px; margin-bottom: 18px; }
.script-section:last-child { border-bottom: 0; }
.script-section h4 { color: var(--blue); font-size: 11px; letter-spacing: .08em; margin: 0 0 10px; }
.script-section p, .script-section li { font-size: 12px; line-height: 1.85; }
.script-section ol, .script-section ul { padding-left: 20px; }
.script-meta { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.check-card { background: #f4f8f9; border-radius: 8px; padding: 13px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.check-card.good { background: #edf7f2; color: #36715d; }
.check-card.warn { background: #fff8e9; color: #86682d; }
.check-list { padding: 0; list-style: none; display: grid; gap: 6px; margin: 0; }
.filter-row { display: grid; grid-template-columns: 1fr 220px; gap: 10px; margin-bottom: 14px; }
.table-wrap { overflow: auto; background: white; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 10px; vertical-align: top; }
th { color: var(--muted); background: #f8fafb; font-size: 9px; letter-spacing: .05em; }
td { line-height: 1.6; }
td a { color: var(--blue); }
.instagram-link { display: inline-block; margin-top: 5px; color: #242424; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.sample-label { display: inline-block; margin-top: 5px; padding: 4px 7px; border-radius: 999px; background: #eeeeec; color: var(--muted); font-size: 9px; font-weight: 800; }
.research-analysis { min-width: 260px; margin-top: 10px; padding: 12px; border-radius: 13px; background: #eeeeec; color: var(--muted); font-size: 10px; line-height: 1.7; }
.research-analysis summary { color: var(--ink); font-weight: 800; cursor: pointer; }
.research-analysis p { margin: 0; }
.research-analysis[open] p { margin-top: 7px; }
.row-actions { display: flex; gap: 5px; }
.icon-button { border: 0; background: transparent; color: var(--muted); font-size: 18px; }
.improvement-box { margin: 16px 0; border-left: 3px solid var(--gold); background: linear-gradient(90deg, #fffaf0, white); }
.improvement-box h3 { font-size: 15px; line-height: 1.7; }
.analytics-stats { margin-top: 0; }
.settings-grid { grid-template-columns: 1fr 1fr; }
.button-stack { display: grid; gap: 9px; margin: 20px 0; }
.future-card { border: 1px solid var(--gold-soft); background: #fffcf7; border-radius: 9px; padding: 15px; }
.future-card span { color: var(--gold); font-weight: 700; font-size: 11px; }
.future-card p { color: var(--muted); font-size: 10px; line-height: 1.7; }
dialog { border: 0; border-radius: 15px; padding: 0; width: min(680px, calc(100vw - 30px)); box-shadow: 0 30px 100px rgba(15,42,61,.28); }
dialog::backdrop { background: rgba(12,34,49,.55); backdrop-filter: blur(4px); }
#dialogForm { padding: 25px; }
.dialog-head, .dialog-actions { display: flex; justify-content: space-between; align-items: center; }
.dialog-head h3 { margin: 5px 0 0; font-family: "Yu Mincho", serif; }
.dialog-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 23px 0; max-height: 62vh; overflow: auto; padding: 2px; }
.dialog-fields label.full { grid-column: 1 / -1; }
.dialog-actions { justify-content: flex-end; gap: 8px; }
.toast { position: fixed; right: 25px; bottom: 25px; background: var(--navy); color: white; padding: 12px 18px; border-radius: 8px; font-size: 11px; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s; z-index: 30; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1050px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .two-column { grid-template-columns: 1fr; }
  .generator-panel { grid-template-columns: 1fr 1fr; }
  .hero-orbit { display: none; }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: -280px; width: 265px; transition: .25s; }
  .sidebar.open { left: 0; }
  .mobile-menu { display: block; border: 0; background: white; border-radius: 7px; padding: 8px 10px; }
  .topbar { padding: 18px; gap: 12px; }
  .top-actions .today { display: none; }
  .top-actions .button { display: none; }
  .view { padding: 20px 15px 40px; }
  .hero-panel { padding: 30px 24px; min-height: 350px; }
  .stat-grid, .generator-panel, .settings-grid { grid-template-columns: 1fr; }
  .section-toolbar, .split-heading { align-items: flex-start; flex-direction: column; }
  .ratio-summary { width: 100%; }
  .ratio-summary span { min-width: 0; flex: 1; padding: 8px 4px; }
  .calendar-grid { min-width: 700px; }
  #view-calendar { overflow-x: auto; }
  .theme-card { grid-template-columns: 50px 1fr; }
  .theme-actions { grid-column: 1 / -1; }
  .dialog-fields { grid-template-columns: 1fr; }
  .dialog-fields label.full { grid-column: auto; }
  .script-preview .panel-head { align-items: flex-start; }
  .script-copy-actions { display: grid; width: 100%; }
  .threads-script-head { align-items: flex-start; flex-direction: column; }
}

/* RBA経理AIアシスタントと共通のブランドデザイン */
:root {
  --navy: #242424;
  --blue: #3d3d3d;
  --blue-soft: #eeeeec;
  --ice: #f2f2f1;
  --gold: #777773;
  --gold-soft: #e4e4e1;
  --ink: #242424;
  --muted: #6d6d6d;
  --line: #ddddda;
  --white: #fdfdfd;
  --shadow: 0 18px 50px rgba(32, 32, 32, .1);
}

body {
  min-width: 320px;
  background-color: #f2f2f1;
  background-image: url("./rba-marble-background.png");
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
}

.sidebar {
  color: var(--ink);
  background: rgba(253, 253, 253, .92);
  border-right: 1px solid rgba(70, 70, 70, .13);
  box-shadow: 10px 0 35px rgba(32, 32, 32, .06);
  backdrop-filter: blur(18px);
}

.brand-mark {
  width: 66px;
  height: 66px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: none;
}

.brand-block h1,
.topbar h2,
.hero-panel h3,
.panel h3,
.section-toolbar h3,
.split-heading h3,
.threads-script-head h4 {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
}

.brand-block h1 { color: var(--ink); }
.sidebar .eyebrow { color: #666; }
.brand-message {
  color: var(--muted);
  border-bottom-color: var(--line);
}

.nav-item { color: #555; }
.nav-item span { color: #555; }
.nav-item:hover,
.nav-item.active {
  color: var(--ink);
  background: #eeeeec;
}
.nav-item.active {
  box-shadow: inset 3px 0 #3d3d3d;
}

.sidebar-foot {
  color: var(--ink);
  background: #eeeeec;
}
.sidebar-foot small { color: var(--muted); }
.status-dot {
  background: #6f7772;
  box-shadow: 0 0 0 4px rgba(111, 119, 114, .13);
}

.topbar {
  background: rgba(253, 253, 253, .82);
  border-bottom-color: rgba(70, 70, 70, .13);
}

.view { max-width: 1280px; }

.hero-panel {
  color: var(--ink);
  background: rgba(253, 253, 253, .94);
  border: 1px solid rgba(70, 70, 70, .13);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.hero-panel p:not(.eyebrow) { color: var(--muted); }
.hero-panel .eyebrow.gold { color: #666; }
.hero-panel .button.primary { background: #3d3d3d; }

.orbit-ring { border-color: rgba(70, 70, 70, .18); }
.orbit-ring::before,
.orbit-ring::after { border-color: rgba(70, 70, 70, .09); }
.orbit-card {
  color: var(--ink);
  background: #f5f5f3;
  box-shadow: 0 16px 40px rgba(32, 32, 32, .12);
}
.orbit-card.small {
  color: white;
  background: #666;
}

.button {
  min-height: 43px;
  border-radius: 13px;
  font-weight: 800;
}
.button.primary {
  color: white;
  background: #3d3d3d;
  box-shadow: 0 9px 22px rgba(45, 45, 45, .2);
}
.button.secondary {
  color: #3d3d3d;
  background: rgba(253, 253, 253, .92);
  border-color: #ccccca;
}
.button.threads-button {
  color: white;
  background: #242424;
  border-color: #242424;
}

.stat-card,
.panel,
.table-wrap {
  background: rgba(253, 253, 253, .9);
  border-color: rgba(70, 70, 70, .13);
  box-shadow: var(--shadow);
}
.stat-card { border-radius: 20px; }
.panel { border-radius: 24px; }
.stat-card .stat-icon {
  background: #eeeeec;
  color: #3d3d3d;
}
.stat-card strong,
.date-tile strong,
.theme-day,
.calendar-nav strong { color: var(--ink); }

.insight-panel,
.improvement-box {
  border-left-color: #666;
  background: rgba(253, 253, 253, .94);
}
.insight-mark {
  border-color: #666;
  color: #555;
}

input,
select,
textarea {
  min-height: 49px;
  border-color: #ccccca;
  border-radius: 13px;
  background: white;
  color: var(--ink);
  font-size: 14px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #777773;
  box-shadow: 0 0 0 3px rgba(80, 80, 80, .08);
}

.generator-panel,
.theme-card {
  background: rgba(253, 253, 253, .92);
  border-color: rgba(70, 70, 70, .13);
}
.theme-card { border-radius: 18px; }

.calendar-grid {
  background: rgba(253, 253, 253, .92);
  border-color: var(--line);
  border-radius: 20px;
}
.calendar-head { background: #eeeeec; }
.calendar-event {
  color: #333;
  background: #eeeeec !important;
  border-left-color: #666 !important;
}
.calendar-day.today-cell { box-shadow: inset 0 0 0 2px #666; }

.tag {
  color: #555 !important;
  background: #eeeeec !important;
}

.ready-script {
  border-color: #d8d8d5;
  border-left-color: #666;
  background: #f5f5f3;
}
.threads-script {
  border-color: #d8d8d5;
  border-left-color: #242424;
  background: #f5f5f3;
}
.threads-note { color: #555; }
.check-card { background: #eeeeec; }
.check-card.good { color: #4f5752; background: #edf0ed; }
.check-card.warn { color: #755f38; background: #f7f1e7; }

th { background: #eeeeec; }

dialog {
  color: var(--ink);
  background: #fdfdfd;
  border-radius: 26px;
  box-shadow: 0 24px 80px rgba(30, 30, 30, .28);
}
dialog::backdrop {
  background: rgba(25, 25, 25, .55);
  backdrop-filter: blur(3px);
}

.toast { background: #242424; }

@media (max-width: 760px) {
  .sidebar {
    background: rgba(253, 253, 253, .98);
  }
  .topbar { min-height: 86px; }
  .topbar-logo { display: block; }
  .topbar-brand { margin-right: auto; }
  .topbar h2 { font-size: 21px; }
  .topbar .eyebrow { font-size: 8px; }
  .hero-panel {
    min-height: 330px;
    padding: 30px 24px;
  }
}

/* ── モデリング先 ─────────────────── */
.modeling-card { margin-bottom: 18px; }
.modeling-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.modeling-card-head h4 { margin: 0 0 6px; font-size: 16px; }
.modeling-card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.modeling-stats { display: flex; gap: 18px; margin-bottom: 12px; flex-wrap: wrap; }
.modeling-stat { background: var(--blue-soft); border-radius: 8px; padding: 8px 14px; text-align: center; min-width: 72px; }
.modeling-stat strong { display: block; font-family: Georgia, serif; font-size: 20px; color: var(--navy); }
.modeling-stat span { font-size: 10px; color: var(--muted); }
.modeling-reason { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.modeling-analysis { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.modeling-analysis summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--blue); padding: 4px 0; }
.modeling-analysis-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 14px; }
.analysis-section { background: var(--ice); border-radius: 8px; padding: 12px 14px; }
.analysis-section p.eyebrow { margin-bottom: 8px; }
.analysis-section ul { margin: 0; padding-left: 16px; }
.analysis-section li { font-size: 12px; color: var(--ink); line-height: 1.8; }

/* ── モデリング洞察パネル ─────────────────── */
.analytics-insight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.modeling-insight-box { border-left: 3px solid var(--gold); }
.modeling-dashboard-panel { margin-top: 16px; border-left: 3px solid var(--gold); }
.modeling-dashboard-detail { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.modeling-badge { background: var(--gold-soft); color: var(--navy); font-size: 11px; font-weight: 700; border-radius: 20px; padding: 4px 12px; }
.insight-chips { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.insight-chip { background: var(--blue-soft); color: var(--navy); font-size: 12px; border-radius: 6px; padding: 6px 10px; line-height: 1.5; }
.insight-sub { font-size: 12px; color: var(--muted); margin: 8px 0 0; line-height: 1.7; }
@media (max-width: 760px) {
  .analytics-insight-grid { grid-template-columns: 1fr; }
}
