:root {
  --ink: #171817;
  --muted: #6d746f;
  --line: #dfe5df;
  --paper: #f7f8f4;
  --panel: #ffffff;
  --deep: #123734;
  --river: #0f716c;
  --pine: #1f5a45;
  --amber: #d9902f;
  --coral: #d75d45;
  --sky: #dcebea;
  --shadow: 0 18px 50px rgba(17, 43, 39, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
  letter-spacing: 0;
}

body.auth-locked {
  min-height: 100vh;
  overflow: hidden;
}

body.auth-locked .wrapper {
  display: none;
}

.access-gate {
  display: none;
}

body.auth-locked .access-gate {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(rgba(18, 55, 52, 0.58), rgba(18, 55, 52, 0.38)),
    url("assets/ulsan-hero.png") center / cover no-repeat;
}

.access-panel {
  width: min(420px, 100%);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.access-kicker {
  margin: 0 0 8px;
  color: var(--river);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.access-panel h1 {
  margin: 0 0 22px;
  font-size: 32px;
  line-height: 1.15;
}

.access-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.access-input-row {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 8px;
}

.access-input-row input,
.access-input-row button {
  height: 46px;
  border-radius: 6px;
}

.access-input-row input {
  width: 100%;
  border: 1px solid var(--line);
  padding: 0 14px;
  background: #fff;
}

.access-input-row button {
  border: 0;
  background: var(--river);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.access-error {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--coral);
  font-size: 13px;
  font-weight: 700;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.sound-only,
.to-content {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.to-content:focus {
  z-index: 30;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  background: var(--ink);
  color: #fff;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-wrap {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 248, 244, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.top-header {
  border-bottom: 1px solid rgba(223, 229, 223, 0.8);
  color: var(--muted);
  font-size: 13px;
}

.top-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  gap: 16px;
}

.top-header-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.top-header-nav a:hover,
.footer-wrap a:hover,
.panel-head a:hover,
.post-list a:hover {
  color: var(--river);
}

.date-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border: 1px solid rgba(31, 90, 69, 0.18);
  color: var(--deep);
  background: rgba(220, 235, 234, 0.65);
}

.title-header {
  display: grid;
  grid-template-columns: minmax(230px, 0.8fr) minmax(280px, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 88px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--deep), var(--river));
  border-radius: 16px 16px 16px 4px;
  color: #fff;
  font-size: 26px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(18, 55, 52, 0.24);
}

.site-logo strong {
  display: block;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1;
}

.site-logo em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-transform: uppercase;
}

.search-box,
.search-bar {
  display: grid;
  grid-template-columns: 1fr 52px;
  min-width: 0;
  border: 2px solid var(--deep);
  background: #fff;
}

.search-box input,
.search-bar input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0 16px;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search-box button,
.search-bar button {
  min-height: 46px;
  border: 0;
  background: var(--deep);
  color: #fff;
  cursor: pointer;
}

.icon-btn,
.close-btn,
.ticker-control,
.tab {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  color: var(--deep);
}

.icon-btn span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 2px 0;
  background: currentColor;
}

.mobile-only,
.search-toggle {
  display: none;
}

.nav-wrap {
  background: var(--deep);
  color: #fff;
}

.nav-scroll {
  display: flex;
  align-items: center;
  min-height: 48px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-scroll::-webkit-scrollbar {
  display: none;
}

.nav-scroll a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-scroll a:hover {
  background: rgba(255, 255, 255, 0.11);
}

.mobile-search-wrap {
  display: none;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.mobile-search-wrap.open {
  display: block;
}

.offcanvas {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: min(340px, 86vw);
  transform: translateX(-104%);
  transition: transform 0.25s ease;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.offcanvas.open {
  transform: translateX(0);
}

.offcanvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background: var(--deep);
  color: #fff;
}

.close-btn {
  width: 34px;
  height: 34px;
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.sidebar-member-menu,
.sidebar-nav {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
}

.sidebar-member-menu {
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.sidebar-member-menu a,
.sidebar-nav a {
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
}

.hero {
  position: relative;
  min-height: clamp(230px, 36vw, 420px);
  overflow: hidden;
  background: #102c2a;
}

.hero img {
  width: 100%;
  height: clamp(230px, 36vw, 420px);
  object-fit: cover;
  display: block;
  opacity: 0.82;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 28, 26, 0.82), rgba(7, 28, 26, 0.32) 52%, rgba(7, 28, 26, 0.08));
}

.hero-copy {
  position: absolute;
  z-index: 1;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: clamp(28px, 6vw, 78px);
  width: min(640px, calc(100% - 48px));
  color: #fff;
}

.hero-copy p {
  margin: 0 0 10px;
  color: #f2c172;
  font-weight: 800;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 62px);
  line-height: 1.05;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  padding: 24px 0 40px;
}

.main-wrap,
.basic-body-side {
  display: grid;
  gap: 18px;
  align-content: start;
}

.ticker-wrap {
  display: grid;
  grid-template-columns: auto 1fr 38px 38px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
}

.ticker-wrap strong {
  display: inline-grid;
  place-items: center;
  min-width: 54px;
  min-height: 32px;
  background: var(--coral);
  color: #fff;
}

.ticker-window {
  min-width: 0;
  overflow: hidden;
}

.ticker-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ticker-list li {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ticker-list li.active {
  display: flex;
}

.ticker-list a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.ticker-list time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
}

.ticker-control {
  width: 38px;
  height: 34px;
  border: 1px solid var(--line);
  color: var(--deep);
  font-size: 24px;
}

.banner-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.sponsor {
  min-height: 92px;
  padding: 18px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  overflow: hidden;
  position: relative;
}

.sponsor::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -34px;
  width: 108px;
  height: 108px;
  border: 18px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.sponsor span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  opacity: 0.82;
}

