@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root{
  --paper:#F7EEDC;
  --card:#FFFDF8;
  --ink:#2A2559;
  --ink-soft:#5C5588;
  --raspberry:#D63B72;
  --raspberry-600:#B92F60;
  --pine:#1F5C46;
  --gold:#EFC24C;
  --gold-600:#D9A72E;
  --lilac:#D9CBEA;
  --lilac-ink:#5B4F86;
  --border:#E7DCC2;
  --radius-lg:22px;
  --radius-sm:12px;
  --shadow:0 16px 40px rgba(42,37,89,.14);
  --shadow-soft:0 8px 20px rgba(42,37,89,.08);
  --ring:0 0 0 4px rgba(239,194,76,.45);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:'Inter',ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--ink);
  background:var(--paper);
  -webkit-font-smoothing:antialiased;
}

.brand-title,.tile-title,legend,.btn,.popup-content h2{
  font-family:'Fredoka',ui-sans-serif,system-ui,sans-serif;
}

.site-header{padding:32px 16px 0}
.brand{
  max-width:1100px;
  margin:0 auto;
  display:flex;
  gap:18px;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.brand img{
  width:56px;height:56px;border-radius:50%;object-fit:cover;background:#fff;
  box-shadow:0 0 0 6px var(--paper),0 0 0 10px rgba(239,194,76,.55),0 8px 18px rgba(42,37,89,.18);
}
.brand-title{margin:0;font-weight:600;font-size:clamp(20px,2.8vw,30px);color:var(--ink);letter-spacing:-.01em}
.brand-subtitle{margin:4px 0 0;color:var(--ink-soft);font-size:clamp(13px,1.6vw,15px);font-weight:500}
.brand-subtitle strong{color:var(--raspberry)}

.site-header::after{
  content:"✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦";
  display:block;
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  color:var(--gold);
  opacity:.6;
  font-size:11px;
  letter-spacing:.55em;
  margin-top:22px;
}

.page{
  max-width:1100px;
  margin:0 auto;
  padding:28px 16px 48px;
  display:grid;
  grid-template-columns:1fr;
  gap:28px;
  grid-template-areas:
    "form"
    "poster";
}
.form-wrap{grid-area:form}
.poster{grid-area:poster}

@media(min-width:900px){
  .page{
    grid-template-columns:400px 1fr;
    align-items:start;
    grid-template-areas:"poster form";
  }
}

.poster{position:sticky;top:20px;z-index:0;display:block}
.poster img{
  width:100%;height:auto;display:block;
  border-radius:var(--radius-lg);
  border:1px solid var(--border);
  box-shadow:var(--shadow);
}

.facts{
  list-style:none;
  margin:14px 0 0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.facts li{
  padding:12px 16px;
  color:var(--ink);
  font-weight:500;
  font-size:14px;
  background:var(--card);
  border:1px solid var(--border);
  border-left:4px solid var(--gold);
  border-radius:var(--radius-sm);
}
.facts li strong{color:var(--raspberry)}
.facts li:nth-child(1){border-left-color:var(--raspberry)}
.facts li:nth-child(2){border-left-color:var(--gold)}
.facts li:nth-child(3){border-left-color:var(--lilac-ink)}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow);
  padding:22px;
  position:relative;
  z-index:1;
}
legend{
  padding:0 8px;
  color:var(--ink-soft);
  font-weight:600;
  font-size:15px;
}

.alert{
  margin:0 0 14px;
  padding:12px 14px;
  border-radius:var(--radius-sm);
  border:1px solid var(--border);
  font-weight:500;
  font-size:14px;
}
.alert.info{background:rgba(217,203,234,.4);border-color:var(--lilac);color:var(--lilac-ink);color: crimson;}
.alert.warn{background:rgba(214,59,114,.1);border-color:rgba(214,59,114,.35);color:var(--raspberry-600)}
.alert.warn h3{color:var(--raspberry-600);margin-top:0}

.form-wrap{display:flex;flex-direction:column;gap:18px}
.form{padding:22px}

.grid{
  display:grid;
  gap:16px;
  grid-template-columns:1fr;
}
.field.full{grid-column:1/-1}

@media(min-width:680px){
  .grid{grid-template-columns:1fr 1fr}
  .field.full{grid-column:1/-1}
}

.field label{
  display:block;
  font-size:13px;
  color:var(--ink-soft);
  margin:0 0 6px;
  font-weight:500;
}

