@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

:root {
  --bg: #f4f1ea;
  --paper: #fffdf8;
  --ink: #1c1915;
  --muted: #6b645a;
  --line: #e6dfd2;
  --accent: #0f6e56;
  --accent-soft: #e4f4ee;
  --accent-contrast: #fff;
  --accent-text: #0d5a46;
  --info: #1e4d7b;
  --info-soft: #e6eef6;
  --warn: #9a4a12;
  --warn-soft: #f8eadc;
}
html.dark {
  --bg: #141210;
  --paper: #1e1b18;
  --ink: #f4efe6;
  --muted: #a79f93;
  --line: #3a342c;
  --accent: #4ec9a6;
  --accent-soft: #24362f;
  --accent-contrast: #0d241c;
  --accent-text: #b8ead8;
  --info: #8eb8e4;
  --info-soft: #1e2a38;
  --warn: #e0a06a;
  --warn-soft: #3a2a1c;
}
html.dark body {
  background:
    radial-gradient(1200px 500px at 10% -10%, #2a241c 0%, transparent 55%),
    var(--bg);
}
html.dark .nav a, html.dark .nav-tab { color: #d5cdc2; }
html.dark .nav a:hover, html.dark .nav-tab:hover { background: #2a261f; }
html.dark .nav a.active, html.dark .nav-tab.active { color: #b8ead8; }
html.dark .hero { box-shadow: 0 10px 30px rgba(0,0,0,.25); }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}
body {
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  background:
    radial-gradient(1200px 500px at 10% -10%, #efe6d4 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  touch-action: manipulation;
}
a { color: var(--info); }
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
}
.site-header .brand,
.site-header .nav a,
.site-header .nav-logout {
  font-family: inherit;
}
.site-header .inner {
  max-width: none;
  width: 100%;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -.02em;
  font-size: 17px;
  line-height: 1.2;
}
.brand span { color: var(--accent); display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.nav a, .nav-tab {
  text-decoration: none;
  color: #3d382f;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  flex: none;
}
.nav-tab {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
}
.nav a:hover, .nav-tab:hover { background: #f3eee4; }
.nav a.active, .nav-tab.active { background: var(--accent-soft); color: var(--accent-text); }
.nav a:focus, .nav-tab:focus, .nav-logout:focus {
  outline: none;
  box-shadow: 0 0 0 3px #111;
}
html.dark .nav a:focus, html.dark .nav-tab:focus, html.dark .nav-logout:focus {
  box-shadow: 0 0 0 3px #f0c36a;
}
.who {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
  padding: 7px 4px;
}
.who b { color: var(--ink); font-weight: 800; }
.nav-logout {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.nav-logout:hover { color: var(--accent); border-color: var(--accent); }
.nav-toggle {
  display: none;
  appearance: none;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  z-index: 270;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .22s ease, opacity .22s ease;
}
.nav-toggle:hover { background: var(--accent-soft); }
.nav-toggle:focus { outline: none; box-shadow: 0 0 0 3px #111; }
html.dark .nav-toggle:focus { box-shadow: 0 0 0 3px #f0c36a; }
.site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-overlay {
  display: none;
}
.site-header.has-drawer {
  position: sticky;
  top: 0;
  z-index: 200;
}
.site-header.has-drawer.nav-open { z-index: 400; }
.nav a .soon {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--warn);
  vertical-align: 1px;
}
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 20px 64px;
  width: 100%;
  flex: 1;
  min-width: 0;
}
.hero {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 40px 36px 34px;
  box-shadow: 0 10px 30px rgba(70, 50, 20, .06);
}
.kicker {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 8px;
}
h1 { font-size: 32px; line-height: 1.25; margin: 0 0 10px; }
.lead { color: var(--muted); margin: 0; max-width: 38em; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 18px 16px;
  text-decoration: none;
  color: inherit;
  display: block;
}
.card:hover { border-color: #d4cbb8; }
.card b { display: block; font-size: 17px; margin-bottom: 6px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card .meta {
  margin-top: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}
.card .meta.wait { color: var(--warn); }
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  margin-top: 16px;
}
h2 { margin: 0 0 8px; font-size: 22px; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.log-list { list-style: none; margin: 16px 0 0; padding: 0; }
.log-list li { border-bottom: 1px solid var(--line); }
.log-list li:last-child { border-bottom: 0; }
.log-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  text-decoration: none;
  color: inherit;
  padding: 14px 2px;
}
.log-list a:hover b { color: var(--accent); }
.log-list time { color: var(--muted); font-size: 13px; white-space: nowrap; }
.soon-box {
  text-align: center;
  padding: 48px 20px;
}
.soon-box h1 { font-size: 28px; }
.crumb { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.crumb a { color: var(--muted); text-decoration: none; }
.site-footer {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 0 20px 36px;
}
.intro p { margin: 0 0 10px; color: var(--muted); max-width: 40em; }
.intro p:last-child { margin-bottom: 0; }
.drop {
  margin-top: 16px;
  border: 2px dashed #d4cbb8;
  border-radius: 16px;
  padding: 28px 18px;
  text-align: center;
  background: #faf7f1;
  color: var(--muted);
  transition: border-color .15s, background .15s;
}
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: #11493a; }
.drop b { display: block; color: var(--ink); margin-bottom: 6px; }
.drop input { display: none; }
.drop .pick {
  display: inline-block;
  margin-top: 10px;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.status { margin-top: 10px; font-size: 13px; color: var(--muted); }
.status.err { color: #8a4038; }
.status.ok { color: var(--accent-text); }
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.album-grid a {
  display: block;
  background: #f3eee4;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 1;
}
.album-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.empty { margin-top: 18px; color: var(--muted); font-size: 14px; }
.status-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.status-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px 10px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(30, 20, 5, .03);
}
.status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b8b1a2;
  flex: none;
  transition: background .25s ease, box-shadow .25s ease;
}
.status-pill .s-sep {
  width: 1px;
  height: 12px;
  background: var(--line);
  flex: none;
}
.status-pill .s-value {
  color: #948c7c;
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.status-pill.on .dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.status-pill.on .s-value { color: var(--accent-text); }

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.action-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.action-btn:hover,
.action-btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent-text);
  background: var(--accent-soft);
  outline: none;
}

.modal {
  border: none;
  border-radius: 22px;
  padding: 0;
  width: min(560px, calc(100vw - 32px));
  max-height: min(80vh, 720px);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(20, 20, 10, .28);
}
.modal::backdrop { background: rgba(20, 18, 12, .45); }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-close {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 6px;
  border-radius: 999px;
}
.modal-close:hover { color: var(--ink); background: var(--accent-soft); }
.modal-body {
  padding: 20px 22px 26px;
  max-height: calc(min(80vh, 720px) - 60px);
  overflow-y: auto;
}
.modal-body .url-label:first-child { margin-top: 0; }

@media (max-width: 720px) {
  .site-header.has-drawer .inner {
    flex-direction: row;
    align-items: center;
    padding: 8px 12px 8px 16px;
  }
  .site-header.has-drawer .nav-toggle { display: flex; }
  .site-header.has-drawer .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 250;
    background: rgba(22, 18, 12, .42);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
  }
  html.dark .site-header.has-drawer .nav-overlay { background: rgba(0, 0, 0, .55); }
  .site-header.has-drawer.nav-open .nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }
  .site-header.has-drawer .nav,
  #school-header.has-drawer .nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 260;
    width: min(300px, 84vw);
    height: 100dvh;
    margin: 0;
    padding: 68px 14px 28px;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 4px;
    background: var(--paper);
    border-left: 1px solid var(--line);
    box-shadow: -16px 0 40px rgba(40, 30, 10, .14);
    transform: translateX(100%);
    transition: transform .24s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  html.dark .site-header.has-drawer .nav {
    box-shadow: -16px 0 40px rgba(0, 0, 0, .4);
  }
  .site-header.has-drawer.nav-open .nav,
  #school-header.has-drawer.nav-open .nav { transform: translateX(0); }
  #school-header.has-drawer .nav {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    width: min(300px, 84vw);
  }
  .site-header.has-drawer .nav a,
  .site-header.has-drawer .nav .nav-tab,
  .site-header.has-drawer .nav-logout,
  .site-header.has-drawer .who {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 16px;
  }
  .site-header.has-drawer .nav-logout {
    margin-top: 10px;
    justify-content: center;
  }
  .site-header.has-drawer .who { padding-left: 14px; color: var(--muted); }
  body.nav-open { overflow: hidden; }
  .wrap { padding: 20px 14px 48px; }
  .hero { padding: 24px 18px; }
  h1 { font-size: 24px; }
}
@media (max-width: 640px) {
  .site-header:not(.has-drawer) .inner { flex-direction: column; align-items: flex-start; padding: 12px 14px; }
  .site-header:not(.has-drawer) .nav { width: 100%; }
  .site-header:not(.has-drawer) .nav a,
  .site-header:not(.has-drawer) .nav .nav-tab,
  .site-header:not(.has-drawer) .nav-logout,
  .site-header:not(.has-drawer) .who {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}
