:root {
  --blue: #0a559c;
  --blue-2: #0d68bd;
  --blue-press: #08457d;
  --blue-soft: #e8f2fb;
  --blue-tint: #f3f8fd;
  --ink: #111827;
  --muted: #667085;
  --bg: #dff3fb;
  --card: #ffffff;
  --line: #e4ebf3;
  --danger: #d92d20;
  --ok: #067647;
  --ok-bg: #ecfdf3;
  --wait: #b54708;
  --wait-bg: #fffaeb;
  --shadow: 0 10px 30px rgba(16, 38, 72, 0.08);
  --radius: 20px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; max-width: 100%; overflow-x: clip; }
html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 380px at 8% -8%, #b9e4f7 0%, transparent 55%),
    radial-gradient(720px 320px at 96% 8%, #c9ecfb 0%, transparent 48%),
    radial-gradient(700px 280px at 70% 100%, #d7f0fc 0%, transparent 42%),
    var(--bg);
}
.decor { pointer-events: none; position: fixed; inset: 0; overflow: hidden; z-index: 0; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.45;
}
.blob.b1 {
  width: 220px;
  height: 220px;
  left: -60px;
  top: 120px;
  background: #8fd4f2;
}
.blob.b2 {
  width: 280px;
  height: 280px;
  right: -80px;
  top: 40px;
  background: #a8e4f8;
}
.blob.b3 {
  width: 180px;
  height: 180px;
  right: 18%;
  bottom: 8%;
  background: #c5eefc;
}
header, main, footer { position: relative; z-index: 1; }

a { color: inherit; }
img { max-width: 100%; }

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  margin: 0;
  padding: max(12px, env(safe-area-inset-top)) env(safe-area-inset-right) 12px env(safe-area-inset-left);
  background: rgba(232, 246, 252, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.top-inner,
main,
footer {
  width: min(1080px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
  min-width: 0;
}
.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
}
.mark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}
.mark > span:last-child { min-width: 0; }
.mark strong { display: block; letter-spacing: -0.02em; font-size: 17px; }
.mark small { color: var(--blue); font-size: 12px; font-weight: 600; white-space: nowrap; }
.mark-em { font-size: 15px; font-weight: 800; letter-spacing: -0.02em; }
.mark-heart {
  color: #ff9eb8;
  font-size: 13px;
  font-weight: 700;
  padding: 0 2px;
}
.seal {
  width: 46px;
  height: 46px;
  border-radius: 0;
  display: grid;
  place-items: center;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.seal img {
  display: block;
  width: 46px;
  height: 46px;
  object-fit: contain;
}
.lounge-booting #lounge-title,
.lounge-booting #lounge-lede,
.lounge-booting #lounge-hint,
.lounge-booting .panel-body {
  visibility: hidden;
}
nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
nav form { margin: 0; display: inline-flex; }
.logout {
  display: grid;
  justify-items: end;
  align-self: flex-start;
  gap: 4px;
  min-width: 0;
}
.logout-hint {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  font-weight: 500;
  text-align: right;
  word-break: keep-all;
}
.who {
  color: var(--muted);
  font-size: 13px;
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
}

main { padding: 28px 0 72px; }
footer {
  padding: 0 0 max(40px, calc(24px + env(safe-area-inset-bottom)));
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  word-break: keep-all;
}
footer .link { display: inline-block; margin: 0 10px 0 0; }

.hero, .matched {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
  min-width: 0;
}
.hero > *, .copy, .stack { min-width: 0; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  max-width: 100%;
  line-height: 1.35;
}
h1 {
  font-size: clamp(30px, 4.6vw, 48px);
  line-height: 1.28;
  letter-spacing: -0.04em;
  margin: 14px 0 14px;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.panel h1 { font-size: clamp(24px, 3.6vw, 34px); }
.lede { color: var(--muted); line-height: 1.7; max-width: 42rem; overflow-wrap: anywhere; word-break: keep-all; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 24px; min-width: 0; }

.btn, .ghost, .nav-link, select, input, textarea, button {
  font: inherit;
}
.btn, .ghost, .nav-link {
  border: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  font-weight: 700;
  touch-action: manipulation;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.btn, .ghost, .nav-link:active { transform: translateY(1px); }
.btn {
  background: linear-gradient(180deg, #1470c2 0%, var(--blue) 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(10, 85, 156, 0.28);
}
.btn:hover { background: var(--blue-2); }
.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.ghost:hover { background: var(--blue-tint); border-color: #c9d9ea; }
.nav-link {
  min-height: 46px;
  padding: 0 12px;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  position: relative;
  gap: 6px;
}
.nav-link:hover { background: var(--blue-soft); color: var(--blue); }
.nav-notices {
  gap: 4px;
  align-items: center;
  padding-right: 10px;
}
.nav-notices-label {
  padding-top: 0;
}
.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-top: 0;
  padding: 0 5px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  box-shadow: 0 0 0 2px rgba(232, 246, 252, 0.96);
  font-variant-numeric: tabular-nums;
}
.notice-feed {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}
.site-notice {
  display: block;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}
.site-notice.unread {
  background: var(--ok-bg);
  border-color: #abefc6;
}
.site-notice .kicker { margin-bottom: 6px; }
.site-notice p { margin: 0; color: var(--ink); line-height: 1.55; font-weight: 600; }
.site-notice time { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }
.site-notice a { color: inherit; text-decoration: none; }
.link { color: var(--blue); font-weight: 700; text-decoration: none; }
button.link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}
.link:hover { text-decoration: underline; }

.stack { position: relative; min-height: 400px; }
.paper {
  background: var(--card);
  color: var(--ink);
  padding: 0 0 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.paper-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 14px;
  background: linear-gradient(180deg, #eef6fd 0%, #fff 100%);
  border-bottom: 1px solid var(--line);
}
.paper-head > div { min-width: 0; }
.avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #e4eef7;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar.is-f { background: #fff8fb; border-color: #f3e4ea; }
.avatar img {
  display: block;
  width: 50px;
  height: 50px;
  object-fit: contain;
}
.avatar-note {
  width: 58px;
  height: 58px;
  background: transparent;
  border-radius: 0;
}
.avatar-note img {
  display: block;
  width: 58px;
  height: 58px;
}
.paper h2, .paper h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.stack .paper h2 {
  font-size: 16px;
}
.paper-meta, .paper .meta, .paper .sub { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.paper .chips { padding: 14px 20px 0; }
.paper .intro { margin: 12px 20px 0; line-height: 1.7; color: #344054; }
.paper .contact {
  margin: 16px 20px 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--blue-press);
}
.paper .contact span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 2px;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--blue-tint);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}
.tilt-left, .tilt-right {
  position: absolute;
  width: min(300px, 88%);
}
.tilt-left { transform: rotate(-5deg); top: 8px; left: 0; z-index: 1; }
.tilt-right { transform: rotate(4deg); top: 188px; right: 0; z-index: 2; background: #fff; }

.steps {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.steps article {
  border: 1px solid var(--line);
  padding: 22px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}
.steps span {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.steps h3 { margin: 14px 0 8px; letter-spacing: -0.03em; }
.steps p { color: var(--muted); line-height: 1.65; margin: 0; }
.guide-list {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}
.guide-list article {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbfe 0%, #fff 70%);
}
.guide-list span {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.guide-list h3 {
  margin: 12px 0 8px;
  letter-spacing: -0.03em;
  word-break: keep-all;
}
.guide-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  word-break: keep-all;
}
.guide-legal { margin-top: 28px; }

.panel, .admin {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 28px;
  border-radius: 28px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.panel { max-width: 680px; }
.panel.wide, .admin { max-width: min(760px, 100%); }
.admin { max-width: none; }
.panel.has-hero {
  padding: 0;
  overflow: hidden;
  scroll-margin-top: calc(80px + env(safe-area-inset-top, 0px));
}
.panel-hero {
  position: relative;
  padding: 28px 28px 32px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(135deg, #08457d 0%, var(--blue) 48%, #3d94d6 100%);
  overflow: hidden;
}
.panel-hero > *:not(.hero-art) { position: relative; z-index: 1; }
.panel-hero.wait {
  background: linear-gradient(135deg, #0b3b6d 0%, #15609a 55%, #3d94d6 100%);
}
.hero-art {
  position: absolute;
  right: -8px;
  top: -6px;
  width: 168px;
  height: 112px;
  opacity: 0.9;
}
.panel-hero .kicker {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.panel-hero h1 { color: #fff; margin-top: 12px; max-width: 16ch; padding-right: 72px; }
.panel-hero .lede {
  color: rgba(255, 255, 255, 0.86);
  margin-top: 8px;
  padding-right: 48px;
  max-width: 38rem;
  word-break: keep-all;
}
.panel-hero .wait-hint { color: rgba(255, 255, 255, 0.82); }
.hero-notes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
  padding: 12px 48px 0 0;
  max-width: 38rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}
.hero-note {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.65;
  word-break: keep-all;
}
.hero-note.is-follow {
  color: rgba(255, 255, 255, 0.95);
}
.panel-hero .waiting-dot { background: #fff; }
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.hero-facts span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.copy .hero-facts span {
  background: var(--blue-soft);
  color: var(--blue);
}
.panel-body { padding: 36px 24px 32px; }
.form-card {
  display: grid;
  gap: 18px;
  padding: 22px 20px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbfe 0%, #fff 48%);
}
.form-card-title {
  margin: 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}
.note-form { margin-top: 0; gap: 22px; }
.notice {
  margin-top: 8px;
  max-width: 100%;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  background: var(--blue-tint);
}
.consent-block { margin-top: 22px; min-width: 0; }
.consent-block h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -0.03em;
}
.consent-block h3 {
  color: var(--ink);
  font-size: 13px;
  margin: 14px 0 6px;
}
.req {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.refuse {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
  padding: 16px;
  border-radius: 18px;
  background: var(--blue-tint);
}
.bubble {
  max-width: 86%;
  border: 0;
  border-radius: 18px 18px 18px 6px;
  padding: 12px 14px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(16, 38, 72, 0.06);
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: anywhere;
  align-self: flex-start;
  min-width: 0;
}
.bubble.mine-msg {
  align-self: flex-end;
  background: var(--blue);
  color: #fff;
  border-radius: 18px 18px 6px 18px;
}
.bubble .meta { color: var(--muted); font-size: 12px; margin: 0 0 6px; font-weight: 700; }
.bubble.mine-msg .meta { color: rgba(255, 255, 255, 0.78); }
.bubble p { margin: 0; color: inherit; line-height: 1.65; white-space: pre-wrap; }
.notice h2 {
  color: var(--ink);
  font-size: 15px;
  margin: 16px 0 8px;
}
.notice p, .notice li { margin: 0 0 8px; }
.notice ul { padding-left: 1.1rem; }
.notice table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 8px 0 12px;
  font-size: 12px;
}
.notice th, .notice td {
  text-align: left;
  vertical-align: top;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
  word-break: keep-all;
  white-space: normal;
}
.notice th { color: var(--blue); }
.notice-meta { color: var(--muted); font-size: 12px; }
.stack-form { display: grid; gap: 14px; margin-top: 24px; min-width: 0; }
.stack-form > * { min-width: 0; }
.note-form { display: grid; gap: 22px; margin-top: 0; }
label { display: grid; gap: 12px; font-size: 14px; color: #344054; font-weight: 600; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 500;
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(10, 85, 156, 0.16);
  border-color: var(--blue);
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  padding: 0;
  flex: 0 0 18px;
  accent-color: var(--blue);
}
label.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--ink);
  font-weight: 500;
  min-width: 0;
}
label.check span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: keep-all;
}
label.check.all {
  font-weight: 700;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--blue-tint);
}
textarea { resize: vertical; min-height: 120px; }
.report-box { margin-top: 12px; }
.report-box textarea { min-height: 72px; }
.mail-field { display: grid; gap: 12px; }
.mail-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tip-btn {
  width: auto;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.tip-btn:hover { background: var(--blue-soft); }
.tip-card { width: min(640px, 100%); }
.tip-photo {
  display: block;
  width: 100%;
  margin-top: 10px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
}
.mail-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.mail-row span { color: var(--blue); font-size: 14px; font-weight: 700; white-space: nowrap; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; min-width: 0; }
.split > * { min-width: 0; }
.hint, .dev, .sent { color: var(--muted); font-size: 13px; line-height: 1.6; font-weight: 500; }
.dev { border-top: 1px solid var(--line); padding-top: 16px; }
.status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fef3f2;
  color: var(--danger);
  font-weight: 600;
}
.status.is-ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.code-card {
  margin: 0;
  padding: 18px;
  text-align: center;
  font-size: 36px;
  letter-spacing: 0.28em;
  font-weight: 800;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 16px;
  overflow-wrap: anywhere;
}
.smtp-box {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.hidden { display: none !important; }
.mine-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 20px 0 18px;
}
.mine-head .kicker { margin: 0; }
.mine-back {
  border: 0;
  cursor: pointer;
}
.mine-back.is-on {
  cursor: default;
}
.mine-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  min-height: 40px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}
.mine-tab.is-on {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  cursor: default;
}
span.mine-tab { cursor: default; }
.mine-reput {
  border: 0;
  background: none;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  padding: 0;
  min-height: 0;
  line-height: 1.3;
  cursor: pointer;
}
.mine-reput.is-on {
  font-weight: 800;
  text-decoration: none;
  cursor: default;
}
.mine-reput:hover { text-decoration: underline; }
.mine-reput.is-on:hover { text-decoration: none; }
span.mine-reput { cursor: default; }
.note-form { margin-top: 4px; }
.mine { margin-top: 12px; }
#cooldown-left { margin: 12px 0 4px; }
.open { min-height: 240px; }
#previous-wrap { margin-top: 28px; padding-top: 8px; }
.wait-hint {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  word-break: keep-all;
}
.waiting-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--blue);
  vertical-align: middle;
  animation: pulse 1.4s ease-in-out infinite;
}
.arrive {
  margin: 0 0 14px;
  padding: 12px 16px;
  border: 0;
  border-radius: 14px;
  color: var(--ok);
  background: var(--ok-bg);
  font-weight: 700;
}
.accept-box {
  margin: 0 0 16px;
  padding: 16px;
  border-radius: 16px;
  background: var(--blue-tint);
  border: 1px solid var(--line);
}
.accept-box .wait-hint { margin: 0 0 12px; }
.envelope-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 8px;
  min-width: 0;
}
.envelope-slot {
  min-width: 0;
  min-height: 0;
}
.envelope-slot:empty {
  min-height: 210px;
  border: 1px dashed #c9dcea;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.45);
}
.envelope {
  width: 100%;
  min-width: 0;
  min-height: 210px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, #eaf3fb 0 38px, #fff 38px 100%);
  box-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
  position: relative;
  touch-action: manipulation;
}
.envelope:hover { border-color: #b7d0e8; transform: translateY(-1px); }
.envelope .kicker {
  margin-bottom: 14px;
  white-space: normal;
  height: auto;
  align-items: flex-start;
}
.envelope-seal {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 0 10px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e4eef7;
  overflow: hidden;
}
.envelope-seal.is-f { background: #fff8fb; border-color: #f3e4ea; }
.envelope-seal img {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.envelope strong {
  display: block;
  font-size: 18px;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
  word-break: keep-all;
}
.envelope-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.envelope-preview {
  margin: 12px 0 14px;
  color: #475467;
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.envelope .chip { background: var(--blue-soft); color: var(--blue); }
body.modal-open { overflow: hidden; }
body.modal-open header,
body.modal-open main,
body.modal-open footer {
  z-index: auto;
}
body.modal-open .top { z-index: 0; }
.note-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.note-modal-back {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(16, 38, 72, 0.48);
  cursor: pointer;
}
.note-modal-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(92dvh, 92vh, 880px);
  overflow: auto;
  padding: 18px;
  border-radius: 24px;
  background: var(--bg);
  box-shadow: 0 24px 60px rgba(16, 38, 72, 0.28);
}
.note-modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.note-modal-top .ghost { min-height: 38px; }
#modal-report { display: inline-block; margin-top: 12px; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.draw-stage {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: rgba(223, 243, 251, 0.78);
  backdrop-filter: blur(14px);
}
.draw-card {
  width: min(420px, 100%);
  padding: 26px 22px 20px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(16, 38, 72, 0.16);
  text-align: center;
}
.draw-card h2 {
  margin: 10px 0 8px;
  font-size: 24px;
  letter-spacing: -0.04em;
  line-height: 1.3;
  word-break: keep-all;
}
.draw-card .lede {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  word-break: keep-all;
}
.draw-glass {
  position: relative;
  width: min(300px, 100%);
  height: 236px;
  margin: 18px auto 16px;
  overflow: hidden;
  border-radius: 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(232, 246, 252, 0.18) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 0 0 1px rgba(10, 85, 156, 0.08),
    0 10px 24px rgba(16, 38, 72, 0.08);
  backdrop-filter: blur(8px);
}
.draw-note {
  position: absolute;
  display: block;
  width: 72px;
  height: 86px;
  border: 0;
  background: none;
  transform-origin: 50% 55%;
  filter: drop-shadow(0 6px 7px rgba(16, 38, 72, 0.16));
}
.draw-note img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.draw-note.n2,
.draw-note.n6 {
  filter: drop-shadow(0 6px 7px rgba(16, 38, 72, 0.16)) hue-rotate(-18deg) saturate(1.2);
}
.draw-note.n3,
.draw-note.n7 {
  filter: drop-shadow(0 6px 7px rgba(16, 38, 72, 0.16)) hue-rotate(16deg) saturate(0.95);
}
.draw-note.n5 {
  filter: drop-shadow(0 6px 7px rgba(16, 38, 72, 0.16)) sepia(0.18);
}
.draw-note.n1 { left: 6%; top: 12%; transform: rotate(-18deg); }
.draw-note.n2 { left: 26%; top: 42%; transform: rotate(14deg); }
.draw-note.n3 { left: 44%; top: 8%; transform: rotate(8deg); }
.draw-note.n4 { left: 38%; top: 36%; transform: rotate(-6deg); }
.draw-note.n5 { left: 62%; top: 14%; transform: rotate(16deg); }
.draw-note.n6 { left: 70%; top: 44%; transform: rotate(-12deg); }
.draw-note.n7 { left: 10%; top: 58%; transform: rotate(22deg); }
.draw-note.n8 { left: 52%; top: 60%; transform: rotate(-20deg); }
.draw-stage.is-shaking .draw-glass { animation: draw-box 0.16s linear infinite; }
.draw-stage.is-shaking .draw-note.n1 { animation: draw-wobble 0.7s ease-in-out infinite; }
.draw-stage.is-shaking .draw-note.n2 { animation: draw-wobble 0.82s ease-in-out 0.05s infinite reverse; }
.draw-stage.is-shaking .draw-note.n3 { animation: draw-wobble 0.64s ease-in-out 0.1s infinite; }
.draw-stage.is-shaking .draw-note.n4 { animation: draw-wobble 0.76s ease-in-out 0.08s infinite reverse; }
.draw-stage.is-shaking .draw-note.n5 { animation: draw-wobble 0.7s ease-in-out 0.14s infinite; }
.draw-stage.is-shaking .draw-note.n6 { animation: draw-wobble 0.88s ease-in-out 0.04s infinite reverse; }
.draw-stage.is-shaking .draw-note.n7 { animation: draw-wobble 0.66s ease-in-out 0.16s infinite; }
.draw-stage.is-shaking .draw-note.n8 { animation: draw-wobble 0.78s ease-in-out 0.12s infinite reverse; }
.draw-stage.is-picked .draw-note {
  opacity: 0.22;
  filter: blur(0.4px);
  transition: opacity 0.35s ease, filter 0.35s ease, transform 0.5s ease;
}
.draw-stage.is-picked .draw-note.is-winner {
  left: 36%;
  top: 14%;
  z-index: 2;
  width: 86px;
  height: 102px;
  opacity: 1;
  filter: drop-shadow(0 16px 18px rgba(10, 85, 156, 0.22));
  animation: draw-pick 0.5s ease forwards;
}
.draw-sweat,
.draw-sigh {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  z-index: 4;
}
.draw-sweat {
  width: 16px;
  height: 22px;
}
.draw-sweat svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.draw-sweat.sw1 { left: 48%; top: 7%; width: 18px; height: 24px; }
.draw-sweat.sw2 { left: 59%; top: 16%; width: 14px; height: 19px; rotate: 18deg; }
.draw-sweat.sw3 { left: 39%; top: 14%; width: 13px; height: 18px; rotate: -26deg; }
.draw-sweat.sw4 { left: 66%; top: 6%; width: 11px; height: 15px; rotate: 10deg; }
.draw-sigh {
  right: 14%;
  top: 12%;
  width: 22px;
  height: 32px;
}
.draw-sigh::before,
.draw-sigh::after {
  content: "";
  position: absolute;
  border: 2.4px solid #7aa7c9;
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
}
.draw-sigh::before {
  left: 0;
  top: 0;
  width: 12px;
  height: 26px;
  transform: rotate(18deg);
}
.draw-sigh::after {
  left: 9px;
  top: 6px;
  width: 9px;
  height: 18px;
  transform: rotate(18deg);
}
.draw-stage.is-empty .draw-note {
  opacity: 0.52;
  filter: drop-shadow(0 6px 7px rgba(16, 38, 72, 0.12)) grayscale(0.12);
  transition: transform 0.48s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease;
}
.draw-stage.is-empty .draw-note.n1 { transform: translate(22px, 38px) rotate(-26deg) scale(0.82); }
.draw-stage.is-empty .draw-note.n2 { transform: translate(10px, 26px) rotate(10deg) scale(0.84); }
.draw-stage.is-empty .draw-note.n3 { transform: translate(-8px, 42px) rotate(18deg) scale(0.8); }
.draw-stage.is-empty .draw-note.n5 { transform: translate(-16px, 34px) rotate(-14deg) scale(0.82); }
.draw-stage.is-empty .draw-note.n6 { transform: translate(-10px, 22px) rotate(8deg) scale(0.84); }
.draw-stage.is-empty .draw-note.n7 { transform: translate(14px, 10px) rotate(-8deg) scale(0.86); }
.draw-stage.is-empty .draw-note.n8 { transform: translate(-6px, 8px) rotate(16deg) scale(0.84); }
.draw-stage.is-empty .draw-note.n4 {
  left: 36%;
  top: 26%;
  z-index: 3;
  width: 84px;
  height: 100px;
  opacity: 1;
  filter: drop-shadow(0 10px 12px rgba(16, 38, 72, 0.16));
  transform: rotate(-14deg) translateY(10px) scale(1.04);
}
.draw-stage.is-empty .draw-sweat,
.draw-stage.is-empty .draw-sigh {
  animation: sweat-pop 0.42s cubic-bezier(0.2, 1.2, 0.3, 1) forwards;
}
.draw-stage.is-empty .draw-sweat.sw2 { animation-delay: 0.08s; }
.draw-stage.is-empty .draw-sweat.sw3 { animation-delay: 0.14s; }
.draw-stage.is-empty .draw-sweat.sw4 { animation-delay: 0.2s; }
.draw-stage.is-empty .draw-sigh { animation-delay: 0.1s; }
.draw-empty {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
  word-break: keep-all;
}
.draw-stage #draw-skip {
  width: auto;
  margin: 0 auto;
}
body.draw-open { overflow: hidden; }
@keyframes draw-wobble {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  25% { translate: 6px -8px; rotate: 9deg; }
  50% { translate: -5px 5px; rotate: -7deg; }
  75% { translate: 7px 3px; rotate: 5deg; }
}
@keyframes draw-box {
  0% { transform: rotate(-0.7deg) translate(0, 0); }
  25% { transform: rotate(0.8deg) translate(1px, -1px); }
  50% { transform: rotate(-0.5deg) translate(-1px, 1px); }
  75% { transform: rotate(0.5deg) translate(1px, 0); }
  100% { transform: rotate(-0.7deg) translate(0, 0); }
}
@keyframes draw-pick {
  0% { transform: rotate(-6deg) scale(1) translateY(0); }
  100% { transform: rotate(-8deg) scale(1.16) translateY(-36px); }
}
@keyframes sweat-pop {
  0% { opacity: 0; translate: 0 -10px; scale: 0.35; }
  72% { opacity: 1; translate: 0 3px; scale: 1.08; }
  100% { opacity: 1; translate: 0 0; scale: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .draw-stage.is-shaking .draw-note,
  .draw-stage.is-shaking .draw-glass { animation: none; }
  .draw-stage.is-picked .draw-note.is-winner { animation: none; transform: rotate(-8deg) scale(1.16) translateY(-36px); }
  .draw-stage.is-empty .draw-sweat,
  .draw-stage.is-empty .draw-sigh { animation: none; opacity: 1; }
}

.admin h1 { max-width: 40rem; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 28px 0 16px;
}
.campus-stats { margin-top: 0; }
.stat {
  border: 1px solid var(--line);
  background: var(--blue-tint);
  padding: 16px 18px;
  border-radius: 18px;
}
.stat span, .stat small { color: var(--muted); font-size: 12px; font-weight: 700; }
.stat strong {
  display: block;
  font-size: 30px;
  letter-spacing: -0.04em;
  margin: 6px 0 4px;
  color: var(--blue);
}
.board { margin-top: 36px; }
.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  -webkit-overflow-scrolling: touch;
}
.admin .board table { min-width: 720px; }
.ghost.compact, .btn.compact {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
  width: auto;
}
.board table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.board th, .board td {
  text-align: left;
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: anywhere;
}
.board tr:last-child td { border-bottom: 0; }
.board th { color: var(--muted); font-weight: 700; background: var(--blue-tint); }
.board td small { color: var(--muted); }
.board tbody tr:hover { background: #f8fbfe; }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--wait-bg);
  color: var(--wait);
}
.pill.ok { background: var(--ok-bg); color: var(--ok); }

@media (max-width: 860px) {
  nav { width: 100%; justify-content: flex-start; align-items: center; }
  .hero, .matched, .steps { grid-template-columns: 1fr; }
  .envelope-row { gap: 10px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stack { min-height: 0; }
  .tilt-left, .tilt-right {
    position: relative;
    transform: none;
    top: auto;
    left: auto;
    right: auto;
    margin-bottom: 12px;
    width: 100%;
  }
  nav .who { display: none; }
  .logout { width: auto; }
  .logout-hint { display: none; }
  .nav-link { min-height: 36px; padding: 0 10px; }
  nav .btn, nav .ghost { min-height: 36px; padding: 0 12px; }
  .panel, .admin { padding: 22px 16px; }
  .panel.has-hero { padding: 0; }
  .panel-hero { padding: 22px 16px; }
  .panel-hero h1, .panel-hero .lede, .hero-notes { padding-right: 0; max-width: none; }
  .panel-body { padding: 24px 16px 22px; }
  .hero-art { width: 110px; height: 76px; right: -22px; opacity: 0.55; }
  .btn, .ghost { width: 100%; }
  .actions .btn, .actions .ghost, nav .btn, nav .ghost, nav .nav-link, .mine-tab, .mine-reput, .tip-btn { width: auto; }
  input, select, textarea { font-size: 16px; }
  .code-card { font-size: 30px; letter-spacing: 0.18em; padding: 16px 10px; }
  .envelope { min-height: 0; padding: 14px 12px 12px; }
  .envelope-slot:empty { min-height: 168px; }
  .envelope strong { font-size: 16px; }
  .envelope-preview { -webkit-line-clamp: 2; }
  .note-modal-top { flex-wrap: wrap; }
  .board-head { flex-wrap: wrap; }
}

@media (max-width: 560px) {
  .split, .mail-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .top-inner,
  main,
  footer {
    width: min(1080px, calc(100% - 20px));
  }
  .seal, .seal img { width: 38px; height: 38px; }
  .mark { gap: 8px; }
  .mark strong { font-size: 16px; }
  .hero-art { display: none; }
  .stats { gap: 8px; }
  .stat { padding: 12px 14px; }
  .stat strong { font-size: 24px; }
  .code-card { font-size: 24px; letter-spacing: 0.12em; }
  .envelope .kicker { font-size: 11px; padding: 5px 8px; }
  .envelope-seal { width: 40px; height: 40px; margin-bottom: 8px; }
  .envelope-seal img { width: 36px; height: 36px; }
  .envelope strong { font-size: 15px; }
  .envelope-preview { -webkit-line-clamp: 1; }
  .envelope-row { grid-template-columns: 1fr; }
  .envelope-slot:empty { min-height: 0; display: none; }
  .paper-head { padding: 14px 14px 12px; gap: 10px; }
  .avatar { width: 48px; height: 48px; border-radius: 16px; }
  .avatar img { width: 44px; height: 44px; }
  .avatar-note, .avatar-note img { width: 46px; height: 46px; }
  .stack .paper h2 { font-size: 15px; }
  .guide-list article, .steps article { padding: 16px; }
  .form-card { padding: 16px 14px 18px; }
  .notice table { font-size: 11px; }
  .notice th, .notice td { padding: 8px 4px; }
  .draw-glass { height: 188px; }
  .draw-card h2 { font-size: 22px; }
  .bubble { max-width: 100%; }
  .actions { width: 100%; }
  .actions .btn, .actions .ghost { flex: 1 1 auto; }
}
