:root {
  color-scheme: light;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: #294f52;
  background: #e9f3ed;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 7% 4%, rgba(255,255,255,.95), transparent 18%),
    radial-gradient(circle at 94% 13%, rgba(216,240,222,.82), transparent 23%),
    #e9f3ed;
}

button { font: inherit; }
button:focus-visible { outline: 4px solid rgba(242,183,72,.5); outline-offset: 3px; }

.app {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 0 44px;
}

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.brand,.sound-button,.quiet-button,.hint-button,.next-level-button { border: 0; cursor: pointer; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0; color: #294f52; text-align: left; background: transparent; }
.brand-mark { display: grid; width: 61px; height: 49px; place-items: center; overflow: hidden; }
.brand-mark .ship { width: 61px; transform: translateY(3px); }
.brand strong,.brand small { display: block; }
.brand strong { font-size: 18px; line-height: 1.05; }
.brand small { margin-top: 3px; color: #66817b; font-size: 12px; font-weight: 700; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.sound-button,.quiet-button,.hint-button,.next-level-button { min-height: 46px; padding: 0 17px; border: 2px solid #c9ded4; border-radius: 16px; color: #385d5c; font-weight: 800; background: rgba(255,255,255,.84); box-shadow: 0 6px 14px rgba(43,82,75,.06); }
.sound-button { display: flex; align-items: center; gap: 8px; }
.quiet-button:hover,.sound-button:hover,.hint-button:hover:not(:disabled),.next-level-button:hover { border-color: #8fbbb0; transform: translateY(-1px); }
.quiet-button.large { min-height: 54px; }

.eyebrow { margin: 0 0 10px; color: #43847a; font-size: 13px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
h1,h2,p { margin-top: 0; }
h1,h2 { color: #294f52; line-height: 1.07; letter-spacing: -.035em; }
.primary-button { min-height: 56px; padding: 0 24px; border: 0; border-radius: 18px; color: #fff; font: 900 17px/1 "Trebuchet MS","Segoe UI",sans-serif; cursor: pointer; background: #df735d; box-shadow: 0 10px 0 #b75843,0 16px 24px rgba(168,73,51,.2); transition: transform .15s,box-shadow .15s; }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 12px 0 #b75843,0 19px 26px rgba(168,73,51,.2); }
.primary-button:active { transform: translateY(7px); box-shadow: 0 3px 0 #b75843; }
.primary-button span { margin-left: 8px; }
.primary-button.compact { min-height: 47px; padding: 0 18px; font-size: 15px; box-shadow: 0 7px 0 #b75843; }

.hero { position: relative; display: grid; grid-template-columns: 1.04fr .96fr; min-height: 448px; overflow: hidden; border: 1px solid rgba(255,255,255,.78); border-radius: 36px; background: #fbf3dd; box-shadow: 0 22px 52px rgba(39,83,73,.13); }
.hero-copy { position: relative; z-index: 8; align-self: center; padding: 48px 16px 48px 52px; }
.hero h1 { max-width: 590px; margin-bottom: 19px; font-size: clamp(36px,4.25vw,59px); }
.hero-copy > p:not(.eyebrow) { max-width: 555px; margin-bottom: 27px; color: #5a736c; font-size: 17px; line-height: 1.55; }
.hero-scene { position: relative; min-height: 448px; overflow: hidden; background: linear-gradient(180deg,#a9dcdb 0 48%,#3fa5b1 49%,#137a93 100%); clip-path: ellipse(88% 84% at 100% 50%); }
.ship { display: block; width: 100%; height: auto; }
.hero-sun { position: absolute; top: 10%; right: 12%; width: 74px; height: 74px; border-radius: 50%; background: #f5cc63; box-shadow: 0 0 0 14px rgba(255,224,133,.2); }
.hero-clouds i,.scene-sky i { position: absolute; display: block; width: 95px; height: 27px; border-radius: 40px; opacity: .72; background: #fff; }
.hero-clouds i::before,.hero-clouds i::after,.scene-sky i::before,.scene-sky i::after { position: absolute; bottom: 7px; border-radius: 50%; content: ""; background: inherit; }
.hero-clouds i::before,.scene-sky i::before { left: 16px; width: 39px; height: 39px; }
.hero-clouds i::after,.scene-sky i::after { right: 14px; width: 48px; height: 48px; }
.hero-clouds i:first-child { top: 18%; left: 8%; transform: scale(.65); }
.hero-clouds i:last-child { top: 8%; right: 35%; transform: scale(.43); }
.hero-ship { position: absolute; z-index: 5; left: 5%; bottom: 13%; width: 62%; filter: drop-shadow(0 14px 8px rgba(11,67,77,.22)); transform: rotate(-2deg); }
.hero-island { position: absolute; z-index: 3; right: -4%; bottom: 12%; width: 42%; height: 68px; border-radius: 50% 50% 0 0; font-size: 75px; background: #e2bd73; }
.hero-island span { position: absolute; right: 28%; bottom: 23px; }
.hero-island b { position: absolute; right: 19%; bottom: 9px; font-size: 39px; }
.hero-chest { position: absolute; z-index: 7; top: 15%; left: 7%; display: grid; min-width: 125px; padding: 13px 16px; border: 3px solid rgba(255,255,255,.78); border-radius: 20px; color: #294f52; text-align: center; background: rgba(255,246,210,.88); box-shadow: 0 12px 24px rgba(34,78,75,.16); }
.hero-chest span { position: absolute; top: -24px; right: -13px; font-size: 35px; }
.hero-chest strong { font-size: 25px; }
.hero-chest b { color: #df735d; font-size: 20px; }
.hero-waves { position: absolute; z-index: 6; right: 0; bottom: 8%; left: 0; height: 28px; opacity: .65; background: radial-gradient(20px 11px at 50% 0,transparent 48%,#d9ffff 52% 63%,transparent 67%) 0 0/40px 22px repeat-x; }

.how,.levels { padding: 48px 14px 0; }
.how > .eyebrow { text-align: center; }
.how-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 15px; }
.how-grid article { display: grid; grid-template-columns: 52px 1fr; gap: 3px 14px; padding: 19px; border: 1px solid #d7e7df; border-radius: 23px; background: rgba(255,255,255,.72); }
.how-grid article > span { grid-row: 1/3; display: grid; width: 52px; height: 52px; place-items: center; border-radius: 17px; color: #fff; font-size: 24px; font-weight: 900; background: #df735d; }
.how-grid article:nth-child(2) > span { background: #3f9475; }
.how-grid article:nth-child(3) > span { background: #667bc2; }
.how-grid strong { align-self: end; font-size: 17px; }
.how-grid p { margin: 2px 0 0; color: #67817b; font-size: 13px; line-height: 1.4; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 20px; }
.section-heading h2 { margin: 0; font-size: clamp(29px,4vw,42px); }
.section-heading > p { max-width: 425px; margin: 0; color: #66807a; line-height: 1.45; }
.level-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.level-card { position: relative; display: flex; min-width: 0; min-height: 330px; overflow: hidden; flex-direction: column; padding: 0; border: 2px solid rgba(255,255,255,.9); border-radius: 27px; color: #294f52; text-align: left; cursor: pointer; background: #fff; box-shadow: 0 12px 25px rgba(43,84,77,.09); transition: transform .18s,box-shadow .18s; }
.level-card:hover { transform: translateY(-5px); box-shadow: 0 19px 35px rgba(43,84,77,.15); }
.level-number { position: absolute; z-index: 6; top: 13px; left: 13px; display: grid; width: 38px; height: 38px; place-items: center; border: 3px solid rgba(255,255,255,.9); border-radius: 50%; color: #fff; font-weight: 900; background: var(--accent); }
.level-preview { position: relative; display: block; height: 145px; overflow: hidden; background: linear-gradient(180deg,#b9e0de 0 50%,#3ca1ae 51%,#247e98 100%); }
.blue .level-preview { background: linear-gradient(180deg,#a9d5df 0 50%,#357eaa 51%,#285d8a 100%); }
.preview-sun { position: absolute; top: 13px; right: 18px; width: 36px; height: 36px; border-radius: 50%; background: #f3ca61; }
.preview-ship { position: absolute; z-index: 3; bottom: 4px; left: 17%; width: 50%; }
.preview-island { position: absolute; right: 7px; bottom: 7px; font-size: 37px; }
.preview-example { position: absolute; z-index: 5; top: 18px; right: 12px; padding: 7px 10px; border-radius: 12px; color: #fff; background: rgba(38,79,82,.52); }
.level-copy { display: flex; flex: 1; flex-direction: column; padding: 19px 19px 10px; }
.level-copy small { color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.level-copy strong { margin: 5px 0 7px; font-size: 22px; }
.level-copy em { color: #69817c; font-size: 14px; font-style: normal; line-height: 1.42; }
.level-status { display: flex; min-height: 52px; align-items: center; justify-content: space-between; margin: 0 18px; border-top: 1px solid #e2ece7; color: #68817b; font-size: 13px; font-weight: 800; }
.level-status b { color: var(--accent); font-size: 24px; }
.mini-stars { color: #ecb63f; letter-spacing: 2px; }
.adult-note { display: flex; align-items: center; gap: 18px; margin: 34px 14px 0; padding: 20px 24px; border: 1px solid #cfe3d6; border-radius: 22px; background: rgba(228,244,231,.86); }
.adult-note > span { font-size: 34px; }
.adult-note p { margin: 0; color: #5e776f; line-height: 1.5; }
.adult-note strong { display: block; color: #386b60; }

.game-shell { padding: 28px; border: 1px solid rgba(255,255,255,.9); border-radius: 34px; background: rgba(250,253,248,.82); box-shadow: 0 20px 48px rgba(39,83,73,.12); }
.game-head { display: flex; align-items: end; justify-content: space-between; gap: 22px; }
.game-head h1 { margin: 0; font-size: clamp(26px,3.7vw,43px); }
.round-count { display: flex; align-items: baseline; gap: 5px; color: #78918b; }
.round-count strong { color: var(--level-accent); font-size: 35px; }
.round-count span { font-weight: 900; }
.progress-track { display: grid; grid-template-columns: repeat(10,1fr); gap: 7px; margin: 20px 0; }
.progress-track i { height: 8px; border-radius: 999px; background: #dbe8e2; }
.progress-track i.done { background: var(--level-accent); }
.progress-track i.current { background: #f2c65d; box-shadow: 0 0 0 3px rgba(242,198,93,.24); }
.division-game { display: grid; grid-template-columns: minmax(0,1.04fr) minmax(365px,.96fr); gap: 20px; }

.share-scene { position: relative; min-height: 465px; overflow: hidden; border: 5px solid #f8fbf2; border-radius: 29px; background: linear-gradient(180deg,#b8dfdb 0 34%,#7fc6c3 35%,#b77b4f 36%,#895837 100%); box-shadow: inset 0 0 42px rgba(34,73,61,.12),0 9px 21px rgba(33,83,91,.12); }
.scene-sky i:first-child { top: 13%; left: 8%; transform: scale(.58); }
.scene-sky i:last-child { top: 7%; right: 9%; transform: scale(.4); }
.ship-rail { position: absolute; right: 0; bottom: 0; left: 0; height: 71px; border-top: 7px solid #294f52; background: repeating-linear-gradient(90deg,#a96d45 0 46px,#925b39 47px 52px); }
.ship-rail i { position: absolute; top: -67px; width: 12px; height: 68px; border: 4px solid #294f52; background: #bc7c4c; }
.ship-rail i:first-child { left: 8%; }
.ship-rail i:nth-child(2) { left: 49%; }
.ship-rail i:last-child { right: 8%; }
.loot-chest { position: absolute; z-index: 4; top: 57px; left: 50%; display: grid; width: 143px; min-height: 94px; place-items: center; padding: 28px 9px 9px; border: 6px solid #294f52; border-radius: 13px; color: #fff6d5; text-align: center; background: #9b603c; box-shadow: inset 0 11px 0 #cd8954,0 11px 18px rgba(53,45,32,.18); transform: translateX(-50%); }
.loot-chest::before { position: absolute; top: -34px; right: -6px; left: -6px; height: 42px; border: 6px solid #294f52; border-radius: 55px 55px 8px 8px; content: ""; background: #c9824e; transform-origin: bottom; transition: transform .4s; }
.loot-chest.open::before { transform: rotateX(52deg) translateY(-9px); }
.loot-chest > span { position: absolute; z-index: 2; top: -33px; right: 10px; font-size: 33px; opacity: 0; transform: translateY(14px); transition: opacity .4s,transform .4s; }
.loot-chest.open > span { opacity: 1; transform: translateY(-15px); }
.loot-chest strong { font-size: 31px; }
.loot-chest small { font-size: 10px; font-weight: 800; }
.share-arrow { position: absolute; z-index: 5; top: 112px; right: 12%; padding: 8px 12px; border: 3px solid rgba(255,255,255,.7); border-radius: 14px; color: #294f52; font-size: 20px; font-weight: 900; background: rgba(255,247,211,.84); }
.crew-grid { position: absolute; z-index: 5; right: 5%; bottom: 73px; left: 5%; display: grid; grid-template-columns: repeat(5,1fr); gap: 6px; align-items: end; justify-content: center; }
.crew-grid.count-2 { grid-template-columns: repeat(2,80px); }
.crew-grid.count-3 { grid-template-columns: repeat(3,75px); }
.crew-grid.count-4 { grid-template-columns: repeat(4,67px); }
.crew-member { position: relative; display: grid; min-width: 0; justify-items: center; }
.crew-member > i { display: block; width: 52px; height: 60px; }
.pirate { display: block; width: 100%; height: 100%; }
.crew-member > b { position: relative; z-index: 3; display: grid; min-width: 39px; height: 27px; place-items: center; margin-top: -5px; border: 3px solid #294f52; border-radius: 8px 8px 14px 14px; color: #294f52; font-size: 15px; background: #f1c35a; }
.crew-member > small { color: #fff5cf; font-size: 8px; font-weight: 900; text-shadow: 0 1px 2px #5a3a27; }
.voyage-mark { position: absolute; z-index: 7; top: 15px; left: 16px; display: flex; align-items: center; gap: 7px; padding: 8px 11px; border: 2px solid rgba(255,255,255,.72); border-radius: 14px; color: #466963; background: rgba(255,255,255,.68); backdrop-filter: blur(5px); }
.voyage-mark strong { color: var(--level-accent); font-size: 21px; }
.voyage-mark span { font-size: 10px; font-weight: 900; }

.task-panel { display: flex; min-width: 0; min-height: 465px; flex-direction: column; padding: 22px; border: 2px solid #d8e8e2; border-radius: 29px; background: #fffdf5; }
.equation-board { padding: 21px 14px; border: 2px dashed #bbd5cb; border-radius: 22px; text-align: center; background: #f0f7ef; }
.equation-board > small { display: block; margin-bottom: 7px; color: #65827b; font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.equation-board > div { display: flex; align-items: center; justify-content: center; gap: 11px; }
.equation-board strong,.equation-board b { font-size: clamp(38px,4.7vw,58px); }
.equation-board i { color: #77918a; font-size: 34px; font-style: normal; font-weight: 900; }
.equation-board b { color: var(--level-accent); }
.task-tip { display: grid; min-height: 125px; place-items: center; margin: 7px 0; color: #728a84; text-align: center; font-size: 14px; font-weight: 800; }
.distribution-hint { min-height: 139px; padding: 7px 0 3px; text-align: center; }
.distribution-hint > small { display: block; margin-bottom: 6px; color: #668078; font-size: 10px; font-weight: 800; }
.share-purses { display: grid; max-height: 97px; overflow: auto; grid-template-columns: repeat(auto-fit,minmax(50px,1fr)); gap: 4px; }
.share-purses > span { position: relative; display: flex; min-height: 40px; align-items: center; gap: 3px; padding: 5px; border: 2px solid #d0ddd2; border-radius: 8px 8px 14px 14px; background: #f6e7bb; }
.share-purses > span > small { display: grid; width: 16px; height: 16px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; font-size: 8px; font-weight: 900; background: var(--level-accent); }
.share-purses > span > i { display: grid; flex: 1; grid-template-columns: repeat(3,7px); gap: 2px; justify-content: center; }
.share-purses b { width: 7px; height: 7px; border: 1px solid #a87324; border-radius: 50%; background: #f2bf40; }
.distribution-hint > strong { display: block; margin-top: 4px; color: #4d716a; font-size: 11px; }

.map-options { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-top: auto; }
.map-option { position: relative; min-height: 87px; overflow: hidden; border: 3px solid #d3d3b8; border-radius: 12px 21px 12px 21px; color: #2d5759; cursor: pointer; background: #f7edc9; box-shadow: 0 6px 0 #d4c390; transition: transform .14s,border-color .14s; }
.map-option:hover:not(:disabled) { z-index: 2; border-color: #6eab96; transform: translateY(-3px) rotate(-1deg); }
.map-option:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 #d4c390; }
.map-option > small { position: absolute; top: 8px; left: 10px; color: #8b856b; font-weight: 900; }
.map-option strong { position: relative; z-index: 2; display: block; font-size: 34px; }
.map-option em { position: relative; z-index: 2; display: block; color: #73837c; font-size: 9px; font-style: normal; font-weight: 900; text-transform: uppercase; }
.map-option > span { position: absolute; inset: 0; opacity: .35; }
.map-option > span i:first-child { position: absolute; right: 14px; bottom: 13px; width: 37px; height: 24px; border: 2px dashed #7a9a82; border-radius: 50%; }
.map-option > span i:last-child { position: absolute; top: 12px; right: 25px; width: 12px; height: 12px; border: 3px solid #c18832; border-radius: 50%; background: #f2bf40; }
.map-option.wrong { border-color: #e59181; color: #9b4d42; background: #ffebe6; box-shadow: 0 6px 0 #dda99c; animation: shake .25s ease-in-out; }
.map-option.correct { border-color: #55a883; color: #fff; background: #58ad87; box-shadow: 0 6px 0 #368263; }
.map-option.correct em { color: rgba(255,255,255,.82); }
.map-option:disabled { cursor: default; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.game-tools { display: flex; justify-content: flex-end; margin: 14px 0; }
.hint-button:disabled { cursor: default; opacity: .48; }
.feedback-card { display: flex; min-height: 82px; align-items: center; gap: 14px; padding: 14px 18px; border: 2px solid #d5e5df; border-radius: 23px; background: #fff; }
.feedback-card.correct { border-color: #aedbc5; background: #eefaf2; }
.feedback-card.wrong { border-color: #edc3b8; background: #fff3ef; }
.feedback-card.hint { border-color: #e9d79e; background: #fff9df; }
.feedback-icon { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; border-radius: 16px; font-size: 25px; background: #e8f4f1; }
.feedback-card p { flex: 1; margin: 0; }
.feedback-card strong,.feedback-card small { display: block; }
.feedback-card strong { margin-bottom: 3px; }
.feedback-card small { color: #69817b; line-height: 1.35; }

.result-wrap { display: grid; min-height: 680px; padding: 40px 18px; place-items: center; overflow: hidden; border-radius: 35px; background: linear-gradient(180deg,#a9dcd8 0 55%,#328e9f 56%,#176b87 100%); box-shadow: 0 20px 46px rgba(31,77,83,.16); }
.result-card { width: min(660px,100%); padding: 32px 34px 35px; border: 4px solid rgba(255,255,255,.68); border-radius: 31px; text-align: center; background: #fffdf4; box-shadow: 0 21px 44px rgba(8,52,70,.23); }
.result-island { position: relative; height: 165px; margin: -8px auto 6px; overflow: hidden; }
.result-island > span { position: absolute; left: 7%; bottom: 1px; width: 43%; }
.result-island > b { position: absolute; right: 8%; bottom: 0; font-size: 105px; }
.result-island > i { position: absolute; right: 19%; bottom: 3px; font-size: 42px; font-style: normal; }
.result-island > em { position: absolute; right: 4%; bottom: 36px; font-size: 35px; font-style: normal; }
.result-card h1 { margin-bottom: 10px; font-size: clamp(35px,5vw,51px); }
.result-card > p:not(.eyebrow) { max-width: 490px; margin: 0 auto 10px; color: #637c76; line-height: 1.5; }
.result-stars { margin: 10px 0 18px; color: #efb83f; font-size: 42px; letter-spacing: 7px; }
.result-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 24px; }
.result-stats span { padding: 13px 8px; border-radius: 17px; background: #edf5ed; }
.result-stats strong,.result-stats small { display: block; }
.result-stats strong { color: #3f887a; font-size: 25px; }
.result-stats small { color: #6d837e; font-size: 11px; font-weight: 800; }
.result-actions { display: flex; justify-content: center; gap: 13px; }

@media (max-width: 1000px) {
  .hero-copy { padding-left: 38px; }
  .level-card { min-height: 344px; }
  .division-game { grid-template-columns: minmax(0,.96fr) minmax(355px,1.04fr); }
  .game-shell { padding: 23px; }
  .crew-member > i { width: 45px; height: 53px; }
}

@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 42px; }
  .hero-scene { min-height: 335px; clip-path: ellipse(78% 93% at 50% 100%); }
  .hero-ship { left: 22%; bottom: 9%; width: 44%; }
  .hero-island { width: 35%; }
  .hero-chest { left: 17%; }
  .how-grid { grid-template-columns: 1fr; }
  .level-grid { grid-template-columns: 1fr; }
  .level-card { display: grid; min-height: 180px; grid-template-columns: 37% 1fr; }
  .level-preview { height: 100%; min-height: 180px; grid-row: 1/3; }
  .level-copy { padding: 23px 20px 5px; }
  .level-status { align-self: end; }
  .division-game { grid-template-columns: 1fr; }
  .share-scene { min-height: 450px; }
  .task-panel { min-height: 455px; }
  .crew-member > i { width: 52px; height: 60px; }
}

@media (max-width: 700px) {
  .app { width: min(1120px,calc(100% - 20px)); padding-top: 10px; }
  .topbar { gap: 8px; margin-bottom: 12px; }
  .brand-mark { width: 49px; }
  .brand-mark .ship { width: 50px; }
  .brand strong { font-size: 15px; }
  .brand small { display: none; }
  .sound-button { width: 47px; padding: 0; justify-content: center; }
  .sound-button span:last-child { display: none; }
  .top-actions .quiet-button { padding: 0 12px; font-size: 13px; }
  .hero { border-radius: 26px; }
  .hero-copy { padding: 31px 23px 38px; }
  .hero h1 { font-size: clamp(34px,10vw,48px); }
  .hero-copy > p:not(.eyebrow) { font-size: 15px; }
  .hero-scene { min-height: 280px; }
  .hero-ship { left: 17%; width: 49%; }
  .hero-chest { top: 13%; left: 8%; }
  .hero-island { width: 38%; font-size: 59px; }
  .how,.levels { padding: 37px 2px 0; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 10px; }
  .adult-note { margin-right: 2px; margin-left: 2px; padding: 17px; }
  .game-shell { padding: 16px; border-radius: 25px; }
  .game-head { align-items: center; }
  .game-head .eyebrow { font-size: 10px; }
  .game-head h1 { font-size: 25px; }
  .round-count strong { font-size: 29px; }
  .share-scene { min-height: 420px; border-width: 3px; }
  .task-panel { min-height: 455px; padding: 17px; }
  .feedback-card.correct { flex-wrap: wrap; }
  .feedback-card.correct p { min-width: calc(100% - 70px); }
  .feedback-card.correct .primary-button { width: 100%; flex-basis: 100%; margin-top: 8px; }
  .result-wrap { min-height: 610px; padding: 25px 10px; border-radius: 27px; }
  .result-card { padding: 25px 16px 28px; }
  .result-actions { flex-direction: column; }
  .result-actions > * { width: 100%; }
}

@media (max-width: 520px) {
  .level-card { display: flex; min-height: 320px; }
  .level-preview { width: 100%; min-height: 135px; height: 135px; }
  .level-status { align-self: auto; width: calc(100% - 36px); }
  .crew-grid { right: 2%; left: 2%; gap: 2px; }
  .crew-grid.count-2 { grid-template-columns: repeat(2,70px); }
  .crew-grid.count-3 { grid-template-columns: repeat(3,65px); }
  .crew-grid.count-4 { grid-template-columns: repeat(4,58px); }
  .crew-member > i { width: 43px; height: 51px; }
  .crew-member > b { min-width: 34px; height: 24px; font-size: 13px; }
  .share-arrow { right: 5%; }
  .equation-board > div { gap: 7px; }
  .equation-board strong,.equation-board b { font-size: 40px; }
  .equation-board i { font-size: 27px; }
  .result-stats { gap: 5px; }
  .result-stats span { padding: 11px 4px; }
}

@media (max-width: 390px) {
  .app { width: calc(100% - 16px); }
  .top-actions .quiet-button { max-width: 90px; padding: 0 9px; font-size: 11px; }
  .primary-button { width: 100%; padding: 0 15px; }
  .hero-copy { padding-right: 18px; padding-left: 18px; }
  .hero h1 { font-size: 34px; }
  .hero-scene { min-height: 250px; }
  .hero-chest { min-width: 105px; padding: 10px; }
  .hero-chest strong { font-size: 21px; }
  .hero-island { right: -9%; }
  .how-grid article { padding: 15px; }
  .game-shell { padding: 12px; }
  .game-head h1 { font-size: 21px; }
  .round-count strong { font-size: 25px; }
  .progress-track { gap: 4px; margin: 14px 0; }
  .share-scene { min-height: 390px; }
  .loot-chest { top: 53px; transform: translateX(-50%) scale(.86); }
  .crew-grid { bottom: 68px; }
  .crew-member > i { width: 38px; height: 46px; }
  .crew-member > b { min-width: 30px; height: 22px; border-width: 2px; }
  .crew-member > small { display: none; }
  .share-arrow { top: 105px; padding: 6px 8px; font-size: 17px; }
  .task-panel { min-height: 445px; padding: 12px; }
  .equation-board { padding: 17px 6px; }
  .map-option { min-height: 83px; }
  .feedback-card { padding: 12px; }
  .feedback-icon { width: 42px; height: 42px; }
  .result-island { height: 135px; }
  .result-island > b { font-size: 82px; }
  .result-stars { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
