:root {
  color-scheme: light;
  --background: #edf3f5;
  --surface: #fbfdfe;
  --surface-strong: #ffffff;
  --text: #102a3a;
  --muted: #647984;
  --line: #d5e1e6;
  --accent: #087f8c;
  --accent-hover: #056671;
  --accent-soft: #dff1f2;
  --navy: #0b3045;
  --navy-deep: #071f30;
  --signal: #f0a43a;
  --danger: #c44c43;
  --danger-soft: #f9ebe8;
  --shadow: 0 18px 45px rgba(6, 46, 68, 0.1);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--background);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0 0 auto;
  height: 390px;
  background:
    linear-gradient(115deg, rgba(10, 69, 93, 0.16), transparent 48%),
    linear-gradient(180deg, var(--navy-deep), var(--navy));
  content: "";
}

body::after {
  position: fixed;
  z-index: -1;
  top: 330px;
  right: -5%;
  left: -5%;
  height: 82px;
  border-radius: 50% 50% 0 0;
  background: var(--background);
  content: "";
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(100% - 40px, 880px);
  margin: 0 auto;
  padding: 72px 0 80px;
}

.page-header {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr minmax(220px, 0.65fr);
  align-items: center;
  gap: 22px;
  min-height: 205px;
  margin-bottom: 34px;
  color: #fff;
}

