@import url('https://fonts.googleapis.com/css2?family=Tangerine:wght@700&family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=Gowun+Mincho:wght@400;700&family=Noto+Serif+KR:wght@400;700&family=Inter:wght@100;200;300;400&display=swap');

:root {
  --bg:       #FFFFFF;
  --window:   #FFFFFF;
  --border:   #1A1A1A;
  --border-lt:#D8D8D8;
  --text:     #1A1A1A;
  --text-2:   #555555;
  --text-3:   #AAAAAA;

  --p1: #8C9E5C;
  --p2: #497B55;
  --p3: #D4A8C4;
  --p4: #F4F5EF;

  --script:   'Tangerine', cursive;
  --serif-en: 'Cormorant Garamond', Georgia, serif;
  --serif-kr: 'Gowun Mincho', serif;
  --sans:     'Inter', -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  font-family: var(--serif-kr);
  font-size: 14px;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 36px 20px 48px 80px;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── DOCK ────────────────────────────────────────────────────── */
.dock {
  position: fixed;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 100;
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-2);
  position: relative;
}

.dock-icon {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: #fff;
  transition: background 0.15s;
}
.dock-item:hover .dock-icon { background: var(--border); color: #fff; }
.dock-aidric { cursor: default; }
.dock-aidric:hover .dock-icon { background: #497B55; border-color: #8C9E5C; color: #8C9E5C; }
.dock-misaya { cursor: default; }
.dock-misaya:hover .dock-icon { background: #F4F5EF; border-color: #D4A8C4; color: #D4A8C4; }

.dock-label {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--text-3);
  text-transform: uppercase;
}

/* Board sub-menu */
.dock-submenu {
  display: none;
  position: absolute;
  left: 44px;
  top: 0;
  background: #fff;
  border: 1px solid var(--border);
  flex-direction: column;
  min-width: 80px;
  z-index: 200;
}
/* submenu show/hide handled by JS (dock-submenu-init) to allow mouse travel */
.dock-submenu a {
  padding: 8px 14px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  border-bottom: 1px solid var(--border-lt);
  white-space: nowrap;
  transition: background 0.15s;
}
.dock-submenu a:last-child { border-bottom: none; }
.dock-submenu a:hover { background: var(--border); color: #fff; }

/* ── WINDOW ──────────────────────────────────────────────────── */
.window {
  width: 100%;
  max-width: 1200px;
  background: var(--window);
  border: 1px solid var(--border);
}

/* ── TITLE BAR ───────────────────────────────────────────────── */
.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.titlebar-title {
  font-family: var(--script);
  font-size: 32px;
  color: var(--text);
  line-height: 1;
}

.titlebar-controls { display: flex; gap: 6px; align-items: center; }
.ctrl-btn {
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 1px solid #1A1A1A;
  display: flex; align-items: center; justify-content: center;
  font-size: 7px; line-height: 1; color: transparent;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.titlebar-controls:hover .ctrl-btn { background: #1A1A1A; color: #fff; }
.ctrl-close::before { content: '✕'; }
.ctrl-min::before   { content: '−'; }
.ctrl-max::before   { content: '+'; }

/* ── TOP BAR ─────────────────────────────────────────────────── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 30px 20px;
  border-bottom: 1px solid var(--border-lt);
}

.clock-time {
  font-family: var(--sans);
  font-weight: 100;
  font-size: 64px;
  letter-spacing: -2px;
  color: var(--text);
  line-height: 1;
}

.clock-date {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 5px;
}

.visitors-block { text-align: right; }
.visitors-label {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}
.visitors-counts { display: flex; gap: 14px; justify-content: flex-end; align-items: baseline; }
.visitor-item { text-align: center; }
.visitor-num {
  font-family: var(--sans);
  font-weight: 200;
  font-size: 28px;
  color: var(--text);
  line-height: 1;
  display: block;
}
.visitor-sub { font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); font-family: var(--sans); }
.visitor-divider { width: 1px; height: 26px; background: var(--border-lt); align-self: center; }

/* ── BODY ────────────────────────────────────────────────────── */
.window-body {
  display: grid;
  grid-template-columns: 270px 1fr;
}

/* ── GALLERY COLUMN ──────────────────────────────────────────── */
.gallery-col {
  border-right: 1px solid var(--border-lt);
  display: flex;
  flex-direction: column;
}

.gallery-slider {
  position: relative;
  overflow: hidden;
  flex: 1;
  min-height: 360px;
  background: #f0f0f0;
  cursor: pointer;
}

.gallery-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
}

.gallery-slide {
  min-width: 100%;
  height: 100%;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f8f8;
  color: var(--text-3);
  font-size: 24px;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
}
.gallery-arrow.prev { left: 6px; }
.gallery-arrow.next { right: 6px; }
.gallery-slider:hover .gallery-arrow { opacity: 1; }

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 6px;
  opacity: 0;
  transition: opacity 0.2s;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}
.gallery-slider:hover .gallery-dots { opacity: 1; }
.gallery-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
  cursor: pointer;
  transition: background 0.2s;
}
.gallery-dot.active { background: var(--text); }

.profile-info {
  padding: 14px 16px;
  border-top: 1px solid var(--border-lt);
}
.profile-name {
  font-family: var(--serif-en);
  font-style: italic;
  font-weight: 300;
  font-size: 22px;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 3px;
}
.profile-date {
  font-family: var(--sans);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.06em;
}

/* ── CONTENT COLUMN ──────────────────────────────────────────── */
.content-col { padding: 6px 30px 26px; display: flex; flex-direction: column; }
.content-section { flex: 1; display: flex; flex-direction: column; padding-top: 20px; }
.content-section + .content-section { flex: 2; }
.section-viewall { margin-top: auto; padding-top: 14px; }

/* 프로필 섹션 날짜·카테고리 숨김 */
#profile-list .post-list-date { display: none; }
#profile-list .post-list-cat  { display: none; }

.section-title {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border-lt); }

/* Recent posts list */
.post-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 4px; }
.post-list-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-lt);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.15s;
}
.post-list-item:hover { opacity: 0.6; }
.post-list-item:last-child { border-bottom: none; }
.post-list-cat {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  flex-shrink: 0;
  width: 38px;
}
.post-list-title {
  flex: 1;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-list-lock { font-size: 11px; flex-shrink: 0; }
.post-list-date { font-family: var(--sans); font-size: 10px; color: var(--text-3); flex-shrink: 0; }
.post-list-empty { font-size: 12px; color: var(--text-3); font-style: italic; font-family: var(--serif-en); padding: 10px 0; }

/* ── POINT COLOR ─────────────────────────────────────────────── */
.point-color-section {
  border-top: 1px solid var(--border-lt);
  padding: 16px 30px;
}

.color-swatches {
  display: flex;
  justify-content: center;
  gap: 36px;
  margin-top: 10px;
}

.swatch-color {
  width: 60px;
  aspect-ratio: 4/5;
  max-height: 70px;
  border: 1px solid rgba(0,0,0,0.06);
}

.swatch-name {
  font-family: var(--sans);
  font-size: 9px;
  color: var(--text-2);
  letter-spacing: 0.05em;
  margin-top: 5px;
  line-height: 1.4;
  text-align: center;
}

/* ── WIDE GALLERY ─────────────────────────────────────────────── */
.wide-gallery-section {
  border-top: 1px solid var(--border-lt);
  padding: 16px 30px;
}

.wide-gallery-slider {
  position: relative;
  overflow: hidden;
  height: 210px;
  background: #ffffff;
  cursor: pointer;
}

.wide-gallery-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
}

