/* 라라스튜디오 앱 안내 — 크림 종이 · 검은 가는 선 · 채도 낮은 색 */
:root {
  --paper: #fbf9f5;
  --paper-2: #ece8e1;
  --ink: #23211e;
  --ink-soft: #6b665e;
  --line: #23211e;
  --navy: #34425f;      /* 강조색은 이것 하나 */
  --navy-bg: #e4e7ee;
  --mustard: #f1e7c8;
  --sage: #dfe6d8;
  --pink: #f2e1dd;
  --lilac: #e6e1ee;
  --serif: "Noto Serif KR", "Nanum Myeongjo", "AppleMyungjo", "Batang", serif;
  --sans: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.75 var(--sans); word-break: keep-all; overflow-wrap: anywhere;
  overflow-x: hidden;
}
a { color: var(--navy); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 18px; }

.top { border-bottom: 1.5px solid var(--line); background: var(--paper-2); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.top a { color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 700; }
.top small { color: var(--ink-soft); font-size: 13px; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.4; letter-spacing: -0.01em; }
h1 { font-size: 28px; margin: 34px 0 10px; }
h2 { font-size: 22px; margin: 40px 0 10px; padding-top: 6px; border-top: 1px solid var(--line); }
h3 { font-size: 18px; margin: 24px 0 6px; }
.lead { font-size: 18px; }
.sub { color: var(--ink-soft); font-size: 14px; margin-top: 0; }
.note { color: var(--ink-soft); font-size: 14px; }

.card {
  border: 1.5px solid var(--line); border-radius: 14px; background: #fff;
  padding: 16px; margin: 18px 0;
}
.card.mustard { background: var(--mustard); }
.card.sage { background: var(--sage); }
.card.pink { background: var(--pink); }
.card.lilac { background: var(--lilac); }
.card.navy { background: var(--navy-bg); }

.app {
  display: grid; grid-template-columns: 1fr; gap: 6px;
  border: 1.5px solid var(--line); border-radius: 14px; background: var(--navy-bg); padding: 16px; margin: 26px 0;
}
.app h2 { border: 0; margin: 0; padding: 0; font-size: 20px; }
.app p { margin: 4px 0; }
.btn, button {
  font: inherit; font-size: 16px; color: var(--ink); cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 999px; background: #fff;
  padding: 8px 16px; min-height: 42px; line-height: 1.3;
}
.btn.main, button.main { background: var(--navy); color: #fff; border-color: var(--navy); }
a.btn { display: inline-block; text-decoration: none; }
button:disabled { opacity: .5; cursor: default; }
button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
label { font-size: 15px; }
input[type="number"], input[type="text"], select, textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 8px; max-width: 100%;
}
textarea { width: 100%; min-height: 140px; }

ul.plain { padding-left: 20px; }
ol { padding-left: 22px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
th { background: var(--paper-2); font-weight: 600; }
.scroll { overflow-x: auto; max-width: 100%; }

.faq h3 { margin-top: 20px; }
.faq p { margin-top: 4px; }

footer { margin-top: 56px; border-top: 1.5px solid var(--line); background: var(--paper-2); padding: 20px 0 36px; font-size: 14px; color: var(--ink-soft); }
footer ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }

/* 퍼즐 판 */
.board { display: grid; gap: 0; border: 2px solid var(--line); width: 100%; max-width: 420px; margin: 8px auto; background: #fff; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.board .cell { position: relative; aspect-ratio: 1 / 1; border: 1px solid rgba(35,33,30,.35); display: flex; align-items: center; justify-content: center; padding: 0; border-radius: 0; min-height: 0; background: transparent; font-size: 20px; }
.board .cell img { width: 82%; height: 82%; object-fit: contain; pointer-events: none; }
.board .cell.given::after { content: ""; position: absolute; left: 3px; top: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.board .cell.bad { outline: 3px solid #9b4a3c; outline-offset: -4px; }
.board .cell.hint { outline: 3px solid var(--navy); outline-offset: -4px; }
.board .cell .x { color: var(--ink-soft); font-size: 18px; }
.msg { min-height: 1.75em; text-align: center; font-weight: 600; }

/* 룰렛 */
.wheel-box { position: relative; width: min(340px, 100%); margin: 10px auto; }
.wheel-box svg { width: 100%; height: auto; display: block; }
.wheel-box .pin { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent; border-top: 22px solid var(--ink); }
#wheel { transition: transform 3.6s cubic-bezier(.12,.75,.12,1); transform-origin: 50% 50%; }
.chips button { font-size: 15px; min-height: 36px; padding: 5px 12px; }

/* 목록 */
.apps { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
.apps li { border: 1.5px solid var(--line); border-radius: 12px; background: #fff; padding: 12px 14px; }
.apps li a.q { font-family: var(--serif); font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; }
.apps li p { margin: 2px 0 0; font-size: 15px; color: var(--ink-soft); }

.reading p.on { background: var(--mustard); }
.reading { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; background: #fff; }

@media (min-width: 640px) {
  h1 { font-size: 32px; }
  .apps { grid-template-columns: 1fr 1fr; }
}
