/* Pretendard Variable © 2021 Kil Hyung-jin, SIL OFL 1.1. See /assets/Pretendard-OFL.txt */
@font-face {
  font-family: "Pretendard Variable";
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
  src: url("/assets/PretendardVariable.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --canvas: #f2f4f6;
  --surface: #ffffff;
  --ink: #191f28;
  --body: #4e5968;
  --muted: #6b7684;
  --line: #e5e8eb;
  --primary: #1b64da;
  --primary-press: #1957c2;
  --primary-foreground: #ffffff;
  --page-fg: var(--ink);
  --accent: #3182f6;
  --accent-weak: #e8f3ff;
  --focus: #1b64da;
  --solved: #027648;
  --solved-bg: #f0faf6;
  --solved-line: #aeefd5;
  --amber: #7a3e00;
  --amber-bg: #fff4d6;
  --amber-line: #e45600;
  --danger: #d22030;
  --danger-bg: #ffeeee;
  --header-h: 48px;
  --summary-h: 56px;
  --activity-h: 32px;
  --toolbar-h: 36px;
  --card-h: 188px;
  --grid-gap: 8px;
  --rail: 180px;
  --radius-card: 14px;
  --radius-control: 8px;
  font-family: "Pretendard Variable", "Apple SD Gothic Neo", sans-serif;
}

* { box-sizing: border-box; }

[hidden]:not([hidden="until-found" i]) {
  display: none !important;
}

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  background-color: var(--page-bg, var(--canvas));
  background-image: var(--theme-image, none);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  color: var(--page-fg, var(--ink));
  font-family: "Pretendard Variable", "Apple SD Gothic Neo", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  word-break: keep-all;
  line-break: strict;
}

body { min-height: 100vh; }

h1, h2, h3, h4, p, dl, dd { margin: 0; }

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; }

a { color: var(--primary); }

:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 30;
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-control);
  padding: 8px 12px;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus { top: 8px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wordmark {
  flex: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
}

a.wordmark:hover { color: var(--ink); }

.brand {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.contest-mark {
  flex: none;
  max-width: 8em;
  color: var(--body);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contest-mark[hidden],
.theme-logo[hidden],
.theme-logo-slot[hidden] { display: none !important; }

.theme-logo {
  display: block;
  height: 24px;
  width: auto;
  max-width: 64px;
  object-fit: contain;
  flex: none;
  background: var(--surface);
}

.theme-logo-slot { display: contents; }

.topbar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: var(--surface);
  color: var(--ink);
}

.topbar h1 {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}

.site-nav a {
  color: var(--body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 6px;
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.subnav {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 16px;
  background: var(--surface);
  color: var(--ink);
}

.subnav a {
  color: var(--body);
  font-size: 14px;
  font-weight: 600;
  line-height: 36px;
  text-decoration: none;
  padding: 0 8px;
}

.subnav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.button, .button-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-control);
  min-height: 36px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.button {
  background: var(--primary);
  color: var(--primary-foreground, #fff);
  border: 1px solid var(--primary);
}

.button:hover { background: var(--primary-press); border-color: var(--primary-press); }

.button-quiet {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}

.button[hidden]:not([hidden="until-found" i]),
.button-quiet[hidden]:not([hidden="until-found" i]),
.panel[hidden]:not([hidden="until-found" i]) {
  display: none !important;
}

.button:disabled, .button-quiet:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.topbar .button,
.topbar .button-quiet {
  min-height: 32px;
  height: 32px;
  flex: none;
}

.demo-flag {
  margin: 0;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.form-error {
  color: var(--danger);
  font-weight: 600;
}

.form-error:empty,
.saved-note:empty,
.board-status:empty,
.board-error:empty,
.empty-note:empty { display: none; }

.saved-note { color: var(--solved); font-weight: 600; }

input, select, textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
  min-height: 36px;
  padding: 6px 10px;
}

input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  flex: none;
  accent-color: var(--primary);
  vertical-align: middle;
}

textarea { min-height: 96px; resize: vertical; line-height: 1.5; }

.panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  min-width: 0;
  color: var(--ink);
}

.panel h2, .panel h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
}

.quiet, .engine-note {
  color: var(--body);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 8px;
}

.category-cue { font-weight: 700; }

.category-cue::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 0.08em;
}

.cue-0 { color: #9a3412; }
.cue-1 { color: #6d28d9; }
.cue-2 { color: #9f1239; }
.cue-3 { color: #9d174d; }
.cue-4 { color: #7c2d12; }
.cue-5 { color: #6b21a8; }

.mono, pre, .login-command, .source-link, .detail-file {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  font-weight: 450;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.icon {
  display: inline-block;
  flex: none;
  vertical-align: -1px;
}

@keyframes live-border {
  0%, 100% { border-color: var(--accent); }
  50% { border-color: #90c2ff; }
}

@keyframes exclusive-emphasis {
  0%, 100% { background: #fff4d6; }
  50% { background: #ffe3a3; }
}

@media (max-width: 680px) {
  .topbar, .subnav {
    height: auto;
    min-height: 0;
    flex-wrap: wrap;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .topbar h1 { font-size: 22px; white-space: normal; }

  .site-nav, .subnav { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
