:root {
  color-scheme: light;
  --page: #f4f6fb;
  --surface: #ffffff;
  --surface-soft: #f8f9fc;
  --text: #172033;
  --muted: #566174;
  --line: #dde2ec;
  --line-strong: #cbd2df;
  --input-line: #7d889c;
  --accent: #315fe8;
  --accent-dark: #244cc5;
  --accent-soft: #edf2ff;
  --danger: #c94252;
  --danger-soft: #fff0f2;
  --warning: #8b5a13;
  --warning-soft: #fff8e8;
  --shadow: 0 24px 70px rgba(33, 50, 91, 0.1);
  --radius-large: 28px;
  --radius-medium: 18px;
  --radius-small: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 12%, rgba(49, 95, 232, 0.08), transparent 24rem),
    radial-gradient(circle at 92% 4%, rgba(245, 185, 67, 0.09), transparent 21rem),
    var(--page);
  font-family:
    -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard",
    "Noto Sans KR", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

.page-shell {
  width: min(1160px, calc(100% - clamp(36px, 5.4vw, 64px)));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  border-bottom: 1px solid rgba(203, 210, 223, 0.8);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 31px;
  height: 31px;
  overflow: hidden;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  box-shadow: 0 8px 20px rgba(49, 95, 232, 0.22);
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  position: absolute;
  width: 4px;
  border-radius: 999px;
  background: #ffffff;
  content: "";
}

.brand-mark::before {
  height: 9px;
  transform: translate(-7px, 5px);
}

.brand-mark span {
  height: 16px;
}

.brand-mark::after {
  height: 22px;
  transform: translate(7px, -2px);
}

.local-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 650;
}

.local-label span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #27a96f;
  box-shadow: 0 0 0 5px rgba(39, 169, 111, 0.11);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(440px, 1.1fr);
  gap: clamp(48px, 7vw, 92px);
  align-items: center;
  padding: clamp(76px, 10vw, 126px) 0 clamp(88px, 11vw, 138px);
}

.eyebrow {
  margin: 0 0 17px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.75rem, 5vw, 4.35rem);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 1.11;
}

.hero h1 span {
  color: var(--accent);
}

.hero-description {
  margin: 27px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.85;
}

.composer-card {
  padding: clamp(28px, 4vw, 42px);
  border: 1px solid rgba(221, 226, 236, 0.9);
  border-radius: var(--radius-large);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.card-heading {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 32px;
}

.step-number {
  display: grid;
  flex: 0 0 auto;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.73rem;
  font-weight: 800;
}

.card-heading h2 {
  margin: 0;
  font-size: 1.28rem;
  letter-spacing: -0.035em;
}

.card-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.field-group + .field-group {
  margin-top: 22px;
}

.field-group label {
  display: block;
  margin-bottom: 9px;
  font-size: 0.87rem;
  font-weight: 750;
}

.field-group input,
.field-group textarea {
  width: 100%;
  border: 1px solid var(--input-line);
  border-radius: var(--radius-small);
  outline: 0;
  color: var(--text);
  background: var(--surface-soft);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.field-group input {
  height: 52px;
  padding: 0 16px;
}

.field-group textarea {
  min-height: 146px;
  padding: 15px 16px;
  line-height: 1.65;
  resize: vertical;
}

.field-group input::placeholder,
.field-group textarea::placeholder {
  color: #697386;
}

.field-group input:hover,
.field-group textarea:hover {
  border-color: #5f6b7f;
}

.field-group input:focus,
.field-group textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(49, 95, 232, 0.11);
}

.field-group input[aria-invalid="true"],
.field-group textarea[aria-invalid="true"] {
  border-color: var(--danger);
  background: #fffafb;
}

.form-message {
  min-height: 20px;
  margin: 12px 0 -2px;
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 650;
  opacity: 0;
}

.form-message.is-visible {
  opacity: 1;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
}

.form-actions > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 50px;
  padding: 0 20px 0 23px;
  border-radius: var(--radius-small);
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 10px 24px rgba(49, 95, 232, 0.2);
  font-size: 0.9rem;
  font-weight: 750;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.submit-button span {
  font-size: 1.18rem;
  font-weight: 400;
  line-height: 1;
}

.submit-button:hover {
  background: var(--accent-dark);
  box-shadow: 0 13px 28px rgba(49, 95, 232, 0.26);
  transform: translateY(-2px);
}

.submit-button:active {
  transform: translateY(0);
}

.submit-button:focus-visible,
.delete-button:focus-visible,
.calendar-nav-button:focus-visible,
.today-button:focus-visible,
.calendar-day:focus-visible,
.brand:focus-visible {
  outline: 3px solid #173b9e;
  outline-offset: 4px;
}

.board-section {
  padding: clamp(70px, 9vw, 110px) 0;
  border-top: 1px solid rgba(203, 210, 223, 0.8);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.section-heading .eyebrow {
  margin-bottom: 11px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.55rem);
  letter-spacing: -0.055em;
}

.post-count {
  margin: 0;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.66);
  font-size: 0.78rem;
  font-weight: 700;
}

