﻿:root {
  --bg: #f3eee4;
  --paper: #fbf8f2;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --line: #d8cebf;
  --line-strong: #a79882;
  --text: #171612;
  --muted: #6a6358;
  --red: #b0342b;
  --amber: #b98025;
  --green: #4b7c4a;
  --blue: #2f629c;
  --navy: #263141;
  --gray: #78808d;
  --shadow: 0 18px 48px rgba(35, 30, 24, 0.06);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 18%),
    radial-gradient(circle at top left, rgba(185, 128, 37, 0.08), transparent 22%),
    linear-gradient(180deg, #f8f4ec 0%, var(--bg) 100%);
  font-family: "Noto Sans KR", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }
main { min-height: calc(100vh - 160px); }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 248, 242, 0.94);
  backdrop-filter: blur(12px);
  border-top: 4px solid #111;
  border-bottom: 1px solid rgba(23, 22, 18, 0.1);
}

.utility-bar {
  border-bottom: 1px solid rgba(23, 22, 18, 0.08);
  background: rgba(255, 255, 255, 0.55);
}

.utility-inner,
.topbar,
.main-nav,
.account-nav,
.footer-inner,
.sub-nav {
  display: flex;
  align-items: center;
}

.utility-inner {
  justify-content: space-between;
  min-height: 38px;
  gap: 18px;
}

