:root {
  --cs-bg: #f5f6f8;
  --cs-card: #ffffff;
  --cs-ink: #0f172a;
  --cs-text: #334155;
  --cs-muted: #5b6475;
  --cs-line: #e2e6ec;
  --cs-accent: #3b3fd8;
  --cs-accent-soft: #eef0ff;
  --cs-danger: #c2410c;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.cs {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--cs-bg);
  color: var(--cs-text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

a { color: var(--cs-accent); }

code { font-family: inherit; white-space: nowrap; }

.cs-top {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 22px 20px 0;
}

.cs-brand {
  color: var(--cs-ink);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .02em;
  text-decoration: none;
}

.cs-brand b { color: var(--cs-accent); font-weight: 800; }

.cs-top-tag {
  padding: 2px 10px;
  border: 1px solid var(--cs-line);
  border-radius: 999px;
  color: var(--cs-muted);
  font-size: 14px;
}

.cs-main {
  flex: 1;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 20px 56px;
}

.cs-eyebrow {
  margin: 0 0 8px;
  color: var(--cs-accent);
  font-size: 14px;
  font-weight: 700;
}

.cs h1 {
  margin: 0;
  color: var(--cs-ink);
  font-size: clamp(26px, 4.4vw, 36px);
  line-height: 1.3;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.cs-lead { margin: 14px 0 0; font-size: 17px; text-wrap: pretty; }

.cs-sub { margin: 12px 0 0; color: var(--cs-muted); font-size: 14px; }

.cs-notice {
  max-width: 520px;
  margin: 8vh auto 0;
  padding: 36px 32px;
  border: 1px solid var(--cs-line);
  border-radius: 20px;
  background: var(--cs-card);
}

.cs-notice h1 { font-size: 26px; }

.cs-notice > p:not(.cs-eyebrow):not(.cs-sub) { margin: 12px 0 0; text-wrap: pretty; }

.cs-login { display: grid; gap: 10px; margin-top: 24px; }

.cs-login label { color: var(--cs-ink); font-size: 15px; font-weight: 700; }

.cs-login input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #cbd2dc;
  border-radius: 12px;
  font: inherit;
}

.cs-login input:focus { outline: 2px solid var(--cs-accent); outline-offset: 1px; border-color: transparent; }

.cs-login button {
  margin-top: 6px;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: var(--cs-accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.cs-error { margin: 0; color: var(--cs-danger); font-size: 14px; }

.cs-cover-head { padding-bottom: 28px; border-bottom: 1px solid var(--cs-line); }

.cs-empty {
  margin-top: 28px;
  padding: 28px;
  border: 1px dashed #c9d0da;
  border-radius: 16px;
  color: var(--cs-muted);
  text-align: center;
}

.cs-files {
  display: grid;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.cs-file a {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--cs-line);
  border-radius: 14px;
  background: var(--cs-card);
  color: var(--cs-ink);
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}

.cs-file a:hover { border-color: #b9bff5; box-shadow: 0 6px 18px rgba(30, 41, 90, .08); }

.cs-badge {
  display: inline-flex;
  justify-content: center;
  padding: 4px 0;
  border-radius: 8px;
  background: var(--cs-accent-soft);
  color: var(--cs-accent);
  font-size: 14px;
  font-weight: 700;
}

.is-pdf .cs-badge { background: #fff1ea; color: var(--cs-danger); }

.cs-thumb { display: block; width: 64px; height: 48px; overflow: hidden; border-radius: 8px; background: #eef1f5; }

.cs-thumb img { width: 100%; height: 100%; object-fit: cover; }

.cs-file-name { min-width: 0; overflow: hidden; font-weight: 600; }

.cs-file-name code { display: block; overflow: hidden; text-overflow: ellipsis; }

.cs-file-meta { color: var(--cs-muted); font-size: 14px; white-space: nowrap; }

.cs-foot {
  padding: 22px 20px 30px;
  border-top: 1px solid var(--cs-line);
  color: var(--cs-muted);
  font-size: 14px;
  text-align: center;
}

.cs-foot p { margin: 0; }

.cs-foot a { color: inherit; }

@media (max-width: 560px) {
  .cs-main { padding-top: 28px; }
  .cs-notice { margin-top: 2vh; padding: 28px 22px; }
  .cs-file a { grid-template-columns: 56px minmax(0, 1fr); gap: 4px 14px; padding: 14px; }
  .cs-file a > :first-child { grid-row: span 2; }
  .cs-file-meta { grid-column: 2; }
  .cs-thumb { width: 56px; height: 44px; }
  .cs-foot { padding-bottom: 84px; }
}