.wide-gallery-slide {
  min-width: 100%;
  height: 100%;
}

.wide-gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #ffffff;
}

.wide-gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f8f8;
  color: var(--text-3);
  font-size: 22px;
}

.wide-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.88);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
}
.wide-gallery-arrow.wprev { left: 10px; }
.wide-gallery-arrow.wnext { right: 10px; }
.wide-gallery-slider:hover .wide-gallery-arrow { opacity: 1; }

.wide-gallery-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 7px;
  opacity: 0;
  transition: opacity 0.2s;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}
.wide-gallery-slider:hover .wide-gallery-dots { opacity: 1; }
.wide-gallery-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
  cursor: pointer;
  transition: background 0.2s;
}
.wide-gallery-dot.active { background: var(--text); }

/* ── GUESTBOOK ───────────────────────────────────────────────── */
.guestbook-section {
  border-top: 1px solid var(--border-lt);
  padding: 24px 30px;
}

.gb-form {
  display: grid;
  grid-template-columns: 1fr 2.5fr auto;
  gap: 6px;
  margin-top: 12px;
  margin-bottom: 6px;
  align-items: end;
}

.gb-form-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  grid-column: 1 / -1;
}

.gb-row { display: grid; grid-template-columns: 1fr 2.5fr auto; gap: 6px; align-items: center; }