input,select,textarea{
  width:100%;
  appearance:none;
  border:1.5px solid var(--border);
  background:#fff;
  color:var(--ink);
  border-radius:var(--radius-sm);
  padding:12px 14px;
  font-size:16px;
  font-family:inherit;
  outline:none;
  transition:border-color .15s ease,box-shadow .15s ease;
}
input::placeholder,textarea::placeholder{color:#A79F86}
input:focus,select:focus,textarea:focus{border-color:var(--gold-600);box-shadow:var(--ring)}
fieldset[disabled] input,fieldset[disabled] select,fieldset[disabled] textarea{opacity:.55;cursor:not-allowed}

.label-like{margin:0 0 10px;color:var(--ink-soft);font-size:13px;font-weight:500}

.radio-tiles{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}
@media(min-width:560px){
  .radio-tiles{grid-template-columns:repeat(3,1fr)}
}
.tile{display:block;cursor:pointer;user-select:none}
.tile input{position:absolute;opacity:0;pointer-events:none}
.tile-face{
  display:flex;flex-direction:column;gap:3px;
  padding:14px 16px;
  background:#fff;
  border:1.5px solid var(--border);
  border-left:4px solid var(--border);
  border-radius:var(--radius-sm);
  transition:transform .12s ease,border-color .12s ease,box-shadow .12s ease,background .12s ease;
}
.tile:nth-child(1) .tile-face{border-left-color:var(--raspberry)}
.tile:nth-child(2) .tile-face{border-left-color:var(--lilac-ink)}
.tile:nth-child(3) .tile-face{border-left-color:var(--pine)}
.tile:hover .tile-face{background:#fffdf5;transform:translateY(-1px);box-shadow:var(--shadow-soft)}
.tile input:focus-visible + .tile-face{box-shadow:var(--ring)}
.tile-title{font-weight:600;font-size:15px;color:var(--ink)}
.tile-hint{font-size:12px;color:var(--ink-soft)}
.tile input:checked + .tile-face{border-color:var(--gold-600);background:rgba(239,194,76,.1)}

.actions{margin-top:6px}
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  gap:8px;padding:13px 22px;
  border-radius:999px;border:1px solid transparent;
  font-weight:600;font-size:16px;cursor:pointer;
  transition:transform .1s ease,box-shadow .12s ease,background .12s ease;
}
.btn.primary{background:var(--raspberry);color:#fff;box-shadow:0 10px 24px rgba(214,59,114,.32)}
.btn.primary:hover{background:var(--raspberry-600);transform:translateY(-1px)}
.btn.primary:focus-visible{box-shadow:var(--ring)}
.btn:disabled{opacity:.55;cursor:not-allowed;box-shadow:none;transform:none}
.btn.ghost{background:transparent;border-color:var(--border);color:var(--ink)}
.btn.ghost:hover{border-color:var(--ink-soft)}

.site-footer{
  max-width:1100px;
  margin:32px auto 44px;
  padding:0 16px;
  display:flex;align-items:center;justify-content:center;
  gap:10px;
  color:var(--ink-soft);
  text-align:center;
  font-size:14px;
}
.site-footer img{
  width:30px;height:30px;border-radius:50%;object-fit:cover;border:1px solid var(--border);background:#fff;
}
.site-footer a{
  color:var(--raspberry-600);
  text-underline-offset:3px;
  font-weight:600;
  text-decoration:none;
}
.site-footer a:hover{text-decoration:underline}

@media(max-width:899px){
  .poster{display:flex;flex-direction:column}
  .poster .facts{order:-1;margin:0 0 12px}
}

@media(prefers-reduced-motion:reduce){
  *{transition:none!important;animation:none!important}
}

.popup{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(42,37,89,.55);
  justify-content:center;
  align-items:center;
  z-index:1000;
}
.popup-content{
  background:var(--card);
  padding:24px;
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow);
  max-width:480px;
  text-align:center;
}
.popup-content h2{margin-top:0;color:var(--ink)}
.popup-content p{margin:16px 0;color:var(--ink-soft)}
.close-btn{
  background:var(--raspberry);
  color:#fff;
  border:none;
  padding:11px 22px;
  border-radius:999px;
  font-weight:600;
  font-family:'Fredoka',sans-serif;
  cursor:pointer;
}
.close-btn:hover{background:var(--raspberry-600)}
