/* Shared base for all giromi sites: fonts, tokens, reset. Each site overrides tokens in its own CSS. */
@import url("https://fonts.googleapis.com/css2?family=Gowun+Dodum&family=Jua&display=swap");

:root {
  --bg: #fbf8f2;
  --surface: #ffffff;
  --ink: #23201c;
  --muted: #6b645b;
  --line: #e4ddd1;
  --accent: #7d2b33;
  --round: "Jua", "Gowun Dodum", sans-serif;
  --body: "Gowun Dodum", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #181614;
    --surface: #221f1c;
    --ink: #f1ece4;
    --muted: #a9a097;
    --line: #38332e;
    --accent: #e08b93;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--round); font-weight: 400; line-height: 1.25; margin: 0 0 0.5em; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.site-head { padding: 20px 0; border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-family: var(--round); font-size: 22px; color: var(--ink); text-decoration: none; }
.site-foot { margin-top: 64px; padding: 24px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.hero { padding: 72px 0 40px; }
.hero h1 { font-size: clamp(32px, 6vw, 52px); }
.hero p { color: var(--muted); font-size: 18px; max-width: 36em; }
.placeholder { border: 1px dashed var(--line); border-radius: 12px; padding: 20px; color: var(--muted); background: var(--surface); }

/* Slide view (talks): PowerPoint-like fixed 16:9 canvas (1920x1080) scaled to fit a dark stage, letterboxed. */
.stage { position: relative; width: 100%; height: calc(100svh - 190px); min-height: 180px; margin-top: 16px; background: #111; border-radius: 12px; overflow: hidden; cursor: default; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.stage.small { height: 32svh; min-height: 140px; }
.stage:fullscreen { height: 100vh; border-radius: 0; }
.canvas { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; box-sizing: border-box; padding: 100px 128px 130px; background: #fff; color: #1d1d1f; transform-origin: 0 0; overflow: hidden; font-family: var(--body); line-height: 1.45; text-align: left; overflow-wrap: anywhere; }
.canvas h1, .canvas h2, .canvas h3 { font-family: var(--round); line-height: 1.2; margin: 0 0 48px; color: #1d1d1f; }
.canvas h1 { font-size: 88px; } .canvas h2 { font-size: 76px; } .canvas h3 { font-size: 64px; }
.canvas p, .canvas li { font-size: 46px; margin: 0 0 24px; } .canvas ul, .canvas ol { margin: 0 0 24px; padding-left: 64px; }
.canvas strong { color: #000; } .canvas a { color: #7d2b33; }
.canvas pre { font-size: 32px; background: #f3f1ed; padding: 24px; border-radius: 12px; overflow: hidden; }
.canvas blockquote { margin: 0 0 24px; padding-left: 32px; border-left: 8px solid #7d2b33; color: #555; font-size: 46px; }
.canvas img { display: block; max-width: 100%; max-height: 620px; margin: 16px 0; object-fit: contain; }
.slide-num { position: absolute; right: 64px; bottom: 44px; font-size: 32px; color: #8a8a8a; font-variant-numeric: tabular-nums; }
.rotate-hint { display: none; text-align: center; color: var(--muted); font-size: 14px; margin-top: 8px; }
@media (orientation: portrait) and (max-width: 700px) { .rotate-hint { display: block; } .stage:not(.small) { height: calc(100svh - 230px); } }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.nav .count { color: var(--muted); font-variant-numeric: tabular-nums; }
.btn { font: inherit; font-family: var(--round); min-height: 48px; min-width: 48px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn:disabled { opacity: .4; cursor: default; }
.talk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.talk-list a { display: block; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.talk-list small { display: block; color: var(--muted); }
.notice { text-align: center; color: var(--muted); padding: 80px 0; font-size: 20px; }
.visually { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }
.hint { text-align: center; color: var(--muted); font-size: 14px; margin-top: 8px; }
.zoom-reset { position: absolute; right: 10px; top: 10px; z-index: 2; display: none; width: 44px; height: 44px; border-radius: 22px; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 22px; cursor: pointer; }
.stage.zoomed .zoom-reset { display: block; }
.stage.zoomed { touch-action: none; }
/* /present fullscreen show: the stage fills the projector; tiny sync dot; B = blackout */
.show { position: relative; }
.show:fullscreen { background: #000; }
.show:fullscreen .stage { height: 100vh; margin: 0; border-radius: 0; background: #000; }
.sync-dot { position: absolute; left: 10px; bottom: 10px; z-index: 3; width: 8px; height: 8px; border-radius: 50%; background: #2fa84f; opacity: .55; pointer-events: none; }
.sync-dot.bad { background: #d23b3b; opacity: .9; }
.sync-dot.wait { background: #c9a227; }
.blackout { position: absolute; inset: 0; z-index: 2; background: #000; display: none; }
.show.black .blackout { display: block; }
.btn.big { width: 100%; min-height: 64px; font-size: 22px; margin-top: 12px; }
/* Visual slide (opens with a picture, e.g. a 1920x900 animated SVG): full-width picture, one caption line below */
.canvas.visual { padding: 0; }
.canvas.visual > p:first-child { margin: 0; line-height: 0; }
.canvas.visual > p:first-child img { width: 1920px; max-width: none; height: auto; max-height: 900px; margin: 0; object-fit: contain; }
.canvas.visual > :not(:first-child):not(.slide-num) { margin: 0; padding: 40px 128px 0; font-size: 46px; line-height: 1.3; }
/* /live audience: follow toggle, back-to-presenter pill, slide number chips */
.follow { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 16px; }
.follow input { width: 20px; height: 20px; accent-color: var(--accent); }
.follow-pill { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; padding: 12px 20px; border-radius: 999px; border: 0; background: var(--accent); color: #fff; font: inherit; font-family: var(--round); font-size: 17px; box-shadow: 0 4px 16px rgba(0,0,0,.25); cursor: pointer; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; justify-content: center; }
.chips button { min-width: 40px; min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.chips button.live { border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }
.chips button.here { background: var(--accent); border-color: var(--accent); color: #fff; }
main:has(.follow-pill:not([hidden])) { padding-bottom: 96px; }
@media (orientation: portrait) and (max-width: 700px) { .stage.live:not(.small) { height: 50svh; } }
/* /live audience fullscreen: Fullscreen API on .viewer, or .immersive overlay on iPhone Safari */
.viewer { position: relative; }
.fs-btn { position: absolute; left: 10px; top: 26px; z-index: 4; width: 44px; height: 44px; border-radius: 22px; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 22px; cursor: pointer; }
.fs-hint { display: none; }
.viewer:fullscreen, .viewer.immersive { background: #000; width: 100vw; }
.viewer:fullscreen .stage:not(.small), .viewer.immersive .stage:not(.small) { height: 100%; margin: 0; border-radius: 0; background: #000; }
.viewer:fullscreen { height: 100vh; }
.viewer.immersive { position: fixed; inset: 0; z-index: 100; height: 100dvh; box-sizing: border-box; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
body.immersive-on { overflow: hidden; }
.viewer:fullscreen .fs-btn, .viewer.immersive .fs-btn { top: 12px; left: 12px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.viewer.controls .fs-btn { opacity: 1; pointer-events: auto; }
.viewer:fullscreen .follow-pill, .viewer.immersive .follow-pill { position: absolute; left: auto; right: 12px; bottom: 12px; transform: none; font-size: 13px; padding: 6px 12px; opacity: .85; box-shadow: none; }
@media (orientation: portrait) { .viewer.immersive.controls .fs-hint { display: block; position: absolute; left: 0; right: 0; top: 70px; text-align: center; color: #ccc; font-size: 14px; margin: 0; z-index: 4; } }
/* Hotfix: obvious fullscreen button on phones (bottom-right, labeled), first-visit tip */
.fs-btn span { display: none; }
@media (pointer: coarse) and (max-width: 950px) {
  .fs-btn { left: auto; top: auto; right: 10px; bottom: 10px; width: auto; height: 48px; padding: 0 16px; border-radius: 24px; font-size: 18px; font-family: var(--round); background: var(--accent); box-shadow: 0 2px 10px rgba(0,0,0,.35); }
  .fs-btn span { display: inline; margin-left: 4px; }
  .viewer:fullscreen .fs-btn, .viewer.immersive .fs-btn { top: auto; left: auto; right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); }
  .viewer:fullscreen .follow-pill, .viewer.immersive .follow-pill { right: auto; left: max(12px, env(safe-area-inset-left)); }
}
.fs-tip { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 5; background: rgba(0,0,0,.8); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 16px; text-align: center; max-width: 85%; }
/* Live now: homepage banner + live row, /t follow pill */
.live-banner { display: block; margin: 16px 0 0; padding: 18px 20px; border-radius: 14px; background: var(--accent); color: #fff; text-decoration: none; font-family: var(--round); font-size: 20px; line-height: 1.4; box-shadow: 0 4px 16px rgba(0,0,0,.18); }
.live-banner strong { text-decoration: underline; text-underline-offset: 4px; }
.live-banner .dot, .talk-list a.is-live small::first-letter { color: #ff5a5a; }
.live-banner .dot::before { content: "●"; color: #ff7676; animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }
.talk-list a.is-live { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.talk-list a.is-live small { color: var(--accent); font-weight: 700; }
a.follow-pill { text-decoration: none; }
.other-note { position: absolute; right: 10px; bottom: 10px; z-index: 3; padding: 4px 10px; border-radius: 8px; background: rgba(0,0,0,.65); color: #ffd36b; font-size: 13px; pointer-events: none; }