.sponsor strong {
  font-size: 22px;
}

.sponsor-a {
  background: linear-gradient(135deg, #0e635f, #1f5a45);
}

.sponsor-b {
  background: linear-gradient(135deg, #9a4d35, #d9902f);
}

.sponsor-c {
  background: linear-gradient(135deg, #293b54, #0f716c);
}

.panel,
.side-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(17, 43, 39, 0.06);
}

.panel {
  padding: 20px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 12px;
}

.panel-head h2,
.side-panel h2 {
  margin: 0;
  font-size: 18px;
}

.panel-head a {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
}

.featured-list {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 14px;
}

.featured a {
  display: grid;
  align-content: end;
  min-height: 178px;
  padding: 16px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(18, 55, 52, 0.1)),
    var(--sky);
}

.featured:first-child a {
  min-height: 230px;
  background:
    linear-gradient(135deg, rgba(15, 113, 108, 0.14), rgba(217, 144, 47, 0.18)),
    #f0f6f2;
}

.category {
  width: fit-content;
  padding: 4px 8px;
  background: var(--deep);
  color: #fff;
  font-size: 12px;
}

.featured time {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.featured h3 {
  margin: 8px 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

.featured p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  background: #eef2ed;
  border: 1px solid var(--line);
}

.tab {
  min-width: 52px;
  min-height: 30px;
  padding: 0 10px;
  color: var(--muted);
}

.tab.active {
  background: var(--deep);
  color: #fff;
}

.rank-list {
  display: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-list.active {
  display: grid;
  gap: 10px;
}

.rank-list li,
.post-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  border-bottom: 1px dashed var(--line);
}

.rank-list a,
.post-list a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-list span {
  display: inline-block;
  width: 26px;
  color: var(--coral);
  font-weight: 900;
}

.rank-list em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.photo-card {
  display: grid;
  align-items: end;
  min-height: 112px;
  padding: 12px;
  color: #fff;
  overflow: hidden;
  position: relative;
}

.photo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.82;
}

.photo-card span {
  position: relative;
  z-index: 1;
  font-weight: 800;
}

.tone-river::before {
  background: radial-gradient(circle at 20% 20%, #8fd0c8, #0f716c 58%, #123734);
}

.tone-harbor::before {
  background: radial-gradient(circle at 70% 20%, #d9902f, #293b54 58%, #111827);
}

.tone-market::before {
  background: radial-gradient(circle at 30% 20%, #f0b46f, #9a4d35 58%, #3a221b);
}

.tone-sea::before {
  background: radial-gradient(circle at 35% 25%, #9ec9f2, #276b86 56%, #173548);
}

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

.post-list time {
  color: var(--muted);
  font-size: 13px;
}

.side-panel {
  padding: 18px;
}

.login-panel form {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.login-panel label {
  color: var(--muted);
  font-size: 13px;
}

.login-panel input[type="text"],
.login-panel input[type="password"] {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  padding: 0 10px;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-panel button[type="submit"] {
  min-height: 42px;
  margin-top: 4px;
  border: 0;
  background: var(--deep);
  color: #fff;
  cursor: pointer;
}

.login-links {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  border-bottom: 1px dashed var(--line);
}

.metric strong {
  color: var(--river);
}

.preservation-panel ul {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.footer-wrap {
  padding: 24px 0 32px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-wrap nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-wrap p {
  margin: 0;
}

@media (max-width: 980px) {
  .title-header {
    grid-template-columns: 1fr auto;
    min-height: 74px;
  }

  .search-box {
    display: none;
  }

  .search-toggle,
  .mobile-only {
    display: inline-grid;
  }

  .top-header-nav {
    display: none;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .basic-body-side {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .featured-list {
    grid-template-columns: 1fr;
  }

  .featured a,
  .featured:first-child a {
    min-height: 160px;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .site-logo strong {
    font-size: 24px;
  }

  .logo-mark {
    width: 46px;
    height: 46px;
    font-size: 23px;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

  .ticker-wrap {
    grid-template-columns: auto 1fr;
  }

  .ticker-control {
    display: none;
  }

  .ticker-list li.active {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .banner-grid,
  .two-col,
  .basic-body-side,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    align-items: flex-start;
  }

  .panel {
    padding: 16px;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
}