.brand-mark {
  position: relative;
  width: 70px;
  height: 70px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.brand-mark::before {
  position: absolute;
  top: 15px;
  left: 32px;
  width: 5px;
  height: 31px;
  border-radius: 5px;
  background: var(--signal);
  content: "";
}

.brand-mark::after {
  position: absolute;
  top: 13px;
  left: 25px;
  width: 19px;
  height: 19px;
  border: 4px solid #fff;
  border-radius: 50%;
  content: "";
}

.brand-wave,
.brand-wave::before {
  position: absolute;
  bottom: 14px;
  left: 14px;
  width: 42px;
  height: 9px;
  border-top: 3px solid #fff;
  border-radius: 50%;
  content: "";
}

.brand-wave::before {
  bottom: -8px;
  left: 0;
}

.eyebrow,
.section-label {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.page-header .eyebrow {
  color: #7fd2d8;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2.3rem, 7vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.intro {
  max-width: 570px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.page-header .intro {
  color: rgba(255, 255, 255, 0.7);
}

.route-art {
  position: relative;
  height: 92px;
}

.route-line {
  position: absolute;
  top: 47px;
  right: 12px;
  left: 12px;
  border-top: 2px dashed rgba(127, 210, 216, 0.5);
  transform: rotate(-7deg);
}

.route-point {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.08);
}

.route-point-start {
  bottom: 29px;
  left: 8px;
}

.route-point-end {
  top: 28px;
  right: 8px;
  border-color: var(--signal);
}

.route-ship {
  position: absolute;
  top: 31px;
  left: 52%;
  color: #fff;
  font-size: 1.5rem;
  transform: rotate(-7deg);
}

.composer {
  padding: 32px;
  border: 1px solid rgba(213, 225, 230, 0.9);
  border-top: 4px solid var(--accent);
  border-radius: 24px;
  background: rgba(255, 253, 249, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.section-heading,
.posts-heading,
.form-actions,
.label-row,
.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading {
  align-items: flex-start;
  margin-bottom: 28px;
}

h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  letter-spacing: -0.035em;
}

.local-badge,
.post-count {
  flex: none;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-radius: 50%;
  background: #22a671;
  box-shadow: 0 0 0 3px rgba(34, 166, 113, 0.13);
}

.field + .field {
  margin-top: 20px;
}

label {
  display: inline-block;
  margin-bottom: 9px;
  font-size: 0.92rem;
  font-weight: 750;
}

.label-row label {
  margin-bottom: 9px;
}

.label-row span {
  color: var(--muted);
  font-size: 0.78rem;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  color: var(--text);
  background: var(--surface-strong);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input {
  height: 50px;
  padding: 0 15px;
}

textarea {
  min-height: 150px;
  padding: 14px 15px;
  line-height: 1.65;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #a5a79f;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(49, 92, 75, 0.11);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.field-error {
  min-height: 1.15rem;
  margin: 6px 2px 0;
  color: var(--danger);
  font-size: 0.78rem;
}

.form-actions {
  margin-top: 9px;
}

.storage-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.submit-button {
  min-width: 132px;
  padding: 12px 20px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--accent);
  font-weight: 750;
  box-shadow: 0 8px 18px rgba(8, 127, 140, 0.2);
  transition: background 160ms ease, transform 160ms ease;
}

.submit-button:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

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

.posts-section {
  margin-top: 52px;
}

.posts-heading {
  align-items: flex-end;
  margin-bottom: 20px;
  padding: 0 4px;
}

.empty-state {
  padding: 54px 24px;
  border: 1px dashed #b9cbd2;
  border-radius: 20px;
  text-align: center;
  background: rgba(255, 253, 249, 0.55);
}

.empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 1.25rem;
  line-height: 48px;
}

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

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

.post-list {
  display: grid;
  gap: 14px;
}

.post-card {
  position: relative;
  overflow: hidden;
  padding: 25px 26px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 8px 25px rgba(51, 57, 48, 0.045);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

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

.post-card:hover {
  border-color: #b9c8bd;
  box-shadow: 0 14px 32px rgba(51, 57, 48, 0.09);
  transform: translateY(-2px);
}

.post-card:focus-visible {
  outline: 3px solid rgba(49, 92, 75, 0.3);
  outline-offset: 3px;
}

.post-title {
  margin: 0 0 13px;
  font-size: 1.18rem;
  line-height: 1.4;
  letter-spacing: -0.025em;
}

.post-content {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 22px;
  color: #494d46;
  line-height: 1.75;
  white-space: pre-wrap;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.post-meta {
  padding-top: 16px;
  border-top: 1px solid #e3ecef;
}

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

.delete-button {
  padding: 7px 11px;
  border: 0;
  border-radius: 9px;
  color: var(--danger);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 750;
  transition: background 150ms ease;
}

.delete-button:hover {
  background: var(--danger-soft);
}

.post-dialog {
  width: min(calc(100% - 32px), 680px);
  max-height: min(82vh, 760px);
  padding: 0;
  border: 0;
  border-radius: 22px;
  color: var(--text);
  background: var(--surface-strong);
  box-shadow: 0 28px 80px rgba(24, 31, 26, 0.25);
}

.post-dialog::backdrop {
  background: rgba(25, 30, 26, 0.58);
  backdrop-filter: blur(4px);
}

.dialog-panel {
  position: relative;
  padding: 36px;
}

.dialog-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: var(--background);
  font-size: 1.6rem;
  line-height: 1;
}

.dialog-close:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.post-dialog h2 {
  padding-right: 42px;
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  line-height: 1.35;
}

.detail-time {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.detail-content {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: #3f433d;
  font-size: 1rem;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

button:focus-visible {
  outline: 3px solid rgba(49, 92, 75, 0.3);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 28px, 880px);
    padding: 42px 0 56px;
  }

  .page-header {
    grid-template-columns: auto 1fr;
    gap: 15px;
    min-height: 235px;
    margin-bottom: 26px;
  }

  .brand-mark {
    width: 58px;
    height: 58px;
  }

  .brand-mark::before {
    top: 10px;
    left: 26px;
  }

  .brand-mark::after {
    top: 8px;
    left: 19px;
  }

  .brand-wave,
  .brand-wave::before {
    bottom: 9px;
    left: 8px;
  }

  .brand-wave::before {
    left: 0;
  }

  .route-art {
    display: none;
  }

  .composer {
    padding: 23px 20px;
    border-radius: 19px;
  }

  .section-heading {
    display: block;
  }

  .local-badge {
    display: inline-block;
    margin-top: 13px;
  }

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

  .submit-button {
    width: 100%;
  }

  .posts-section {
    margin-top: 42px;
  }

  .post-card {
    padding: 21px 19px 18px;
  }

  .dialog-panel {
    padding: 29px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
