:root {
  color-scheme: light;
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
  color: #2d4b46;
  background: #f6f0df;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 88% 2%, rgba(255, 251, 229, .95) 0 12%, transparent 37%),
    radial-gradient(circle at 7% 42%, rgba(230, 215, 178, .34) 0 8%, transparent 29%),
    #f6f0df;
}

button { font: inherit; }
button:focus-visible { outline: 4px solid #efb64c; outline-offset: 3px; }

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

.topbar {
  min-height: 66px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.brand-mark {
  width: 67px;
  height: 52px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 17px;
  color: #fff;
  background: #3f9475;
  box-shadow: 0 6px 0 #2e6d56;
  transform: rotate(-2deg);
}

.brand-mark i {
  width: 14px;
  height: 14px;
  border: 3px solid #fff8e8;
  border-radius: 50%;
}

.brand-mark b { margin: 0 1px; font-size: 10px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 18px; }
.brand small { margin-top: 2px; color: #6e7b75; font-size: 12px; }
.top-actions { display: flex; gap: 10px; }

.sound-button,
.quiet-button,
.hint-button,
.next-level-button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #ded3bb;
  border-radius: 14px;
  color: #53655f;
  background: rgba(255, 255, 255, .76);
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.sound-button { display: flex; align-items: center; gap: 8px; }
.sound-button:hover, .quiet-button:hover, .hint-button:hover, .next-level-button:hover { background: #fff; transform: translateY(-1px); }
.sound-button:active, .quiet-button:active, .hint-button:active, .next-level-button:active { transform: translateY(1px); }

.eyebrow {
  margin: 0 0 8px;
  color: #79877f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.primary-button {
  min-height: 54px;
  padding: 0 24px;
  border: 0;
  border-radius: 17px;
  color: #fff;
  background: #438f70;
  box-shadow: 0 6px 0 #2f7258;
  font-weight: 900;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease;
}

.primary-button span { margin-left: 8px; }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 8px 0 #2f7258; }
.primary-button:active { transform: translateY(4px); box-shadow: 0 2px 0 #2f7258; }

.token {
  width: 25px;
  height: 25px;
  display: inline-block;
  flex: 0 0 auto;
  filter: drop-shadow(0 3px 0 rgba(57, 72, 59, .13));
}

.token.berry { border: 3px solid #a94d4d; border-radius: 50%; background: #df735d; }
.token.leaf { border: 3px solid #39795e; border-radius: 80% 18% 80% 18%; background: #66a981; transform: rotate(-28deg); }
.token.star { background: #efb84d; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 93%, 50% 72%, 21% 93%, 32% 57%, 2% 35%, 39% 35%); }
.token.drop { border: 3px solid #4779a2; border-radius: 50% 50% 55% 15%; background: #67acd4; transform: rotate(45deg); }
.mini-pair { padding: 4px 6px; display: inline-flex; align-items: center; gap: 3px; border: 2px solid rgba(255,255,255,.86); border-radius: 12px; background: rgba(255,250,238,.82); }
.mini-pair .token { width: 16px; height: 16px; border-width: 2px; }
.solo-token { align-self: center; }

.hero {
  min-height: 470px;
  display: grid;
  grid-template-columns: 1.06fr .94fr;
  overflow: hidden;
  border: 1px solid #ded3bc;
  border-radius: 34px;
  background: #fffaf0;
  box-shadow: 0 22px 65px rgba(75, 67, 45, .12);
}

.hero-copy { padding: 62px 28px 56px 58px; position: relative; z-index: 2; }
.hero h1 { max-width: 620px; margin: 0; color: #2f4d46; font-family: Georgia, serif; font-size: clamp(47px, 5vw, 64px); line-height: .99; letter-spacing: -.045em; }
.hero-copy > p:not(.eyebrow) { max-width: 570px; margin: 24px 0 30px; color: #65766f; font-size: 18px; line-height: 1.55; }
.hero-scene { min-width: 0; position: relative; overflow: hidden; background: linear-gradient(150deg, #d9ebe0, #94c8ad); }
.hero-scene::after { content: ""; width: 470px; height: 190px; position: absolute; right: -70px; bottom: -104px; border-radius: 50%; background: #70a56f; }
.hero-cloud { width: 102px; height: 31px; position: absolute; top: 52px; right: 38px; border-radius: 30px; background: rgba(255,255,255,.68); }
.hero-cloud::before, .hero-cloud::after { content: ""; position: absolute; border-radius: 50%; background: inherit; }
.hero-cloud::before { width: 43px; height: 43px; left: 18px; bottom: 0; }
.hero-cloud::after { width: 34px; height: 34px; right: 16px; bottom: 0; }
.hero-sign { width: 144px; min-height: 126px; position: absolute; z-index: 2; top: 57px; left: 53px; display: grid; place-items: center; align-content: center; clip-path: polygon(50% 0, 100% 34%, 92% 100%, 8% 100%, 0 34%); color: #fff; background: #df735d; filter: drop-shadow(0 8px 0 rgba(46, 79, 60, .17)); }
.hero-sign small { margin-top: 16px; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.hero-sign strong { font-family: Georgia, serif; font-size: 52px; line-height: 1; }
.hero-pairs { width: 230px; padding: 18px; position: absolute; z-index: 3; top: 202px; left: 35px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; border: 5px solid #fff3d5; border-radius: 25px; background: #edc778; box-shadow: 0 8px 0 rgba(62, 78, 58, .15); }
.hero-pairs .mini-pair { justify-content: center; }
.hero-example { width: 170px; padding: 16px; position: absolute; z-index: 4; right: 22px; bottom: 29px; border: 5px solid #fff1d5; border-radius: 25px; background: #fff9ea; box-shadow: 0 8px 0 rgba(62, 78, 58, .15); text-align: center; transform: rotate(2deg); }
.hero-example > b { display: block; color: #667bc2; font-family: Georgia, serif; font-size: 43px; }
.hero-example > span { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; }
.hero-example > small { margin-top: 7px; display: block; color: #9b6558; font-size: 10px; font-weight: 900; }

.how { padding: 58px 8px 38px; }
.how > .eyebrow { text-align: center; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.how-grid article { padding: 18px; text-align: center; }
.how-grid article > span { width: 66px; height: 66px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 21px; background: #fffaf0; box-shadow: 0 7px 20px rgba(76,73,56,.09); font-size: 30px; font-weight: 900; }
.how-grid article > span:first-child .mini-pair { transform: scale(1.3); }
.rule-even { color: #3f9475; }
.rule-odd { color: #df735d; }
.how-grid strong { display: block; font-size: 17px; }
.how-grid p { margin: 7px 0 0; color: #71807a; font-size: 14px; line-height: 1.45; }

.levels { padding: 42px; border: 1px solid #dfd6c2; border-radius: 32px; background: rgba(255,251,241,.75); }
.section-heading { margin-bottom: 26px; display: flex; align-items: end; justify-content: space-between; gap: 35px; }
.section-heading h2 { margin: 0; color: #2f4d46; font-family: Georgia, serif; font-size: 39px; }
.section-heading > p { max-width: 430px; margin: 0; color: #71807a; line-height: 1.45; }
.level-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.level-card { min-width: 0; min-height: 340px; padding: 17px; position: relative; display: flex; flex-direction: column; overflow: hidden; border: 2px solid #e3dbc8; border-radius: 25px; color: inherit; background: #fffdf7; text-align: left; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.level-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 15px 32px rgba(67,70,50,.12); }
.level-card:active { transform: translateY(-1px); }
.level-number { width: 38px; height: 38px; position: absolute; z-index: 3; top: 14px; left: 14px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--accent); box-shadow: 0 3px 0 color-mix(in srgb,var(--accent) 65%,#253b35); font-weight: 900; }
.level-preview { min-height: 150px; margin-bottom: 17px; padding: 20px; display: grid; place-items: center; overflow: hidden; border-radius: 19px; background: color-mix(in srgb,var(--accent) 14%,#fff8e7); }
.preview-number { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 22px; color: #fff; background: var(--accent); font-family: Georgia, serif; font-size: 40px; font-weight: 900; }
.preview-pairs { margin-top: 7px; display: flex; gap: 3px; }
.preview-bins { display: grid; grid-template-columns: auto auto; gap: 6px 9px; align-items: center; }
.preview-bins i { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; color: #fff; background: var(--accent); font-size: 20px; font-style: normal; font-weight: 900; }
.preview-bins b { padding: 7px 9px; border-radius: 10px; background: #fffaf0; font-size: 11px; }
.preview-rule { display: grid; place-items: center; text-align: center; }
.preview-rule b { font-family: Georgia, serif; font-size: 45px; }
.preview-rule i { color: #6b7c75; font-size: 11px; font-style: normal; }
.preview-rule strong { margin-top: 8px; padding: 7px 12px; border-radius: 10px; color: #fff; background: var(--accent); }
.level-copy { min-height: 105px; display: block; }
.level-copy small, .level-copy strong, .level-copy em { display: block; }
.level-copy small { color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.level-copy strong { margin-top: 6px; color: #354f49; font-family: Georgia, serif; font-size: 23px; }
.level-copy em { margin-top: 8px; color: #75827d; font-size: 13px; font-style: normal; line-height: 1.4; }
.level-status { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #7a8580; font-size: 12px; font-weight: 800; }
.level-status > b { color: var(--accent); font-size: 24px; }
.mini-stars { color: #efb64c; font-size: 17px; letter-spacing: 1px; }
.adult-note { margin: 22px 0 0; padding: 20px 26px; display: flex; align-items: center; gap: 15px; border: 1px solid #ddd5bd; border-radius: 22px; background: rgba(255,253,246,.74); }
.adult-note > span { font-size: 27px; }
.adult-note p { margin: 0; color: #6b7c75; font-size: 13px; line-height: 1.45; }
.adult-note strong { margin-right: 8px; color: #3d5b53; }

.game-shell { padding: 34px 40px 40px; border: 1px solid #ded3bc; border-radius: 30px; background: #fffaf0; box-shadow: 0 18px 55px rgba(75,67,45,.1); }
.game-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.game-head h1 { margin: 0; color: #2e4a43; font-family: Georgia, serif; font-size: clamp(28px,3.4vw,43px); line-height: 1.06; }
.round-count { min-width: 80px; display: flex; align-items: baseline; justify-content: flex-end; color: #728079; }
.round-count strong { color: var(--level-accent); font-size: 34px; }
.round-count span { font-weight: 800; }
.progress-track { margin: 24px 0 28px; display: grid; grid-template-columns: repeat(10,1fr); gap: 7px; }
.progress-track i { height: 7px; border-radius: 10px; background: #e6dfcd; }
.progress-track i.done { background: #69a386; }
.progress-track i.current { background: var(--level-accent); box-shadow: 0 0 0 3px color-mix(in srgb,var(--level-accent) 20%,transparent); }

.sorting-stage { min-height: 620px; padding: 32px; position: relative; overflow: hidden; border: 6px solid #fff; border-radius: 27px; background: linear-gradient(150deg,#dcece1,#acd2bc); box-shadow: inset 0 0 0 1px #bad5c7,0 8px 20px rgba(66,87,76,.1); }
.sorting-stage::after { content: ""; width: 510px; height: 175px; position: absolute; z-index: 0; right: -80px; bottom: -112px; border-radius: 50%; background: rgba(77,145,99,.42); }
.stage-decoration i { position: absolute; z-index: 0; border-radius: 50%; background: rgba(255,255,255,.28); }
.stage-decoration i:nth-child(1) { width: 50px; height: 50px; top: 40px; left: 55px; }
.stage-decoration i:nth-child(2) { width: 22px; height: 22px; top: 90px; right: 80px; }
.stage-decoration i:nth-child(3) { width: 34px; height: 34px; bottom: 160px; left: 28px; }
.number-ticket { width: 190px; min-height: 150px; margin: 0 auto 20px; position: relative; z-index: 3; display: grid; place-items: center; align-content: center; clip-path: polygon(50% 0,100% 28%,94% 100%,6% 100%,0 28%); color: #fff; background: var(--level-accent); filter: drop-shadow(0 8px 0 rgba(48,75,62,.17)); transition: transform .2s ease; }
.number-ticket.sorted { transform: translateY(5px) scale(.97); }
.number-ticket small { margin-top: 22px; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.number-ticket strong { font-family: Georgia, serif; font-size: 65px; line-height: .95; }
.number-ticket span { margin-top: 4px; font-size: 10px; font-weight: 800; }
.pair-area { max-width: 930px; margin: 0 auto 20px; padding: 18px 20px; position: relative; z-index: 2; border: 5px solid #fff1d3; border-radius: 24px; background: #edc778; box-shadow: 0 7px 0 rgba(72,78,55,.16); }
.pair-area-head { margin-bottom: 13px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.pair-area-head .eyebrow { margin-bottom: 3px; color: #775e36; }
.pair-area-head h2 { margin: 0; color: #4b5f55; font-family: Georgia, serif; font-size: 21px; }
.pair-result { padding: 8px 12px; border-radius: 13px; color: #fff; font-size: 11px; font-weight: 900; white-space: nowrap; }
.pair-result.all-paired { background: #438f70; }
.pair-result.has-solo { background: #c56657; }
.pair-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(58px,1fr)); gap: 7px; }
.object-pair { min-height: 48px; padding: 6px; display: flex; align-items: center; justify-content: center; gap: 4px; border: 3px solid rgba(255,255,255,.84); border-radius: 15px; background: #fff9e9; animation: pairIn .2s ease both; animation-delay: var(--delay); }
.object-pair.solo { position: relative; border-color: #e18c79; background: #fff0e9; }
.object-pair.solo b { position: absolute; right: 2px; bottom: -7px; padding: 2px 5px; border-radius: 6px; color: #fff; background: #c56657; font-size: 7px; }
.hidden-rule { max-width: 700px; min-height: 190px; margin: 0 auto 22px; padding: 25px; position: relative; z-index: 2; display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 24px; border: 4px dashed rgba(255,255,255,.82); border-radius: 24px; background: rgba(255,250,239,.42); }
.rule-card { min-height: 130px; padding: 15px; display: grid; place-items: center; align-content: center; border: 5px solid #fff2d6; border-radius: 23px; background: #fffaf0; box-shadow: 0 7px 0 rgba(64,83,66,.13); }
.rule-card small { color: #74827c; font-size: 10px; font-weight: 900; text-align: center; text-transform: uppercase; }
.rule-card strong { color: #36574e; font-family: Georgia,serif; font-size: 56px; }
.rule-card strong b { color: var(--level-accent); }
.hidden-rule p { margin: 0; color: #47655b; font-size: 18px; font-weight: 800; line-height: 1.45; }
.bins { max-width: 820px; margin: 0 auto; position: relative; z-index: 3; display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.sort-bin { min-width: 0; min-height: 120px; padding: 16px 18px; display: grid; grid-template-columns: 95px 1fr; grid-template-rows: 1fr auto; column-gap: 10px; border: 5px solid #fff5e0; border-radius: 23px; color: #36564e; background: #fffaf0; box-shadow: 0 7px 0 rgba(57,82,67,.14); text-align: left; cursor: pointer; transition: transform .15s ease,border-color .15s ease,background .15s ease; }
.sort-bin:hover { transform: translateY(-4px); border-color: var(--bin-color); }
.sort-bin:active { transform: translateY(1px); }
.sort-bin.even { --bin-color: #3f9475; }
.sort-bin.odd { --bin-color: #df735d; }
.sort-bin.selected { border-color: var(--bin-color); background: color-mix(in srgb,var(--bin-color) 13%,#fffaf0); }
.sort-bin.wrong { border-color: #d98270; background: #fff0e9; animation: nudge .25s ease; }
.sort-bin:disabled { cursor: default; }
.bin-icon { grid-row: 1 / 3; min-height: 77px; padding: 8px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; border-radius: 18px; background: color-mix(in srgb,var(--bin-color) 14%,#fff); }
.bin-copy { align-self: center; }
.bin-copy small, .bin-copy strong { display: block; }
.bin-copy small { color: #7d8983; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.bin-copy strong { margin-top: 4px; color: var(--bin-color); font-family: Georgia,serif; font-size: 29px; }
.sort-bin > b { align-self: end; color: #87908b; font-size: 10px; }
.game-tools { margin-top: 18px; display: flex; justify-content: center; }
.hint-button:disabled { opacity: .5; cursor: default; }
.feedback-card { min-height: 88px; margin-top: 22px; padding: 15px 16px 15px 19px; display: flex; align-items: center; gap: 14px; border: 1px solid #d6e4d2; border-radius: 20px; background: #eef5ec; }
.feedback-icon { width: 49px; height: 49px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 16px; background: #fff; font-size: 24px; }
.feedback-card p { margin: 0; }
.feedback-card strong, .feedback-card small { display: block; }
.feedback-card small { margin-top: 4px; color: #6b7b74; line-height: 1.35; }
.feedback-card.correct { border-color: #b7dbc5; background: #e3f3e9; }
.feedback-card.wrong { border-color: #edc9bb; background: #fff0e9; }
.feedback-card.hint { border-color: #ead491; background: #fff7d9; }
.feedback-card .compact { min-height: 48px; margin-left: auto; }

.result-wrap { min-height: 650px; padding: 28px; display: grid; place-items: center; overflow: hidden; border: 1px solid #ded3bc; border-radius: 31px; background: linear-gradient(145deg,#dbece1,#a9d0b9); box-shadow: 0 18px 55px rgba(75,67,45,.1); }
.result-card { width: min(650px,100%); padding: 44px; border: 7px solid #fff4d6; border-radius: 30px; background: #fffaf0; box-shadow: 0 15px 0 rgba(61,82,66,.14); text-align: center; }
.result-pairs { margin-bottom: 20px; display: flex; justify-content: center; gap: 8px; }
.result-pairs .mini-pair { transform: scale(1.35); margin: 0 5px; }
.result-card h1 { margin: 0; color: #2e4b44; font-family: Georgia,serif; font-size: 48px; line-height: 1.05; }
.result-card > p:not(.eyebrow) { max-width: 500px; margin: 16px auto; color: #6c7b75; line-height: 1.5; }
.result-stars { margin: 22px 0; color: #efb64c; font-size: 49px; letter-spacing: 5px; }
.result-stats { margin: 22px 0 28px; display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.result-stats span { padding: 13px 7px; border-radius: 16px; background: #f4ecd8; }
.result-stats strong, .result-stats small { display: block; }
.result-stats strong { color: #3e695b; font-size: 27px; }
.result-stats small { margin-top: 2px; color: #817a68; font-size: 11px; }
.result-actions { display: flex; justify-content: center; gap: 10px; }
.next-level-button { min-height: 54px; }

@keyframes nudge { 0%,100% { transform: translateX(0); } 35% { transform: translateX(-5px); } 70% { transform: translateX(5px); } }
@keyframes pairIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1000px) {
  .level-grid { grid-template-columns: 1fr; }
  .level-card { min-height: 230px; display: grid; grid-template-columns: 205px 1fr; grid-template-rows: 1fr auto; column-gap: 20px; }
  .level-preview { grid-row: 1 / 3; margin: 0; }
  .level-copy { min-height: 0; align-self: center; }
  .level-status { align-self: end; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 47px 44px; }
  .hero-scene { min-height: 390px; }
  .pair-grid { grid-template-columns: repeat(auto-fit,minmax(54px,1fr)); }
}

@media (max-width: 700px) {
  .app { width: min(1120px,calc(100% - 20px)); padding-top: 12px; }
  .topbar { margin-bottom: 14px; }
  .brand small, .sound-button span:last-child, .quiet-button { display: none; }
  .sound-button { width: 46px; padding: 0; justify-content: center; }
  .hero { border-radius: 25px; }
  .hero-copy { padding: 36px 26px 31px; }
  .hero h1 { font-size: 43px; }
  .hero-copy > p:not(.eyebrow) { margin: 19px 0 25px; font-size: 16px; }
  .hero-scene { min-height: 350px; }
  .hero-sign { top: 31px; left: 25px; transform: scale(.85); transform-origin: top left; }
  .hero-pairs { top: 169px; left: 20px; width: 205px; }
  .hero-example { right: 16px; bottom: 20px; transform: rotate(2deg) scale(.9); transform-origin: bottom right; }
  .how { padding: 42px 0 26px; }
  .how-grid { grid-template-columns: 1fr; gap: 7px; }
  .how-grid article { display: grid; grid-template-columns: 66px 1fr; column-gap: 14px; text-align: left; }
  .how-grid article > span { grid-row: 1 / 3; margin: 0; }
  .levels { padding: 28px 16px; border-radius: 24px; }
  .section-heading { display: block; }
  .section-heading h2 { font-size: 32px; }
  .section-heading > p { margin-top: 12px; }
  .level-card { min-height: 322px; display: flex; }
  .level-preview { min-height: 128px; margin-bottom: 16px; }
  .level-copy { min-height: 103px; }
  .adult-note { align-items: flex-start; }
  .game-shell { padding: 24px 12px 28px; border-radius: 24px; }
  .game-head { align-items: flex-start; }
  .game-head h1 { font-size: 29px; }
  .round-count { min-width: 57px; }
  .round-count strong { font-size: 27px; }
  .progress-track { margin: 18px 0 22px; gap: 4px; }
  .sorting-stage { min-height: 640px; padding: 22px 10px; border-width: 4px; }
  .number-ticket { width: 160px; min-height: 132px; }
  .number-ticket strong { font-size: 55px; }
  .pair-area { padding: 14px 10px; border-width: 4px; }
  .pair-area-head { align-items: flex-start; }
  .pair-area-head h2 { font-size: 17px; }
  .pair-result { padding: 6px 8px; font-size: 9px; }
  .pair-grid { grid-template-columns: repeat(auto-fit,minmax(48px,1fr)); gap: 5px; }
  .object-pair { min-height: 44px; padding: 4px; gap: 2px; }
  .object-pair .token { width: 21px; height: 21px; }
  .hidden-rule { min-height: 210px; padding: 15px; grid-template-columns: 150px 1fr; gap: 14px; }
  .rule-card { min-height: 120px; }
  .rule-card strong { font-size: 45px; }
  .hidden-rule p { font-size: 15px; }
  .bins { gap: 8px; }
  .sort-bin { min-height: 112px; padding: 12px 8px; grid-template-columns: 70px 1fr; column-gap: 6px; border-width: 4px; }
  .bin-icon { min-height: 70px; padding: 5px; }
  .bin-copy strong { font-size: 23px; }
  .sort-bin > b { font-size: 8px; }
  .feedback-card { align-items: flex-start; }
  .feedback-card.correct { flex-wrap: wrap; }
  .feedback-card.correct p { flex: 1; }
  .feedback-card .compact { width: 100%; margin: 11px 0 0; }
  .result-wrap { min-height: 590px; padding: 13px; border-radius: 24px; }
  .result-card { padding: 30px 15px; }
  .result-card h1 { font-size: 40px; }
  .result-stars { font-size: 40px; }
  .result-stats small { font-size: 10px; }
  .result-actions { flex-direction: column; }
  .result-actions button { width: 100%; }
  .quiet-button.large { display: inline-block; }
}

@media (max-width: 470px) {
  .app { width: min(1120px,calc(100% - 16px)); }
  .brand-mark { width: 60px; }
  .hero-sign { left: 8px; }
  .hero-pairs { left: 7px; width: 190px; }
  .hero-example { right: 5px; }
  .game-shell { padding-left: 9px; padding-right: 9px; }
  .sorting-stage { padding-left: 7px; padding-right: 7px; }
  .pair-area-head { display: block; }
  .pair-result { margin-top: 7px; display: inline-block; }
  .bins { grid-template-columns: 1fr; }
  .sort-bin { min-height: 96px; grid-template-columns: 82px 1fr; }
  .hidden-rule { grid-template-columns: 1fr; text-align: center; }
  .rule-card { min-height: 104px; }
}

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