/* 댕냥넷 화면 스타일. 포인트 색(--accent)은 서버가 테마에 맞춰 넣는다. */
:root {
  --accent: #3355CC;
  --accent-soft: #3355CC1A;
  --ink: #1B1B1F;
  --ink-2: #3A3A42;
  --sub: #5C5C66;
  --muted: #6B6B75;
  --line: #E6E4E0;
  --line-2: #EEECE8;
  --surface: #F6F5F2;
  --dog: #EADFD3;
  --cat: #DCE3EA;
  --danger: #B42318;
  --ok: #0F766E;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: 'IBM Plex Sans KR', system-ui, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  word-break: keep-all; /* 한국어 단어 중간 줄바꿈 방지 */
  overflow-wrap: anywhere;
}
a { color: var(--ink); }
a:hover { color: var(--sub); }
button, input, textarea, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.wrap { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: #fff; }
.logo { font-family: 'Jua', sans-serif; font-size: 28px; color: var(--accent); text-decoration: none; line-height: 1; }
.top { height: 56px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-2); }
.top.plain { padding: 0 4px; justify-content: flex-start; gap: 4px; }
.top h1 { margin: 0; font-size: 18px; font-weight: 700; }
.icon-btn { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; cursor: pointer; color: var(--ink); }
.top-link { font-size: 14px; font-weight: 500; color: var(--sub); text-decoration: none; padding: 12px 4px; }
.sec { padding: 20px 16px; display: flex; flex-direction: column; gap: 14px; }
.divider { height: 8px; background: var(--surface); }
.lead { margin: 0; font-size: 21px; line-height: 1.45; font-weight: 700; }
.box { padding: 12px 14px; background: var(--surface); border-radius: 12px; }
.box-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.small { font-size: 13px; color: var(--sub); }
.tiny { font-size: 12px; color: var(--muted); }
.strong { font-weight: 600; }
h2 { margin: 0; font-size: 20px; font-weight: 700; }
.theme-msg { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); font-size: 14px; }
.theme-msg b { color: var(--accent); }
.seg { display: flex; gap: 4px; padding: 4px; background: var(--surface); border-radius: 999px; }
.seg a { flex: 1; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 999px; text-decoration: none; font-size: 15px; color: var(--sub); }
.seg a[aria-current="true"] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.ph { position: relative; border-radius: 12px; overflow: hidden; background: var(--dog); }
.ph.cat { background: var(--cat); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 10px; left: 10px; padding: 4px 11px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; }
.badge.dark { background: var(--ink); }
.card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); }
.card-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 36px; padding: 0 14px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-2); font-size: 14px; text-decoration: none; }
.chip[aria-current="true"] { border-color: transparent; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sort a { font-size: 14px; color: var(--muted); text-decoration: none; padding: 8px 6px; }
.sort a[aria-current="true"] { color: var(--ink); font-weight: 700; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; padding: 0 18px; border-radius: var(--radius); border: 0; background: var(--accent); color: #fff; font-size: 17px; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { color: #fff; filter: brightness(.95); }
.btn.line { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); font-size: 16px; font-weight: 600; }
.btn.soft { background: var(--accent-soft); color: var(--accent); }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); font-size: 15px; height: 48px; }
.btn.danger { background: var(--danger); }
.btn.dark { background: var(--ink); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.ad-slot { min-height: 100px; border: 1.5px dashed #CFCBC4; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); }
.bottom-cta { position: sticky; bottom: 0; margin-top: auto; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); background: #fff; }
.foot { padding: 8px 16px 24px; display: flex; flex-direction: column; gap: 10px; }
.foot nav { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.foot nav a { color: var(--sub); text-decoration: none; padding: 6px 0; }
.foot nav a.b { color: var(--ink-2); font-weight: 700; }
.link-row { display: flex; align-items: center; justify-content: space-between; min-height: 52px; font-size: 15px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line-2); }
.link-row:last-child { border-bottom: 0; }
.panel { padding: 18px; border-radius: 16px; background: var(--surface); display: flex; flex-direction: column; gap: 12px; }
.panel.accent { background: var(--accent-soft); }
.tag { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--accent-soft); color: var(--accent); }
.tag.dark { background: var(--ink); color: #fff; }
.tag.gray { background: var(--surface); color: var(--ink-2); }
.big-photo { background: var(--dog); display: flex; justify-content: center; }
.big-photo.cat { background: var(--cat); }
.big-photo img { max-height: 80vh; width: auto; max-width: 100%; }
.form { display: flex; flex-direction: column; gap: 22px; padding: 16px 16px 28px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .field > .label { font-size: 15px; font-weight: 600; }
.req { color: var(--accent); }
.input, textarea.input { height: 52px; padding: 0 14px; border: 1px solid #D9D6D0; border-radius: 12px; font-size: 16px; background: #fff; width: 100%; }
textarea.input { height: auto; padding: 12px 14px; resize: vertical; }
.input:focus, textarea.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pick label { position: relative; }
.pick input { position: absolute; opacity: 0; inset: 0; }
.pick span { height: 52px; display: flex; align-items: center; justify-content: center; border: 1px solid #D9D6D0; border-radius: 12px; font-size: 16px; color: var(--ink-2); cursor: pointer; }
.pick input:checked + span { border: 2px solid var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.drop { position: relative; min-height: 220px; border: 1.5px dashed #CFCBC4; border-radius: 14px; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 16px; cursor: pointer; overflow: hidden; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop img { max-height: 320px; border-radius: 10px; }
.checks { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; font-size: 14px; line-height: 1.55; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--accent); }
.err { padding: 12px 14px; border-radius: 12px; background: #FEE4E2; color: #7A271A; font-size: 14px; }
.okmsg { padding: 12px 14px; border-radius: 12px; background: #D1FADF; color: #05603A; font-size: 14px; }
.center { text-align: center; align-items: center; }
.state { padding: 32px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.state h1 { margin: 0; font-size: 22px; }
.state p { margin: 0; color: var(--sub); font-size: 15px; }
.spinner { width: 48px; height: 48px; border-radius: 50%; border: 5px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.sheet-list { display: flex; flex-direction: column; gap: 8px; }
.sheet-list label { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 16px; cursor: pointer; }
.sheet-list input { accent-color: var(--accent); width: 20px; height: 20px; }
.hall-round { border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.deleted-ph { height: 150px; border-radius: 12px; background: var(--surface); border: 1.5px dashed #CFCBC4; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); }
.install-banner { margin: 0 16px 12px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); display: none; align-items: center; justify-content: space-between; gap: 10px; }
.install-banner.show { display: flex; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 10; }
.toast.show { opacity: 1; }
.pager { display: flex; gap: 8px; }
.pager a { flex: 1; }
[data-best][hidden] { display: none !important; }