.utility-copy {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.utility-edition {
  color: var(--text);
  font-weight: 800;
}

.utility-divider {
  width: 18px;
  height: 1px;
  background: rgba(23, 22, 18, 0.18);
}

.utility-side {
  display: flex;
  align-items: center;
  gap: 18px;
}

.utility-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.utility-date {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.utility-link {
  color: var(--muted);
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.utility-link:hover {
  color: var(--text);
}

.utility-link-accent {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid rgba(176, 52, 43, 0.18);
  background: rgba(176, 52, 43, 0.06);
  color: var(--red);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.utility-link-strong {
  color: var(--text);
  font-weight: 700;
}

.utility-login-link {
  display: inline-flex;
  align-items: center;
  padding: 5px 0;
}

.account-menu {
  position: relative;
}

.account-menu summary {
  list-style: none;
}

.account-menu summary::-webkit-details-marker {
  display: none;
}

.account-summary {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 0;
  cursor: pointer;
  color: var(--muted);
}

.account-summary strong {
  color: var(--text);
  font-size: 0.96rem;
}

.account-summary span {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.account-summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 4px;
  border-right: 1.5px solid rgba(23, 22, 18, 0.42);
  border-bottom: 1.5px solid rgba(23, 22, 18, 0.42);
  transform: translateY(-2px) rotate(45deg);
}

.account-menu[open] .account-summary::after {
  transform: translateY(1px) rotate(-135deg);
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 148px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(23, 22, 18, 0.12);
  box-shadow: 0 14px 36px rgba(23, 22, 18, 0.12);
}

.account-dropdown-link,
.account-dropdown-button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.account-dropdown-link:hover,
.account-dropdown-button:hover {
  background: rgba(23, 22, 18, 0.04);
}

.account-dropdown-form {
  margin: 0;
}

.utility-button {
  padding: 7px 11px;
  font-size: 0.8rem;
  font-weight: 700;
}

.masthead-wrap {
  border-bottom: 3px double rgba(23, 22, 18, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.35));
}

.topbar {
  justify-content: space-between;
  gap: 26px;
  padding: 18px 0 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-image-only {
  display: inline-flex;
  width: auto;
  max-width: 360px;
  flex: 0 0 auto;
}

.brand-logo {
  width: 220px;
  height: auto;
  object-fit: contain;
  filter: contrast(1.03);
}

.masthead-side {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.masthead-side strong {
  color: var(--text);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
}

.masthead-side-right {
  text-align: right;
  align-items: flex-end;
}

.masthead-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.masthead-kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: rgba(23, 22, 18, 0.24);
}

.site-footer p,
.welcome-text { color: var(--muted); }

.account-nav,
.main-nav,
.footer-links,
.sub-nav { gap: 14px; }

.button-light,
.button-primary,
.button-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 2px;
  font-size: 0.92rem;
  font-weight: 700;
  border: 0;
  cursor: pointer;
}

.button-light {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 22, 18, 0.14);
}

.button-primary { background: var(--red); color: #fff; }
.button-dark { background: var(--navy); color: #fff; }

.main-nav-wrap {
  border-top: 1px solid rgba(23, 22, 18, 0.04);
  border-bottom: 1px solid rgba(23, 22, 18, 0.1);
  background: rgba(250, 246, 238, 0.82);
}

.main-nav,
.sub-nav {
  min-height: 54px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar,
.sub-nav::-webkit-scrollbar {
  display: none;
}

.main-nav {
  gap: 28px;
  font-size: 1.02rem;
  justify-content: center;
}

.main-nav a,
.sub-nav a {
  position: relative;
  font-size: 1rem;
}

.main-nav a.active {
  color: var(--red);
  font-weight: 800;
}

.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -18px;
  height: 2px;
  background: var(--red);
}

.write-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px 0 20px;
  border-left: 1px solid rgba(23, 22, 18, 0.12);
  background: linear-gradient(90deg, rgba(176, 52, 43, 0.02), rgba(176, 52, 43, 0.08));
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.write-link::before {
  content: "+";
  margin-right: 8px;
  color: var(--red);
  font-size: 1.05rem;
  font-weight: 800;
}

.sub-nav-wrap {
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(23, 22, 18, 0.06);
}

.sub-nav {
  gap: 22px;
  min-height: 48px;
}

.sub-nav a { color: var(--muted); }

.sub-nav a.active {
  color: var(--text);
  font-weight: 700;
}

.sub-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -15px;
  height: 2px;
  background: var(--text);
}

.site-footer {
  margin-top: 48px;
  padding: 24px 0 36px;
  border-top: 1px solid rgba(23, 22, 18, 0.08);
}

.footer-inner { justify-content: space-between; gap: 20px; }
.footer-links { display: flex; flex-wrap: wrap; }

.label {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 2px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.red { background: var(--red); }
.amber { background: var(--amber); }
.green { background: var(--green); }
.blue { background: var(--blue); }
.navy { background: var(--navy); }
.gray { background: var(--gray); }

.eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--red);
  font-weight: 800;
}

.card,
.panel,
.sidebar-box,
.review-box,
.author-box,
.share-box,
.comment-box,
.auth-form,
.auth-copy {
  background: var(--surface);
  border: 1px solid rgba(38, 49, 65, 0.08);
  border-radius: 4px;
  box-shadow: var(--shadow);
}

input,
textarea,
select,
button { font: inherit; }

input,
textarea,
select {
  width: 100%;
  padding: 13px 14px;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

textarea { resize: vertical; }
.inline-form { display: inline; }

.flash {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.flash-error { border-left: 3px solid var(--red); }
.flash-success { border-left: 3px solid var(--green); }
.muted,
.muted-line { color: var(--muted); }

@media (max-width: 960px) {
  .utility-copy { display: none; }
  .main-nav { justify-content: flex-start; }
  .topbar { gap: 18px; }
  .masthead-side { font-size: 0.72rem; }
}

@media (max-width: 760px) {
  .utility-inner,
  .utility-side,
  .utility-actions,
  .footer-inner,
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar {
    padding: 14px 0;
    gap: 10px;
  }

  .masthead-side-right {
    text-align: left;
    align-items: flex-start;
  }

  .write-link {
    margin-left: 0;
    padding: 0 14px;
    border-left: 0;
  }

  .brand-logo { width: 190px; }

  .account-dropdown {
    left: 0;
    right: auto;
  }
}
