:root {
  /* ☀️ 여름 라이트 테마 — 맑은 하늘 + 바다 + 햇살 */
  --bg: #f2fbff;
  --panel: #ffffff;
  --panel2: #eef8ff;
  --line: #d6eafc;
  --text: #0f2a43;
  --muted: #5d7a92;
  --accent: #0ea5e9;        /* 하늘색 */
  --accent2: #0284c7;       /* 진한 하늘 */
  --teal: #06b6d4;          /* 바다 */
  --coral: #fb7185;         /* 산호 */
  --sun: #f59e0b;           /* 햇살 */
  --good: #16a34a;
  --warn: #d97706;
  --bad: #e11d48;
  --chip: #06b6d4;
  --shadow: 0 6px 20px rgba(13, 110, 170, 0.08);
  --shadow-sm: 0 2px 8px rgba(13, 110, 170, 0.06);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: linear-gradient(180deg, #d7f1ff 0%, #eaf9ff 22%, #f7fcff 55%, #ffffff 100%);
  background-attachment: fixed;
  min-height: 100vh;
}
a { color: var(--accent2); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 20px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; position: sticky; top: 0; z-index: 10;
  background: linear-gradient(95deg, #38bdf8 0%, #22d3ee 55%, #2dd4bf 100%);
  color: #fff; box-shadow: 0 4px 16px rgba(14, 165, 233, 0.25);
}
.topbar h1 { font-size: 17px; margin: 0; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.08); }
.topbar .me { display: flex; align-items: center; gap: 10px; font-size: 14px; color: rgba(255,255,255,.95); }
.topbar .me img { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); }
.topbar button.ghost { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.6); color: #fff; }
.topbar button.ghost:hover { background: rgba(255,255,255,.3); }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 8px; font-size: 16px; }
.card h3 { margin: 16px 0 6px; font-size: 14px; color: var(--accent2); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

button {
  background: linear-gradient(95deg, #0ea5e9, #06b6d4); color: white; border: none; border-radius: 10px;
  padding: 10px 16px; font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: transform .05s ease, filter .15s ease;
}
button:hover { filter: brightness(1.06); }
button:active { transform: translateY(1px); }
button:disabled { background: #b8d4e6; cursor: not-allowed; box-shadow: none; }
button.secondary { background: #eaf6fe; color: var(--accent2); border: 1px solid var(--line); }
button.danger { background: linear-gradient(95deg, #fb7185, #f43f5e); }
button.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); box-shadow: none; }

label { display: block; font-size: 13px; color: var(--accent2); margin: 14px 0 4px; font-weight: 700; }
textarea, input[type=text] {
  width: 100%; background: #fbfdff; color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px; font-size: 14px; font-family: inherit;
}
textarea:focus, input[type=text]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14,165,233,.15); }
textarea { resize: vertical; min-height: 90px; }
textarea.mono { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 13px; background: #f3f9fe; }

.center { text-align: center; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }

.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.badge.open { background: #d1fae5; color: #047857; }
.badge.waiting { background: #fef3c7; color: #b45309; }
.badge.closed { background: #ffe4e6; color: #be123c; }
.badge.review { background: #ffedd5; color: #c2410c; }

.status-banner { padding: 16px 18px; border-radius: 14px; margin-bottom: 16px; font-weight: 700; box-shadow: var(--shadow-sm); }
.status-banner.waiting { background: linear-gradient(95deg, #fff7db, #fff1c2); color: #92580a; }
.status-banner.open { background: linear-gradient(95deg, #d6fbe8, #ccfaf1); color: #056b51; }
.status-banner.closed { background: linear-gradient(95deg, #ffe1e4, #ffd9dd); color: #b01530; }

.task { border-left: 4px solid var(--teal); padding: 8px 14px; margin: 8px 0; background: var(--panel2); border-radius: 0 10px 10px 0; }
.task b { color: var(--accent2); }
.task .maps { font-size: 12px; color: var(--muted); }

pre.code-template { background: #f1f7fd; border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow-x: auto; font-size: 12px; color: #0f2a43; }

/* 결과 화면 */
.score-hero {
  text-align: center; padding: 28px;
  background: linear-gradient(160deg, #e0f5ff 0%, #f0fbff 60%, #ffffff 100%);
  border: 1px solid var(--line);
}
.score-hero .total { font-size: 52px; font-weight: 900; background: linear-gradient(95deg, #0ea5e9, #06b6d4); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.score-hero .lvl { font-size: 22px; font-weight: 800; }
.lvl-A { color: #0e9f6e; } .lvl-B { color: #0284c7; } .lvl-C { color: #ca8a04; }
.lvl-D { color: #ea580c; } .lvl-E { color: #dc2626; }

.elem { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 10px 0; background: var(--panel2); }
.elem .head { display: flex; justify-content: space-between; align-items: baseline; }
.elem .head .sc { font-weight: 900; font-size: 18px; color: var(--accent2); }
.level-상 { color: #0e9f6e; font-weight: 800; } .level-중 { color: #ca8a04; font-weight: 800; } .level-하 { color: #dc2626; font-weight: 800; }
.elem ul { margin: 8px 0 0; padding-left: 18px; }
.elem li { color: #be123c; font-size: 14px; }
.elem .lvldesc { font-size: 13px; color: var(--muted); margin-top: 4px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 700; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: var(--panel2); }

.toast { position: fixed; bottom: 20px; right: 20px; background: #0f2a43; color: #fff; border: none;
  padding: 11px 18px; border-radius: 10px; font-size: 14px; opacity: 0; transition: opacity .2s; box-shadow: var(--shadow); }
.toast.show { opacity: 1; }

.login-box { max-width: 440px; margin: 70px auto; text-align: center; padding: 0 16px; }
.login-box .card { padding: 34px 30px; border-top: 5px solid; border-image: linear-gradient(95deg, #38bdf8, #fbbf24) 1; }
.login-box h2 { font-size: 20px; }
.devlogin { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 16px; }
.modal-bg { position: fixed; inset: 0; background: rgba(15, 42, 67, .45); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; max-width: 460px; box-shadow: 0 20px 50px rgba(13,110,170,.25); }
