/* 큐리오 브랜드 색: 자동화/채널아트/브랜드_색상.md */
:root {
  --gold: #E7B23C;
  --ink: #1A1408;
  --green: #3A9C44;
  --cream: #FFF6D8;
  --dkgold: #7A5410;
  --brown: #4a3610;
  --red: #7A1F1F;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100dvh;
  background: var(--gold);
  color: var(--ink);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* 흐르는 curio 글자 */
.pat {
  position: fixed; inset: -60vmax; z-index: 0; pointer-events: none;
  transform: rotate(-12deg);
  display: flex; flex-direction: column; justify-content: center; gap: .08em;
  font-family: "Black Han Sans", sans-serif; font-size: clamp(52px, 9vw, 96px);
  line-height: 1.05; letter-spacing: .04em;
  color: rgba(26, 20, 8, .07);
  transition: color .4s;
}
.pat div { white-space: nowrap; animation: sl 60s linear infinite; will-change: transform; }
.pat div:nth-child(2n) { animation-name: sr; }
.pat div:nth-child(3n) { animation-duration: 70s; }
@keyframes sl { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes sr { from { transform: translateX(-50%); } to { transform: translateX(0); } }
body.list .pat { color: rgba(26, 20, 8, .045); }
body.list .pat div { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .pat div { animation: none; } }

/* 위 막대 */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: max(14px, env(safe-area-inset-top)) 18px 14px;
}
body.list .top { background: var(--gold); border-bottom: 3px solid var(--ink); }
.logo { font-family: "Black Han Sans", sans-serif; font-size: 26px; color: var(--ink); text-decoration: none; line-height: 1; }
.topnav { display: flex; gap: 6px; }
.topnav a {
  font-size: 13.5px; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap;
  background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 6px 12px;
}
.topnav a.on { background: var(--ink); color: #fff; }

.view { position: relative; z-index: 1; }

/* 첫 화면 */
#v-home {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: 84px 14px 72px;
}
.ask, .done { width: 100%; max-width: 440px; text-align: center; }
.q { font-weight: 800; font-size: clamp(30px, 7.5vw, 42px); line-height: 1.25; letter-spacing: -.02em; margin: 0 0 20px; }
.bar {
  display: flex; align-items: center; gap: 4px;
  background: #fff; border: 3px solid var(--ink); border-radius: 18px; padding: 5px 5px 5px 14px;
  transition: box-shadow .15s;
}
.bar:focus-within { box-shadow: 0 0 0 4px rgba(255, 255, 255, .75); }
.bar input {
  flex: 1; min-width: 0; height: 46px; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 17px; color: var(--ink);
}
.bar input::placeholder { color: #a8915f; }
.bar button {
  flex: none; width: 48px; height: 46px; border: 0; border-radius: 13px; cursor: pointer;
  background: var(--ink); color: #fff; display: grid; place-items: center;
}
.bar button:active { transform: scale(.96); }
.bar button[disabled] { opacity: .6; cursor: wait; }
.bar.small { border-width: 2px; border-radius: 14px; padding: 3px 3px 3px 12px; }
.bar.small input { height: 38px; font-size: 16px; }
.bar.small button { width: auto; height: 38px; padding: 0 14px; border-radius: 11px; font-size: 14px; font-weight: 700; }
.err { min-height: 18px; margin: 8px 0 2px; font-size: 13px; font-weight: 600; color: var(--red); }
.hint { margin: 0; font-size: 12.5px; color: var(--brown); letter-spacing: -.03em; white-space: nowrap; }
.bm { background: var(--green); color: #fff; padding: 0 5px; border-radius: 5px; font-weight: 700; }

/* 낸 뒤 */
.doneTitle { font-size: 26px; font-weight: 800; margin: 0 0 14px; letter-spacing: -.02em; }
.ideaBig {
  margin: 0 0 10px; padding: 18px 16px; background: #fff; border: 3px solid var(--ink); border-radius: 18px;
  font-size: 19px; font-weight: 800; line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere;
}
.sub { margin: 0 0 18px; font-size: 13px; color: var(--brown); }
.nameRow { text-align: left; margin: 0 0 6px; }
.nameRow label { display: block; font-size: 13px; font-weight: 700; margin: 0 0 2px 4px; }
.nameHint { margin: 0 0 7px 4px; font-size: 12px; color: var(--brown); }
.nameRow label span { font-weight: 500; color: var(--brown); }
.btns { display: flex; gap: 8px; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 46px; padding: 0 18px; border-radius: 14px; border: 2.5px solid var(--ink);
  font-size: 15px; font-weight: 800; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn.ink { background: var(--ink); color: #fff; }
.btn.line { background: #fff; color: var(--ink); }
.btns .btn { flex: 1; }
.btn:active { transform: scale(.98); }
.btn.wide { display: flex; width: 100%; }
.done > .btn.wide { margin-bottom: 8px; }

/* 스토리 카드 미리보기 */
.sheet {
  position: fixed; inset: 0; z-index: 20; background: rgba(26, 20, 8, .72);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.sheetIn {
  position: relative; width: min(100%, 400px); max-height: 100%; overflow: auto;
  background: var(--gold); border: 3px solid var(--ink); border-radius: 22px; padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.sheetIn > * { flex: none; }
.sheetX {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  border: 2.5px solid var(--ink); background: #fff; display: grid; place-items: center; cursor: pointer;
}
.cardBox {
  position: relative; height: min(58vh, 560px); aspect-ratio: 9 / 16; margin: 0 auto 6px;
  background: #15120c; border: 2.5px solid var(--ink); border-radius: 12px; overflow: hidden;
}
.cardBox img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cardWait { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; color: var(--gold); font-weight: 800; font-size: 14px; }
.cardTip { margin: 2px 4px 0; font-size: 12.5px; line-height: 1.5; color: var(--brown); text-align: center; word-break: keep-all; }
.cardTip b { color: var(--ink); }

.again { margin-top: 14px; background: none; border: 0; font-size: 14px; font-weight: 700; color: var(--brown); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.foot { position: absolute; left: 0; right: 0; bottom: max(14px, env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 14px; font-size: 12px; }
.foot a { color: var(--brown); text-decoration: none; }

/* 상상 목록 */
#v-ideas { max-width: 560px; margin: 0 auto; padding: 78px 14px 110px; }
.listHead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 2px 14px; }
.listHead h1 { font-size: 22px; font-weight: 800; margin: 0; letter-spacing: -.02em; }
.listHead h1 span { font-size: 14px; font-weight: 600; color: var(--brown); }
.tabs { display: flex; background: #fff; border: 2px solid var(--ink); border-radius: 12px; padding: 3px; }
.tabs button { border: 0; background: none; padding: 6px 14px; border-radius: 9px; font-size: 14px; font-weight: 700; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }

.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.card {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 2.5px solid var(--ink); border-radius: 16px; padding: 14px 12px 14px 14px;
}
.card .rank { flex: none; width: 22px; text-align: center; font-family: "Black Han Sans", sans-serif; font-size: 18px; color: var(--dkgold); }
.card .body { flex: 1; min-width: 0; }
.card .t { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; }
.card .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: 12px; }
.card .meta:empty { display: none; }
.tag { padding: 2px 7px; border-radius: 6px; font-weight: 700; }
.tag.name { background: var(--cream); color: var(--dkgold); }
.tag.mine { background: var(--ink); color: #fff; }
.tag.wait { background: #eee3c4; color: var(--brown); }
.tag.made { background: var(--green); color: #fff; text-decoration: none; }
.like {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 50px; padding: 6px 4px; border: 0; background: none; cursor: pointer; color: var(--ink);
}
.like svg { width: 26px; height: 26px; transition: transform .15s; }
.like span { font-size: 13px; font-weight: 800; }
.like[aria-pressed="true"] svg { fill: #E0473C; stroke: #E0473C; }
.like.pop svg { transform: scale(1.25); }
.like[disabled] { cursor: default; opacity: .45; }

.boxLabel { margin: 0 2px 6px; font-size: 13px; font-weight: 800; }
#focusBox .card { border-width: 3px; background: var(--cream); }
#focusBox, #pendingBox { margin-bottom: 16px; }
#pendingBox .card { border-style: dashed; }
.empty { text-align: center; font-weight: 700; color: var(--brown); margin: 40px 0; }
.more { display: flex; width: 100%; margin-top: 14px; }

.fab {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 5;
  background: var(--ink); color: #fff; text-decoration: none; font-weight: 800; font-size: 16px;
  padding: 14px 26px; border-radius: 999px; border: 3px solid #fff;
}

.toast {
  position: fixed; left: 50%; bottom: 90px; z-index: 9; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; padding: 10px 16px; border-radius: 12px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; white-space: nowrap;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 720px) {
  .hint { font-size: 13.5px; }
}
