@font-face{font-family:Oswald;src:url('./oswald-bold.ttf') format('truetype');font-weight:400 700;font-display:swap}
:root{color-scheme:light;--paper:#eeeae3;--ink:#191919;--accent:#bc2627;--line:#b7b2a9;--muted:#56524c}
*{box-sizing:border-box}html{-webkit-text-size-adjust:100%}body{margin:0;background:#353431;color:var(--ink);font-family:Georgia,'Times New Roman',serif}button{font:inherit;cursor:pointer;border-radius:0;touch-action:manipulation}button:disabled{cursor:default;opacity:.5}button:focus-visible{outline:3px solid #161616;outline-offset:3px}[hidden]{display:none!important}
.page{width:100%;max-width:480px;margin:auto;position:relative;isolation:isolate;background:var(--paper);min-height:100svh;min-height:var(--tg-viewport-stable-height,100svh);padding:0 28px 28px;overflow:hidden}
.scene-art{position:absolute;inset:0;z-index:-2;background-image:url('./folk-collage.png');background-size:300% 100%;background-position:0 0;pointer-events:none;min-height:100svh}
.site-header{height:115px;display:flex;align-items:center;position:relative;z-index:2}.logo-img{width:167px;height:79px;display:block}main{position:relative}.mini-screen{min-height:calc(100svh - 164px);display:flex;flex-direction:column;position:relative;padding:0 0 12px}.mini-screen:focus{outline:none}
h1,h2,h3,.primary-btn,.secondary-mini-btn,.share-mini-btn,.big-result,.stats-head strong,.card-brand{font-family:Oswald,'Arial Narrow',Impact,sans-serif;font-weight:700}h1{font-size:clamp(42px,11.6vw,58px);letter-spacing:-.045em;line-height:1.08;margin:8px 0 20px}h2{font-size:clamp(29px,7.6vw,37px);line-height:1.14;margin:24px 0 18px;letter-spacing:-.025em}h3{font-size:27px;line-height:1.15;margin:0 0 12px}.hero-accent{color:var(--accent)}.lead{font-size:17px;line-height:1.32;margin:0 0 18px;max-width:67%}p{line-height:1.4}.eyebrow{display:none}.primary-btn,.secondary-mini-btn,.share-mini-btn{width:100%;min-height:54px;border:0;padding:13px 15px;display:flex;align-items:center;justify-content:space-between;font-size:19px;line-height:1.3;background:var(--ink);color:#fff;margin-top:16px}.primary-btn span{font-family:Arial,sans-serif;font-weight:400}.secondary-mini-btn,.share-mini-btn{border:1px solid #726e68;background:#f3f0e8e8;color:var(--ink);justify-content:center;font-size:17px;min-height:49px}.primary-btn:active,.secondary-mini-btn:active,.share-mini-btn:active{transform:translateY(1px)}
#intro-screen h1,#connect-screen h1{text-transform:uppercase;max-width:88%;margin:0 0 18px;color:var(--ink)}#connect-screen h1 .hero-accent{color:var(--ink)}#intro-screen .primary-btn,#connect-screen .primary-btn{margin-top:auto;background:var(--accent)}.intro-facts{display:flex;gap:10px;flex-wrap:wrap;font-size:11px;line-height:1.4;margin:8px 0 0;max-width:75%}.intro-facts span{background:#eeeae3da;padding:3px 5px}.resume{font-size:12px;line-height:1.4;max-width:72%;margin:9px 0 180px;background:#eeeae3c9;padding:6px 0}.notice{background:#f5f1e8ec;border:1px solid var(--line);padding:14px;font-size:13px;line-height:1.45;margin:16px 0}.loader{font:12px/1.4 Arial,sans-serif;min-height:0;margin-top:8px}.loader:empty{display:none}.status-error{color:#9e1d20}.site-footer{position:absolute;bottom:0;left:0;right:0;text-align:center;padding:8px;background:#f6f4eee8;color:#777;font:10px Georgia,serif;height:28px}
/* Question: a single birch margin, with a quiet paper backing under live copy. */
.page[data-screen='question-screen'],.page[data-screen='statistics-screen']{padding-top:18px}.page[data-screen='question-screen'] .site-header,.page[data-screen='statistics-screen'] .site-header{display:none}.page[data-screen='question-screen'] .scene-art,.page[data-screen='statistics-screen'] .scene-art{background-position:50% 0}.page[data-screen='question-screen']:not(.feedback-mode) .scene-art:after,.page[data-screen='statistics-screen'] .scene-art:after{content:'';position:absolute;inset:0 25px 0 0;background:linear-gradient(#eeeae3c0,#eeeae3f9 42%,#eeeae3f9)}
#question-screen{min-height:calc(100svh - 58px)}.quiz-head{display:flex;justify-content:space-between;align-items:center;font:14px Oswald,sans-serif;padding:0 0 10px}.time-chip{font-size:17px;font-variant-numeric:tabular-nums}.time-chip:before{content:'◷';margin-right:7px}.time-chip.urgent,.time-chip.expired{color:var(--accent)!important}.timer-track{height:5px;background:#aaa59d;order:1;margin:0 0 14px}.timer-track>div{height:100%;background:var(--accent);transition:width .2s linear}.quiz-head{order:0}.test-label{order:2;font:10px Arial,sans-serif;letter-spacing:.08em;color:var(--muted)}.quiz-progress{display:none}#question-text{order:4;margin-top:28px}.description-text{order:3;font-size:16px;line-height:1.5;white-space:pre-wrap;background:#f6f3edeb;border-left:2px solid var(--accent);padding:14px;margin-top:18px;overflow-wrap:anywhere}.question-options{order:5;display:grid;gap:9px;margin:4px 0 20px}.question-choice{min-height:49px;display:flex;align-items:center;gap:12px;text-align:left;background:#f5f2ebe6;border:1px solid var(--line);padding:11px 13px;font:16px/1.3 Georgia,serif;color:var(--ink);overflow-wrap:anywhere}.question-choice.selected{background:var(--accent);color:#fff;border-color:var(--accent)}.question-choice:disabled{opacity:1}.marker{width:17px;height:17px;flex:0 0 17px;border:1px solid #8c8982;border-radius:50%;font-size:0}.selected .marker{border-color:#fff;box-shadow:inset 0 0 0 4px var(--accent);background:#fff}.question-choice.right{border-color:#222}.explanation{order:6;font-size:17px;line-height:1.5;margin:28px 0;max-width:92%;background:#eeeae3d9;padding:10px 0}.explanation strong{font:50px/1.1 Oswald,sans-serif;color:var(--accent);display:block;margin-bottom:16px}.explanation p{margin:0;white-space:pre-wrap}.feedback-mode #question-text,.feedback-mode #description,.feedback-mode #options,.feedback-mode #question-type{display:none!important}.feedback-mode .explanation{margin-bottom:250px}.feedback-mode #answer-btn{background:var(--accent)}#answer-btn{order:7;margin-top:auto;position:sticky;bottom:12px;z-index:3}#question-status{order:8}
/* Result: portrait occupies the right edge, live result remains on the left. */
.page[data-screen='finish-screen'] .scene-art{background-position:100% 0}.page[data-screen='finish-screen'] .scene-art:after{content:'';position:absolute;inset:53% 0 0;background:linear-gradient(transparent,#eeeae3 32%)}#finish-screen h1{font-size:45px;margin:0 0 8px;max-width:65%;font-weight:400;letter-spacing:-.025em}.big-result{font-size:108px;line-height:1;color:var(--accent);letter-spacing:-.06em;margin:4px 0 18px}.big-result small{font-size:32px;letter-spacing:-.03em}#result-joke{font-size:16px;max-width:60%;min-height:85px}#finish-screen .share-mini-btn{margin-top:auto}#stats-pending{margin-top:16px}.subscription-panel{background:#f6f2e9ed;padding:15px;border:1px solid #b4afa5;margin:10px 0}.subscription-panel h3{font-size:23px}.subscription-panel p{font-size:13px;margin:8px 0}.subscription-panel .primary-btn{font-size:16px;min-height:45px;background:var(--accent)}.subscription-panel .secondary-mini-btn{font-size:15px;min-height:42px}.subscription-message{font-size:12px}.saved-note{font-size:11px;text-align:center;color:var(--muted);margin-bottom:0}.stats{display:grid;gap:25px;margin:27px 0}.stats-head{display:flex;justify-content:space-between;align-items:baseline;gap:6px;margin-bottom:8px;font:11px Arial,sans-serif}.stats-head strong{font-size:17px;white-space:nowrap}.stats-track{height:8px;display:flex;background:#aaa69f}.stats-good{background:var(--accent)}.stats-bad{background:#a9a59e}#statistics-screen{min-height:calc(100svh - 58px)}#stats-section>.eyebrow{display:block;font:37px/1.15 Oswald,sans-serif;max-width:90%;letter-spacing:-.03em;margin-top:20px}#stats-section>.eyebrow::first-line{color:var(--ink)}.stat-caption{font-size:12px;max-width:85%}#stats-back-btn{margin-top:auto}
/* Sharing is an explicit preview before Telegram's native send dialog. */
.page[data-screen='share-screen'] .site-header{display:none}.page[data-screen='share-screen']{padding-top:24px}.page[data-screen='share-screen'] .scene-art{background:none}.share-card{position:relative;background:var(--paper) url('./folk-collage.png') 100% 0/300% 100%;min-height:470px;padding:24px 19px;box-shadow:0 2px 10px #0002}.share-card h1{font-size:44px;text-transform:uppercase;margin-top:32px}.share-card .big-result{font-size:97px}.share-card p{font-size:12px;max-width:63%}.card-brand{font-size:21px}.share-card .card-brand{display:inline-block;background:#161616;color:#fff;padding:9px 12px;border-radius:50% 0 0 50%}#share-screen{min-height:calc(100svh - 67px)}#share-screen .primary-btn{margin-top:20px}#share-screen .secondary-mini-btn{margin-bottom:8px}
.page[data-screen='completed-screen'] .scene-art{background-position:0 0}#completed-screen h1{font-size:40px;margin-top:16px}#completed-screen .lead{font-size:15px;max-width:90%;margin:0 0 22px}#completed-result-btn{background:#ddd9d0;color:var(--ink);border:1px solid var(--line)}
.page[data-screen='loading-screen'] .site-header{position:absolute;top:27%;left:50%;transform:translateX(-50%);height:auto}.page[data-screen='loading-screen'] .scene-art{background-position:0 0}#loading-screen{min-height:calc(100svh - 40px);justify-content:center;align-items:center;padding-bottom:100px}#loading-screen p{text-align:center;font-size:21px;line-height:1.2;margin:18px 0}.loading-emblem{width:56px;height:56px;border-radius:50%;background:var(--accent);margin-top:100px}.loading-track{width:130px;height:3px;background:#aaa;position:relative;overflow:hidden}.loading-track:after{content:'';position:absolute;width:45%;height:100%;background:var(--accent);animation:load 1.2s infinite ease-in-out}@keyframes load{from{left:-45%}to{left:100%}}
@media(max-width:350px){.page{padding-left:21px;padding-right:21px}.site-header{height:100px}.logo-img{width:145px}.lead{font-size:15px}.resume{margin-bottom:155px}.big-result{font-size:91px}#result-joke{font-size:14px}.stats-head{font-size:10px}.share-card{min-height:430px}.share-card h1{font-size:39px}}
@media(min-height:800px){#intro-screen .resume,#connect-screen .resume{margin-bottom:230px}.feedback-mode .explanation{margin-bottom:310px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

.card-logo{display:block;width:150px;height:auto}.page[data-screen="completed-screen"] .site-header{visibility:hidden}
/* The supplied PNG has transparent margins; display its original proportions. */
.logo-img{width:192px;height:192px;object-fit:contain;margin-left:-13px;flex-shrink:0}.card-logo{width:172px;height:172px;object-fit:contain;margin:-52px 0 -52px -11px}.page[data-screen='loading-screen'] .logo-img{margin-left:0}
.page[data-screen='loading-screen'] .site-header{top:30%;height:80px;transform:translate(-50%,-50%)}
.page[data-screen='completed-screen'] .site-header{display:none}.page[data-screen='completed-screen']{padding-top:34px}#completed-screen{min-height:calc(100svh - 74px)}
.share-card p{position:relative;background:#eeeae3e6;padding:5px 7px;margin-left:-7px;max-width:70%}


/* 2026-10-12 visual fix: restore the artwork's exact original sizing.
   The temporary 110% height stretched the red sun into an ellipse. */
.page .scene-art {
  background-size: 300% 100%;
  /* Keep the printed bot handle out of every screen, without modifying
     the picture's geometry or putting a block on top of buttons/text. */
  -webkit-mask-image: linear-gradient(to bottom,
    #000 0%, #000 91%, transparent 95%, transparent 100%);
  mask-image: linear-gradient(to bottom,
    #000 0%, #000 91%, transparent 95%, transparent 100%);
}
/* Share poster is separate from scene-art. Keep it undistorted too. */
.page .share-card { background-size: 300% 100%; }
.page .share-card::after {
  content:"";
  position:absolute;
  left:0;right:0;bottom:0;
  height:45px;
  pointer-events:none;
  background:linear-gradient(to bottom,rgba(238,234,227,0),var(--paper) 65%);
}
.page .site-footer,
.page .bot-footer,
.page .app-footer,
.page [data-footer-handle] {display:none!important}



/* EXACT APPROVED COMPLETED SCREEN (2026-10-12)
   Uses precisely the user's last approved screenshot, without redrawing.
   The title/copy/button are printed in that approved artwork. The existing
   real HTML button stays over the illustrated button, retaining functionality.
   Every other Mini App screen uses its former presentation unchanged. */
.page[data-screen="completed-screen"]{
  padding:0;
  background:#eeeae3;
  background-image:none;
  min-height:max(100svh, min(177.68vw, 853px));
}
.page[data-screen="completed-screen"] .site-header{display:none}
.page[data-screen="completed-screen"] .scene-art{
  inset:0;
  min-height:100svh;
  background-image:url('./completed-sun-fixed-20261024.webp');
  background-size:100% auto;
  background-repeat:no-repeat;
  background-position:center top;
  -webkit-mask-image:none;
  mask-image:none;
}
.page[data-screen="completed-screen"] .scene-art::before,
.page[data-screen="completed-screen"] .scene-art::after{
  content:none!important;
  display:none!important;
}
.page[data-screen="completed-screen"] main{
  position:absolute;
  inset:0;
  z-index:2;
  padding:0;
}
.page[data-screen="completed-screen"] #completed-screen{
  display:block;
  position:relative;
  min-height:100svh;
  padding:0;
  margin:0;
}
.page[data-screen="completed-screen"] #completed-screen h1,
.page[data-screen="completed-screen"] #completed-screen .lead{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}
.page[data-screen="completed-screen"] #completed-result-btn{
  position:absolute!important;
  top:min(64.4vw,309px);
  left:7.4%;
  width:85.2%;
  height:min(13vw,62px);
  min-height:44px;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:transparent!important;
  opacity:0;
  box-shadow:none!important;
  z-index:5;
  pointer-events:auto;
}


/* My Result — keep portrait and landscape at their intrinsic proportions.
   The former "300% 100%" independently stretched the 3-panel collage
   to the card's computed height, compressing the woman on some phones.
   Change sizing only; retain existing fonts, score and share controls. */
.page[data-screen="share-screen"] .share-card {
  aspect-ratio: 505 / 719;
  background-size: 304% auto;
  background-position: right top;
  background-repeat: no-repeat;
}

/* Match the personalized score comment from the finish screen.
   Keep the artwork's 505:719 proportion and reserve the portrait on the right. */
.page[data-screen="share-screen"] .share-card .share-comment {
  position:relative;
  z-index:1;
  max-width:66%;
  margin:14px 0 0;
  padding:0;
  background:transparent;
  box-shadow:none;
  color:var(--ink);
  font:clamp(13px,3.5vw,17px)/1.22 Georgia,"Times New Roman",serif;
  white-space:pre-line;
  overflow-wrap:anywhere;
}
.page[data-screen="share-screen"] .share-card .share-comment.is-long{
  font-size:clamp(12px,3vw,14px);
  line-height:1.20;
}
.page[data-screen="share-screen"] .share-card .share-comment.is-very-long{
  font-size:11px;
  line-height:1.14;
}
@media(max-width:350px){
  .page[data-screen="share-screen"] .share-card .share-comment{
    font-size:12px;
    line-height:1.22;
  }
  .page[data-screen="share-screen"] .share-card .share-comment.is-very-long{
    font-size:11px;
    line-height:1.14;
  }
}

/* Only the share card: keep “РЕЗУЛЬТАТ” clear of the model's face. */
.page[data-screen="share-screen"] .share-card h1 .hero-accent {
  display: inline-block;
  font-size: clamp(28px, 8vw, 32px);
  line-height: 1.02;
  letter-spacing: -.035em;
  white-space: nowrap;
}


/* Result screen (not share screen): do not vertically distort the photographic
   collage when the subscription/statistics content makes this page taller.
   The rightmost third of folk-collage.png belongs to this screen. */
.page[data-screen="finish-screen"] .scene-art {
  background-size: 304% auto;
  background-position: right top;
  background-repeat: no-repeat;
  background-color: var(--paper);
}

/* Story sharing: variant B copy below the approved poster.
   No transformations or extra overlays on the original artwork. */
#share-screen .share-owner-copy{
  margin:15px 0 0;
  padding:0 2px;
  color:var(--ink);
  font:16px/1.38 Georgia,"Times New Roman",serif;
}
#share-screen #share-send-btn{
  margin-top:15px;
}
#share-screen #share-story-btn{
  margin-top:9px;
  min-height:52px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding-left:15px;
  padding-right:15px;
  background:#f3f0e8;
  font-size:17px;
}
#share-screen .share-story-status{
  font:12px/1.42 Arial,sans-serif;
  color:#56524c;
  margin:8px 0 0;
  min-height:0;
}
#share-screen .share-story-status:empty{
  display:none;
}
#share-screen .share-story-status.status-error{
  color:#9e1d20;
}

/* The third collage panel starts with a white separator. Crop that gutter
   with a small uniform zoom; keep the portrait at its intrinsic proportions. */

/* Telegram desktop: keep this tall poster scrollable without a dark scrollbar gutter. */
html.completed-view,
html.completed-view body{scrollbar-width:none}
html.completed-view::-webkit-scrollbar,
html.completed-view body::-webkit-scrollbar{display:none;width:0;height:0}
