/* ========================= 기본 설정 ========================= */
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", Arial, sans-serif; background: #f5f7fb; color: #172033; }
.topbar { position: sticky; top: 0; background: #ffffff; border-bottom: 1px solid #e5e8ef; padding: 14px 22px; display: flex; justify-content: space-between; gap: 12px; align-items: center; z-index: 10; }
.brand { font-size: 20px; font-weight: 900; color: #153e90; }
nav { display: flex; gap: 8px; flex-wrap: wrap; }
button { border: 0; border-radius: 12px; padding: 10px 14px; background: #e9eef8; color: #17345f; font-weight: 800; cursor: pointer; }
button:disabled { opacity: .6; cursor: not-allowed; }
.primary { background: #ffcc33; color: #172033; }
.small-button { padding: 8px 12px; font-size: 13px; }
.container { max-width: 1080px; margin: auto; padding: 24px; }
.page { display: none; }
.page.active { display: block; }
.hero { background: linear-gradient(135deg, #153e90, #2274e5); color: white; border-radius: 22px; padding: 34px; margin-bottom: 20px; }
.hero h1 { font-size: 32px; margin: 10px 0; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.card, .period-card, .guide-card, .overview-card, .evaluation-card, .contact-card { background: #ffffff; border: 1px solid #d7e2f2; border-radius: 20px; padding: 24px; margin: 22px 0; box-shadow: 0 8px 20px rgba(30, 50, 90, 0.06); }
.narrow { max-width: 720px; margin: auto; }
label { display: block; font-weight: 800; margin: 14px 0; }
input, textarea, select { width: 100%; padding: 12px; border: 1px solid #cfd6e4; border-radius: 12px; margin-top: 7px; font: inherit; }
input[type="file"] { background: #ffffff; }
.muted { color: #667085; }
.toolbar { display: grid; grid-template-columns: 1fr 220px; gap: 10px; margin: 0 0 18px; }
.idea-list { display: block; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.meta span { background: #eef4ff; color: #153e90; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 900; }
.detail p { white-space: pre-line; line-height: 1.7; }
.likebox { border-top: 1px solid #edf0f5; margin-top: 20px; padding-top: 18px; }
.simple-likebox { background: #fff; border: 1px solid #e5e8ef; border-radius: 14px; padding: 14px; }
.likecount { font-size: 28px; font-weight: 900; color: #e23b3b; }
.rank-row { display: grid; grid-template-columns: 44px 1fr 80px; gap: 12px; border-bottom: 1px solid #edf0f5; padding: 14px 0; align-items: center; }
.rank { background: #153e90; color: #ffffff; border-radius: 50%; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; font-weight: 900; }
.message { font-weight: 800; }
.message.success { color: #176b3a; }
.message.error, .error { color: #a11616; }
footer { text-align: center; color: #8a94a6; padding: 28px; }
.period-card h2, .guide-title-row h2, .overview-card h2, .evaluation-card h2, .contact-card h2 { margin: 0 0 14px; font-size: 30px; color: #153e90; }
.period-list { counter-reset: item; list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.period-list li { display: grid; grid-template-columns: 34px 240px 1fr; gap: 8px; align-items: start; font-size: 20px; line-height: 1.45; }
.period-list li::before { content: counter(item) ")"; counter-increment: item; font-weight: 800; color: #111827; }
.period-date { font-weight: 800; color: #111827; white-space: nowrap; }
.period-list li.active .period-date, .period-list li.active .period-desc { color: #003bff; font-weight: 900; }
.period-list .note { font-size: 18px; color: #333333; font-weight: 500; }
.period-footnote { font-size: 19px; margin: 12px 0 0; }
.guide-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.guide-chip { background: #eef4ff; color: #153e90; border-radius: 999px; padding: 7px 12px; font-weight: 800; font-size: 13px; }
.guide-top-example { display: grid; grid-template-columns: 1fr 240px; gap: 14px; margin-bottom: 16px; }
.guide-example-title, .guide-example-level, .guide-box { border: 2px solid #1a46ff; background: #ffffff; padding: 14px; border-radius: 12px; }
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.guide-box h3 { margin: 0 0 12px; font-size: 22px; }
.guide-desc { font-size: 17px; margin: 0 0 16px; }
.guide-box li { margin-bottom: 14px; line-height: 1.55; }
.blue { color: #003bff; font-weight: 900; }
.guide-box.expected { margin-top: 16px; background: #fbfdff; }
.overview-section, .evaluation-section { margin-bottom: 24px; }
.overview-section h3, .evaluation-section h3 { font-size: 24px; margin-bottom: 10px; color: #111827; }
.overview-section ul, .evaluation-section ol { margin: 0; padding-left: 25px; }
.overview-section li, .evaluation-section li { margin-bottom: 8px; line-height: 1.6; }
.level-box { display: flex; gap: 15px; align-items: flex-start; background: #eef4ff; border-left: 5px solid #153e90; border-radius: 10px; padding: 12px; margin-top: 10px; }
.level-box strong { min-width: 80px; color: #153e90; }
.award-summary { font-size: 19px; font-weight: 700; margin: 0 0 10px; color: #111827; }
.contact-list { display: grid; gap: 12px; }
.contact-row { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: start; font-size: 22px; line-height: 1.5; }
.contact-row strong { color: #111827; font-weight: 900; }
.small-note { font-size: 13px; line-height: 1.5; }
.selected-file-list { margin-top: 10px; }
.selected-files-box { border: 1px solid #d7e2f2; background: #fbfdff; border-radius: 14px; padding: 14px; }
.selected-files-box.file-error { border-color: #e23b3b; background: #fff7f7; }
.selected-files-box ul { margin: 10px 0 0; padding-left: 20px; }
.selected-files-box li { margin-bottom: 6px; line-height: 1.5; }
.selected-files-box li span { color: #667085; font-size: 13px; margin-left: 6px; }
.attachment-box { margin: 20px 0; padding: 16px; border: 1px solid #d7e2f2; border-radius: 16px; background: #fbfdff; }
.attachment-box h3 { margin-top: 0; color: #153e90; }
.attachment-list { display: grid; gap: 14px; }
.attachment-item { padding: 12px; border: 1px solid #e5e8ef; border-radius: 14px; background: #ffffff; }
.attachment-preview { width: 100%; max-height: 420px; object-fit: contain; border-radius: 12px; border: 1px solid #e5e8ef; background: #ffffff; margin-bottom: 8px; }
.file-link { display: inline-block; margin-top: 6px; padding: 10px 14px; border-radius: 12px; background: #eef4ff; color: #153e90; font-weight: 900; text-decoration: none; word-break: break-all; }
.file-link:hover { background: #dceaff; }
.hidden-detail { display: none; }
.preline { white-space: pre-line; line-height: 1.65; }
.board-section { margin: 8px 0 28px; }
.board-title-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.board-title-row h2 { margin: 0; color: #153e90; }
.board-simple-list { display: grid; gap: 12px; }
.board-simple-card { background: #f4fff4; border: 1px solid #8fcd8f; border-radius: 16px; padding: 15px; box-shadow: 0 8px 20px rgba(30, 50, 90, .04); }
.board-simple-head { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.board-simple-summary strong { color: #176b3a; font-size: 18px; }
.board-simple-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.board-simple-meta span { background: #ffffff; border: 1px solid #cfe8cf; border-radius: 999px; padding: 4px 9px; color: #43536a; font-size: 12px; font-weight: 800; }
.board-simple-detail { background: #ffffff; border-radius: 12px; padding: 14px; margin-top: 14px; border: 1px solid #d7e2f2; }
.board-simple-detail h3 { color: #153e90; margin: 14px 0 8px; }
@media (max-width: 780px) { .period-list li { grid-template-columns: 30px 1fr; font-size: 18px; } .period-date, .period-desc { grid-column: 2; } .guide-top-example, .guide-grid, .toolbar { grid-template-columns: 1fr; } .period-card h2, .guide-title-row h2, .evaluation-card h2, .contact-card h2, .overview-card h2 { font-size: 25px; } .evaluation-card, .contact-card { padding: 18px; } .evaluation-section h3 { font-size: 21px; } .evaluation-section li, .award-summary { font-size: 17px; } .contact-row { grid-template-columns: 1fr; gap: 2px; font-size: 18px; } .attachment-preview { max-height: 280px; } .board-simple-head { flex-direction: column; align-items: flex-start; } .board-simple-head button { width: 100%; } }
@media (max-width: 720px) { .topbar { flex-direction: column; align-items: flex-start; } .container { padding: 16px; } .hero h1 { font-size: 25px; } }
/* LocalStorage 열람 표시 및 Hash 공감 UI */
.view-new {
  background: #fff3cd !important;
  border-color: #ffe69c !important;
  color: #8a5a00 !important;
}

.view-read {
  background: #eef7ee !important;
  border-color: #cfe8cf !important;
  color: #176b3a !important;
}

.like-action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.attachment-input-group {
  display: grid;
  gap: 6px;
}
.login-overlay {
  position: fixed;
  inset: 0;
  background: #f5f7fb;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 24px;
}

.login-box {
  width: 100%;
  max-width: 360px;
  background: #ffffff;
  padding: 36px 28px;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  text-align: center;
}

.login-box h2 {
  margin-bottom: 12px;
}

.login-box p {
  margin-bottom: 16px;
  color: #555;
}

.login-box input {
  width: 100%;
  padding: 13px 14px;
  font-size: 16px;
  border: 1px solid #ccd3dd;
  border-radius: 10px;
  box-sizing: border-box;
  margin-bottom: 14px;
}

.login-box button {
  width: 100%;
  padding: 13px 14px;
  border: none;
  border-radius: 10px;
  background: #0066cc;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

#loginMessage {
  margin-top: 14px;
  color: #cc0000;
  font-weight: 600;
}
