@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');

:root,
:root[data-theme="dark"] {
  --bg: #0a0d0a;
  --bg-soft: radial-gradient(1200px 600px at 50% -10%, #16211a 0%, #0a0d0a 60%);
  --bg-alt: rgba(255, 255, 255, 0.035);
  --text: #eef2ea;
  --muted: #9aa89a;
  --accent: #b7e35a;
  --accent-soft: #d9f5a3;
  --accent-2: #e8c468;
  --border: rgba(255, 255, 255, 0.09);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  --glow: 0 0 32px rgba(183, 227, 90, 0.22);
  --logo-glow: 0 0 18px rgba(183, 227, 90, 0.35);
  --input-bg: rgba(255, 255, 255, 0.04);
  --radius: 16px;
}

:root[data-theme="light"] {
  --bg: #faf8f2;
  --bg-soft: radial-gradient(1200px 600px at 50% -10%, #eef3e3 0%, #faf8f2 60%);
  --bg-alt: rgba(20, 30, 15, 0.04);
  --text: #24281f;
  --muted: #6b7263;
  --accent: #4d7a2a;
  --accent-soft: #3f6b23;
  --accent-2: #96690f;
  --border: rgba(20, 30, 15, 0.12);
  --shadow: 0 12px 30px rgba(30, 40, 20, 0.08);
  --glow: 0 0 24px rgba(77, 122, 42, 0.18);
  --logo-glow: none;
  --input-bg: rgba(20, 30, 15, 0.03);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  font-weight: 400;
  background: var(--bg-soft) fixed;
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
  transition: background 0.2s, color 0.2s;
}

h1, h2, h3, .logo {
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 700;
  letter-spacing: 0;
}

header {
  background: rgba(10, 13, 10, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

:root[data-theme="light"] header {
  background: rgba(250, 248, 242, 0.7);
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.auth-widget {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.85rem;
}

.auth-login-link {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  text-decoration: none;
  display: inline-flex;
}

.auth-user {
  color: var(--muted);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-admin-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
}

.auth-admin-link:hover {
  text-decoration: underline;
}

#auth-logout-btn {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-top: 1.5rem;
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--muted);
  padding: 0.7rem 0.3rem;
  font-size: 1rem;
  font-weight: 600;
}

.tab-btn:hover {
  filter: none;
  box-shadow: none;
  color: var(--text);
}

.tab-btn.active {
  color: var(--accent);
  border-color: var(--accent);
}

.tab-panel {
  max-width: 420px;
}

.logo {
  font-size: 1.4rem;
  color: var(--accent);
  text-decoration: none;
  text-shadow: var(--logo-glow);
}

nav {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.3rem 0.1rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

nav a:hover,
nav a.active {
  color: var(--accent);
  border-color: var(--accent);
}

#theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  font-size: 1.05rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
}

#theme-toggle:hover {
  border-color: var(--accent);
  box-shadow: none;
  filter: none;
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.hero {
  text-align: center;
  padding: 6rem 1.5rem 5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 260px at 50% 0%, rgba(183, 227, 90, 0.12), transparent 70%);
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3rem);
  font-weight: 700;
  margin: 0 0 1rem;
  background: linear-gradient(120deg, var(--accent-soft), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
}

.hero p {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0;
  position: relative;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 2.5rem;
}

.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: block;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow), var(--glow);
}

.card h3 {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 700;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

h2 {
  color: var(--accent-soft);
  font-size: 1.6rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.7rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.gallery-grid .placeholder {
  aspect-ratio: 4 / 3;
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.gallery-item {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.item-comments {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border-top: 1px solid var(--border);
}

.item-comments .comment-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
}

.item-comment-form {
  margin-top: 0;
  gap: 0.5rem;
  max-width: none;
}

.item-comment-form textarea {
  font-size: 0.85rem;
  padding: 0.5rem 0.7rem;
}

.item-comment-form button {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

.comment-entry {
  background: var(--input-bg);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
}

.comment-entry .name {
  font-weight: 700;
  color: var(--accent);
}

.notice-list {
  list-style: none;
  padding: 0;
  margin-top: 1.5rem;
}

.notice-list li {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
  margin-bottom: 0.8rem;
}

.notice-date {
  color: var(--accent-2);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 0.3rem;
}

.contact-info {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
}

.contact-info .item {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
}

.contact-info .label {
  color: var(--accent-2);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 0.2rem;
}

form {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
  max-width: 520px;
}

label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--muted);
}

input,
textarea,
select {
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(183, 227, 90, 0.15);
}

button, .btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #0a0d0a;
  font-weight: 700;
  cursor: pointer;
  width: fit-content;
  font-size: 1rem;
  transition: filter 0.2s, box-shadow 0.2s;
}

button:hover, .btn:hover {
  filter: brightness(1.1);
  box-shadow: var(--glow);
}

button.secondary, .btn.secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

button.danger {
  background: #e35a5a;
  color: #1a0a0a;
}

.guestbook-entry {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
  margin-bottom: 0.8rem;
}

.guestbook-entry .name {
  font-weight: 700;
  color: var(--accent);
}

.muted {
  color: var(--muted);
}

.admin-section {
  margin-bottom: 3rem;
}

.admin-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.admin-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.6rem;
}

.badge {
  display: inline-block;
  background: rgba(183, 227, 90, 0.15);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 700;
}

footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

.status-msg {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.status-msg.error {
  color: #e88;
}
