
:root {
  --navy:#183b63;
  --navy-2:#285d8f;
  --blue-soft:#eaf3fb;
  --green:#2c8b57;
  --green-soft:#eaf7ef;
  --red:#b42318;
  --red-soft:#fff0ee;
  --yellow:#fff6cf;
  --ink:#172033;
  --muted:#667085;
  --line:#dce3ea;
  --surface:#ffffff;
  --background:#f4f7fa;
  --shadow:0 10px 30px rgba(24,59,99,.10);
  --radius:18px;
}
* { box-sizing:border-box; }
html { background:var(--background); }
body {
  margin:0;
  background:var(--background);
  color:var(--ink);
  font-family:Inter, Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
}
button,input,textarea { font:inherit; }
button { -webkit-tap-highlight-color:transparent; }
button:disabled { opacity:.58; cursor:wait; }
.app-shell {
  width:min(760px,100%);
  min-height:100vh;
  margin:0 auto;
  padding:0 16px 100px;
}
.app-header {
  position:sticky;
  top:0;
  z-index:5;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:calc(18px + env(safe-area-inset-top)) 2px 14px;
  background:linear-gradient(to bottom,var(--background) 84%,rgba(244,247,250,0));
}
.eyebrow,.label {
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  letter-spacing:.04em;
}
h1,h2,h3,p { margin-top:0; }
h1 { margin-bottom:0; font-size:28px; }
h2 { margin:3px 0 0; font-size:23px; }
h3 { margin-bottom:8px; font-size:17px; }
.icon-button {
  width:42px;height:42px;border:0;border-radius:14px;
  background:var(--navy);color:white;font-size:25px;cursor:pointer;
}
.hidden { display:none !important; }
.connection-notice {
  margin-bottom:12px;padding:11px 13px;border-radius:13px;
  background:var(--yellow);color:#6a5200;font-size:13px;font-weight:800;
}
.connection-notice.error { background:var(--red-soft);color:var(--red); }
.summary-card,.settings-card,.daily-public-card {
  background:var(--surface);border:1px solid var(--line);
  border-radius:var(--radius);box-shadow:var(--shadow);
}
.summary-card { padding:17px;margin-bottom:20px; }
.summary-row { display:flex;align-items:center;justify-content:space-between;gap:12px; }
.summary-row strong { display:block;margin-top:4px;font-size:21px; }
.version-badge {
  max-width:55%;padding:6px 9px;border-radius:999px;background:var(--blue-soft);
  color:var(--navy);font-size:11px;font-weight:800;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap;
}
.progress-track { height:11px;margin-top:13px;overflow:hidden;border-radius:999px;background:#e8edf2; }
.progress-fill {
  width:0;height:100%;border-radius:inherit;
  background:linear-gradient(90deg,var(--navy),#4d8fc2);transition:width .2s ease;
}
.summary-mini-grid {
  display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:14px;
}
.summary-mini-grid div {
  padding:10px 8px;border-radius:12px;background:#f7f9fb;text-align:center;
}
.summary-mini-grid span { display:block;color:var(--muted);font-size:10px;font-weight:800; }
.summary-mini-grid strong { display:block;margin-top:4px;font-size:14px; }
.view { display:none; }
.view.active { display:block; }
.section-heading {
  display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 2px 12px;
}
.small-button,.primary-button,.secondary-button,.danger-button {
  border:0;border-radius:12px;padding:11px 14px;font-weight:800;cursor:pointer;
}
.small-button,.primary-button { background:var(--navy);color:white; }
.secondary-button { background:#edf2f6;color:var(--ink); }
.danger-button { background:var(--red);color:white; }
.compact-button { width:auto !important;margin:0 !important;padding:10px 13px; }
.settings-card { padding:17px;margin-bottom:13px;box-shadow:none; }
.settings-card p { margin-bottom:13px;color:var(--muted);line-height:1.55;font-size:14px; }
.settings-card button { width:100%;margin-top:8px; }
.daily-public-card { padding:14px;margin-bottom:12px;box-shadow:none; }
.daily-card-head { display:flex;align-items:flex-start;justify-content:space-between;gap:12px; }
.daily-card-head h3 { margin:3px 0 0; }
.daily-log-details {
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px;
}
.log-chip {
  padding:10px;border-radius:12px;background:var(--blue-soft);
  color:var(--navy);font-size:13px;font-weight:800;
}
.log-chip.memo-chip { grid-column:1/-1;background:#f5f6f8;color:var(--ink);font-weight:600;line-height:1.45; }
.task-list { display:grid;gap:10px; }
.task-row {
  display:flex;align-items:flex-start;gap:11px;min-height:58px;padding:13px;
  background:var(--surface);border:1px solid var(--line);border-radius:15px;
}
.task-row input[type=checkbox] {
  width:22px;height:22px;flex:0 0 auto;margin:1px 0 0;accent-color:var(--navy);
}
.task-row input[type=checkbox]:disabled { cursor:default;opacity:1; }
.task-copy { flex:1;min-width:0; }
.task-title { display:block;font-size:15px;font-weight:700;line-height:1.45;word-break:keep-all; }
.task-meta { display:flex;flex-wrap:wrap;gap:5px;margin-top:5px; }
.pill {
  display:inline-flex;align-items:center;padding:3px 7px;border-radius:999px;
  background:var(--blue-soft);color:var(--navy);font-size:11px;font-weight:800;
}
.moved-pill { background:var(--yellow);color:#6a5200; }
.task-row.done { background:#f2f8f4;border-color:#cbe3d3; }
.task-row.done .task-title { color:var(--muted);text-decoration:line-through; }
.task-admin-buttons { display:flex;flex-wrap:wrap;gap:6px;margin-top:9px; }
.move-button,.delete-button-inline {
  border:1px solid var(--line);border-radius:9px;padding:6px 8px;
  background:#f7f9fb;color:var(--navy);font-size:11px;font-weight:800;cursor:pointer;
}
.delete-button-inline { background:var(--red-soft);color:var(--red);border-color:#ffd2cc; }
.empty-state {
  padding:30px 18px;border:1px dashed var(--line);border-radius:15px;
  background:rgba(255,255,255,.65);color:var(--muted);text-align:center;
}
.milestone {
  margin-bottom:10px;padding:10px 12px;border-radius:13px;
  background:var(--green-soft);color:#1f6b43;font-size:13px;font-weight:800;
}
.month-summary {
  display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:12px;
}
.month-stat {
  padding:11px 8px;border:1px solid var(--line);border-radius:13px;background:white;text-align:center;
}
.month-stat span { display:block;color:var(--muted);font-size:10px;font-weight:800; }
.month-stat strong { display:block;margin-top:4px;font-size:14px; }
.month-card {
  margin-bottom:17px;overflow:hidden;background:var(--surface);
  border:1px solid var(--line);border-radius:var(--radius);
}
.month-title { padding:13px 15px;background:var(--navy);color:white;font-size:18px;font-weight:900; }
.calendar-grid { display:grid;grid-template-columns:repeat(7,minmax(0,1fr)); }
.weekday {
  padding:8px 2px;background:#e8f1f9;border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);color:var(--navy);font-size:12px;font-weight:900;text-align:center;
}
.day-cell {
  min-height:105px;padding:7px 5px;border:0;border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);background:white;color:var(--ink);text-align:left;cursor:pointer;
}
.day-cell.blank { background:#f4f6f8;cursor:default; }
.day-cell.today { box-shadow:inset 0 0 0 3px #4d8fc2; }
.day-cell.complete { background:var(--green-soft); }
.day-cell.buffer { background:var(--yellow); }
.day-cell.exam { background:#ffe7e3; }
.day-number { display:block;font-weight:900; }
.day-info {
  display:block;margin-top:5px;color:var(--muted);font-size:9.5px;line-height:1.35;
  white-space:normal;word-break:keep-all;
}
.day-info strong { color:var(--ink);font-weight:800; }
.day-dot { display:inline-block;width:7px;height:7px;margin-top:5px;border-radius:50%;background:var(--navy-2); }
.bottom-nav {
  position:fixed;left:50%;bottom:0;z-index:8;display:grid;grid-template-columns:repeat(4,1fr);
  width:min(760px,100%);padding:8px 14px calc(8px + env(safe-area-inset-bottom));
  transform:translateX(-50%);border-top:1px solid var(--line);
  background:rgba(255,255,255,.96);backdrop-filter:blur(15px);
}
.nav-button {
  display:flex;flex-direction:column;align-items:center;gap:3px;border:0;border-radius:12px;
  padding:7px;background:transparent;color:var(--muted);font-size:11px;font-weight:800;cursor:pointer;
}
.nav-button span { font-size:20px;line-height:1; }
.nav-button.active { background:var(--blue-soft);color:var(--navy); }
.modal {
  position:fixed;inset:0;z-index:20;display:none;align-items:flex-end;justify-content:center;
  padding:16px 16px calc(16px + env(safe-area-inset-bottom));background:rgba(12,24,39,.48);
}
.modal.open { display:flex; }
.modal-panel {
  width:min(650px,100%);max-height:90vh;overflow:auto;padding:18px;
  border-radius:23px 23px 18px 18px;background:white;box-shadow:0 24px 70px rgba(0,0,0,.24);
}
.modal-head { display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px; }
.close-button {
  width:38px;height:38px;border:0;border-radius:12px;background:#eef2f6;color:var(--ink);font-size:24px;cursor:pointer;
}
.modal-daily-card { background:#f9fbfd; }
.daily-log-form {
  display:grid;gap:11px;margin-bottom:14px;padding:14px;border-radius:15px;
  border:1px solid var(--line);background:#f7f9fb;
}
.daily-log-form label { display:grid;gap:6px; }
.daily-log-form label > span { color:var(--muted);font-size:12px;font-weight:800; }
.daily-log-form input,.daily-log-form textarea {
  width:100%;border:1px solid var(--line);border-radius:11px;padding:11px;background:white;
}
.duration-fields { display:grid;grid-template-columns:1fr 1fr;gap:9px; }
.duration-fields label { position:relative; }
.duration-fields small { position:absolute;right:10px;bottom:12px;color:var(--muted);font-weight:800; }
.duration-fields input { padding-right:34px; }
.form-action-row { display:flex;justify-content:flex-end;gap:8px; }
.add-form { display:flex;gap:8px;margin-top:14px; }
.add-form input { flex:1;min-width:0;border:1px solid var(--line);border-radius:12px;padding:12px; }
.add-form button { border:0;border-radius:12px;padding:0 16px;background:var(--navy);color:white;font-weight:800; }
.text-button { width:100%;margin-top:12px;border:0;background:transparent;color:var(--navy);font-weight:800;cursor:pointer; }
.comment-admin-card {
  display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;
  padding:14px;border:1px solid var(--line);border-radius:15px;background:var(--surface);
}
.comment-admin-card strong { display:block;margin-bottom:4px; }
.comment-admin-card p { margin:0;color:var(--muted);font-size:13px;line-height:1.45; }
.admin-actions { display:flex;gap:7px;flex:0 0 auto; }
.comment-form {
  display:grid;gap:11px;margin-bottom:14px;padding:15px;border:1px solid var(--line);
  border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow);
}
.comment-form label { display:grid;gap:6px; }
.comment-form label > span { color:var(--muted);font-size:12px;font-weight:800; }
.comment-form input,.comment-form textarea {
  width:100%;border:1px solid var(--line);border-radius:12px;padding:12px;background:white;color:var(--ink);outline:none;
}
.comment-form textarea { resize:vertical;min-height:100px; }
.comment-form-footer { display:flex;align-items:center;justify-content:space-between;gap:10px; }
.comment-form-footer span { color:var(--muted);font-size:12px;font-weight:700; }
.honeypot { position:absolute !important;left:-10000px !important;width:1px !important;height:1px !important;opacity:0 !important; }
.comment-notice {
  margin-bottom:12px;padding:12px 13px;border-radius:13px;background:var(--yellow);
  color:#6a5200;font-size:13px;font-weight:700;line-height:1.5;
}
.comment-notice.error { background:var(--red-soft);color:var(--red); }
.comments-list { display:grid;gap:10px; }
.comment-card { padding:14px;border:1px solid var(--line);border-radius:15px;background:var(--surface); }
.comment-card.pinned { border-color:#e2c34a;background:#fffaf0; }
.comment-card.hidden-comment { opacity:.72;background:#f3f4f6; }
.comment-head { display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:8px; }
.comment-name { font-weight:900;word-break:break-all; }
.comment-time { margin-top:3px;color:var(--muted);font-size:11px; }
.comment-badges { display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px; }
.comment-badge {
  display:inline-flex;padding:3px 7px;border-radius:999px;background:var(--blue-soft);
  color:var(--navy);font-size:10px;font-weight:900;
}
.comment-body { margin:0;white-space:pre-wrap;word-break:break-word;line-height:1.58;font-size:14px; }
.comment-moderation { display:flex;flex-wrap:wrap;gap:6px;margin-top:11px;padding-top:10px;border-top:1px solid var(--line); }
.comment-moderation button {
  border:0;border-radius:10px;padding:7px 9px;background:#edf2f6;
  color:var(--ink);font-size:11px;font-weight:800;cursor:pointer;
}
.comment-moderation button.delete-comment { background:var(--red-soft);color:var(--red); }
.comment-loading { padding:28px 16px;text-align:center;color:var(--muted); }
.toast {
  position:fixed;left:50%;bottom:92px;z-index:30;max-width:calc(100% - 32px);
  padding:11px 15px;border-radius:999px;background:#172033;color:white;font-size:13px;
  font-weight:700;opacity:0;pointer-events:none;transform:translate(-50%,12px);transition:.2s ease;
}
.toast.show { opacity:1;transform:translate(-50%,0); }
ul { margin:8px 0 0;padding-left:20px;color:var(--muted);line-height:1.65; }
@media (max-width:520px) {
  .summary-mini-grid,.month-summary { grid-template-columns:repeat(3,1fr); }
  .comment-admin-card { align-items:flex-start;flex-direction:column; }
  .admin-actions { width:100%; }
  .admin-actions button { flex:1; }
  .day-cell { min-height:101px;padding:6px 4px; }
  .day-info { font-size:8.8px; }
}
@media (min-width:700px) {
  .modal { align-items:center; }
  .modal-panel { border-radius:23px; }
  .day-cell { min-height:116px; }
}