.storage-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 22px;
  padding: 15px 17px;
  border: 1px solid #f0d8ab;
  border-radius: var(--radius-small);
  color: var(--warning);
  background: var(--warning-soft);
  font-size: 0.86rem;
  line-height: 1.55;
}

.storage-notice[hidden] {
  display: none;
}

.storage-notice > span {
  display: grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: #c0872f;
  font-size: 0.75rem;
  font-weight: 850;
}

.storage-notice p {
  margin: 0;
}

.calendar-shell {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 44px rgba(33, 50, 91, 0.06);
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.calendar-toolbar p,
.selected-day-heading > div > p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.calendar-toolbar h3,
.selected-day-heading h3 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: -0.045em;
}

.calendar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-nav-button,
.today-button {
  display: inline-grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
  font-weight: 750;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.calendar-nav-button {
  width: 44px;
  padding: 0;
  font-size: 1rem;
}

.today-button {
  min-width: 60px;
  padding: 0 14px;
  color: var(--accent);
  font-size: 0.8rem;
}

.calendar-nav-button:hover,
.today-button:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.calendar-weekdays,
.calendar-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-weekdays {
  margin-bottom: 8px;
}

.calendar-grid {
  display: grid;
  gap: 8px;
}

.calendar-weekdays span {
  padding: 8px 4px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
  text-align: center;
}

.calendar-weekdays span:first-child {
  color: var(--danger);
}

.calendar-weekdays span:last-child {
  color: var(--accent);
}

.calendar-day {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: clamp(72px, 11vw, 124px);
  padding: 8px;
  align-items: stretch;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: var(--surface-soft);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.calendar-day:hover {
  border-color: #9ba8c0;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(33, 50, 91, 0.08);
  transform: translateY(-2px);
}

.calendar-day.is-outside {
  color: #667186;
  background: #fbfcfe;
}

.calendar-day.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.calendar-day.is-sunday:not(.is-outside) .calendar-day-number {
  color: var(--danger);
}

.calendar-day.is-saturday:not(.is-outside) .calendar-day-number {
  color: var(--accent);
}

.calendar-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-height: 26px;
  margin-bottom: 7px;
}

.calendar-day-number {
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 800;
}

.calendar-day.is-today .calendar-day-number {
  color: #ffffff;
  background: var(--accent);
}

.calendar-post-count {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  place-items: center;
  border-radius: 999px;
  color: var(--accent);
  background: #ffffff;
  font-size: 0.67rem;
  font-weight: 850;
  box-shadow: 0 2px 8px rgba(49, 95, 232, 0.1);
}

.calendar-post-preview {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #3f4b62;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-day:focus-visible {
  z-index: 1;
  outline-offset: -4px;
}

.selected-day-panel {
  margin-top: 34px;
}

.selected-day-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.selected-day-heading h3 {
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
}

#selected-post-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.empty-state {
  display: flex;
  min-height: 235px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-large);
  background: rgba(255, 255, 255, 0.55);
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-illustration {
  position: relative;
  display: block;
  width: 66px;
  height: 74px;
  margin-bottom: 23px;
  border: 2px solid #b9c4dd;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 8px 8px 0 var(--accent-soft);
}