.gb-input {
  padding: 7px 10px;
  border: 1px solid var(--border-lt);
  background: #fff;
  font-family: var(--serif-kr);
  font-size: 12.5px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.gb-input:focus { border-color: var(--border); }
.gb-input::placeholder { color: var(--text-3); font-size: 11px; }

.gb-secret-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 10px;
  color: var(--text-3);
  cursor: pointer;
  padding: 2px 0;
}
.gb-secret-row input { cursor: pointer; }

.gb-submit {
  padding: 7px 14px;
  background: var(--text);
  color: #fff;
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.15s;
}
.gb-submit:hover { background: var(--text-2); }
.gb-submit:disabled { opacity: 0.5; }

.gb-entries { display: flex; flex-direction: column; }
.gb-entry {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-lt);
}
.gb-entry:last-child { border-bottom: none; }
.gb-name  { font-size: 12px; font-weight: 700; min-width: 54px; flex-shrink: 0; }
.gb-msg   { flex: 1; font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.gb-time  { font-family: var(--sans); font-size: 10px; color: var(--text-3); flex-shrink: 0; }
.gb-secret-badge { font-family: var(--sans); font-size: 9.5px; color: var(--text-3); }
.gb-empty { font-size: 12px; color: var(--text-3); font-style: italic; font-family: var(--serif-en); padding: 12px 0; text-align: center; }
.gb-alert { font-size: 11px; color: #B04040; margin-bottom: 6px; display: none; font-family: var(--sans); }

/* ── PASSWORD MODAL ──────────────────────────────────────────── */
.pw-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.pw-modal {
  background: #fff;
  border: 1px solid var(--border);
  padding: 28px 32px;
  width: 300px;
  text-align: center;
}
.pw-modal h3 { font-family: var(--script); font-size: 22px; margin-bottom: 16px; }
.pw-modal p { font-size: 12px; color: var(--text-3); margin-bottom: 14px; font-family: var(--sans); }
.pw-modal input {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border-lt); font-family: var(--sans);
  font-size: 13px; margin-bottom: 12px; outline: none; text-align: center;
}
.pw-modal input:focus { border-color: var(--border); }
.pw-modal .pw-error { font-size: 11px; color: #B04040; font-family: var(--sans); margin-bottom: 8px; }
.pw-modal-btns { display: flex; gap: 8px; }
.pw-modal-btns button { flex: 1; padding: 8px; font-family: var(--sans); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid var(--border); cursor: pointer; }
.pw-modal-btns .pw-ok { background: var(--text); color: #fff; border-color: var(--border); }

/* ── BOARD PAGE ──────────────────────────────────────────────── */
.board-area { padding: 24px 26px 36px; }

.board-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.board-home-link {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  text-decoration: none;
  border-bottom: 1px solid var(--border-lt);
  padding-bottom: 1px;
}
.board-home-link:hover { color: var(--text); border-color: var(--text); }
.board-write-btn {
  margin-left: auto;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 5px 12px;
  transition: all 0.15s;
}
.board-write-btn:hover { background: var(--text); color: #fff; }

.board-cat-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.cat-tab {
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 9px 18px;
  color: var(--text-3);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s;
}
.cat-tab:hover { color: var(--text); }
.cat-tab.active { color: var(--text); border-bottom-color: var(--text); }

.board-post-list { display: flex; flex-direction: column; }
.board-post-item {
  display: grid;
  grid-template-columns: 36px 1fr 50px 90px;
  align-items: baseline;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-lt);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.15s;
}
.board-post-item:hover { opacity: 0.6; }
.bp-num { font-family: var(--sans); font-size: 10px; color: var(--text-3); text-align: right; }
.bp-title { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-cat { font-family: var(--sans); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); text-align: center; }
.bp-date { font-family: var(--sans); font-size: 10px; color: var(--text-3); text-align: right; }
.board-empty { font-family: var(--serif-en); font-size: 13px; font-style: italic; color: var(--text-3); text-align: center; padding: 40px 0; }

.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 28px; }
.page-btn {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: 10px; letter-spacing: 0.05em;
  border: 1px solid var(--border-lt); cursor: pointer;
  background: #fff; color: var(--text-2); transition: all 0.15s;
}
.page-btn.active, .page-btn:hover { background: var(--text); color: #fff; border-color: var(--text); }

/* ── POST PAGE ───────────────────────────────────────────────── */
.post-area { padding: 26px 28px 44px; min-height: 320px; }

.post-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 26px; padding-bottom: 14px; border-bottom: 1px solid var(--border-lt);
}
.post-back {
  font-family: var(--sans); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-3); text-decoration: none;
}
.post-back:hover { color: var(--text); }
.post-edit-btns { display: flex; gap: 8px; }
.post-edit-btns a, .post-edit-btns button {
  font-family: var(--sans); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 12px; border: 1px solid var(--border-lt); background: #fff; color: var(--text-2);
  cursor: pointer; text-decoration: none; transition: all 0.15s;
}
.post-edit-btns a:hover { background: var(--text); color: #fff; border-color: var(--text); }
.post-edit-btns .del-btn:hover { background: #B04040; color: #fff; border-color: #B04040; }

.post-label {
  font-family: var(--sans); font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--text-3); display: block; margin-bottom: 10px;
}
.post-area h1 {
  font-family: var(--serif-en); font-weight: 300; font-size: 26px; line-height: 1.3; margin-bottom: 10px;
}
.post-meta-bar {
  display: flex; gap: 8px; font-family: var(--sans); font-size: 10px; color: var(--text-3); margin-bottom: 24px;
}
.post-hero-wrap { margin-bottom: 24px; }
.post-hero-wrap img { width: 100%; max-height: 380px; object-fit: cover; display: block; }
.post-body { font-family: var(--serif-kr); font-size: 14.5px; line-height: 1.9; color: var(--text); }
.post-body img { max-width: 100%; height: auto; display: block; margin: 16px auto; }
.post-body p { margin-bottom: 1em; }
.post-body h1,.post-body h2,.post-body h3 { font-family: var(--serif-en); font-weight: 300; margin: 1.4em 0 0.6em; }
.post-body blockquote { border-left: 2px solid var(--border-lt); margin: 16px 0; padding: 4px 16px; color: var(--text-2); font-style: italic; }
.post-body ul, .post-body ol { padding-left: 1.4em; margin-bottom: 1em; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */

/* 중간 화면: 데스크톱 창을 줄였을 때 */
@media (max-width: 1000px) {
  .window { max-width: 840px; }
  .window-body { grid-template-columns: 200px 1fr; }
  .gallery-slider { min-height: 260px; }
  .clock-time { font-size: 50px; }
  .visitor-num { font-size: 22px; }
  .top-bar { padding: 18px 22px 16px; }
  .content-col { padding: 20px 22px; }
  .point-color-section { padding: 20px 22px; }
  .guestbook-section { padding: 20px 22px; }
}

/* 모바일 */
@media (max-width: 700px) {
  /* 여백: dock이 하단으로 이동하므로 좌측 패딩 제거, 하단에 dock 높이만큼 확보 */
  body { padding: 10px 10px 66px 10px; }
  .window { max-width: 100%; }

  /* Dock → 하단 탭 바 */
  .dock {
    left: 0; right: 0; bottom: 0; top: auto;
    transform: none;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    padding: 5px 4px;
    gap: 0;
    background: #fff;
    border-top: 1px solid var(--border-lt);
    border-right: none;
  }
  .dock-item { padding: 0 6px; flex-direction: column; gap: 2px; }
  .dock-icon { width: 30px; height: 30px; font-size: 13px; }
  .dock-label { font-size: 7.5px; }

  /* Board 서브메뉴: dock 위쪽에 표시 */
  .dock-submenu {
    left: 50%; top: auto; bottom: calc(100% + 6px);
    transform: translateX(-50%);
  }

  /* 창 레이아웃 */
  .window-body { grid-template-columns: 1fr; }
  .gallery-col { border-right: none; border-bottom: 1px solid var(--border-lt); }
  .gallery-slider { min-height: 75vw; }

  /* 상단 바 */
  .clock-time { font-size: 38px; }
  .visitor-num { font-size: 20px; }
  .top-bar { padding: 14px 16px 12px; }

  /* 콘텐츠 영역 */
  .content-col { padding: 16px 14px; }
  .point-color-section { padding: 16px 14px; }
  .guestbook-section { padding: 16px 14px; }
  .color-swatches { grid-template-columns: repeat(4,1fr); gap: 6px; }

  /* 방명록 폼: 이름 전체폭, 그 아래 메시지+버튼 */
  .gb-row { grid-template-columns: 1fr auto; grid-template-rows: auto auto; }
  .gb-row .gb-input:first-child { grid-column: 1 / -1; }

  /* 게시판: 번호·카테고리 숨기고 제목+날짜만 */
  .board-area { padding: 16px 14px; }
  .board-cat-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cat-tab { flex-shrink: 0; }
  .board-post-item { grid-template-columns: 1fr auto; gap: 8px; padding: 10px 0; }
  .bp-num, .bp-cat { display: none; }
  .bp-date { font-size: 9.5px; }

  /* 관리자 탭: 가로 스크롤 */
  .admin-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-tab { flex-shrink: 0; white-space: nowrap; }
  .admin-panel { padding: 16px 14px 32px; }

  /* 포스트 상세 */
  .post-area { padding: 16px 14px 36px; }
  .post-area h1 { font-size: 22px; }

  /* 갤러리 화살표·점: 모바일은 hover 없으므로 항상 표시 */
  .gallery-arrow { opacity: 0.7; }
  .gallery-dots { opacity: 1; }
  .wide-gallery-arrow { opacity: 0.7; }
  .wide-gallery-dots { opacity: 1; }

  /* 배너 갤러리: 크게 보이되 잘리지 않게 */
  .wide-gallery-section { padding: 10px 0; }
  .wide-gallery-slider { height: 60vw; }
  .wide-gallery-slide img { object-fit: contain; }

  /* 글쓰기 페이지 */
  .write-area { padding: 18px 16px 32px; }
  .w-grid-2 { grid-template-columns: 1fr; gap: 12px; }

  /* 관리자 포스트 행: 버튼 줄바꿈 허용 */
  .admin-post-row { grid-template-columns: 1fr auto auto auto; gap: 6px; }

  /* 채팅: 키보드 올라와도 입력창 보이도록 */
  .chat-wrapper { height: calc(100svh - 220px); min-height: 320px; }
}
