:root {
  --paper: #fff9eb;
  --paper-2: #fffdf7;
  --ink: #30212a;
  --muted: #806d76;
  --cherry: #e93b66;
  --cherry-dark: #a91f49;
  --pink: #ffb7d0;
  --blue: #5a7bd8;
  --sky: #b9d8ff;
  --lemon: #ffd75f;
  --mint: #b9e4c8;
  --line: rgba(48, 33, 42, 0.18);
  --shadow: 7px 8px 0 rgba(69, 45, 58, 0.13);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(233, 59, 102, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 59, 102, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 4% 4%, rgba(255, 183, 208, 0.55), transparent 22rem),
    radial-gradient(circle at 96% 86%, rgba(185, 216, 255, 0.65), transparent 26rem),
    var(--paper);
  background-size: 28px 28px, 28px 28px, auto, auto, auto;
  font-family: "Avenir Next", Avenir, "Helvetica Neue", sans-serif;
}

button, input, textarea { font: inherit; }
button { color: inherit; }
.doodle { position: fixed; z-index: 0; color: rgba(233, 59, 102, 0.16); pointer-events: none; font-family: "Comic Sans MS", cursive; }
.doodle-one { top: 6vh; left: 4vw; font-size: 110px; transform: rotate(-15deg); }
.doodle-two { right: 4vw; bottom: 8vh; font-size: 150px; transform: rotate(11deg); }
.app-shell { position: relative; z-index: 1; width: min(100%, 820px); min-height: 100vh; margin: 0 auto; padding: 28px 22px 72px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 34px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { font-size: 30px; }
.brand strong { display: block; font-size: 17px; }
.eyebrow { margin: 0 0 5px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, .display { font-family: "Cooper Black", "Iowan Old Style", Georgia, serif; letter-spacing: -0.035em; }
h1 { margin-bottom: 18px; font-size: clamp(50px, 11vw, 82px); line-height: 0.9; }
h2 { margin-bottom: 14px; font-size: clamp(34px, 7vw, 54px); line-height: 0.98; }
h3 { margin-bottom: 9px; font-size: 20px; }
p { line-height: 1.55; }
.lede { max-width: 640px; color: #5f4a55; font-size: 19px; }
.muted { color: var(--muted); }
.quiet { color: #9b8992; font-size: 13px; }
.panel, .game-card { border: 2px solid var(--ink); border-radius: var(--radius); background: rgba(255, 253, 247, 0.94); box-shadow: var(--shadow); }
.panel-pad { padding: 26px; }
.hero { padding: 6vh 0 26px; }
.hero-stickers { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.sticker { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--lemon); box-shadow: 3px 3px 0 var(--ink); font-size: 12px; font-weight: 900; transform: rotate(-2deg); }
.sticker.pink { background: var(--pink); transform: rotate(3deg); }
.sticker.blue { background: var(--sky); }
.sticker.mint { background: var(--mint); }
.hero-cherries { display: inline-block; font-size: clamp(74px, 16vw, 126px); line-height: 1; transform: rotate(-7deg); filter: drop-shadow(7px 8px 0 rgba(69,45,58,.13)); }
.identity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 26px 0 16px; }
.identity-card { min-height: 132px; padding: 20px; border: 2px solid var(--ink); border-radius: 21px; background: var(--paper-2); box-shadow: 4px 5px 0 var(--ink); cursor: pointer; text-align: left; transition: transform 150ms ease, box-shadow 150ms ease; }
.identity-card:hover { transform: translate(2px, 2px); box-shadow: 2px 3px 0 var(--ink); }
.identity-card strong { display: block; margin: 24px 0 4px; font-family: "Cooper Black", Georgia, serif; font-size: 24px; }
.avatar-dot { display: grid; width: 35px; height: 35px; place-items: center; border: 2px solid var(--ink); border-radius: 50%; font-size: 17px; }
.identity-card[data-person="denis"] .avatar-dot { background: var(--sky); }
.identity-card[data-person="nastya"] .avatar-dot { background: var(--pink); }
.profile-button, .text-button { border: 0; background: transparent; cursor: pointer; }
.profile-button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-2); font-weight: 800; }
.profile-button .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cherry); }
.round-panel { position: relative; overflow: hidden; padding: clamp(24px, 6vw, 40px); }
.round-panel::after { content: "🍒"; position: absolute; right: -12px; top: -28px; font-size: 100px; opacity: 0.12; transform: rotate(18deg); }
.round-kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.round-number { display: grid; width: 44px; height: 44px; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: var(--lemon); font-weight: 900; }
.button-row { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 22px; }
.primary-button, .secondary-button, .soft-button { min-height: 52px; padding: 0 20px; border: 2px solid var(--ink); border-radius: 15px; cursor: pointer; font-weight: 900; box-shadow: 4px 5px 0 var(--ink); transition: transform 140ms ease, box-shadow 140ms ease; }
.primary-button { color: white; background: var(--cherry); }
.secondary-button { background: var(--lemon); }
.soft-button { background: var(--paper-2); }
.primary-button:hover, .secondary-button:hover, .soft-button:hover { transform: translate(2px, 2px); box-shadow: 2px 3px 0 var(--ink); }
.wide { width: 100%; }
.mini-rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.mini-rule { padding: 15px; border: 1px dashed rgba(48,33,42,.36); border-radius: 14px; background: rgba(255,255,255,.42); font-size: 13px; line-height: 1.4; }
.mini-rule strong { display: block; margin-bottom: 4px; }
.section { margin-top: 38px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.history-list { display: grid; gap: 10px; }
.history-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 17px; border: 2px solid var(--ink); border-radius: 16px; background: rgba(255,253,247,.78); cursor: pointer; text-align: left; }
.history-row:nth-child(odd) { transform: rotate(-.25deg); }
.history-row:nth-child(even) { transform: rotate(.2deg); }
.round-badge { padding: 7px 10px; border-radius: 999px; background: var(--pink); font-size: 12px; font-weight: 900; }
.footer-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 44px; color: var(--muted); }
.text-button { padding: 0; color: inherit; text-decoration: underline; text-decoration-style: wavy; text-underline-offset: 4px; }
.guide-list { display: grid; gap: 12px; margin: 26px 0; counter-reset: guide; }
.guide-item { display: grid; grid-template-columns: 46px 1fr; gap: 14px; padding: 18px; border: 2px solid var(--ink); border-radius: 18px; background: var(--paper-2); }
.guide-item::before { counter-increment: guide; content: counter(guide); display: grid; width: 38px; height: 38px; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: var(--pink); font-weight: 900; }
.progress-wrap { margin-bottom: 24px; }
.progress-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--muted); font-size: 12px; font-weight: 800; }
.progress { display: grid; grid-template-columns: repeat(var(--steps, 3), 1fr); gap: 7px; }
.progress span { height: 9px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-2); }
.progress span.done { background: var(--cherry); }
.game-card { position: relative; min-height: 500px; padding: clamp(24px, 7vw, 48px); overflow: hidden; }
.game-card::before { content: attr(data-emoji); position: absolute; right: -8px; top: -22px; font-size: 112px; opacity: .12; transform: rotate(13deg); }
.card-meta { position: relative; z-index: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 16px; }
.card-label { display: inline-flex; padding: 7px 11px; border: 2px solid var(--ink); border-radius: 999px; background: var(--lemon); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; transform: rotate(-2deg); }
.card-context { color: var(--cherry-dark); font-size: 12px; font-weight: 900; }
.question { position: relative; z-index: 1; margin: 0 0 14px; font-size: clamp(34px, 7vw, 55px); }
.hint { position: relative; z-index: 1; max-width: 560px; margin-bottom: 26px; color: var(--muted); }
textarea { position: relative; z-index: 1; width: 100%; min-height: 150px; padding: 17px; border: 2px solid var(--ink); border-radius: 16px; outline: none; color: var(--ink); background: rgba(255,255,255,.8); resize: vertical; line-height: 1.5; }
textarea:focus { box-shadow: 4px 5px 0 var(--pink); }
.mood-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.mood { min-height: 74px; padding: 8px; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper-2); cursor: pointer; font-size: 29px; box-shadow: 3px 4px 0 var(--ink); }
.mood.selected { background: var(--pink); transform: translate(2px, 2px); box-shadow: 1px 2px 0 var(--ink); }
.mood span { display: block; margin-top: 3px; font-size: 10px; font-weight: 800; }
.skip-note { margin: 14px 0 0; color: var(--muted); font-size: 12px; }
.form-nav { display: grid; grid-template-columns: auto 1fr; gap: 12px; margin-top: 17px; }
.review-stack { display: grid; gap: 12px; margin: 24px 0; }
.review-card { padding: 19px; border: 2px solid var(--ink); border-radius: 17px; background: var(--paper-2); box-shadow: 3px 4px 0 rgba(48,33,42,.2); }
.review-card small { display: block; margin-bottom: 8px; color: var(--cherry-dark); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.review-question { display: block; margin-bottom: 10px; line-height: 1.4; }
.review-card p { margin: 0; white-space: pre-wrap; }
.reveal-title { padding: 24px 0 18px; }
.answer-section { margin-top: 28px; }
.answer-section > h3 { display: inline-block; margin-bottom: 12px; padding: 6px 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--lemon); font-size: 12px; text-transform: uppercase; transform: rotate(-1deg); }
.answer-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.answer-card { min-height: 130px; padding: 20px; border: 2px solid var(--ink); border-radius: 18px; background: var(--paper-2); }
.answer-card.denis { box-shadow: 5px 6px 0 var(--sky); }
.answer-card.nastya { box-shadow: 5px 6px 0 var(--pink); }
.answer-card strong { display: block; margin-bottom: 10px; }
.answer-card small { display: block; margin-bottom: 14px; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.4; }
.answer-card p { margin-bottom: 0; white-space: pre-wrap; }
.answer-card.empty { color: var(--muted); font-style: italic; }
.quest-zone { margin-top: 38px; padding: clamp(24px, 6vw, 38px); border: 3px solid var(--ink); border-radius: 28px; background: var(--lemon); box-shadow: 8px 9px 0 var(--ink); }
.quest-zone h3 { font-family: "Cooper Black", Georgia, serif; font-size: 28px; }
.quest-grid { display: grid; gap: 10px; margin-top: 18px; }
.quest-choice { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: center; padding: 15px; border: 2px solid var(--ink); border-radius: 15px; background: var(--paper-2); cursor: pointer; text-align: left; }
.quest-choice.selected { color: white; background: var(--cherry); }
.quest-choice span:first-child { font-size: 25px; }
.quest-result { padding: 19px; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper-2); font-weight: 900; }
.storage-warning { margin-top: 14px; color: var(--cherry-dark); font-size: 13px; }
@media (max-width: 600px) {
  .app-shell { padding: 20px 15px 52px; }
  .identity-grid, .answer-pair { grid-template-columns: 1fr; }
  .identity-card { min-height: 108px; }
  .identity-card strong { margin-top: 16px; }
  .mini-rules { grid-template-columns: 1fr; }
  .game-card { min-height: 0; }
  .mood-grid { grid-template-columns: repeat(3, 1fr); }
  .form-nav { grid-template-columns: 1fr; }
  .form-nav .soft-button { order: 2; }
  .quest-zone { box-shadow: 5px 6px 0 var(--ink); }
}
@media (prefers-reduced-motion: no-preference) {
  .panel, .game-card { animation: pop .34s ease both; }
  @keyframes pop { from { opacity: 0; transform: translateY(8px) rotate(-.4deg); } to { opacity: 1; transform: none; } }
}
