:root {
  color-scheme: light;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  color: #24251f;
  background: #faf9f6;
  --line: #dedbd2;
  --muted: #605d54;
  --green: #234937;
  --light: #edf0e8;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button, input, select { border: 1px solid var(--line); border-radius: 8px; background: #fff; min-height: 42px; }
button { padding: .55rem .9rem; }
button:disabled { cursor: default; opacity: .55; }
input, select { padding: .48rem .72rem; }
:focus-visible { outline: 2px solid #286e4c; outline-offset: 3px; }
.shell { width: min(100% - 48px, 1032px); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); background: #fffefa; }
.header-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; font-size: 1.13rem; font-weight: 750; letter-spacing: -.04em; }
.brand img { border-radius: 9px; }
.gallery { padding-block: 28px 55px; }
.gallery-nav { display: flex; gap: 27px; border-bottom: 1px solid var(--line); width: 100%; }
.gallery-nav a { text-decoration: none; padding-block: 12px 14px; color: var(--muted); font-weight: 640; }
.gallery-nav a[aria-current=page] { color: var(--green); border-bottom: 3px solid var(--green); margin-bottom: -1px; }
.gallery-heading { display: flex; justify-content: space-between; align-items: end; gap: 10px; margin-block: 30px 19px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.55rem, 3vw, 2.2rem); line-height: 1.2; letter-spacing: -.055em; }
.tag { margin-top: 7px; color: var(--green); font-size: .91rem; font-weight: 600; }
.tag:empty { display: none; }
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { position: relative; border: 0; border-radius: 3px; padding: 0; overflow: hidden; display: grid; place-items: center; min-width: 0; aspect-ratio: 1; background: #e7e8df; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile .rank { position: absolute; bottom: 8px; left: 8px; color: #fff; background: var(--green); font-size: .83rem; font-weight: 650; padding: 5px 9px; border-radius: 4px; }
.tile:hover .tile-label { text-decoration: underline; }
.tile-label { color: var(--green); text-align: center; padding: .75rem; }
.gallery-status:not(:empty) { border: 1px dashed var(--line); padding: 45px 16px; text-align: center; color: var(--muted); line-height: 1.55; }
.more { display: block; margin: 22px auto; }
.gallery-footer { margin-top: 28px; color: var(--muted); font-size: .88rem; }
.privacy h2 { margin-block: 24px 8px; font-size: 1.2rem; }
.privacy p { line-height: 1.65; }
dialog { width: min(calc(100% - 28px), 580px); max-height: calc(100dvh - 32px); border: 1px solid var(--line); border-radius: 16px; background: #fffefa; padding: 16px; color: inherit; }
dialog::backdrop { background: #182119bc; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.dialog-heading h2 { font-size: 1.15rem; }
#work-preview :is(img, iframe) { display: block; width: 100%; border: 0; border-radius: 6px; }
#work-preview img { max-height: 60dvh; object-fit: contain; background: #efede6; }
#work-preview iframe { height: min(62dvh, 590px); background: #efede6; }
.caption { white-space: pre-line; margin: 12px 0; overflow-wrap: anywhere; }
#work-link { display: inline-block; padding-block: 8px; font-weight: 650; color: var(--green); }
.admin { max-width: 880px; padding-block: 30px 60px; }
.admin-section { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 20px; }
.admin-section h2 { font-size: 1.15rem; margin-bottom: 10px; }
.admin-section p { color: var(--muted); margin-block: 7px 12px; line-height: 1.5; }
#message:not(:empty) { padding: 12px; border-radius: 8px; margin-top: 12px; background: var(--light); }
#message[data-error=true] { color: #812d26; background: #f9ece7; }
.control-row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 9px; }
.control-row label { display: grid; gap: 5px; font-size: .88rem; font-weight: 560; min-width: 0; }
.flex-input { flex: 1 1 260px; }
.primary { background: var(--green); color: #fff; border-color: var(--green); }
#login { margin-top: 24px; }
.candidate { border-top: 1px solid var(--line); padding: 12px 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; }
.candidate input { width: 5rem; }
.candidate p { margin-bottom: 0; max-width: 44ch; overflow-wrap: anywhere; }
#admin-more { margin-top: 12px; }
#meta-guide { background: var(--light); border-radius: 8px; padding: 11px 13px; margin-block: 13px; }
#meta-guide summary { cursor: pointer; color: var(--green); font-weight: 650; }
#meta-guide ol { padding-left: 1.5rem; line-height: 1.52; margin: 10px 0 2px; }
#meta-guide li + li { margin-top: 8px; }
#meta-guide code { overflow-wrap: anywhere; }
#select-instagram { margin-top: 12px; align-items: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
@media (max-width: 620px) {
  .shell { width: calc(100% - 28px); }
  .site-header .header-inner { min-height: 58px; }
  .gallery { padding-top: 12px; }
  .gallery-heading { margin-top: 24px; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
}