.empty-illustration::before,
.empty-illustration::after,
.empty-illustration span {
  position: absolute;
  left: 15px;
  height: 3px;
  border-radius: 99px;
  background: #cad2e3;
  content: "";
}

.empty-illustration::before {
  top: 20px;
  width: 34px;
}

.empty-illustration span {
  top: 32px;
  width: 27px;
}

.empty-illustration::after {
  top: 44px;
  width: 32px;
}

.empty-state h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.025em;
}

.empty-state p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.87rem;
}

.post-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-card {
  position: relative;
  padding: clamp(24px, 3vw, 32px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 30px rgba(33, 50, 91, 0.045);
  animation: reveal-card 340ms both;
  animation-delay: min(calc(var(--item-index) * 50ms), 250ms);
}

.post-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--accent);
  content: "";
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 19px;
}

.post-time {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.delete-button {
  min-width: 52px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--danger);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.delete-button:hover {
  border-color: #f3cbd1;
  background: var(--danger-soft);
}

.post-title {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.12rem, 2vw, 1.38rem);
  letter-spacing: -0.035em;
  line-height: 1.42;
}

.post-content {
  margin: 13px 0 0;
  color: #4f596c;
  font-size: 0.94rem;
  line-height: 1.78;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 104px;
  border-top: 1px solid rgba(203, 210, 223, 0.8);
  color: var(--muted);
  font-size: 0.73rem;
}

.site-footer p {
  margin: 0;
}

.site-footer p:first-child {
  font-weight: 800;
  letter-spacing: 0.12em;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@keyframes reveal-card {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-copy {
    max-width: 640px;
  }

  .composer-card {
    max-width: 680px;
  }
}

@media (max-width: 600px) {
  .site-header {
    min-height: 74px;
  }

  .local-label {
    font-size: 0.72rem;
  }

  .hero {
    gap: 38px;
    padding: 58px 0 78px;
  }

  .hero h1 {
    font-size: clamp(2rem, 10vw, 2.85rem);
  }

  .hero-description br {
    display: none;
  }

  .composer-card {
    padding: 25px 20px;
    border-radius: 22px;
  }

  .card-heading {
    margin-bottom: 26px;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .submit-button {
    width: 100%;
  }

  .board-section {
    padding: 68px 0;
  }

  .section-heading {
    align-items: flex-start;
  }

  .calendar-shell {
    padding: 18px 10px 12px;
    border-radius: 20px;
  }

  .calendar-toolbar {
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 18px;
  }

  .calendar-toolbar h3 {
    font-size: 1.35rem;
  }

  .calendar-actions {
    gap: 3px;
  }

  .calendar-nav-button {
    width: 40px;
    min-height: 44px;
  }

  .today-button {
    min-width: 50px;
    min-height: 44px;
    padding: 0 8px;
  }

  .calendar-weekdays,
  .calendar-row {
    gap: 3px;
  }

  .calendar-weekdays {
    margin-bottom: 3px;
  }

  .calendar-grid {
    gap: 3px;
  }

  .calendar-day {
    min-height: 59px;
    padding: 5px;
    border-radius: 9px;
  }

  .calendar-day-header {
    position: relative;
    justify-content: center;
    min-height: 23px;
    margin-bottom: 0;
  }

  .calendar-day-number {
    width: 23px;
    height: 23px;
    font-size: 0.72rem;
  }

  .calendar-post-count {
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 6px;
    min-width: 6px;
    height: 6px;
    padding: 0;
    background: var(--accent);
    box-shadow: none;
    font-size: 0;
    transform: translateX(-50%);
  }

  .calendar-post-preview {
    display: none;
  }

  .selected-day-panel {
    margin-top: 28px;
  }

  .selected-day-heading {
    align-items: flex-start;
  }

  .post-card {
    padding: 22px 20px 24px;
  }

  .post-meta {
    align-items: flex-start;
  }

  .site-footer {
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    padding: 25px 0;
  }
}

@media (max-width: 360px) {
  .calendar-toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .calendar-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
