/* 신청곡 메뉴판(/request): 휴대폰에서 한 손으로 쓰는 화면 */
:root {
  --bg: #16120e; --surface: #211a14; --ink: #f1eadb; --muted: #a3978a; --line: #3b3027;
  --paper: #ece1c6; --obi: #b3242c; --sticker: #f4c62e;
  --hand: "Sue Ellen Francisco", cursive; --serif: "Jua", "IBM Plex Sans KR", sans-serif;
  --sans: "IBM Plex Sans KR", system-ui, sans-serif; --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
body { margin: 0 auto; max-width: 640px; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; padding-bottom: 96px; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--sticker); outline-offset: 2px; }

.top { padding: 18px 16px 6px; }
.mark { margin: 0; font-family: var(--hand); font-size: 26px; line-height: 36px; color: var(--muted); padding-left: 44px; background: url(/logo.webp) left center / 36px 36px no-repeat; }
.top h1 { margin: 6px 0 8px; font-family: var(--serif); font-weight: 400; font-size: 30px; }
.how { margin: 0; color: var(--muted); font-size: 14px; }
.how b { color: var(--sticker); font-weight: 600; }

.search { position: sticky; top: 0; z-index: 3; background: var(--bg); padding: 12px 16px 8px; }
#q { width: 100%; height: 50px; padding: 0 14px; font-size: 17px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
#q::placeholder { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 16px 10px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 9px 14px; background: none; border: 1px solid var(--line); border-radius: 4px; white-space: nowrap; font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

main { padding: 0 16px; }
.hint { margin: 6px 0 4px; font-size: 13px; color: var(--muted); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list img, .list .noimg { width: 52px; height: 52px; object-fit: cover; background: var(--surface); display: block; }
.list .tt { min-width: 0; background: none; border: 0; padding: 0; text-align: left; }
.list b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list span { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add { min-width: 64px; height: 44px; padding: 0 12px; background: var(--sticker); color: #1b1713; border: 0; border-radius: 4px; font-weight: 600; white-space: nowrap; }
.add.on { background: none; color: var(--sticker); border: 1px solid var(--sticker); }
.add.open { background: none; color: var(--ink); border: 1px solid var(--line); }
.more { display: block; width: 100%; margin: 16px 0; height: 48px; background: none; border: 1px solid var(--line); border-radius: 4px; }
.more[hidden] { display: none; }

.cart { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 4; width: min(608px, calc(100% - 32px)); height: 56px; background: var(--obi); color: #fff; border: 0; border-radius: 6px; font-size: 17px; font-weight: 600; box-shadow: 0 8px 24px -6px #000; }
.cart[hidden] { display: none; }
/* 보낸 신청의 차례: 신청서 단추가 있으면 그 위에 */
.mine { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 3; margin: 0; width: min(608px, calc(100% - 32px)); padding: 10px 14px; background: var(--paper); color: var(--bg); border-radius: 6px; font-size: 15px; font-weight: 600; text-align: center; box-shadow: 0 8px 24px -6px #000; }
.mine[hidden] { display: none; }
.cart:not([hidden]) + .mine { bottom: 80px; }

dialog { border: 0; padding: 20px 16px 28px; width: 100vw; max-width: 640px; height: 100dvh; max-height: none; margin: 0 auto; background: var(--paper); color: #1b1713; --ink: #1b1713; --muted: #6d6156; --line: #cdc1aa; --surface: #e2d8c2; overflow-y: auto; }
dialog::backdrop { background: rgba(8, 6, 4, .8); }
.x { position: fixed; top: 10px; right: max(10px, calc(50% - 310px)); width: 44px; height: 44px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); font-size: 26px; line-height: 1; z-index: 2; }
.a-head { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; margin: 0 52px 12px 0; }
.a-head img { width: 96px; height: 96px; object-fit: cover; }
.a-head p { margin: 0; font-weight: 600; }
.a-head h2 { margin: 2px 0; font-family: var(--serif); font-weight: 400; font-size: 20px; line-height: 1.25; }
.a-head .a-meta { font-weight: 400; font-size: 13px; color: var(--muted); }
#aList li { grid-template-columns: 2.6em minmax(0, 1fr) auto; }
#aList .pos { font-family: var(--mono); font-size: 13px; color: var(--muted); }

#slip h2 { margin: 4px 0 14px; font-family: var(--serif); font-weight: 400; font-size: 30px; }
.table { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 600; }
.table input { width: 96px; height: 46px; padding: 0 12px; font-size: 20px; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.slip { margin: 0; padding: 0; list-style: none; counter-reset: n; }
.slip li { counter-increment: n; display: grid; grid-template-columns: 1.6em minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 14px 0; border-top: 1px solid var(--line); }
.slip li::before { content: counter(n); font-family: var(--serif); font-weight: 400; font-size: 22px; }
.slip b { display: block; font-size: 21px; line-height: 1.25; }
.slip span { display: block; margin-top: 2px; color: var(--muted); }
.slip .where { margin-top: 6px; font-family: var(--mono); font-size: 13px; color: #1b1713; }
.slip button { background: none; border: 0; padding: 4px 6px; font-size: 13px; color: var(--muted); text-decoration: underline; }
.s-note { margin: 14px 0; font-size: 13px; color: var(--muted); }
.s-actions { display: flex; gap: 10px; }
.btn { height: 48px; padding: 0 18px; background: #1b1713; color: var(--paper); border: 0; border-radius: 4px; font-weight: 600; }
.btn.ghost { background: none; color: #1b1713; border: 1px solid var(--line); }
.s-actions { flex-wrap: wrap; }
.btn.send { background: var(--obi); color: #fff; flex: 1 1 100%; height: 56px; font-size: 18px; }
.btn[hidden] { display: none; }
.btn:disabled { opacity: .5; }
/* 홈에서 팝업으로 열렸을 때: 닫기 단추 자리 비우기 */
html.embedded .top { padding-right: 60px; }

/* 10/15 흰 바탕(메인과 맞춤) */
:root { --bg: #ffffff; --surface: #f2f0ec; --ink: #1b1713; --muted: #6b645c; --line: #e2ddd5; --paper: #f6f5f2; }
:focus-visible { outline-color: var(--obi); }
.mark { color: var(--ink); }
.how b { color: var(--obi); }
.add { background: #1b1713; color: #fff; }
.add.on { color: var(--obi); border-color: var(--obi); }
.mine { color: var(--ink); box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .35); border: 1px solid var(--line); }
.cart { box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .35); }
dialog { background: #f6f5f2; --line: #dcd6cc; --surface: #ebe8e2; }
dialog::backdrop { background: rgba(20, 16, 12, .5); }
.x { background: #fff; }
.list img, .list .noimg { box-shadow: 0 0 0 1px rgba(0, 0, 0, .09), 0 6px 12px -8px rgba(0, 0, 0, .4); }
/* 10/15 빨강으로 통일: 고른 장르·신청 단추 */
.chip { padding: 8px 13px; }
.chip[aria-pressed="true"] { background: var(--obi); border-color: var(--obi); color: #fff; }
.add { background: var(--obi); color: #fff; }
.add.on { background: none; color: var(--obi); border-color: var(--obi); }
