/* 생활무용협회 공통 화면. 색은 css/theme.css의 변수만 쓴다 */
:root { --ink: #1A1A1A; --sub: #555B66; --line: #E3E5E8; --band: #F6F6F4; --max: 1160px; }
* { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', sans-serif; color: var(--ink); background: #fff; line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; min-height: 100vh; display: flex; flex-direction: column; }
.site-foot { margin-top: auto; }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: 2rem; } h2 { font-size: 1.5rem; } h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.nb { white-space: nowrap; }
.muted { color: var(--sub); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.preview-bar { background: #FFF4D6; color: #4A3A00; text-align: center; padding: 8px 16px; font-size: .9rem; }

.site-head { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 24px; }
.brand { font-weight: 800; font-size: 1.25rem; text-decoration: none; color: var(--accent); }
.site-nav { display: flex; gap: 4px; }
.nav-group { position: relative; }
.nav-top { display: block; padding: 24px 14px; text-decoration: none; font-weight: 600; }
.nav-top[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }
.nav-sub { display: none; position: absolute; left: 0; top: 100%; min-width: 180px; background: #fff; border: 1px solid var(--line); padding: 8px 0; }
.nav-sub a { display: block; padding: 10px 16px; text-decoration: none; }
.nav-sub a:hover, .nav-top:hover { color: var(--accent); }
.nav-group:hover .nav-sub, .nav-group:focus-within .nav-sub { display: block; }
.nav-toggle { display: none; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 600; border-radius: 6px; }

.hero { position: relative; }
.hero-photo { width: 100%; height: min(62vh, 560px); object-fit: cover; object-position: center 22%; }
.hero-text { position: absolute; inset: auto 0 0 0; padding-bottom: 48px; color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,.55); }
.hero::after { content: ''; position: absolute; inset: 40% 0 0 0; background: linear-gradient(transparent, rgba(0,0,0,.55)); pointer-events: none; }
.hero-text { z-index: 1; }
.hero-eyebrow { margin: 0 0 8px; font-weight: 600; }
.hero h1 { font-size: clamp(1.8rem, 4.2vw, 3rem); margin: 0; }

.block { padding: 72px 24px; }
.band { background: var(--band); padding-left: 0; padding-right: 0; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.more { color: var(--sub); font-size: .95rem; }
.cards { display: grid; gap: 24px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards > p, .cards > .empty { grid-column: 1 / -1; }
.cards > * { min-width: 0; }
.card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; padding-bottom: 18px; }
.card > strong, .card > span:not(.card-blank), .card > .badge { margin: 0 18px; }
.card > strong { font-size: 1.15rem; margin-top: 12px; }
.card > span { color: var(--sub); }
.card img, .card-blank { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; background: var(--accent-soft); }
.card:hover { border-color: var(--accent); }
.badge { align-self: flex-start; font-size: .82rem; font-weight: 700; padding: 2px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-dark); margin-top: 12px; }
.badge-ended { background: #EEE; color: #555; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.link-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.link-list li { border-bottom: 1px solid var(--line); }
.link-list a { display: flex; justify-content: space-between; gap: 16px; padding: 14px 4px; text-decoration: none; }
.link-list a:hover span { color: var(--accent); text-decoration: underline; }
.link-list time { color: var(--sub); white-space: nowrap; font-size: .92rem; }
.link-list li.muted { padding: 14px 4px; }
.pin { color: var(--accent); font-weight: 700; margin-right: 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 8px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn-accent { background: var(--accent); color: #fff; } .btn-accent:hover { background: var(--accent-dark); }
.btn-line { background: #fff; color: var(--accent); border-color: var(--accent); }
.btn-white { background: #fff; color: var(--accent-dark); }
.btn-danger { background: #fff; color: #B3261E; border-color: #B3261E; }
.btn[disabled] { opacity: .5; cursor: default; }

.page-head { background: var(--band); padding: 48px 0; } .page-head h1 { margin: 0; }
.page-body { padding-top: 48px; padding-bottom: 96px; }
.page-body h2 { margin-top: 1.6em; }
.lead { font-size: 1.15rem; }
.placeholder { border: 1px dashed #B9BEC6; color: var(--sub); padding: 24px; border-radius: 8px; background: #FAFAFA; }
.empty { color: var(--sub); padding: 48px 0; text-align: center; }
.program { padding: 32px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 96px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.group-title { margin-top: 2em; }
.file-list { list-style: none; padding: 0; margin: 0 0 1em; }
.file-list a { display: inline-flex; gap: 8px; padding: 8px 0; color: var(--accent); font-weight: 600; }
.post-head { border-bottom: 2px solid var(--ink); padding-bottom: 16px; margin-bottom: 24px; }
.post-head h1 { font-size: 1.6rem; margin-bottom: .3em; }
.post-body a { color: var(--accent); }
.post-images { display: grid; gap: 16px; margin: 24px 0; }
.post-foot { margin-top: 48px; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 32px; }
.pager a, .pager span { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.pager [aria-current="page"] { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }

.site-foot { background: #1F2226; color: #D5D8DC; padding: 48px 0; font-size: .92rem; }
.foot-name { font-weight: 700; color: #fff; font-size: 1.05rem; }
.foot-info { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0 0 16px; }
.foot-info div { display: flex; gap: 8px; } .foot-info dt { color: #9AA0A8; } .foot-info dd { margin: 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; } .foot-links a { color: #fff; }
.copy { color: #9AA0A8; margin: 0; }

.form { display: grid; gap: 16px; max-width: 760px; }
.form label { display: grid; gap: 6px; font-weight: 600; }
.form input[type="text"], .form input[type="email"], .form input[type="password"], .form input[type="url"], .form input[type="date"], .form select, .form textarea { font: inherit; padding: 12px; border: 1px solid #9AA0A8; border-radius: 6px; width: 100%; min-height: 48px; }
.form textarea { min-height: 260px; resize: vertical; }
.form .check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.form .check input { width: 22px; height: 22px; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.msg { min-height: 1.7em; font-weight: 600; } .msg.error { color: #B3261E; } .msg.ok { color: #1B6B3A; }
.admin-bar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { min-height: 44px; padding: 0 16px; border: 1px solid var(--line); background: #fff; font: inherit; border-radius: 6px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.admin-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.admin-row .hidden-mark { color: #B3261E; font-weight: 700; margin-right: 6px; }
.admin-row div:last-child { display: flex; gap: 8px; }
.attached { list-style: none; padding: 0; margin: 0; font-weight: 400; }

/* 대회 띠: 첫 화면 사진 바로 아래 */
.contest-band { background: var(--accent); color: #fff; padding: 22px 0; }
.contest-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 32px; }
.band-text { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; min-width: 0; }
.band-label { background: var(--point); color: var(--point-ink); font-weight: 800; font-size: .88rem; padding: 3px 12px; border-radius: 99px; white-space: nowrap; }
.band-title { font-size: 1.3rem; }
.band-meta { opacity: .95; }
.band-note { margin: 0; font-weight: 600; }
.sponsor-strip { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px; }
.sponsor-strip li { background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; padding: 8px 18px; border-radius: 99px; }
.sponsor-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sponsor-list li { border: 1px solid var(--line); border-radius: 10px; padding: 20px; font-weight: 700; }

@media (max-width: 860px) {
  html { font-size: 16px; }
  .nav-toggle { display: inline-flex; align-items: center; white-space: nowrap; flex-shrink: 0; }
  .head-row { gap: 12px; } .brand { font-size: 1.05rem; line-height: 1.35; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; padding: 8px 24px 16px; max-height: calc(100vh - 72px); overflow-y: auto; }
  .site-nav.open { display: flex; }
  .nav-top { padding: 12px 0; } .nav-top[aria-current="page"] { box-shadow: none; }
  .nav-sub { display: block; position: static; border: 0; padding: 0 0 8px 12px; }
  .cards-3, .photo-grid, .two-col { grid-template-columns: 1fr; }
  .block { padding: 48px 24px; } .band { padding-left: 0; padding-right: 0; }
  .hero-photo { height: 52vh; }
  .contest-band .wrap { flex-direction: column; align-items: flex-start; }
  .sponsor-list { grid-template-columns: 1fr; }
}
