/* 주소랭킹 — cream & orange */
:root {
  color-scheme: light;
  font-family: 'DM Sans', 'Noto Sans KR', sans-serif;
  font-synthesis: none;
  color: #423126;
  background: #fffaf3;
  /* 글자 색은 놓이는 배경과 명도 대비 4.5:1 이상 (24px 이상 또는 19px 이상 굵은 글자는 3:1) — 웹 접근성 기준 */
  --page: #fffaf3;
  --card: #fffefd;
  --ink: #423126;
  --muted: #816f60;
  --faint: #87705a;
  --orange: #e56b19;
  --orange-dark: #b54f0d;
  /* 흰 글자를 올리는 주황 버튼 바탕 (흰 글자와 4.5:1 이상). --orange 는 글자·선·아이콘 바탕에 그대로 써요 */
  --orange-button: #c0540f;
  --line: #eddcc6;
  --cream: #fff3e3;
  --soft: #ffead1;
  --card-border: #e9d2b3;
  --card-shadow: 0 3px 6px #7b4f1210;
  --ring: 0 0 0 3px #e56b1918;
}

* { box-sizing: border-box; }
/* Room for the sticky header when jumping to a category (/#search) */
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; min-width: 280px; background: var(--page); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
a, button, input { -webkit-tap-highlight-color: transparent; }
a, button { touch-action: manipulation; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #db751c; outline-offset: 4px; border-radius: 4px; }
h1, h2, h3, p { margin: 0; word-break: keep-all; }
svg { display: block; width: 20px; height: 20px; flex-shrink: 0; }
button svg { pointer-events: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 100; top: -60px; left: 12px; padding: 12px 20px; border-radius: 8px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 12px; }
.shell { width: calc(100% - 80px); max-width: 1240px; margin-inline: auto; }
.accent { color: var(--orange); }

/* Header: a full-width bar that stays at the top while scrolling (layout from 링크올) */
.site-header { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--line); background: #fffaf3eb; box-shadow: 0 4px 22px #7b4f120d; backdrop-filter: saturate(1.3) blur(12px); }
.header-inner {
  position: relative; display: grid; align-items: center; gap: 8px 22px; min-height: 76px; padding-block: 10px;
  grid-template-columns: auto minmax(220px, 380px) minmax(0, 1fr) auto auto;
  grid-template-areas: "brand search trend nav submit";
}
.brand { grid-area: brand; }
.site-header .site-search { grid-area: search; }
.trending { grid-area: trend; }
.header-nav { grid-area: nav; }
.nav-submit { grid-area: submit; }
.brand { display: flex; flex-shrink: 0; align-items: center; gap: 9px; }
.brand img { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 4px 9px #a34b0017; }
.brand-name { font-size: 25px; font-weight: 900; line-height: 1.18; letter-spacing: -1.6px; white-space: nowrap; }
.brand-name small { display: block; margin: 4px 0 0 2px; color: #886d55; font-size: 8px; font-weight: 600; letter-spacing: 2.3px; }
.header-nav { display: flex; align-items: center; gap: 24px; font-size: 14px; font-weight: 600; }
.header-nav a, .header-nav summary { padding: 11px 0; white-space: nowrap; }
.nav-item { display: inline-flex; align-items: center; gap: 5px; color: #6f5645; cursor: pointer; }
.nav-item:hover, .nav-dropdown[open] > summary { color: var(--orange-dark); }
.nav-item.is-active { color: var(--orange-dark); font-weight: 700; }
.saved-count { display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 5px; background: #f6ecdf; color: #80654f; font-size: 11px; font-weight: 600; }
.nav-item.is-active .saved-count { background: #ffe6c6; color: #b95a12; }

/* Header "카테고리" dropdown (details/summary, works without JavaScript) */
.nav-dropdown > summary { list-style: none; }
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-chevron { width: 15px; height: 15px; transition: transform .15s; }
.nav-dropdown[open] .nav-chevron { transform: rotate(180deg); }
.dropdown-panel { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; width: min(640px, 100%); padding: 14px; border: 1px solid var(--card-border); border-radius: 14px; background: var(--card); box-shadow: 0 18px 44px #6b3f1422; }
.dropdown-panel ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px; margin: 0; padding: 0; list-style: none; }
.dropdown-panel li a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; font-size: 13px; font-weight: 500; }
.dropdown-panel li a:hover { background: #fff2e0; color: var(--orange-dark); }
.menu-icon { width: 24px; height: 24px; flex: none; object-fit: contain; }
.dropdown-all { display: block; margin-top: 8px; padding: 10px 10px 2px; border-top: 1px solid #f3e6d5; color: var(--orange-dark); font-size: 13px; font-weight: 700; }
.nav-submit { display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px; border: 1px solid #f3d6b0; border-radius: 999px; background: #fff1df; color: var(--orange-dark); font-size: 14px; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s; }
.nav-submit:hover { background: #ffe8cc; border-color: #ecc08c; }
.nav-submit.is-active { background: var(--orange-button); border-color: var(--orange-button); color: #fff; }
.nav-submit svg { width: 15px; height: 15px; }

/* 실시간 인기 사이트: one site at a time, the full top 10 when opened */
.trending { position: relative; min-width: 0; }
.trending > summary { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border: 1px solid #f0e0cb; border-radius: 10px; background: #fffdf9; font-size: 13px; list-style: none; cursor: pointer; }
.trending > summary::-webkit-details-marker { display: none; }
.trending > summary:hover, .trending[open] > summary { border-color: #e9c49a; background: #fff; }
.trending-label { flex-shrink: 0; color: #cf421e; font-size: 11px; font-weight: 800; }
.trending-roll { position: relative; flex: 1; min-width: 0; height: 20px; margin: 0; padding: 0; overflow: hidden; list-style: none; color: #6f5039; }
.trending-roll li { position: absolute; inset: 0; display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; opacity: 0; transform: translateY(100%); transition: opacity .35s, transform .35s; }
.trending-roll li.is-current { opacity: 1; transform: none; }
.trending-roll b { color: var(--orange); font-weight: 800; }
.trending-chevron { width: 15px; height: 15px; color: var(--faint); transition: transform .15s; }
.trending[open] .trending-chevron { transform: rotate(180deg); }
.trending-panel { position: absolute; z-index: 35; top: calc(100% + 6px); right: 0; width: 300px; padding: 14px 12px 8px; background: var(--card); border: 1px solid var(--card-border); border-radius: 14px; box-shadow: 0 18px 44px #6b3f1422; }
.trending-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 4px 6px; font-size: 13px; }
.trending-title small { color: var(--faint); font-size: 11px; }
.trending-list { display: grid; margin: 0; padding: 0; list-style: none; }
.trending-list a { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 8px; font-size: 13px; }
.trending-list a:hover { background: #fff2e0; color: var(--orange-dark); }
.trending-rank { width: 18px; flex-shrink: 0; color: var(--faint); font-weight: 800; text-align: center; }
.trending-rank.is-top { color: var(--orange); }
.trending-query { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Notice set in the admin settings */
.site-notice { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 11px 16px; border: 1px solid #f3d9a8; border-radius: 12px; background: #fff4e0; color: #7a5316; font-size: 13px; line-height: 1.55; }
.site-notice svg { width: 18px; height: 18px; color: #d08a1c; }
.site-notice span { flex: 1; }
.site-notice a { flex-shrink: 0; color: #8a5a12; font-weight: 700; white-space: nowrap; }
.site-notice a:hover { text-decoration: underline; }

/* Header search: a round box with suggestions */
.site-search { position: relative; min-width: 0; }
.search-box { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 3px 0 18px; border: 1px solid #efdcc2; border-radius: 999px; background: #fff6ea; transition: background .15s, border-color .15s, box-shadow .15s; }
.search-box:focus-within { border-color: var(--orange); background: #fff; box-shadow: var(--ring); }
.search-box input { flex: 1; width: 100%; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink); font-size: 14px; outline: none; }
.search-box input::placeholder { color: #ad9b8b; }
.search-box input::-webkit-search-cancel-button { cursor: pointer; }
.search-box button { display: grid; flex-shrink: 0; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--orange); color: #fff; transition: background .15s; }
.search-box button:hover { background: var(--orange-dark); }
.search-box button svg { width: 18px; height: 18px; }
.search-suggest { position: absolute; z-index: 35; top: calc(100% + 6px); left: 0; right: 0; min-width: 260px; padding: 6px; background: var(--card); border: 1px solid var(--card-border); border-radius: 12px; box-shadow: 0 18px 44px #6b3f1422; }
.suggest-option { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 8px; font-size: 13px; }
.suggest-option strong { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.suggest-option small { flex-shrink: 0; color: var(--faint); font-size: 11px; }
.suggest-option:hover, .suggest-option[aria-selected="true"] { background: #fff2e0; color: var(--orange-dark); }
.suggest-option:last-child { margin-top: 4px; border-top: 1px solid #f3e6d5; border-radius: 0 0 8px 8px; color: var(--orange-dark); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 48px; padding: 39px 0 32px; }
.eyebrow { display: flex; align-items: center; gap: 7px; margin-bottom: 14px; color: #a06434; font-size: 10px; font-weight: 700; letter-spacing: 2px; }
.eyebrow span { width: 14px; height: 2px; background: var(--orange); }
.hero h1 { font-size: 32px; font-weight: 800; line-height: 1.55; letter-spacing: -1.45px; }
.hero h1 strong { color: var(--orange); font-weight: 800; }
.hero-description { margin-top: 14px; color: var(--muted); font-size: 12px; line-height: 1.9; letter-spacing: -.1px; }
.hero.is-single { grid-template-columns: 1fr; }
/* The admin's "메인 오른쪽 문구" in a quiet box */
.hero-note { justify-self: end; width: 100%; max-width: 490px; padding: 22px 26px; border: 1px solid #eed9b9; border-left: 3px solid var(--orange); border-radius: 12px; background: linear-gradient(105deg, #fff1df 0%, #fffaf3 100%); color: #7d6755; font-size: 13px; line-height: 1.9; }

.intro-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 22px; color: #826f60; font-size: 11px; }
.intro-strip > div { display: flex; align-items: center; gap: 5px; }
.intro-strip b { color: #745137; font-size: 12px; font-weight: 700; }
.tiny-grid { margin-right: 5px; color: var(--orange); font-size: 18px; }
.strip-divider { width: 1px; height: 9px; margin: 0 10px; background: #dccaaf; }
.intro-strip p { display: flex; align-items: center; gap: 6px; color: #a08a76; font-size: 10px; }
.intro-strip svg { width: 13px; height: 13px; fill: #f6dc9f; stroke: #b89964; stroke-width: 1.3; }

/* Ranking cards */
.directory { padding-top: 25px; border-top: 2px solid #5c402c; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-title { display: flex; align-items: center; gap: 12px; }
.section-kicker { padding-right: 12px; border-right: 1px solid #dcc7ab; color: #b29579; font-size: 9px; letter-spacing: 1.1px; }
.section-title h2 { font-size: 17px; font-weight: 700; letter-spacing: -.6px; }
.section-title > p { margin-top: 2px; color: #866d56; font-size: 11px; overflow-wrap: anywhere; }
.expand-all { display: flex; align-items: center; gap: 6px; padding: 6px 0 6px 10px; color: #896d56; font-size: 11px; white-space: nowrap; }
.expand-all:hover { color: var(--orange-dark); }
.expand-all span { font-size: 16px; line-height: 1; }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 16px 14px; }
.category-card { overflow: hidden; border: 1px solid var(--card-border); border-radius: 14px; background: var(--card); box-shadow: var(--card-shadow); scroll-margin-top: 20px; transition: border-color .2s, box-shadow .2s; }
.category-card:hover { border-color: #deb98a; box-shadow: 0 5px 14px #7b4f1210; }
.card-heading { display: flex; align-items: center; gap: 9px; min-height: 57px; padding: 12px 14px; border-bottom: 1px solid #ecd6b8; background: linear-gradient(115deg, #fff1df, #fffaf3); }
.card-heading h3 { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 17px; font-weight: 600; letter-spacing: -.4px; }
.category-icon { width: 28px; height: 28px; flex-shrink: 0; object-fit: contain; }
.count-badge { flex-shrink: 0; margin-left: auto; padding: 3px 7px; border: 1px solid #ffe3bc; border-radius: 20px; background: #ffe9cb; color: #a15519; font-size: 12px; white-space: nowrap; }
.ranked-links { margin: 0; padding: 3px 0 4px; list-style: none; }
.ranked-links li { display: flex; align-items: center; gap: 4px; min-height: 42px; margin-inline: 13px; border-bottom: 1px dashed #f0e0cc; }
.ranked-links li:last-child, .ranked-links li:nth-child(8) { border-bottom-color: transparent; }
.category-card.is-expanded .ranked-links li:nth-child(8):not(:last-child) { border-bottom-color: #f0e0cc; }
.category-card:not(.is-expanded) .is-extra { display: none; }
.site-link { display: flex; flex: 1; align-items: center; gap: 9px; min-width: 0; padding: 10px 0; font-size: 15px; transition: color .15s; }
.site-link:hover { color: var(--orange-dark); }
.site-link:hover .link-name { text-decoration: underline; text-underline-offset: 4px; }
.rank { display: grid; flex-shrink: 0; place-items: center; width: 23px; height: 23px; color: #8b6f55; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rank.is-medal { position: relative; width: 20px; height: 20px; margin: 0 1.5px; border: 1px solid #e8c36a; border-radius: 50%; background: linear-gradient(145deg, #fff3c7, #f4d583); color: #9e6a1c; font-weight: 800; box-shadow: inset 0 0 0 2px #fff5cb; }
.rank.is-medal::before, .rank.is-medal::after { content: ''; position: absolute; top: -3px; width: 3px; height: 4px; background: #e3b965; transform: rotate(-25deg); }
.rank.is-medal::before { left: 3px; }
.rank.is-medal::after { right: 3px; transform: rotate(25deg); }
.rank.rank-2 { border-color: #bfc5bd; background: linear-gradient(145deg, #f6f7f5, #d8d9d3); color: #717c76; box-shadow: inset 0 0 0 2px #f1f3ef; }
.rank.rank-2::before, .rank.rank-2::after { background: #bbc3b8; }
.rank.rank-3 { border-color: #d39e75; background: linear-gradient(145deg, #ffe6cb, #ebbc91); color: #a1663e; box-shadow: inset 0 0 0 2px #ffe3c6; }
.rank.rank-3::before, .rank.rank-3::after { background: #d5a277; }
.link-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranked-links li:nth-child(1) .link-name { color: #af6010; font-weight: 600; }
.ranked-links li:nth-child(2) .link-name { color: #697773; }
.ranked-links li:nth-child(3) .link-name { color: #a16640; }
.external-arrow { width: 10px; height: 10px; flex-shrink: 0; margin-left: auto; color: #b6a18e; opacity: .85; transition: transform .15s; }
.site-link:hover .external-arrow { color: var(--orange); transform: translate(1px, -1px); }
.save-button { display: grid; flex-shrink: 0; place-items: center; width: 27px; height: 32px; padding: 5px; border-radius: 6px; color: #c8bba9; }
.save-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.35; }
.save-button:hover { background: #fff2dd; color: #cf8d38; }
.save-button[aria-pressed="true"] { color: #b98a32; }
.save-button[aria-pressed="true"] svg { fill: #f4cc70; }
.ranked-links li.is-empty .site-link { pointer-events: none; }
.more-button { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 37px; border-top: 1px solid var(--line); background: #fff4e4; color: #a55c1f; font-size: 13px; }
.more-button:hover { background: #ffebce; }
.more-button .chevron { width: 12px; height: 12px; transition: transform .15s; }
.more-button[aria-expanded="true"] .chevron { transform: rotate(180deg); }
/* 저장한 주소: only the saved rows, all of them */
.category-grid.is-saved .is-extra { display: flex; }
.category-grid.is-saved .is-empty, .category-grid.is-saved .more-button { display: none; }
.catalog-status, .empty-state { padding: 70px 20px 80px; border: 1px dashed #dec5a9; border-radius: 14px; background: #fffcf7; text-align: center; }
.catalog-status { padding: 40px 20px; color: var(--muted); font-size: 14px; }
.empty-icon { color: #cf9554; font-size: 40px; }
.empty-state h3 { margin-top: 10px; font-size: 19px; font-weight: 600; letter-spacing: -.5px; }
.empty-state p { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.empty-state a { display: inline-block; margin-top: 12px; padding: 6px 0; border-bottom: 1px solid #eab57b; color: var(--orange-dark); font-size: 12px; }

.bookmark-note { display: flex; align-items: center; gap: 16px; margin-top: 26px; padding: 23px 27px; border: 1px solid #eed9b9; border-radius: 12px; background: linear-gradient(105deg, #ffecd1 0%, #fff5e7 60%, #fff0da 100%); }
.note-symbol { display: grid; flex-shrink: 0; place-items: center; width: 39px; height: 39px; border: 1px solid #f4d5a4; border-radius: 50%; background: #fffaf0; color: #da9850; font-size: 26px; }
.bookmark-note strong { font-size: 13px; font-weight: 600; letter-spacing: -.3px; }
.bookmark-note p { margin-top: 6px; color: #a07d5e; font-size: 11px; }
.bookmark-note > a { display: flex; gap: 18px; margin-left: auto; padding: 10px 14px; border: 1px solid #dfbe94; border-radius: 7px; background: #fffaf1; color: #916035; font-size: 11px; white-space: nowrap; }
.bookmark-note > a:hover { border-color: #cc9a60; background: #fff; }

.site-guide { margin-top: 34px; }
.site-guide > h2 { margin-bottom: 14px; font-size: 17px; font-weight: 700; letter-spacing: -.6px; }
.guide-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.guide-grid article { padding: 18px 20px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.guide-grid h3 { color: #6f5039; font-size: 14px; font-weight: 700; letter-spacing: -.3px; }
.guide-grid p { margin-top: 8px; color: #826f60; font-size: 12px; line-height: 1.8; }
.guide-grid a { color: var(--orange-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-top: 36px; padding: 27px 0 36px; border-top: 1px solid var(--line); }
.footer-brand { font-size: 19px; font-weight: 800; letter-spacing: -.9px; }
.footer-dot { margin-left: 1px; color: var(--orange); font-size: 22px; }
.site-footer p { margin-top: 7px; color: #866e57; font-size: 10px; }
.footer-details { text-align: right; }
.footer-links { display: flex; justify-content: flex-end; gap: 8px; }
.footer-links a:hover { color: var(--orange-dark); }
.footer-details span { display: block; margin-top: 10px; color: #866e57; font-size: 8px; letter-spacing: .8px; }

.toast { position: fixed; z-index: 50; bottom: 28px; left: 50%; max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 9px; background: #4e3628; color: #fffaf3; font-size: 12px; text-align: center; box-shadow: 0 5px 30px #42271825; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: opacity .2s, transform .2s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Submission and message pages */
.subpage { padding-top: 28px; }
.page-panel { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 16px; }
.form-card, .side-card { border: 1px solid var(--card-border); border-radius: 14px; background: var(--card); box-shadow: var(--card-shadow); }
.form-card { padding: 32px 36px 36px; }
.message-card { max-width: 640px; margin: 0 auto; }
.page-eyebrow { display: flex; align-items: center; gap: 7px; color: #a06434; font-size: 10px; font-weight: 700; letter-spacing: 2px; }
.page-eyebrow > span { color: var(--orange); font-size: 13px; }
.form-card h1 { margin-top: 10px; font-size: 26px; font-weight: 800; letter-spacing: -1px; }
.form-lead { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.submit-form { margin-top: 8px; }
.field { display: grid; gap: 7px; margin-top: 20px; }
.field > label { font-size: 13px; font-weight: 600; }
.field .optional { margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: #f6ecdf; color: #80654f; font-size: 11px; font-weight: 500; vertical-align: 1px; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border: 1px solid #e6cfb1; border-radius: 9px; background: #fffdf9; color: var(--ink); font-size: 14px; transition: border-color .15s, box-shadow .15s, background .15s; }
.field textarea { min-height: 112px; line-height: 1.6; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #b8a594; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--orange); background: #fff; box-shadow: var(--ring); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #d7574f; }
.field-hint { color: var(--faint); font-size: 12px; }
.field-error { color: #c2413b; font-size: 13px; font-weight: 500; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 26px; }
.form-privacy { color: var(--faint); font-size: 12px; }
.button-primary, .button-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 12px 22px; border-radius: 9px; font-size: 14px; font-weight: 600; transition: background .15s, border-color .15s; }
.button-primary { border: 0; background: var(--orange-button); color: #fff; box-shadow: 0 3px 7px #c0540f30; }
.button-primary:hover { background: var(--orange-dark); }
.button-primary svg { width: 16px; height: 16px; }
.button-secondary { border: 1px solid #dfbe94; background: #fffaf1; color: #916035; }
.button-secondary:hover { border-color: #cc9a60; background: #fff; }
.form-alert { margin-top: 20px; padding: 13px 16px; border-radius: 9px; font-size: 13px; line-height: 1.6; }
.form-alert.is-error { border: 1px solid #f3d0cd; background: #fff4f3; color: #9f3a33; }
.submit-done { margin-top: 26px; padding: 28px; border: 1px solid #f0dcc0; border-radius: 12px; background: #fff7ec; text-align: center; }
.submit-done .done-icon { width: 44px; height: 44px; margin: 0 auto; color: var(--orange); }
.submit-done h2 { margin-top: 14px; font-size: 19px; letter-spacing: -.4px; }
.submit-done p { margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.submit-done .form-actions { justify-content: center; }
.side-card { padding: 24px 24px 26px; }
.side-card h2 { font-size: 15px; letter-spacing: -.3px; }
.guide-list { display: grid; gap: 12px; margin: 14px 0 0; padding: 0; list-style: none; }
.guide-list li { position: relative; padding-left: 18px; color: #7d6755; font-size: 13px; line-height: 1.65; word-break: keep-all; }
.guide-list li::before { content: ''; position: absolute; top: .62em; left: 3px; width: 6px; height: 6px; border-radius: 50%; background: #eab57b; }

/* Search results */
.search-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -.8px; }
.search-head h1 strong { color: var(--orange); }
.search-head p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.search-results { display: grid; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.search-result { display: flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; border: 1px solid var(--card-border); border-radius: 12px; background: var(--card); }
.result-link { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; padding: 10px; border-radius: 10px; }
.result-link:hover strong { color: var(--orange-dark); }
.result-icon { width: 32px; height: 32px; flex: none; object-fit: contain; }
.result-main { display: grid; gap: 2px; min-width: 0; }
.result-main strong { font-weight: 700; }
.result-main small { overflow: hidden; color: var(--faint); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.result-link .external-arrow { width: 12px; height: 12px; }
.result-category { flex-shrink: 0; padding: 4px 10px; border-radius: 999px; background: #fff1df; color: #9b6a3f; font-size: 12px; font-weight: 600; }
.result-category:hover { color: var(--orange-dark); }
.search-posts, .search-trending, .search-empty { margin-top: 20px; padding: 20px 22px; border: 1px solid var(--card-border); border-radius: 12px; background: var(--card); }
.search-posts h2, .search-trending h2 { margin-bottom: 10px; font-size: 15px; }
.search-posts ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.search-posts a { display: grid; gap: 3px; padding: 9px 8px; border-radius: 8px; }
.search-posts a:hover { background: #fff7ec; }
.search-posts a:hover strong { color: var(--orange-dark); }
.search-posts span { color: var(--muted); font-size: 13px; line-height: 1.6; }
.search-empty p { line-height: 1.7; }
.search-empty p + p { margin-top: 4px; color: var(--muted); font-size: 14px; }
.search-empty a { color: var(--orange-dark); font-weight: 700; }
.search-trending .trending-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }

/* Blog */
.blog-head { margin-bottom: 20px; }
.blog-head h1 { margin-top: 8px; font-size: 28px; font-weight: 800; letter-spacing: -1px; }
.blog-head p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.post-card a { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 22px; border: 1px solid var(--card-border); border-radius: 14px; background: var(--card); box-shadow: var(--card-shadow); transition: border-color .2s, box-shadow .2s; }
.post-card a:hover { border-color: #deb98a; box-shadow: 0 5px 14px #7b4f1210; }
.post-card a:hover h2 { color: var(--orange-dark); }
.post-card h2 { font-size: 17px; line-height: 1.5; letter-spacing: -.3px; }
.post-card p { display: -webkit-box; flex: 1; overflow: hidden; color: #7d6755; font-size: 14px; line-height: 1.7; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--faint); font-size: 12px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 26px; color: var(--muted); font-size: 14px; }
.pagination a { color: var(--orange-dark); font-weight: 700; }
.post { max-width: 780px; margin: 0 auto; padding: 32px 38px 40px; border: 1px solid var(--card-border); border-radius: 16px; background: var(--card); box-shadow: var(--card-shadow); }
.back-to { color: var(--orange-dark); font-size: 13px; font-weight: 600; }
.post h1 { margin-top: 14px; font-size: 30px; font-weight: 800; line-height: 1.4; letter-spacing: -1px; }
.post > .post-meta { margin-top: 10px; font-size: 13px; }
.post-summary { margin-top: 18px; padding: 14px 16px; border-radius: 10px; background: #fff5e7; color: #6f5645; line-height: 1.7; }
.post-body { margin-top: 26px; color: #4a3829; font-size: 16px; line-height: 1.85; word-break: keep-all; overflow-wrap: anywhere; }
.post-body > * + * { margin-top: 1em; }
.post-body h2 { margin-top: 1.8em; font-size: 21px; letter-spacing: -.4px; }
.post-body h3 { margin-top: 1.5em; font-size: 18px; }
.post-body a { color: var(--orange-dark); text-decoration: underline; text-underline-offset: 3px; }
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body li + li { margin-top: .3em; }
.post-body blockquote { margin-inline: 0; padding: 10px 16px; border-left: 3px solid #eab57b; background: #fff7ec; color: #6f5645; }
.post-body code { padding: 1px 6px; border-radius: 5px; background: #f6ecdf; font-size: .9em; }
.post-body hr { margin: 1.6em 0; border: 0; border-top: 1px solid var(--line); }
.post-more { max-width: 780px; margin: 20px auto 0; padding: 20px 24px; border: 1px solid var(--card-border); border-radius: 14px; background: var(--card); }
.post-more h2 { font-size: 15px; }
.post-more ul { margin: 8px 0 0; padding: 0; list-style: none; }
.post-more a { display: grid; gap: 4px; padding: 11px 0; border-bottom: 1px solid #f3e6d5; }
.post-more li:last-child a { border-bottom: 0; }
.post-more a:hover strong { color: var(--orange-dark); }

@media (min-width: 1500px) {
  .hero { padding-block: 46px 36px; }
  .hero h1 { font-size: 35px; }
}
@media (max-width: 1100px) {
  .shell { width: calc(100% - 48px); }
  html { scroll-padding-top: 128px; }
  .header-inner { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "brand search submit" "nav nav trend"; row-gap: 6px; padding-block: 10px 8px; }
  .header-nav { justify-self: start; }
  .trending { justify-self: end; width: min(320px, 100%); }
  .hero { gap: 26px; }
  .hero h1 { font-size: 28px; }
  .card-heading { gap: 7px; padding-inline: 11px; }
  .card-heading h3 { gap: 7px; font-size: 15px; }
  .ranked-links li { margin-inline: 10px; }
  .site-link { gap: 6px; font-size: 14px; }
  .save-button { width: 22px; }
  .category-grid { gap: 14px 11px; }
  .section-kicker { display: none; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-panel { grid-template-columns: 1fr; }
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .header-nav { gap: 20px; }
  .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 30px; }
  .hero-copy { text-align: center; }
  .eyebrow { justify-content: center; }
  .hero-description { margin-top: 9px; }
  .hero-note { justify-self: center; max-width: 560px; }
  .intro-strip p { font-size: 9px; }
  .section-title h2 { font-size: 16px; }
  .site-link { font-size: 14px; }
  .card-heading h3 { font-size: 16px; }
}
@media (max-width: 640px) {
  .shell { width: calc(100% - 32px); }
  html { scroll-padding-top: 16px; }
  .site-header { position: relative; }
  .header-inner { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "brand submit" "search search" "nav nav" "trend trend"; gap: 8px 12px; padding-block: 10px; }
  .trending { width: 100%; }
  .trending-panel { right: 0; left: 0; width: auto; }
  .dropdown-panel { max-height: calc(100vh - 150px); overflow-y: auto; padding: 10px; }
  .dropdown-panel ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dropdown-panel li a { gap: 7px; padding: 8px 6px; font-size: 12px; }
  .menu-icon { width: 22px; height: 22px; }
  .brand { gap: 7px; }
  .brand img { width: 34px; height: 34px; border-radius: 11px; }
  .brand-name { font-size: 23px; }
  .brand-name small { margin-top: 3px; font-size: 7px; letter-spacing: 1.9px; }
  .nav-submit { justify-self: end; padding: 8px 12px; font-size: 13px; }
  .header-nav { gap: 18px; font-size: 13px; }
  .header-nav a, .header-nav summary { padding: 6px 0; }
  .saved-count { min-width: 17px; height: 17px; font-size: 10px; }
  .hero { gap: 23px; padding: 28px 0 22px; }
  .hero h1 { font-size: 25px; line-height: 1.55; letter-spacing: -1.2px; }
  .eyebrow { margin-bottom: 12px; font-size: 8px; letter-spacing: 1.7px; }
  .hero-description { font-size: 11px; line-height: 1.8; }
  .hero-note { padding: 18px 18px; font-size: 12px; line-height: 1.85; }
  .intro-strip { padding-bottom: 17px; font-size: 10px; }
  .intro-strip b { font-size: 11px; }
  .intro-strip p { display: none; }
  .directory { padding-top: 23px; }
  .section-heading { margin-bottom: 13px; }
  .section-title { flex-wrap: wrap; row-gap: 2px; column-gap: 8px; }
  .section-title > p { font-size: 10px; }
  .expand-all { font-size: 10px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .category-card { border-radius: 11px; }
  .card-heading { gap: 5px; min-height: 51px; padding: 11px 9px; }
  .card-heading h3 { gap: 5px; font-size: 13px; letter-spacing: -.5px; }
  .category-icon { width: 24px; height: 24px; }
  .count-badge { padding: 2px 5px; font-size: 10px; }
  .ranked-links li { gap: 1px; min-height: 39px; margin-inline: 8px; }
  .site-link { gap: 6px; padding: 10px 0; font-size: 13px; }
  .rank { width: 18px; height: 18px; font-size: 11px; }
  .rank.is-medal { width: 17px; height: 17px; margin-inline: .5px; font-size: 11px; }
  .external-arrow { display: none; }
  .save-button { width: 22px; height: 32px; padding: 3px; }
  .save-button svg { width: 12px; height: 12px; }
  .more-button { min-height: 35px; font-size: 12px; }
  .bookmark-note { flex-wrap: wrap; gap: 10px; margin-top: 20px; padding: 18px 16px; }
  .note-symbol { width: 31px; height: 31px; font-size: 21px; }
  .bookmark-note strong { font-size: 12px; }
  .bookmark-note p { max-width: 255px; font-size: 10px; line-height: 1.7; }
  .bookmark-note > a { margin: 3px 0 0 41px; padding: 8px 12px; font-size: 10px; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 17px; margin-top: 26px; padding-block: 23px 30px; }
  .site-footer p { font-size: 9px; }
  .footer-details { text-align: left; }
  .footer-links { justify-content: flex-start; }
  .footer-details span { margin-top: 7px; font-size: 7px; }
  .toast { padding: 11px 16px; font-size: 11px; }
  .subpage { padding-top: 20px; }
  .form-card { padding: 24px 20px 26px; }
  .form-card h1 { font-size: 23px; }
  .form-actions .button-primary, .form-actions .button-secondary { flex: 1 1 100%; }
  .side-card { padding: 20px; }
  .post-grid { grid-template-columns: 1fr; }
  .post { padding: 22px 18px 28px; }
  .site-guide { margin-top: 26px; }
  .site-guide > h2 { font-size: 16px; }
  .guide-grid { grid-template-columns: 1fr; gap: 10px; }
  .guide-grid article { padding: 16px 16px 18px; }
  .post h1 { font-size: 24px; }
  .search-result { padding-right: 10px; }
  .result-category { display: none; }
  .search-trending .trending-list { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
  .shell { width: calc(100% - 24px); }
  .header-nav { gap: 13px; }
  .brand-name { font-size: 21px; }
  .brand img { width: 31px; height: 31px; }
  .nav-submit span { display: none; }
  .hero h1 { font-size: 23px; }
  .category-grid { grid-template-columns: 1fr; }
  .card-heading { padding-inline: 14px; }
  .card-heading h3 { font-size: 16px; }
  .site-link { padding-block: 12px; font-size: 15px; }
  .ranked-links li { margin-inline: 14px; }
  .rank { width: 24px; }
  .rank.is-medal { width: 20px; height: 20px; margin-inline: 2px; }
  .category-icon { width: 28px; height: 28px; }
  .save-button { width: 30px; }
  .save-button svg { width: 15px; height: 15px; }
  .external-arrow { display: block; }
  .count-badge { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* 배너 · 광고 (관리자 '배너 · 광고'): 자리마다 한 줄에 N개씩 격자로 (기본 4개, 16개면 4×4). 좁은 화면에서는 2개씩 */
.banner-slot { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 10px; margin-block: 18px; }
.banner-slot.cols-1 { grid-template-columns: minmax(0, 1fr); }
.banner-slot.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.banner-slot.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.banner-slot.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.banner-slot.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.banner-item { display: block; min-width: 0; overflow: hidden; border-radius: 10px; }
.banner-item img { display: block; width: 100%; height: auto; }
a.banner-item { transition: opacity .15s; }
a.banner-item:hover { opacity: .9; }
a.banner-item:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.banner-item.is-ad { min-height: 90px; }
.adsbygoogle { display: block; }
@media (max-width: 850px) {
  .banner-slot.cols-3, .banner-slot.cols-4, .banner-slot.cols-5, .banner-slot.cols-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .banner-slot { gap: 8px; margin-block: 14px; }
  .banner-item { border-radius: 8px; }
}
