:root {
  color-scheme: light;
  --ink: #27221f;
  --muted: #706762;
  --subtle: #8b8079;
  --line: #e5ddd4;
  --surface: #fffdfa;
  --paper: #f7f4ee;
  --amber: #6e4426;
  --amber-dark: #54301d;
  --warm: #f5e8d5;
  --radius: 14px;
  --sans: "Pretendard", "Noto Sans KR", "Noto Sans CJK KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --serif: Georgia, "Noto Serif KR", "Noto Serif CJK KR", serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .22em; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
h1, h2, h3, p, dl, figure { margin: 0; }
h1, h2, h3 { line-height: 1.23; letter-spacing: -.035em; overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 710; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.17rem; }
p, dd, td { overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid #a76124; outline-offset: 3px; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 10; background: white; color: var(--ink); padding: 10px 14px; border-radius: 5px; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.nav-shell, .page-shell, .footer-shell { width: min(1240px, calc(100% - 72px)); margin-inline: auto; }
.nav-shell { min-height: 78px; display: flex; align-items: center; gap: 46px; }
.wordmark { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; font: 700 1.85rem/1 var(--serif); letter-spacing: -.06em; }
.wordmark:hover { text-decoration: none; }
.brand-mark { position: relative; width: 22px; height: 22px; border: 1.5px solid #87542f; border-radius: 50%; }
.brand-mark::after { content: ""; position: absolute; width: 8px; height: 8px; border: 1.5px solid #87542f; transform: rotate(45deg); inset: 5.5px; border-radius: 1px; }
.nav-shell nav, .nav-account { display: flex; align-items: center; gap: 29px; font-size: .92rem; font-weight: 620; }
.nav-account { margin-left: auto; gap: 16px; }
.nav-account form { margin: 0; }
.join-button { padding: 8px 16px; border: 1px solid #b9977a; border-radius: 8px; color: var(--amber); }
.nav-logout { padding: 4px 0; color: var(--ink); background: none; border: none; font-size: inherit; min-height: 0; }
.nav-logout:hover { background: none; color: var(--amber); text-decoration: underline; }
.page-shell { min-height: calc(100vh - 170px); padding-block: 29px 68px; }
.page-shell > h1 { margin-block: 12px 24px; }
.page-shell > h2 { margin-block: 27px 16px; }
.page-shell > p { margin-block: 10px 17px; }
.site-footer { border-top: 1px solid var(--line); }
.footer-shell { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: .88rem; }
.footer-brand { font-size: 1.46rem; }

.hero { min-height: 430px; background: #231914 url('/assets/hero.webp') center 48% / cover no-repeat; border-radius: 20px; color: #fff9ed; display: flex; align-items: center; overflow: hidden; isolation: isolate; position: relative; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(23,15,11,.53), rgba(23,15,11,.08) 76%); }
.hero-copy { padding: 52px clamp(25px, 5.2vw, 78px); width: min(100%, 790px); }
.hero h1 { font-family: var(--serif); font-size: clamp(2.35rem, 4.55vw, 4.2rem); line-height: 1.18; font-weight: 700; letter-spacing: -.065em; }
.hero p { color: #f0e3d4; margin: 19px 0 28px; font-size: clamp(.95rem, 1.6vw, 1.1rem); }
.hero-search { display: flex; align-items: stretch; width: min(100%, 520px); border-radius: 10px; background: #fffaf1; padding: 5px; gap: 5px; }
.hero-search input { width: 100%; min-width: 0; border: 0; background: none; padding: 10px 13px; color: var(--ink); }
.hero-search input::placeholder { color: #73665e; }
.hero-search button { flex: 0 0 auto; padding-inline: 20px; }

.browse-section { margin-top: 39px; }
.section-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 22px; margin-bottom: 16px; }
.text-link { color: var(--amber); font-size: .94rem; font-weight: 675; text-decoration: underline; text-underline-offset: .24em; }
.text-link:hover { color: var(--amber-dark); }
.featured-grid, .catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.product-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.product-card > a { display: flex; height: 100%; flex-direction: column; }
.product-card > a:hover { text-decoration: none; }
.product-card > a:hover h3 { text-decoration: underline; text-underline-offset: .22em; }
.product-visual { aspect-ratio: 1.32; background: #ede5d9; overflow: hidden; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; }
.product-visual img { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; padding: 8px 12px; }
.card-copy { padding: 16px 17px 18px; }
.card-category { color: var(--amber); font-size: .82rem; font-weight: 700; margin-bottom: 5px; }
.card-copy h3 { font-size: 1.02rem; line-height: 1.4; }
.english-name { color: var(--muted); font-size: .85rem; line-height: 1.45; margin-top: 4px; }
.card-meta { color: var(--muted); margin-top: 9px; font-size: .84rem; font-variant-numeric: tabular-nums; }
.bottle-placeholder { display: grid; justify-items: center; gap: 14px; padding: 20px 12px; }
.bottle-shape { position: relative; width: 46px; height: 62px; margin-top: 21px; border: 1.5px solid #947a64; border-radius: 12px 12px 7px 7px; background: linear-gradient(to top, #d4ad80b0 42%, transparent 42%); }
.bottle-shape::before { content: ""; position: absolute; width: 15px; height: 21px; left: 14px; bottom: 100%; border: 1.5px solid #947a64; border-bottom: 0; border-radius: 3px 3px 0 0; background: #e8d7bf; }
.bottle-shape::after { content: ""; position: absolute; border: 1px solid #a58a72; border-radius: 2px; inset: 23px 8px 13px; background: #eee1ce; }
.photo-status { font-size: .82rem; color: #6b5a4b; }

.listing-header { margin: 14px 0 20px; }
.listing-header .section-header { margin-bottom: 22px; }
.catalog-search { display: grid; grid-template-columns: minmax(180px, 2.2fr) minmax(120px, 1fr) minmax(120px, 1fr) auto; gap: 12px; align-items: end; padding: 17px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); }
.catalog-search label { min-width: 0; }
.catalog-search button { padding-inline: 18px; }
.result-count { color: var(--muted); margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.catalog-grid .product-visual { aspect-ratio: 1.65; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 27px; }
.pagination a, .pagination span { font-size: .93rem; padding: 5px 10px; }
.pagination span { font-variant-numeric: tabular-nums; color: var(--muted); }
.pagination a { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.empty-state { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: clamp(23px, 5vw, 47px); text-align: center; }
.empty-state p { margin-block: 8px 15px; color: var(--muted); }
.empty-state h2 { margin-bottom: 13px; }
.empty-state .text-link { display: block; margin-top: 13px; }
.error-state { margin-top: 30px; }

.breadcrumb { display: inline-flex; margin-block: 8px 17px; color: var(--muted); font-size: .9rem; }
.product-detail { display: grid; grid-template-columns: minmax(0, 37%) minmax(0, 1fr); gap: clamp(22px, 4.4vw, 61px); }
.product-figure .product-visual { aspect-ratio: .92; border-radius: var(--radius); border: 1px solid var(--line); }
.product-figure img { padding: 18px; }
.product-figure figcaption { margin-top: 8px; font-size: .81rem; color: var(--muted); }
.product-figure figcaption a { text-decoration: underline; text-underline-offset: .2em; }
.photo-contribute { display: inline-block; margin-top: 10px; }
.product-detail-info { min-width: 0; }
.product-detail-info h1 { font-size: clamp(1.85rem, 4vw, 3.2rem); margin-block: 5px 3px; }
.product-detail-info .english-name { font-size: 1.02rem; margin-top: 8px; }
.product-brand { font-weight: 660; color: var(--amber); font-size: .91rem; text-transform: capitalize; }
.rating-summary { margin-top: 14px; font-size: .92rem; color: var(--muted); }
.rating { font-weight: 750; color: #804a20; white-space: nowrap; font-variant-numeric: tabular-nums; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-top: 23px; }
.detail-actions form { margin: 0; }
.product-facts { margin-top: 21px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); column-gap: 16px; }
.product-facts div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.product-facts dt { color: var(--muted); font-size: .85rem; }
.product-facts dd { margin: 1px 0 0; font-size: 1rem; font-weight: 550; }
.product-sources { margin-top: 16px; color: var(--muted); font-size: .88rem; }
.product-sources summary { cursor: pointer; width: fit-content; }
.product-sources ul { padding-left: 21px; }
.product-sources a { text-decoration: underline; }
.detail-reviews { margin-top: 42px; }
.review-feed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.browse-section > h2 { margin-bottom: 16px; }
.review-preview { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.review-preview > a { display: flex; gap: 17px; justify-content: space-between; align-items: flex-start; padding: 18px; }
.review-preview > a:hover { text-decoration: none; background: #fbf7f0; }
.review-preview h3 { margin-bottom: 5px; }
.review-preview p { margin: 6px 0; }
.review-preview img { width: 86px; height: 86px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; }
.review-preview-copy { min-width: 0; }
.review-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 13px; font-size: .89rem; color: var(--muted); }

button, .button {
  display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px;
  border: 1px solid transparent; border-radius: 9px; min-height: 43px;
  font-size: .93rem; line-height: 1.35; font-weight: 680; background: var(--amber); color: #fffaf1;
}
button:hover, .button:hover { background: var(--amber-dark); text-decoration: none; }
button.secondary, .button.secondary, .button.button-secondary, button.button-secondary { color: var(--amber-dark); background: var(--surface); border-color: #c9aa8d; }
button.secondary:hover, .button.secondary:hover, .button.button-secondary:hover, button.button-secondary:hover { background: var(--warm); }
button.danger, .button.danger { color: #912b25; background: #fff2ef; border-color: #dfbab7; }
label { display: flex; flex-direction: column; gap: 5px; font-size: .91rem; font-weight: 615; }
label input, label select, label textarea { font-weight: 430; }
input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, textarea { background: var(--surface); color: var(--ink); border: 1px solid #cfc3b7; border-radius: 8px; padding: 9px 12px; min-height: 43px; max-width: 100%; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--amber); }
input[type="file"] { font-size: .88rem; }
select { appearance: none; padding-right: 29px; background-image: linear-gradient(45deg, transparent 50%, #795d49 50%), linear-gradient(135deg, #795d49 50%, transparent 50%); background-size: 5px 5px; background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-repeat: no-repeat; }
textarea { resize: vertical; min-height: 110px; }
.hero-search input:not([type="checkbox"]) { background: transparent; border: 0; }
form:not(.hero-search, .catalog-search) { max-width: 100%; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 10px; }
.auth-form, .create-form, .sidebar-form, .stack-form, .editor-form { display: grid; gap: 14px; }
.auth-panel, .auth-card, .form-panel, .form-card, .editor, .content-panel { background: var(--surface); border: 1px solid var(--line); padding: clamp(17px, 4vw, 32px); border-radius: var(--radius); }
.auth-panel, .auth-card { width: min(100%, 450px); margin: 18px auto; }
.form-panel, .editor, .form-card { width: min(100%, 720px); margin: 18px auto; }
.auth-panel h1, .auth-card h1, .form-panel h1, .editor h1 { margin-bottom: 16px; }
.auth-panel p, .auth-card p, .form-panel p, .content-panel p { margin-block: 6px 15px; }
.form-panel form, .auth-panel form, .auth-card form { display: grid; gap: 13px; }
.form-panel button, .auth-panel button, .auth-card button { justify-self: start; }
.notice, .alert, .form-error, .flash { padding: 12px 14px; margin-block: 12px; border-radius: 8px; border: 1px solid #dcc1a2; background: #fbefd8; color: #543722; }
.error, .form-error { background: #fff2ef; color: #85271f; border-color: #dfbab7; }
.helper, .muted, small { color: var(--muted); }
.check-label { flex-direction: row; align-items: flex-start; gap: 9px; }
.check-label input { flex: none; margin-top: .36em; }
.review-body { white-space: pre-wrap; }
.review-images, .photo-gallery { display: flex; flex-wrap: wrap; gap: 10px; }
.review-images img, .photo-gallery img { max-height: 260px; max-width: 100%; object-fit: contain; border-radius: 8px; }
.moderation-photo { width: min(100%, 320px); max-height: 320px; object-fit: contain; border-radius: 10px; background: #eee4d6; }
.photo-queue { display: grid; gap: 14px; }
.photo-queue article { padding: 16px 19px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.photo-queue img, .photo-queue p { margin-block: 10px; }
.photo-queue form { display: flex; flex-wrap: wrap; gap: 8px; }
ul, ol { overflow-wrap: anywhere; }
table { max-width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }

@media (max-width: 950px) {
  .nav-shell, .page-shell, .footer-shell { width: calc(100% - 44px); }
  .nav-shell { gap: 27px; }
  .featured-grid, .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .featured-grid .product-card:nth-child(4) { display: none; }
  .review-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .nav-shell, .page-shell, .footer-shell { width: calc(100% - 30px); }
  .nav-shell { min-height: 62px; flex-wrap: wrap; gap: 4px 12px; padding-block: 10px 8px; }
  .wordmark { font-size: 1.55rem; gap: 8px; }
  .brand-mark { transform: scale(.84); }
  .nav-account, .nav-shell nav { gap: 13px; font-size: .84rem; }
  .nav-shell nav { order: 3; flex: 1 0 100%; padding-block: 5px 1px; }
  .join-button { padding: 4px 10px; border-radius: 6px; }
  .page-shell { padding-top: 17px; padding-bottom: 40px; }
  .hero { min-height: 342px; background-position: 74% 56%; border-radius: 14px; }
  .hero::before { background: linear-gradient(90deg, rgba(24,14,9,.78), rgba(24,14,9,.44)); }
  .hero-copy { padding: 28px 18px; }
  .hero h1 { font-size: clamp(1.85rem, 7vw, 2.55rem); }
  .hero p { max-width: 300px; margin-top: 14px; margin-bottom: 19px; }
  .hero-search input { padding-inline: 8px; font-size: .88rem; }
  .hero-search button { padding-inline: 11px; }
  .browse-section { margin-top: 26px; }
  .featured-grid, .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .featured-grid .product-card:nth-child(4) { display: block; }
  .product-card { border-radius: 9px; }
  .card-copy { padding: 10px; }
  .card-copy h3 { font-size: .91rem; }
  .product-visual, .catalog-grid .product-visual { aspect-ratio: 1.25; }
  .bottle-placeholder { gap: 8px; transform: scale(.86); }
  .catalog-search { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 13px; gap: 10px; }
  .catalog-term, .catalog-search button { grid-column: 1 / -1; }
  .product-detail { grid-template-columns: 1fr; gap: 16px; }
  .product-figure .product-visual { aspect-ratio: 1.46; }
  .product-figure img { padding: 10px; }
  .detail-reviews { margin-top: 28px; }
  .review-feed { grid-template-columns: 1fr; }
  .review-preview > a { padding: 13px; gap: 9px; }
  .review-preview img { width: 70px; height: 70px; }
}

.stack { display: grid; gap: 13px; }
.actions, .moderation-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 13px; margin-block: 12px; }
.actions a:not(.button), .moderation-nav a { color: var(--amber); text-decoration: underline; text-underline-offset: .22em; }
.bottle-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.bottle-card, .review-article, .comment { background: var(--surface); border: 1px solid var(--line); padding: clamp(13px, 3vw, 24px); border-radius: var(--radius); }
.bottle-card img, .bottle-thumbnail { width: 90px; max-height: 105px; object-fit: contain; background: #eee4d6; border-radius: 7px; }
.bottle-card h2, .bottle-card h3, .review-article h1 { margin-block: 8px; }
.bottle-card p, .comment p { margin-block: 6px; }
.bottle-edit { margin-top: 12px; }
.bottle-edit summary { cursor: pointer; color: var(--amber); }
.bottle-edit form { margin-top: 10px; }
.review-rating { color: #804a20; font-weight: 750; }
.review-article .review-body { margin-block: 19px; }
.review-photos { display: flex; flex-wrap: wrap; gap: 10px; margin-block: 12px; }
.review-photos img { width: auto; max-width: 100%; max-height: 280px; object-fit: contain; border-radius: 8px; }
.comments-section { margin-block: 22px; }
.comments-section h2 { margin-bottom: 13px; }
.comment { margin-bottom: 10px; }
.report-form { margin-block: 12px; max-width: 600px; }
.recovery-code { overflow-wrap: anywhere; background: #f4eadc; padding: 9px 11px; border-radius: 7px; }
@media (max-width: 680px) { .bottle-list { grid-template-columns: 1fr; } }
.narrow { width: min(100%, 760px); margin: 10px auto 0; }
.narrow > h1 { margin-block: 4px 12px; }
.narrow > p { margin-block: 9px 18px; color: var(--muted); }
.narrow > h2, .narrow > section, .narrow > article { margin-block: 20px 12px; }
.panel { padding: clamp(15px, 3vw, 25px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel .button, .panel button { justify-self: start; }
.request-list { margin-top: 11px; padding-left: 21px; }
.request-list li { padding-block: 5px; }
.request-list a { color: var(--amber); text-decoration: underline; text-underline-offset: .22em; }
.section-head { display: grid; justify-items: start; gap: 10px; margin-block: 11px 22px; }
.section-head p { color: var(--muted); }
.bottle-edit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 10px; margin-bottom: 10px; }
.bottle-edit label:first-of-type { grid-column: 1 / -1; }
.bottle-edit button { justify-self: start; }
.review-article > h1 { font-size: clamp(1.65rem, 4vw, 2.5rem); }
