:root {
  color-scheme: light;
  --ink: #261e22;
  --muted: #625b60;
  --line: #e4dfe2;
  --paper: #fff;
  --page: #f5f3f4;
  --accent: #782b43;
  --hour-height: 48px;
  font: 100%/1.5 "Inter", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--page); }
main { max-width: 1500px; margin-inline: auto; padding: 2.35rem clamp(1rem, 4vw, 3.7rem) 1.65rem; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.8rem, 4vw, 3.4rem); line-height: 1.12; letter-spacing: -.055em; margin-top: .38rem; }
h2 { font-size: clamp(1.2rem, 2.8vw, 1.65rem); letter-spacing: -.042em; }
h3 { font-size: 1.08rem; line-height: 1.4; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .17em; }
.project { font-size: .9rem; font-weight: 750; text-decoration: none; }
.project:hover { text-decoration: underline; }
button { color: inherit; font: inherit; cursor: pointer; background: var(--paper); border: 1px solid #d5cdd1; border-radius: .45rem; padding: .47rem .75rem; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .38; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; z-index: 3; }
.masthead, .toolbar, .meta-row { display: flex; align-items: center; justify-content: space-between; gap: .95rem; }
.masthead { padding-bottom: 1.65rem; border-bottom: 1px solid #d5cdd1; align-items: end; }
#share { flex: 0 0 auto; color: var(--accent); font-weight: 700; }
.toolbar { margin-top: 1.25rem; }
.metadata { color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
.controls { display: flex; gap: .4rem; flex-wrap: wrap; }
.controls button { font-size: .88rem; }
.meta-row { margin: .85rem 0 .7rem; }
.markets { display: flex; gap: .42rem; }
.korean-earnings { margin: 0 0 .65rem; }
.korean-earnings button { margin-right: .5rem; font-weight: 700; }
.korean-earnings .metadata { display: inline-block; margin: .2rem 0; }
.market { font-size: .85rem; font-weight: 750; border-color: transparent; padding: .25rem .65rem; }
.market[aria-pressed=false] { background: var(--paper); color: var(--muted); border-color: var(--line); text-decoration: line-through; }
.kr { --card-ink: #40383d; --card-bg: #ebe7e9; --card-edge: #837780; }
.us { --card-ink: #692138; --card-bg: #f4e3e9; --card-edge: #9a3a58; }
.mixed { --card-ink: #692138; --card-bg: #eee8ec; --card-edge: #9a3a58; }
.market[aria-pressed=true] { color: var(--card-ink); background: var(--card-bg); }
.viewport { height: clamp(360px, 61vh, 670px); overflow: auto; overscroll-behavior: contain; border: 1px solid #d5cdd1; border-radius: .65rem; background: var(--paper); }
.board { display: grid; grid-template-columns: 59px repeat(7, minmax(125px, 1fr)); min-width: 934px; }
.corner, .day-head { position: sticky; top: 0; z-index: 5; background: var(--paper); height: 58px; border-bottom: 1px solid #d5cdd1; }
.corner { left: 0; z-index: 8; }
.day-head { display: flex; align-items: center; justify-content: center; gap: .48rem; border-left: 1px solid var(--line); }
.day-head strong { font-size: 1.2rem; min-width: 1.9rem; text-align: center; }
.day-head span { font-size: .88rem; color: var(--muted); }
.day-head.today { background: #faf0f4; }
.day-head.today strong { background: var(--accent); color: var(--paper); border-radius: 50%; }
.weekend { background-color: #f7f5f6; }
.publications-label, .publications-cell, .earnings-label, .earnings-cell { position: sticky; top: 112px; z-index: 5; height: 54px; background: #faf8f9; border-bottom: 1px solid #d5cdd1; padding: .26rem; }
.publications-label, .earnings-label { left: 0; z-index: 7; display: grid; place-items: center; color: var(--accent); font-size: .82rem; font-weight: 750; }
.publications-cell, .earnings-cell { border-left: 1px solid var(--line); }
.publications-label, .publications-cell { top: 58px; }
.publications-cell { display: flex; justify-content: center; align-items: start; flex-direction: column; gap: .12rem; }
.publication { color: var(--accent); font-size: .78rem; font-weight: 700; }
button.publication { border: 0; padding: 0; background: transparent; text-decoration: underline; text-underline-offset: .17em; }
.earnings-secondary { top: 166px; }
.earnings-cell .event { border: 1px solid #e4d9df; }
.time-axis { position: sticky; left: 0; z-index: 4; background: var(--paper); }
.tick { height: var(--hour-height); text-align: right; padding: .13rem .48rem 0 0; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.day-column { position: relative; border-left: 1px solid var(--line); }
.day-column.today { background-color: #fcf7f9; }
.slot { height: var(--hour-height); border-bottom: 1px solid var(--line); padding: .19rem .26rem; }
.slot:nth-child(even) { border-bottom-color: #eee9ec; }
.event { position: relative; display: block; width: 100%; min-width: 0; height: 100%; overflow: hidden; text-align: left; background: var(--card-bg); color: var(--card-ink); border: 1px solid transparent; border-radius: .42rem; padding: .14rem .34rem .14rem .92rem; line-height: 1.15; }
.event::before { content: ""; position: absolute; top: 5px; bottom: 5px; left: 5px; width: 3px; border-radius: 99px; background: var(--card-edge); }
.event-time { display: block; margin-bottom: .16rem; font-size: .79rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.event-title { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .875rem; font-weight: 650; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--accent); pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: 0; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: inherit; }
.source-note { color: var(--muted); font-size: .83rem; margin-top: .78rem; }
dialog { max-width: min(34rem, calc(100vw - 2rem)); width: 100%; max-height: 84vh; padding: 1.15rem; border: 1px solid var(--line); border-radius: .65rem; color: var(--ink); }
dialog::backdrop { background: #271b2399; }
dialog header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .7rem; }
dialog article { border-top: 1px solid var(--line); padding: .9rem 0; }
dialog article:last-child { padding-bottom: 0; }
.release-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: .58rem 0; }
.release-values div { background: var(--page); padding: .42rem .6rem; border-radius: .35rem; }
.release-values dt { color: var(--muted); font-size: .83rem; }
.release-values dd { margin: 0; font-weight: 750; font-variant-numeric: tabular-nums; }
@media (max-width: 620px) {
  main { padding-top: 1.2rem; }
  .masthead { align-items: start; padding-bottom: 1.05rem; }
  .toolbar { flex-wrap: wrap; }
  .viewport { height: 59vh; }
  #share { font-size: .84rem; }
}
