:root {
  color-scheme: light;
  --navy: #12366b;
  --blue: #5188ad;
  --pink: #ec78a3;
  --pink-text: #b83a6d;
  --line: #dce6f2;
  --muted: #60758e;
  --paper: #f4f7fd;
  --sidebar-width: 268px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: #203c61; font: 14px/1.65 'Noto Sans JP','Yu Gothic','Hiragino Kaku Gothic ProN','Meiryo',system-ui,sans-serif; }
button,input,select,textarea { font: inherit; }
[hidden] { display: none !important; }
button { min-height: 42px; border: 0; background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 8px; font-weight: 600; cursor: pointer; transition: background .15s; }
button:hover { filter: brightness(1.08); }
button:disabled { opacity: .55; cursor: wait; }
button.secondary { background: #edf3fb; color: var(--navy); border: 1px solid #d0dfef; }
.text-button { background: transparent; color: var(--navy); }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
#app { display: grid; grid-template-columns: var(--sidebar-width) minmax(0,1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; align-self: start; min-height: 100vh; height: 100vh; padding: 26px 17px; background: #12346a; color: #fff; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 0 4px 25px; border-bottom: 1px solid #ffffff28; }
.brand-mark { flex: 0 0 36px; height: 36px; display: grid; place-items: center; border: 1px solid #adc5e8; border-radius: 50%; font-size: 19px; font-weight: 700; }
.brand { font-size: 15px; font-weight: 700; letter-spacing: 1.1px; }
.brand small { display: block; margin-top: 1px; color: #b8cce7; font-size: 11px; font-weight: 500; letter-spacing: .5px; }
.sidebar-caption { margin: 25px 10px 12px; color: #a2bcdd; font-size: 10px; font-weight: 700; letter-spacing: 1.3px; }
nav { display: grid; gap: 9px; }
nav button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 12px; text-align: left; background: transparent; color: #dce9fc; border-left: 3px solid transparent; font-size: 13px; line-height: 1.6; }
nav button:hover { background: #ffffff10; }
nav button[aria-current] { color: #fff; background: #ffffff23; border-left-color: #9cdbe5; }
.nav-symbol { width: 18px; flex: 0 0 18px; text-align: center; font-size: 18px; font-weight: 400; line-height: 1; }
.workspace { min-width: 0; }
header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 30px; }
.breadcrumb { display: flex; align-items: center; gap: 15px; font-size: 12px; }
.breadcrumb > span { color: #758aa4; }
.breadcrumb strong { color: var(--navy); font-weight: 700; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.header-actions > span { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.header-actions button { padding: 8px 13px; font-size: 12px; }
main { width: 100%; max-width: none; margin: 0; padding: 0 30px 32px; }
h1,h2,h3,p { margin: 0; }
h1 { font-family: inherit; color: var(--navy); font-size: 28px; font-weight: 700; line-height: 1.5; letter-spacing: .02em; margin-bottom: 8px; }
h2 { color: var(--navy); font-size: 16px; font-weight: 700; margin-bottom: 16px; }
h3 { font-size: 14px; font-weight: 600; }
.muted,.footnote { color: var(--muted); font-size: 12px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; padding-top: 12px; }
.filters { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 20px; padding: 20px 22px 4px; background: #fff; border: 1px solid var(--line); border-radius: 13px; margin-bottom: 16px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 500; margin-bottom: 16px; }
input,select,textarea { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #cbd9e9; border-radius: 8px; background: #fff; color: #244266; padding: 10px 12px; font-size: 15px; font-weight: 400; }
input::placeholder { color: #8698ae; font-size: 12px; }
.ribbon { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 11px 17px; margin-bottom: 18px; background: #e8f0fa; color: #3b6087; border-radius: 8px; font-size: 12px; }
.steps { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 22px; }
article { min-width: 0; padding: 25px; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 6px 24px #12366b04; }
.steps article { padding: 20px 19px; border-top: 3px solid #4c94bc; }
.steps h2 { font-size: 13px; margin: 9px 0 6px; font-weight: 500; }
.steps h3 { font-size: 13px; font-weight: 600; margin: 0 0 12px; }
.eyebrow { color: #7792ad; font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.number { font-size: 31px; font-weight: 600; line-height: 1.4; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.number small { font-size: 13px; font-weight: 400; margin-left: 5px; }
.steps .muted { margin-top: 9px; font-size: 11px; }
.steps article.emphasis { border-top-color: var(--pink); }
.pink { color: var(--pink-text); }
.bottom { display: grid; grid-template-columns: 1.05fr 1fr; gap: 20px; }
.bottom { margin-bottom: 22px; }
.retention-panel { padding: 25px; background: #fff; border: 1px solid var(--line); border-radius: 13px; }
.retention-list { margin-top: 18px; }
.retention-row { display: grid; grid-template-columns: 115px minmax(0,1fr) 80px 135px; align-items: center; gap: 16px; padding: 18px 0; border-top: 1px solid #e6edf6; }
.retention-label { font-size: 13px; font-weight: 600; color: var(--navy); }
.retention-track { height: 13px; background: #f0f0f2; border-radius: 7px; overflow: hidden; }
.retention-fill { height: 100%; background: #b3c2d8; border-radius: 7px; }
.retention-row:nth-child(2) .retention-fill { background: #829ab9; }
.retention-row:nth-child(3) .retention-fill { background: #4d6f9a; }
.retention-row:nth-child(4) .retention-fill { background: var(--navy); }
.retention-rate { color: var(--pink); font-size: 23px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.retention-rate small { font-size: 12px; font-weight: 500; margin-left: 3px; }
.retention-count { color: var(--muted); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
@media(max-width:600px) { .retention-panel { padding: 21px 17px; } .retention-row { grid-template-columns: 82px minmax(0,1fr) 65px; gap: 7px 10px; padding: 15px 0; } .retention-count { grid-column: 2 / -1; } .retention-label { font-size: 12px; } .retention-rate { font-size: 21px; } }
.hero { position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--pink); }
.roas { color: var(--pink-text); font-size: 70px; font-weight: 600; letter-spacing: -2px; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.badge { display: inline-block; padding: 5px 11px; background: #fff0f6; color: var(--pink-text); border-radius: 20px; font-size: 11px; }
.summary { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding-top: 18px; margin-top: 22px; border-top: 1px solid var(--line); }
.value { font-size: 23px; font-weight: 600; font-variant-numeric: tabular-nums; }
.barrow { display: grid; grid-template-columns: 85px minmax(0,1fr) 90px; gap: 12px; align-items: center; font-size: 12px; margin: 22px 0; }
.track { height: 10px; background: #f0f0f2; border-radius: 6px; overflow: hidden; }
.bar { height: 100%; background: #b3c2d8; border-radius: 6px; }
.barrow:nth-child(2) .bar { background: #4d6f9a; }
.barrow:last-child .bar { background: var(--navy); }
.percent { color: var(--pink); font-size: 21px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.detail { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); padding-top: 15px; margin-top: 24px; font-size: 12px; color: var(--muted); }
.comparison,.space { margin-top: 22px; }
.footnote { margin-top: 16px; line-height: 1.8; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th,td { padding: 15px 11px; text-align: right; border-bottom: 1px solid #e6edf6; font-variant-numeric: tabular-nums; }
th { color: #72869f; font-size: 12px; font-weight: 500; }
th:first-child,td:first-child { text-align: left; }
td .text-button { white-space: nowrap; padding: 5px 10px; }
.input-columns { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.customer-columns { display: grid; grid-template-columns: .75fr 1.5fr; gap: 20px; }
.customer-list { display: grid; gap: 9px; }
.customer-choice { display: block; text-align: left; width: 100%; background: #f0f5fc; color: var(--navy); border: 1px solid transparent; }
.customer-choice.selected { border-color: #91b4d2; background: #e7f0fb; }
.customer-choice small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.customer-title { font-size: 21px; margin-bottom: 4px; }
#customer-detail form { padding-top: 22px; margin-top: 22px; border-top: 1px solid var(--line); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.empty { text-align: center; color: var(--muted); padding: 22px 14px; font-size: 13px; }
#empty-dashboard { margin-bottom: 16px; background: #eaf1fa; border-radius: 9px; }
.form-error { color: #ae2354; font-size: 13px; margin: 10px 0; white-space: pre-line; }
.auth { padding: 65px 20px; }
.auth-card { max-width: 440px; margin: auto; padding: 32px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.auth h1 { margin-top: 24px; }
.auth form { margin-top: 22px; }
.auth h2 { margin-top: 20px; }
.auth button { width: 100%; }
.notice { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: 90%; padding: 13px 22px; background: var(--navy); color: #fff; border-radius: 9px; z-index: 10; box-shadow: 0 8px 28px #12366b20; }
footer { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); color: #72869f; font-size: 11px; }
@media(min-width:1700px) { main { padding-right: 36px; padding-left: 36px; } header { padding-right: 36px; padding-left: 36px; } .steps article { padding: 23px; } .number { font-size: 34px; } }
@media(max-width:1200px) { :root { --sidebar-width: 250px; } main { padding: 0 22px 28px; } header { padding: 15px 22px; } .sidebar { padding: 24px 13px; } .brand { font-size: 13px; } .sidebar-brand { gap: 9px; } .sidebar-caption { font-size: 9px; } nav button { font-size: 12px; gap: 9px; } .number { font-size: 27px; } .steps article { padding: 18px 15px; } }
@media(max-width:1100px) { .steps { grid-template-columns: 1fr 1fr; } .input-columns { grid-template-columns: 1fr; } .bottom { grid-template-columns: 1fr; } .customer-columns { grid-template-columns: .8fr 1.2fr; } .header-actions { gap: 7px; } .breadcrumb { gap: 8px; } .filters { gap: 14px; padding: 18px 16px 2px; } }
@media(max-width:760px) { #app { display: block; } .sidebar { position: static; width: 100%; min-height: 0; height: auto; padding: 16px 15px 12px; } .sidebar-brand { padding: 0 2px 14px; border-bottom: 0; } .brand { font-size: 15px; } .brand-mark { flex-basis: 32px; height: 32px; font-size: 17px; } .sidebar-caption { display: none; } nav { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } nav button { align-items: center; justify-content: center; font-size: 12px; padding: 10px 7px; gap: 6px; min-height: 50px; border-left: 0; border-bottom: 3px solid transparent; text-align: center; } nav button[aria-current] { border-left: 0; border-bottom-color: #9cdbe5; } .nav-symbol { width: 15px; flex-basis: 15px; font-size: 16px; } header { min-height: 65px; padding: 14px 18px; flex-wrap: wrap; } .breadcrumb { font-size: 11px; } .header-actions { margin-left: auto; } .header-actions > span { font-size: 11px; } main { padding: 0 17px 25px; } .filters { grid-template-columns: 1fr 1fr; gap: 0 13px; } .filters label:first-child { grid-column: 1/-1; } .customer-columns { grid-template-columns: 1fr; } #dashboard .page-heading { padding: 23px; min-height: 126px; } #dashboard .page-heading h1 { font-size: 26px; } h1 { font-size: 25px; } article { padding: 22px 18px; } .fields { grid-template-columns: 1fr 1fr; } }
@media(max-width:420px) { nav button { font-size: 11px; gap: 4px; padding: 9px 4px; } .nav-symbol { display: none; } header { gap: 9px; } .header-actions { width: 100%; justify-content: flex-end; } .header-actions > span { margin-right: auto; } input,select { font-size: 16px; } .steps { gap: 11px; } .steps article { padding: 16px 12px; } .number { font-size: 25px; } .steps h3 { font-size: 12px; } .fields { grid-template-columns: 1fr; } .roas { font-size: 58px; } .value { font-size: 21px; } .barrow { grid-template-columns: 76px minmax(0,1fr) 80px; gap: 7px; } .page-heading { flex-wrap: wrap; } .ribbon { padding: 10px 13px; } }

/* Primary return and supporting visit panels */
.roas-overview { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr); align-items:center; gap:35px; margin-bottom:22px; padding:30px 36px; color:#fff; border:0; border-radius:17px; background:linear-gradient(110deg,#12346a 0%,#1b538c 65%,#309fbb 100%); }
.roas-overview::before { display:none; }
.roas-overview .eyebrow { color:#a2e4ee; letter-spacing:1.8px; }
.roas-overview h2 { color:#fff; margin:8px 0 2px; font-size:20px; }
.roas-overview .roas { color:#ffb6d3; font-size:88px; font-weight:700; }
.roas-overview .badge { background:#ffffff20; color:#fff; }
.roas-overview .summary { border:1px solid #ffffff35; padding:24px; margin:0; border-radius:12px; background:#ffffff12; }
.roas-overview .summary .muted { color:#d7e8fa; }
.roas-overview .value { font-size:28px; color:#fff; margin-top:8px; }
.bottom { grid-template-columns:1fr 1fr; }
.bottom .retention-panel { margin:0; }
.bottom .retention-row { grid-template-columns:100px minmax(0,1fr) 65px; gap:6px 12px; padding:10px 0; }
.bottom .retention-count { grid-column:2/-1; }
.bottom .retention-rate { font-size:21px; }
.bottom .retention-panel .footnote { font-size:11px; }
@media(max-width:1100px) { .bottom { grid-template-columns:1fr; } .roas-overview { gap:22px; padding:28px; } .roas-overview .roas { font-size:76px; } }
@media(max-width:760px) { .roas-overview { grid-template-columns:1fr; padding:25px; gap:20px; } .roas-overview .summary { padding:18px; } .roas-overview .roas { font-size:70px; } .roas-overview h2 { font-size:18px; } }

.campaign-filter { grid-template-columns:minmax(220px,1fr) 2fr; align-items:center; }
.campaign-filter > p { padding-bottom:16px; }
.ad-period { background:#edf3fb; border-radius:8px; padding:12px 15px; margin-bottom:20px; }
@media(max-width:760px) { .campaign-filter { grid-template-columns:1fr; } .campaign-filter > p { padding-bottom:16px; } }

.campaign-actions { display:flex; justify-content:flex-end; gap:4px; }
.nav-symbol svg { display:block; max-width:100%; height:auto; }

.roas-overview .roas small { font-size:.5em; font-weight:500; letter-spacing:0; margin-left:.05em; }
.percent small { font-size:12px; font-weight:500; margin-left:3px; }
