* { box-sizing: border-box; }
:root {
  color-scheme: dark;
  --ground: #10141c;
  --surface: #181d27;
  --rule: #333b48;
  --muted: #a4afbd;
  --ink: #f3f4ef;
  --accent: #d4f880;
  font: clamp(7px, 1.35vw, 19px)/1.45 Pretendard, "Malgun Gothic", Arial, sans-serif;
  color: var(--ink);
  background: var(--ground);
}
body,h1,h2,h3,p,figure { margin: 0; }
body { font-variant-numeric: tabular-nums; }
.workspace { max-width: 84rem; margin: 0 auto; }
.toolbar,.identity,.overview-head,.trend-head,.creative-head,.campaigns header { display: flex; align-items: center; justify-content: space-between; }
.toolbar { padding: 1.05rem 2.1rem; border-bottom: 1px solid var(--rule); }
.identity { gap: 1.05rem; }
.identity b { font: 600 1.85rem/1 Georgia,serif; letter-spacing: .08em; }
.slash { color: #617081; font-size: 1.35rem; font-weight: 300; }
h1,h2,h3 { font-size: 1.16rem; font-weight: 650; letter-spacing: -.045em; }
.identity h1 { color: #d1d7e0; font-size: 1.02rem; }
.sample,.overview-head time,.trend-head>span,.campaigns header>span,.creative-info p { color: var(--muted); font-size: .91rem; }
.sample { border: 1px solid var(--rule); border-radius: 3px; padding: .18rem .55rem; }
.report { padding: 1.75rem 2.1rem; display: grid; grid-template-columns: minmax(0,1.8fr) minmax(0,1fr); gap: 1.5rem 1.65rem; }
.overview { padding-top: .25rem; min-width: 0; display: flex; flex-direction: column; }
.overview-head time,.creative-info time { font: .9rem/1.2 Consolas,monospace; }
.metric { display: flex; align-items: baseline; margin: .45rem 0 1.2rem; }
.metric>strong { font: 530 8.6rem/.98 Arial,sans-serif; letter-spacing: -.092em; font-variant-numeric: lining-nums; }
.metric>small { margin-left: .55rem; color: #a6b0b9; font-size: 1.4rem; }
.comparison { align-self: center; display: grid; gap: .1rem; margin: 1rem 0 0 1.6rem; }
.comparison b { color: var(--accent); font-size: 1.65rem; font-weight: 560; letter-spacing: -.05em; }
.comparison span { color: var(--muted); font-size: .92rem; }
.trend-head { border-top: 1px solid var(--rule); padding-top: 1rem; }
.trend-head>span { display: flex; align-items: center; gap: .35rem; font-size: .81rem; }
.trend-head i { width: 1rem; border-top: 2px dashed #8796ab; }
.trend-head i:last-child { border-top: 2px solid var(--accent); margin-left: .5rem; }
.trend { margin-top: .4rem; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--muted); font: 11px Consolas,monospace; }
.gridline { fill: none; stroke: #333b48; stroke-width: .8; }
.change-line { fill: none; stroke: var(--accent); stroke-dasharray: 2 3; opacity: .65; }
.previous,.current { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.previous { stroke: #8896a7; stroke-width: 1.7; stroke-dasharray: 3 4; }
.current { stroke: var(--accent); stroke-width: 2.7; }
.point { fill: var(--accent); stroke: var(--ground); stroke-width: 1.2; }
.past-point { fill: #8996a7; }.label-bg { fill: var(--accent); }
.chart .change-label { fill: #1a230c; font: 650 11px "Malgun Gothic",sans-serif; }
.creative { min-width: 0; display: flex; flex-direction: column; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: .5rem; overflow: hidden; }
.creative-head { padding: .82rem 1rem; }.creative-head h2 { font-size: 1rem; }
.key,.selected small { color: var(--accent); font: 600 .85rem/1.4 "Malgun Gothic",sans-serif; }
.poster { position: relative; overflow: hidden; isolation: isolate; flex: 1; min-height: 11.5rem; background: #595938; }
.poster img,.poster::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.poster img { object-fit: cover; object-position: center 39%; }
.poster::after { content: ""; background: linear-gradient(25deg,rgba(20,22,8,.65),transparent 52%); }
.poster figcaption { position: absolute; bottom: .7rem; left: 1rem; z-index: 1; font: 3.8rem/.78 Georgia,serif; letter-spacing: -.075em; color: #fffbe9; }
.poster em { font-weight: 400; }
.creative-info { padding: .8rem 1rem .9rem; }
.creative-info time { color: var(--accent); font-size: .79rem; }.creative-info h3 { font-size: 1.37rem; margin: .17rem 0; }
.campaigns { grid-column: 1/-1; }
.campaigns header { border-top: 1px solid #586170; padding: .85rem 0 .65rem; }
table { width: 100%; border-collapse: collapse; text-align: right; }
th,td { padding: .53rem 1rem; border-bottom: 1px solid var(--rule); }
th:first-child { text-align: left; width: 55%; }
thead { color: var(--muted); font-size: .85rem; }
thead th { font-weight: 450; }
tbody th { font-weight: 550; font-size: 1rem; }
td { font: 1.05rem/1.35 Consolas,monospace; }
td:nth-child(2) { color: var(--muted); }
.selected { background: #20271f; }
.selected th { box-shadow: inset 2px 0 var(--accent); }
.selected small { margin-left: .55rem; }
.selected td:last-child { color: var(--accent); }
@media(max-width: 520px) and (max-aspect-ratio: 6/5) {
  :root { font-size: clamp(11px, 3.15vw, 15px); }
  .toolbar { padding: .95rem 1.15rem; }.identity { gap: .75rem; }
  .report { padding: 1rem 1.15rem; grid-template-columns: 1fr; gap: 1rem; }
  .overview-head time { font-size: .83rem; }.metric { margin: .32rem 0 .65rem; }
  .metric>strong { font-size: 6.4rem; }.comparison { margin-top: .5rem; }
  .trend-head { padding-top: .65rem; }.trend { margin-top: .35rem; }
  .creative { display: grid; grid-template-columns: 39% 1fr; grid-template-rows: auto 1fr; }
  .creative-head { grid-column: 2; padding: .7rem .85rem 0; }
  .poster { grid-column: 1; grid-row: 1/3; min-height: 7.2rem; }
  .poster figcaption { font-size: 2.15rem; left: .55rem; bottom: .55rem; }
  .creative-info { grid-column: 2; padding: .4rem .85rem .65rem; }
  .creative-info h3 { margin: .15rem 0; font-size: 1.2rem; }.creative-info p { font-size: .81rem; }
  th,td { padding: .65rem .45rem; }.selected small { display: none; }
}
@media(max-width:520px) and (max-aspect-ratio:6/5) and (max-height:440px) {
  .toolbar { padding-block: .55rem; }.report { padding-block: .65rem; gap: .65rem; }
  .metric>strong { font-size: 4.9rem; }.metric { margin-block: 0 .45rem; }
  .trend-head { padding-top: .4rem; }.poster { min-height: 5.8rem; }
}


/* Fit the complete desktop layout inside the main page's landscape carousel. */
@media (min-aspect-ratio:6/5) and (max-height:650px) {
  :root { font-size: clamp(5px,1.25vw,15px); }
  .report { padding-block: 1rem; row-gap: .8rem; }
  .metric { margin-bottom: .8rem; }
  th,td { padding-block: .44rem; }
}
@media (max-width:520px) and (max-aspect-ratio:6/5) {
  .chart text { font-size: 14px; }
  .chart .change-label { font-size: 12px; }
}

:root { scrollbar-color: #394351 var(--ground); scrollbar-width: thin; }

/* The square home preview keeps the complete campaign table under the chart. */
@media (max-width: 700px) and (min-aspect-ratio: 9/10) and (max-aspect-ratio: 1/1) {
  :root { font-size: 2.6vw; }
  .workspace { height: 100svh; display: flex; flex-direction: column; }
  .toolbar { padding: .8rem 1.15rem; }
  .report {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 1.1rem .9rem;
    padding: 1.1rem;
  }
  .overview-head { display: block; }
  .metric { margin: .4rem 0 .7rem; }
  .metric > strong { font-size: 5.8rem; }
  .comparison { margin: 0 0 0 .65rem; }
  .trend-head { margin-top: auto; }
  .creative { display: flex; }
  .creative-head, .creative-info { padding: .65rem; }
  .poster { min-height: 0; }
  .poster figcaption { font-size: 2.4rem; }
  th, td { padding: .58rem .5rem; }
}
