:root {
  color-scheme: light;
  /* 아틀리에 = 따뜻한 종이(크림) 배경 + 잉크 텍스트 + 테라코타 악센트 */
  --bg: #f4efe7;
  --surface: #fbf8f2;
  --card: #ffffff;
  --border: #ece3d6;
  --border2: #e1d6c5;
  --text: #2d2823;
  --muted: #6c6357;
  --muted2: #8b8275;
  --faint: #b1a695;
  --accent: #b65f43;       /* 테라코타 */
  --accent-2: #d98a5c;     /* 그라데이션 보조 */
  --accent-soft: #f5e6da;  /* 악센트 틴트 배경 */
  --gold: #bd9440;
  --silver: #9aa0ab;
  --bronze: #c07d4e;
  --link: #a8502f;
  --shadow-sm: 0 1px 2px rgba(74,54,34,.05), 0 1px 3px rgba(74,54,34,.05);
  --shadow: 0 8px 24px rgba(84,60,38,.08);
  --shadow-lg: 0 18px 44px rgba(84,60,38,.14);
  --radius: 14px;
  --serif: "Gowun Batang", "Nanum Myeongjo", serif;
  --sans: "Pretendard Variable", Pretendard, system-ui, "Noto Sans KR", sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; min-height: 100%;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(1100px 560px at 50% -240px, #fdf3e9 0%, rgba(253,243,233,0) 62%),
    radial-gradient(900px 500px at 100% 0, #f7ece0 0%, rgba(247,236,224,0) 55%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- layout ---- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

header.site {
  border-bottom: 1px solid var(--border);
  background: rgba(251,248,242,.82);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  position: sticky; top: 0; z-index: 10;
}
header.site .bar { display: flex; align-items: center; gap: 18px; height: 62px; }
.brand {
  font-family: var(--serif); font-size: 20px; font-weight: 700; letter-spacing: -.01em;
  background: linear-gradient(96deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  display: inline-flex; align-items: baseline;
}
.brand small { font-family: var(--sans); font-style: italic; font-weight: 400; color: var(--muted2); font-size: 11px; margin-left: 8px; -webkit-text-fill-color: var(--muted2); }
nav.top { display: flex; gap: 4px; flex: 1; }
nav.top a { padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--muted); font-weight: 500; transition: background .15s, color .15s; }
nav.top a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
nav.top a.active { color: #fff; background: linear-gradient(96deg, var(--accent), var(--accent-2)); box-shadow: var(--shadow-sm); }
nav.top a.active:hover { color: #fff; }
nav.top a .soon { font-size: 10px; color: var(--faint); margin-left: 4px; }

.acct { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.acct .who { font-size: 13px; color: var(--muted); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
a.who:hover { color: var(--accent); text-decoration: none; }

.action {
  background: linear-gradient(96deg, var(--accent), var(--accent-2)); border: none; color: #fff;
  border-radius: 999px; padding: 10px 18px; font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit; box-shadow: var(--shadow-sm); transition: transform .12s, box-shadow .15s, filter .15s;
}
a.action { text-decoration: none; display: inline-flex; align-items: center; line-height: 1; }
a.action:hover { text-decoration: none; }
.action:hover { filter: brightness(1.04); transform: translateY(-1px); box-shadow: var(--shadow); }
.action.ghost { background: var(--card); color: var(--text); border: 1px solid var(--border2); box-shadow: none; }
.action.ghost:hover { background: var(--surface); border-color: var(--accent); color: var(--accent); }
.action.sm { padding: 7px 13px; font-size: 12px; }
.action:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; filter: none; }

main { padding: 34px 0 72px; }
section.block { margin-bottom: 40px; }
.h {
  font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent);
  font-weight: 700; margin: 0 0 16px; display: flex; align-items: center; gap: 10px;
}
.h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border2), transparent); }

/* ---- hero ---- */
.hero {
  padding: 30px 30px 34px; margin-bottom: 8px;
  background: linear-gradient(150deg, #fffdfa 0%, #fbeee2 100%);
  border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(217,138,92,.22), transparent 70%); pointer-events: none;
}
.hero h1 { font-family: var(--serif); font-size: 34px; margin: 0 0 12px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.hero p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; max-width: 640px; }

/* ---- feature cards ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.fcard {
  display: block; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; color: var(--text); position: relative;
  box-shadow: var(--shadow-sm); transition: transform .14s, box-shadow .16s, border-color .16s;
}
a.fcard:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.fcard.disabled { opacity: .72; cursor: default; }
.fcard .ico {
  font-size: 22px; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); border-radius: 12px;
}
.fcard .t { font-size: 17px; font-weight: 700; margin: 14px 0 5px; }
.fcard .d { font-size: 13px; color: var(--muted); line-height: 1.6; }
.badge { position: absolute; top: 16px; right: 16px; font-size: 11px; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--border2); font-weight: 600; }

/* ---- notices ---- */
.notices { display: flex; flex-direction: column; gap: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.notice { display: flex; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); align-items: baseline; }
.notice:last-child { border-bottom: none; }
.notice .date { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.notice .txt { font-size: 14px; color: var(--text); }
.notice.empty { color: var(--faint); font-size: 13px; justify-content: center; }

/* ---- boards ---- */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tabs button {
  background: var(--card); border: 1px solid var(--border2); color: var(--muted);
  border-radius: 999px; padding: 9px 18px; font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit;
  transition: background .15s, color .15s, border-color .15s;
}
.tabs button:hover { border-color: var(--accent); color: var(--accent); }
.tabs button.active { background: linear-gradient(96deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; box-shadow: var(--shadow-sm); }

.postlist { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.postrow { display: flex; gap: 14px; padding: 15px 18px; border-bottom: 1px solid var(--border); align-items: center; cursor: pointer; transition: background .12s; }
.postrow:last-child { border-bottom: none; }
.postrow:hover { background: var(--surface); }
.postrow .pt { flex: 1; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.postrow .pt .look-tag { font-size: 11px; color: var(--accent); background: var(--accent-soft); border-radius: 5px; padding: 2px 6px; margin-right: 8px; font-weight: 600; }
.postrow .pa { font-size: 12px; color: var(--muted2); flex: 0 0 auto; }
.postrow .pd { font-size: 12px; color: var(--faint); flex: 0 0 auto; width: 84px; text-align: right; font-variant-numeric: tabular-nums; }
.postlist .empty { padding: 48px; text-align: center; color: var(--faint); font-size: 14px; }

.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .search { position: relative; flex: 1 1 220px; max-width: 340px; min-width: 0; }
.toolbar .search input {
  width: 100%; box-sizing: border-box; background: var(--card); border: 1px solid var(--border2);
  border-radius: 999px; padding: 9px 34px 9px 16px; font-size: 13px; color: var(--text); font-family: inherit;
}
.toolbar .search input::placeholder { color: var(--faint); }
.toolbar .search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.toolbar .search input::-webkit-search-cancel-button { display: none; }
.toolbar .search .searchclear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px;
  border: none; background: var(--surface); color: var(--muted); border-radius: 50%; cursor: pointer;
  font-size: 15px; line-height: 1; display: flex; align-items: center; justify-content: center; padding: 0;
}
.toolbar .search .searchclear:hover { background: var(--accent-soft); color: var(--accent); }
.toolbar .hint { flex: 1 1 auto; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toolbar .action { flex: 0 0 auto; }
@media (max-width: 520px) { .toolbar .hint { display: none; } .toolbar .search { max-width: none; } }

/* ---- 정렬/필터(자랑 전용) ---- */
.filters { display: flex; gap: 10px; align-items: center; margin: -4px 0 16px; flex-wrap: wrap; }
.sortsel {
  background: var(--card); border: 1px solid var(--border2); border-radius: 999px;
  color: var(--text); font-size: 13px; padding: 8px 30px 8px 14px; font-family: inherit; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%238b8275' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center;
}
.sortsel:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--card); border: 1px solid var(--border2); color: var(--muted);
  border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit;
  transition: border-color .15s, background .15s, color .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* 글쓰기 공개여부 체크박스 */
.field label.check { display: flex; flex-direction: row; align-items: center; gap: 8px; font-size: 13px; color: var(--text); font-weight: 500; cursor: pointer; }
.field label.check input { width: auto; }

/* 목록 비공개 뱃지 */
.postrow .pt .priv-tag { font-size: 11px; color: var(--muted2); background: var(--surface); border: 1px solid var(--border2); border-radius: 5px; padding: 2px 6px; margin-right: 8px; font-weight: 600; }

/* ---- modal (write/view) ---- */
.modal-back { position: fixed; inset: 0; background: rgba(45,33,22,.42); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal-back.on { display: flex; }
.modal { background: var(--card); border: 1px solid var(--border); border-radius: 18px; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; padding: 24px; box-shadow: var(--shadow-lg); }
.modal h3 { margin: 0 0 16px; font-size: 19px; font-family: var(--serif); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 12px; color: var(--muted2); font-weight: 500; }
.field input, .field textarea, .field select {
  background: var(--surface); border: 1px solid var(--border2); border-radius: 10px;
  color: var(--text); font-size: 14px; padding: 10px 12px; font-family: inherit; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field textarea { min-height: 120px; resize: vertical; }
.modal .foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.postbody { font-size: 14px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; color: var(--text); }
.postmeta { font-size: 12px; color: var(--muted2); margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; }
.lookbox { margin-top: 16px; padding: 14px; background: var(--surface); border: 1px solid var(--border2); border-radius: 10px; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 10px; }
.lookbox .preview-ph {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 96px; padding: 18px; border: 1px dashed var(--border2); border-radius: 8px;
  background: linear-gradient(135deg, var(--surface), var(--card)); color: var(--muted2); font-size: 13px;
}
.lookbox .privtag { align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--card); border: 1px solid var(--border2); border-radius: 999px; padding: 4px 12px; }

/* ---- 추천/저장 액션 ---- */
.engage { display: flex; gap: 10px; margin-top: 18px; }
button.react {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--border2); color: var(--muted);
  border-radius: 999px; padding: 10px 14px; font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit;
  transition: border-color .15s, background .15s, transform .12s;
}
button.react:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
button.react .ic { font-size: 15px; line-height: 1; }
button.react b { font-variant-numeric: tabular-nums; }
button.react.on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
button.react.on .ic { color: #e0587a; }
button.react#vSave.on { color: #a67c1e; border-color: var(--gold); background: #f8efd8; }
button.react#vSave.on .ic { color: var(--gold); }
button.react:disabled { opacity: .55; cursor: not-allowed; transform: none; }
#vViews { margin-left: auto; color: var(--faint); }

/* 게시판 목록의 지표 뱃지 */
.postrow .pm { font-size: 11px; color: var(--muted2); flex: 0 0 auto; display: flex; gap: 10px; font-variant-numeric: tabular-nums; }
.postrow .pm span { white-space: nowrap; }

/* ---- 이달의 베스트 의상 ---- */
.best { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.bestcard {
  display: block; position: relative; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 16px; color: var(--text);
  box-shadow: var(--shadow-sm); transition: transform .14s, box-shadow .16s, border-color .16s;
}
a.bestcard:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.bestcard .rank { position: absolute; top: 12px; right: 14px; font-size: 22px; font-weight: 800; color: var(--faint); font-variant-numeric: tabular-nums; }
.bestcard.r1 { border-color: var(--gold); background: linear-gradient(160deg, #fffdf6, #fbf1d8); }
.bestcard.r1 .rank { color: var(--gold); }
.bestcard.r2 { border-color: #d3d7de; background: linear-gradient(160deg, #ffffff, #f2f4f7); }
.bestcard.r2 .rank { color: var(--silver); }
.bestcard.r3 { border-color: #e5c6a6; background: linear-gradient(160deg, #fffdfa, #f7e9db); }
.bestcard.r3 .rank { color: var(--bronze); }
.bestcard .bt { font-size: 14px; font-weight: 700; margin: 2px 42px 6px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bestcard .ba { font-size: 12px; color: var(--muted2); margin-bottom: 12px; }
.bestcard .bm { display: flex; gap: 14px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bestcard .bm .ic { color: var(--accent); }
.bestcard .look-tag { font-size: 11px; color: var(--accent); background: var(--accent-soft); border-radius: 5px; padding: 1px 6px; margin-right: 5px; font-weight: 600; }
.best.more { margin-top: 14px; grid-template-columns: 1fr; gap: 8px; }
.best.more .bestcard { display: flex; align-items: center; gap: 16px; padding: 12px 16px; }
.best.more .bestcard .rank { position: static; font-size: 15px; width: 24px; text-align: center; flex: 0 0 auto; }
.best.more .bestcard .bt { margin: 0; flex: 1; }
.best.more .bestcard .ba { margin: 0; flex: 0 0 auto; }
.best.more .bestcard .bm { flex: 0 0 auto; }
.bestmore { display: flex; justify-content: center; margin-top: 16px; }
.best.empty { display: block; padding: 40px; text-align: center; color: var(--faint); font-size: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
@media (max-width: 560px) { .best { grid-template-columns: 1fr; } }

/* ---- 3단 레이아웃 (좌 광고 + 본문 + 우 광고) ----
   사이드 광고를 양 끝(레이아웃 가장자리)에 붙이고, 가운데 본문은 넓게 남는 공간을 채운다.
   폭이 좁아지면 광고를 접어 본문 침범을 막는다. */
.page {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) 168px;
  gap: 30px; align-items: start;
  max-width: 1380px; margin: 0 auto; padding: 0 24px;
}
.content { min-width: 0; }
.rail { position: sticky; top: 78px; }
@media (max-width: 1040px) {
  .page { grid-template-columns: minmax(0, 960px); }
  .rail { display: none; }
}

/* ---- ad slots (reserved; no network yet) ---- */
.adslot {
  border: 1px dashed var(--border2); border-radius: var(--radius); min-height: 90px;
  display: flex; align-items: center; justify-content: center;
  color: var(--faint); font-size: 12px; background: rgba(255,255,255,.5); margin: 24px 0; text-align: center;
}
.adslot.top { margin: 0 0 4px; }
.adslot.side { min-height: 600px; margin: 0; flex-direction: column; }
.adslot.tall { min-height: 250px; }

footer.site { border-top: 1px solid var(--border); padding: 28px 0; color: var(--faint); font-size: 12px; text-align: center; }

.hint { font-size: 12px; color: var(--faint); line-height: 1.6; }
.hidden { display: none !important; }

/* ---- 내 정보 페이지 ---- */
.gatebox {
  text-align: center; padding: 56px 24px; background: var(--card);
  border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-sm);
}
.gatebox .ico { font-size: 40px; margin-bottom: 12px; }
.gatebox h2 { font-family: var(--serif); font-size: 22px; margin: 0 0 8px; color: var(--text); }
.gatebox p { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

.profilecard {
  display: flex; align-items: center; gap: 20px; padding: 24px;
  background: linear-gradient(120deg, var(--surface), var(--card));
  border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-sm); margin-bottom: 18px;
}
.pcavatar {
  flex: 0 0 auto; width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 28px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: var(--shadow-sm);
}
.pcinfo { flex: 1; min-width: 0; }
.pcname { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--text); }
.pcbio { font-size: 13px; color: var(--muted); margin-top: 4px; }
.pcjoin { font-size: 12px; color: var(--faint); margin-top: 6px; }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 26px; }
.stat {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 12px; text-align: center; box-shadow: var(--shadow-sm);
}
.stat b { display: block; font-size: 22px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.stat span { display: block; font-size: 12px; color: var(--muted2); margin-top: 4px; }
.stat.best b { color: var(--accent); }
@media (max-width: 620px) { .stats { grid-template-columns: repeat(2, 1fr); } .stat.best { grid-column: span 2; } }

.postrow .pt .board-tag {
  font-size: 11px; color: var(--muted); background: var(--surface); border: 1px solid var(--border2);
  border-radius: 5px; padding: 2px 6px; margin-right: 8px; font-weight: 600;
}
