/* Expedition tablet: forest glass, ivory type, amber actions. Shared by both maps. */
.tablet-screen:where(:not(.tb-menu)) {
  --exp-ink: #f7efd9;
  --exp-muted: #bfd0bc;
  --exp-line: rgba(160, 203, 163, .25);
  --exp-gold: #ffc43d;
  --exp-green: #9cdbb0;
  --exp-surface: #071c13;
  color: var(--exp-ink);
  background:
    radial-gradient(ellipse at 0 80%, rgba(47, 104, 58, .13), transparent 65%),
    repeating-linear-gradient(135deg, transparent 0 23px, rgba(175, 213, 161, .018) 24px 25px),
    #071b12;
}
.tablet-screen:where(:not(.tb-menu)) .tb-bar { height: 42px; padding: 0 18px; border-bottom: 1px solid var(--exp-line); background: rgba(3, 15, 10, .76); }
.tablet-screen:where(:not(.tb-menu)) .tb-title { font-size: 13px; letter-spacing: .08em; color: #e4ead8; }
.tablet-screen:where(:not(.tb-menu)) .tb-back { min-width: 34px; min-height: 30px; border-radius: 8px; }
.tablet-screen:where(:not(.tb-menu)) .tb-content { padding: 14px 20px 12px; scroll-padding: 14px; scrollbar-gutter: stable; }
.tablet-screen .tb-content > #quest-card.open { margin-bottom: 0 !important; padding: 0 !important; }
.tablet-screen .exp-icon { width: 22px; height: 22px; flex: none; }
.tablet-screen :is(button, a, input, select, summary):focus-visible { outline: 2px solid #ffe7a1 !important; outline-offset: 3px; }
.tablet-screen:where(:not(.tb-menu)) :is(button, a) { -webkit-tap-highlight-color: transparent; }

/* Shared mission composition. Existing classes remain available to the windows editor. */
#quest-card .tm-msg.tm-v2 {
  --tone: #83d99b;
  position: relative; isolation: isolate; display: flex; flex-direction: column;
  gap: 12px; width: 100%; min-width: 0; height: auto; min-height: 0;
  padding: 4px 2px 2px; box-sizing: border-box; color: #f7efd9;
}
#quest-card .tm-msg.tm-v2.task { --tone: #ffc43d; }
#quest-card .tm-v2 .tm-scenery {
  position: absolute; z-index: -1; pointer-events: none; right: -20px; top: -14px;
  width: 65%; height: 245px; background: right 40% / cover no-repeat;
  opacity: .86;
  -webkit-mask-image: linear-gradient(90deg, transparent 2%, #000 60%), linear-gradient(#000 45%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 2%, #000 60%), linear-gradient(#000 45%, transparent 100%);
  mask-composite: intersect;
}
#quest-card .tm-v2 .tm-heading { display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: center; gap: 18px; min-height: 76px; }
#quest-card .tm-v2 .tm-heading-copy { min-width: 0; }
#quest-card .tm-v2 .tm-icon {
  width: 68px; height: 68px; border: 2px solid rgba(255, 184, 41, .75); border-radius: 13px;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
  background: linear-gradient(135deg, rgba(255, 184, 41, .16), rgba(122, 170, 92, .07));
}
#quest-card .tm-v2 .tm-icon svg { width: 49px; height: 46px; }
#quest-card .tm-v2 .tm-eyebrow { margin: 0 0 7px; font: 700 11px/1.35 "Tektur", sans-serif; letter-spacing: .11em; color: #ffc15a; text-transform: uppercase; }
#quest-card .tm-v2 .tm-title {
  max-width: 100%; width: auto; margin: 0; padding: 0 0 10px; border: 0; position: relative;
  font: 700 clamp(25px, 4.1cqw, 36px)/1.08 "Tektur", sans-serif; letter-spacing: -.025em;
  text-transform: none; white-space: normal; text-wrap: balance; color: #fff2d6;
  text-shadow: 0 2px 10px #04120c;
}
#quest-card .tm-v2 .tm-title::after { content: ""; position: absolute; bottom: 0; left: 0; width: min(290px, 80%); height: 2px; background: linear-gradient(90deg, #ffb32b, transparent); }
#quest-card .tm-v2 .tm-body { display: block; grid-column: auto; margin: 0; max-width: none; min-width: 0; }
#quest-card .tm-v2 .tm-copy { max-width: 100%; }
#quest-card .tm-v2.has-scene .tm-copy { max-width: 72%; }
#quest-card .tm-v2 .tm-body p { margin: 0; color: #e4ebdc; font: 400 15px/1.45 "Play", sans-serif; }
#quest-card .tm-v2 .tm-lead { text-wrap: pretty; }
#quest-card .tm-v2 .tm-mission { margin-top: 10px; padding: 10px 13px; border: 1px solid rgba(236, 182, 61, .42); border-radius: 10px; background: rgba(5, 25, 15, .9); }
#quest-card .tm-v2 .tm-mission > b { display: flex; align-items: center; gap: 8px; margin: 0 0 5px; font: 700 12px/1.2 "Tektur", sans-serif; color: #ffc758; letter-spacing: .03em; text-transform: none; }
#quest-card .tm-v2 .tm-mission .exp-icon { width: 18px; height: 18px; }
#quest-card .tm-v2 .tm-mission p { font-size: 15px; color: #fff1d4; line-height: 1.4; }
#quest-card .tm-v2 .tm-controls { display: flex; align-items: flex-start; gap: 9px; margin-top: 8px; color: #bdcdb8; font: 400 13px/1.4 "Play", sans-serif; }
#quest-card .tm-v2 .tm-controls .exp-icon { width: 17px; height: 17px; color: #9cbb9b; }
#quest-card .tm-v2 .tm-controls span { font: inherit; letter-spacing: normal; text-transform: none; color: inherit; }
#quest-card .tm-v2 .tm-reward, .exp-camp-reward {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; box-sizing: border-box;
  border: 1px solid rgba(139, 201, 156, .35); border-radius: 11px;
  background: linear-gradient(100deg, rgba(32, 77, 43, .6), rgba(6, 27, 17, .93));
}
#quest-card .tm-v2 .tm-reward > .exp-icon { width: 28px; height: 28px; color: #ffca55; }
#quest-card .tm-v2 .tm-reward span { font: inherit; text-transform: none; letter-spacing: normal; }
#quest-card .tm-v2 .tm-reward small, .exp-camp-reward small { display: block; margin-bottom: 3px; color: #afc5ab; font: 400 11px/1.2 "Play", sans-serif; }
#quest-card .tm-v2 .tm-reward b, .exp-camp-reward b { display: block; font: 700 16px/1.25 "Tektur", sans-serif; color: #fff0d0; }
#quest-card .tm-v2 .tm-chips { display: flex; width: auto; margin: 0; border-radius: 10px; border: 1px solid rgba(160, 195, 154, .2); }
#quest-card .tm-v2 .tm-chip { flex: 1; padding: 8px 10px; }
#quest-card .tm-v2 .tm-chip svg { width: 20px; height: 20px; }
#quest-card .tm-v2 .tm-chip b { font-size: 12px; }
#quest-card .tm-v2 .tm-details { margin: 0; border-top: 1px solid rgba(153, 184, 148, .18); }
#quest-card .tm-v2 .tm-details summary { padding: 9px 2px; color: #bcccba; cursor: pointer; font: 400 12px/1.2 "Play", sans-serif; }
#quest-card .tm-v2 .tm-details[open] summary { color: #ffce6b; }
#quest-card .tm-v2 .tm-details-body { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 3px 0 10px; }
#quest-card .tm-v2 .tm-details-body p { margin: 0; font: 400 14px/1.45 "Play", sans-serif; color: #d0ddc9; }
#quest-card .tm-v2 .tm-story-media { max-width: 100%; }
#quest-card .tm-v2 .tm-photo { display: block; max-height: 270px; width: 100%; aspect-ratio: 16/9; object-fit: contain; border: 1px solid var(--exp-line, #4a6650); border-radius: 10px; background: #05110b; }
#quest-card .tm-v2 .tm-note { font-size: 13px; }
#quest-card .tm-v2 .tm-actions { margin-top: 0; gap: 10px; display: flex; align-items: center; flex-wrap: wrap; }
#quest-card .tm-v2 .tm-go, .tablet-screen .tg-v2 .tg-confirm {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; margin-left: auto;
  min-width: 0; max-width: 100%; min-height: 46px; padding: 12px 20px; border: 1px solid #ffda68; border-radius: 11px;
  font: 700 16px/1.2 "Tektur", sans-serif; letter-spacing: .01em; text-transform: none; white-space: normal;
  color: #1d1709; background: linear-gradient(#ffdb53, #ffb413);
  box-shadow: inset 0 1px 0 #fff0a1, 0 3px 0 #a26b05, 0 0 18px #eeb33025;
}
#quest-card .tm-v2 .tm-go span { font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }
#quest-card .tm-v2 .tm-go::after { content: none; }
#quest-card .tm-v2 .tm-go svg { margin: 0; width: 22px; height: 22px; }
#quest-card .tm-v2 .tm-go > .exp-icon:last-child { width: 16px; height: 16px; margin-left: 8px; }
#quest-card .tm-v2 .tm-cancel { min-height: 44px; padding: 11px 17px; border: 1px solid #8fa68c; border-radius: 10px; font: 700 13px/1.2 "Tektur", sans-serif; color: #dce6d3; }
#quest-card .tm-v2 .tm-key { font-size: 11px; order: 3; }
#quest-card .tm-v2 .tm-key kbd { font-size: 11px; border-width: 1px; padding: 4px 6px; }
#quest-card .tm-v2 .tm-link { order: 4; border: none; padding: 6px 0; font: 400 12px/1.3 "Play", sans-serif; letter-spacing: normal; text-transform: none; color: #bdccae; }
#quest-card .tm-v2 .tm-gallery { margin-top: 12px; }
#quest-card .tm-v2 .pl-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0; }
#quest-card .tm-v2 .pl-card { min-width: 0; width: auto; margin: 0; padding: 5px 5px 0; transform: none; }
#quest-card .tm-v2 .pl-photo { max-height: 120px; }
#quest-card .tm-v2 .pl-cap { font-size: 17px; overflow-wrap: anywhere; }

/* All other pages: same spacing, controls, surfaces and visible reward information. */
.tablet-screen .exp-panel { color: #f6edda; }
.tablet-screen .exp-panel .exp-camp-reward { margin-bottom: 16px; padding: 10px 13px; }
.tablet-screen .exp-camp-reward .exp-icon { width: 25px; height: 25px; color: #ffcb5b; }
.tablet-screen .exp-camp-reward em { margin-left: auto; font: 400 11px/1.3 "Play", sans-serif; color: #b4c9af; font-style: normal; text-align: right; }
.tablet-screen .exp-camp-reward.is-earned em { color: #a1e4b4; }
.tablet-screen .tb-content > section.exp-panel :is(h3, .films-brand b) { font-size: 27px !important; line-height: 1.15 !important; letter-spacing: -.02em !important; text-wrap: balance; }
.tablet-screen .tb-content > section.exp-panel :is(p, .kz-sub, .about-lead) { font: 400 15px/1.45 "Play", sans-serif; max-width: 70ch; }
.tablet-screen .tb-content > section.exp-panel :is(.kz-body, .gd-body, .about-body) { gap: 16px !important; }
.tablet-screen .tb-content > section.exp-panel :is(.kz-facts, .gd-facts) { gap: 8px; margin: 14px 0; }
.tablet-screen .tb-content > section.exp-panel :is(.kz-facts div, .gd-facts div, .about-stats div) { border-radius: 10px !important; border-color: rgba(169, 201, 158, .24) !important; background: #0b2518b8 !important; }
.tablet-screen .tb-content > section.exp-panel :is(.kz-topics li, .gd-results li) { font-size: 13px; border-radius: 8px; }
.tablet-screen .tb-content > section.exp-panel :is(.kz-apply, .gd-apply, .films-watch, .tr-apply, .cp-submit, .rf-save, .rf-again, .pt-go, .pt-submit) {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 10px !important; font-size: 14px !important; letter-spacing: .01em !important; text-transform: none !important;
  background: linear-gradient(#ffda55, #ffb518) !important; color: #1b1708 !important; border: 1px solid #ffdb70 !important;
}
.tablet-screen .tb-content > section.exp-panel :is(.tr-card, .rv-card, .film) { overflow: hidden; border-radius: 11px !important; border: 1px solid var(--exp-line) !important; background-color: #0b2118 !important; }   /* только цвет: обложка — background-image карточки */
.tablet-screen .tb-content > section.exp-panel :is(.tr-card img, .rv-card img, .film img) { transition: transform .25s ease; }
.tablet-screen .tb-content > section.exp-panel :is(.tr-card, .rv-card, .film):hover img { transform: scale(1.025); }
.tablet-screen #about.exp-panel .about-body { grid-template-columns: 40% 1fr !important; }
.tablet-screen #about.exp-panel .about-photo { border-radius: 11px !important; object-fit: cover; object-position: 50% 28%; }   /* лица — в кадре при любой обрезке */
/* фото — ровно по высоте блока цифр (кадрируется), чтобы окно не прокручивалось из-за него */
@media (min-width: 601px), (orientation: landscape) {   /* на узком телефоне фото — отдельной строкой (ниже, max-height 160px) */
  .tablet-screen #about.exp-panel .about-photo { height: 0; min-height: 100%; aspect-ratio: auto; }
}
/* Telegram и Instagram — той же высоты, что «Продолжить путь», без «ступеньки» тени: одна линия */
.tablet-screen #about .exp-panel-actions .about-links { display: flex !important; gap: 12px !important; padding: 0 !important; }   /* сильнее отступа 16px сверху из index.html */
.tablet-screen #about .exp-panel-actions .social { min-height: 44px; padding: 0 18px; border-width: 1px; box-shadow: none; }
.tablet-screen #gid.exp-panel .gd-hero, .tablet-screen #kaizen.exp-panel .kz-hero { border-radius: 12px; max-height: 155px; }
.tablet-screen #gid.exp-panel .gd-hero video, .tablet-screen #kaizen.exp-panel .kz-hero img { width: 100%; height: 155px; object-fit: cover; }
/* волна Kaizen — справа, слева под текстом чёрное поле (как на kaizenclub.kz) */
.tablet-screen #kaizen.exp-panel .kz-hero img { width: 58%; margin-left: auto; object-position: 50% 50%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%); mask-image: linear-gradient(90deg, transparent, #000 22%); }
.tablet-screen .tb-content > #coupon .cp-head h3, .tablet-screen .tb-content > #coop .cp-head h3, .tablet-screen .tb-content > #shboard .cp-head h3 { margin-bottom: 9px; }
.tablet-screen .tb-content > :is(#coupon, #coop, #shboard) { background: none !important; border: 0 !important; }
.tablet-screen :is(#coupon, #coop, #shboard) .cp-head { padding: 0 0 12px; }
.tablet-screen :is(#coupon, #coop, #shboard) :is(.cp-fields, .cp-actions) { gap: 10px; padding-left: 0; padding-right: 0; }
.tablet-screen .exp-panel :is(input:not([type=range]):not([type=checkbox]), select) { min-height: 43px; padding: 10px 12px; box-sizing: border-box; border: 1px solid #729574; border-radius: 9px; background: #071d14; color: #fbefda; font: 400 15px/1.2 "Play", sans-serif; }
.tablet-screen .exp-panel input::placeholder { color: #9bb39d; }
.tablet-screen .exp-panel :is(.cp-consent, .pt-consent) { font-size: 12px; line-height: 1.5; color: #bed0b8; }
.tablet-screen #coupon .cp-code { padding: 10px 14px; border: 1px solid rgba(255, 197, 69, .5); border-radius: 10px; background: #2b2a0e; }
.tablet-screen #coupon .cp-code b { letter-spacing: .15em; }
.tablet-screen #coop :is(.co-players li, .co-mission), .tablet-screen #shboard :is(.sb-route, .sb-peer) { border: 1px solid var(--exp-line); border-radius: 10px; background: #0b2418; }
.tablet-screen #coop .co-mission { padding: 12px 14px; }
.tablet-screen #portal.exp-panel .pt-next { border-radius: 12px !important; border-color: #c4ae5a66 !important; min-height: 105px; }
.tablet-screen #portal.exp-panel .pt-stay { min-height: 44px; border: 1px solid #8bab8b !important; border-radius: 10px !important; font-size: 13px; text-transform: none; }
.tablet-screen #portal.exp-panel .pt-go { white-space: normal; }
.tablet-screen #portal.exp-panel :is(.pt-go, .pt-submit) { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 11px 16px; border: 1px solid #ffda68 !important; border-radius: 10px !important; background: linear-gradient(#ffdb53,#ffb413) !important; font: 700 14px/1.2 "Tektur",sans-serif !important; letter-spacing: .01em; text-transform: none; }
.tablet-screen #race-finish.exp-panel .rf-time { margin: 12px 0; border: 1px solid #d2b35366; border-radius: 12px; padding: 14px 18px; background: linear-gradient(120deg, #46401766, #0b2118); }
.tablet-screen #race-finish.exp-panel .rf-time b { font-size: 42px; }
.tablet-screen #race-finish.exp-panel .rf-time small { font-size: 13.5px; line-height: 1.35; }
/* рекорд трассы или личный: золотая рамка со вспышкой, время золотом */
.tablet-screen #race-finish.exp-panel .rf-time.record { border-color: #ffcf4a; box-shadow: 0 0 0 1px #ffcf4a55, 0 0 26px rgba(255,190,40,.28); animation: rf-record 1.6s ease-out; }
.tablet-screen #race-finish.exp-panel .rf-time.record b { color: #ffd76a; }
.tablet-screen #race-finish.exp-panel .rf-time.record small { color: #ffe9a8; font-weight: 700; }
@keyframes rf-record { 0% { transform: scale(.96); } 30% { transform: scale(1.02); box-shadow: 0 0 0 6px #ffcf4a55, 0 0 40px rgba(255,190,40,.5); } 100% { transform: none; } }
.tablet-screen #race-finish.exp-panel :is(.rf-board li, .rf-form) { border-radius: 10px; }
/* таблица лидеров: строки крупнее, у первых трёх мест — медали, свой результат подсвечен; пустая таблица — рамка с приглашением по центру */
.tablet-screen #race-finish.exp-panel .rf-board { display: grid; gap: 4px; margin: 12px 0 0; max-height: none; }
.tablet-screen #race-finish.exp-panel .rf-board li { align-items: center; gap: 12px; padding: 4px 14px; border: 1px solid var(--exp-line); background: #0b2418; font: 400 16px/1.2 "Play", sans-serif; color: #f3ead6; }
.tablet-screen #race-finish.exp-panel .rf-board li::before { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.08); font: 700 12.5px/1 "Tektur", sans-serif; color: #dfe4d6; }
.tablet-screen #race-finish.exp-panel .rf-board li:nth-child(1)::before { background: #f5c518; color: #1a1205; }
.tablet-screen #race-finish.exp-panel .rf-board li:nth-child(2)::before { background: #cfd4d8; color: #1a1f22; }
.tablet-screen #race-finish.exp-panel .rf-board li:nth-child(3)::before { background: #c98a4b; color: #1f1206; }
.tablet-screen #race-finish.exp-panel .rf-board li b { font: 700 17px/1 "Tektur", sans-serif; color: #ffd27a; }
.tablet-screen #race-finish.exp-panel .rf-board li.me { border-color: #ffb020; background: rgba(255,176,32,.16); }
.tablet-screen #race-finish.exp-panel .rf-board:empty { place-items: center; min-height: 170px; border: 1px dashed #8fb18066; border-radius: 12px; background: rgba(11,36,24,.5); }
.tablet-screen #race-finish.exp-panel .rf-board:empty::after { padding: 0 20px; font: 700 18px/1.35 "Tektur", sans-serif; color: #f3ead6; text-align: center; }
.tablet-screen #race-finish.exp-panel .rf-status { font-size: 14.5px; line-height: 1.4; color: #cfd6c8; }
.tablet-screen #map-page.exp-panel .mp-head h2 { font-size: 27px; letter-spacing: -.02em; }
.tablet-screen #map-page.exp-panel .mp-grid { gap: 16px; }
.tablet-screen #map-page.exp-panel .mp-grid > canvas { border-radius: 12px; border: 1px solid #8fb18055; }
.tablet-screen #map-page.exp-panel .mp-mission { border-radius: 11px; padding: 12px; border: 1px solid #e5bb4f66; background: #1d2b15; }
.tablet-screen #map-page.exp-panel .mp-legend li > button:first-child { border-radius: 9px !important; padding: 10px 12px; min-height: 43px; }
.tablet-screen #achievements-panel.exp-panel .ach-head { align-items: center; margin-bottom: 10px; }
.tablet-screen #achievements-panel.exp-panel .ach-item { border-radius: 12px; background: #0b2519; border-color: #8aa67d44; }
.tablet-screen .exp-camp-actions { display: flex; justify-content: flex-end; padding-top: 14px; margin-top: 12px; border-top: 1px solid var(--exp-line); }
.tablet-screen .exp-continue { display: inline-flex; align-items: center; justify-content: center; gap: 15px; min-height: 44px; padding: 11px 19px; border: 1px solid #ffda68; border-radius: 10px; background: linear-gradient(#ffdc5b,#ffb61a); color: #211906; font: 700 15px/1.2 "Tektur",sans-serif; cursor: pointer; }
.tablet-screen .exp-continue .exp-icon { width: 16px; height: 16px; }
.tablet-screen .tb-content > section.exp-panel :is(.kz-apply,.gd-apply,.films-watch,.tr-apply) { min-height: 30px; padding: 6px 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; color: #d7cfa4 !important; font: 400 13px/1.4 "Play",sans-serif !important; text-transform: none; }
.tablet-screen .exp-panel-brief { padding: 11px 14px; margin: 0 0 14px; border: 1px solid #bb9a4e77; border-radius: 11px; background: #10291d; }
.tablet-screen .exp-panel-brief > b { display: flex; align-items: center; gap: 8px; color: #ffcc64; font: 700 14px/1.2 "Tektur",sans-serif; }
.tablet-screen .exp-panel-brief p { margin: 7px 0; }
.tablet-screen .exp-panel-brief small { color: #bfceaf; font: 400 12px/1.3 "Play",sans-serif; }
.tablet-screen #map-page.exp-panel .mp-side { min-width: 0; max-height: 395px; overflow-y: auto; padding-right: 5px; }

/* Tire choice: actual illustrated items, explicit selection, then prepare the chosen set. */
#quest-card .tm-msg.tg-v2 { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 10px 16px; padding: 2px 0; position: relative; isolation: isolate; }
#quest-card .tm-msg.tg-v2 .tg-scenery { position: absolute; pointer-events: none; z-index: -1; top: -15px; right: -20px; width: 58%; height: 175px; background: url('../img/tablet/workshop.webp') right center/cover; opacity: .75; mask-image: linear-gradient(90deg, transparent, #000 65%), linear-gradient(#000 40%, transparent); mask-composite: intersect; }
#quest-card .tm-msg.tg-v2 .tm-icon { width: 60px; height: 60px; border-width: 2px; }
#quest-card .tm-msg.tg-v2 .tm-icon svg { width: 44px; height: 44px; }
#quest-card .tm-msg.tg-v2 .tm-eyebrow { font-size: 11px; margin: 2px 0 6px; letter-spacing: .08em; color: #ffc44d; }
#quest-card .tm-msg.tg-v2 .tm-title { font-size: 31px; line-height: 1.05; padding-bottom: 8px; border-width: 1px; text-transform: none; white-space: normal; }
#quest-card .tm-msg.tg-v2 .tg-step { color: #c7d2b7; font: 400 11px/1.2 "Play", sans-serif; margin-top: 6px; }
#quest-card .tm-msg.tg-v2 .tg-layout > .tg { grid-column: 1 / -1; margin: 0; min-width: 0; }
#quest-card .tm-msg.tg-v2 .tg-state { min-height: 0; margin: 0 0 10px; font: 400 14px/1.4 "Play", sans-serif; color: #e2ead6; }
#quest-card .tm-msg.tg-v2 .tg-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; }
#quest-card .tm-msg.tg-v2 .tg-tire {
  position: relative; min-width: 0; display: grid; grid-template-columns: 44% minmax(0, 1fr); align-items: center;
  gap: 7px; padding: 12px 11px 12px 5px; min-height: 180px; border: 1px solid #7aaf9077; border-radius: 15px; overflow: hidden;
  background: radial-gradient(ellipse at 20% 100%, #7c5f1c33, transparent 65%), linear-gradient(140deg, #102e21e8, #05190ff5);
  color: #f7efd9; text-align: left; box-shadow: inset 0 1px 0 #bed8a41a; transition: border-color .16s, background .16s, box-shadow .16s;
}
#quest-card .tm-msg.tg-v2 .tg-tire > img { width: 100%; height: 164px; object-fit: contain; filter: drop-shadow(0 7px 8px #0007); }
#quest-card .tm-msg.tg-v2 .tg-tire > img[src*="tire-sand"] { transform: scale(1.42); }
#quest-card .tm-msg.tg-v2 .tg-tire-copy { font: inherit; text-transform: none; letter-spacing: normal; color: inherit; }
#quest-card .tm-msg.tg-v2 .tg-tire-copy > b { display: block; margin-bottom: 6px; font: 700 19px/1.1 "Tektur", sans-serif; }
#quest-card .tm-msg.tg-v2 .tg-tire-copy > small { display: block; margin: 0 0 12px; font: 400 12px/1.3 "Play", sans-serif; color: #bfd7be; text-transform: none; letter-spacing: normal; }
#quest-card .tm-msg.tg-v2 .tg-tire ul { padding: 9px 0 0; margin: 0; list-style: none; display: grid; gap: 8px; border-top: 1px solid #a3bc8e33; }
#quest-card .tm-msg.tg-v2 .tg-tire li { display: flex; align-items: center; gap: 7px; font: 400 12px/1.25 "Play", sans-serif; color: #dbe7cf; }
#quest-card .tm-msg.tg-v2 .tg-tire .exp-icon { width: 17px; height: 17px; color: #aad7b7; }
#quest-card .tm-msg.tg-v2 .tg-tire.is-selected { border-color: #ffd568; box-shadow: 0 0 0 1px #ffc533, 0 0 18px #ffb50035, inset 0 0 24px #b67d071b; }
#quest-card .tm-msg.tg-v2 .tg-tire.is-selected::after { content: "✓"; position: absolute; top: 8px; left: 9px; display: grid; place-items: center; width: 22px; height: 22px; background: #ffc736; color: #152012; border-radius: 50%; font: 700 15px "Play", sans-serif; }
#quest-card .tm-msg.tg-v2 .tg-tire.is-selected .exp-icon { color: #ffcb4a; }
#quest-card .tm-msg.tg-v2 .tg-tire.wrong { border-color: #f68b64; }
#quest-card .tm-msg.tg-v2 .tg-tire:hover { border-color: #c5d6b6; }
#quest-card .tm-msg.tg-v2 .tg-reward { grid-column: 1/-1; display: flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1px solid #82b99244; border-radius: 10px; background: #122b1de8; color: #d2e6c7; font: 400 12px/1.35 "Play", sans-serif; }
#quest-card .tm-msg.tg-v2 .tg-reward .exp-icon { color: #ffd15a; width: 21px; height: 21px; }
#quest-card .tm-msg.tg-v2 .tg-reward span, #quest-card .tm-msg.tg-v2 .tg-confirm span { font: inherit; color: inherit; text-transform: none; letter-spacing: normal; }
#quest-card .tm-msg.tg-v2 .tm-actions { margin: 0; gap: 10px; justify-content: space-between; }
#quest-card .tm-msg.tg-v2 .tm-cancel { padding: 11px 17px; min-height: 44px; border-width: 1px; border-radius: 10px; font-size: 13px; }
#quest-card .tm-msg.tg-v2 .tg-confirm:disabled { opacity: .5; box-shadow: none; cursor: default; }
#quest-card .tm-msg.tg-v2 .tg-confirm .exp-icon { width: 19px; height: 19px; }
#quest-card .tm-msg.tg-v2.tg-press { grid-template-columns: 62px minmax(0, 1fr) 27%; }
#quest-card .tm-msg.tg-v2.tg-press .tm-title { font-size: 27px; }
#quest-card .tm-msg.tg-v2.tg-press .tg-layout > .tg { display: grid; align-items: center; grid-column: 1/3; grid-template-columns: 35fr 31fr 34fr; gap: 12px; margin-top: 0; }
#quest-card .tm-msg.tg-v2 .tg-task { grid-column: 3; grid-row: 1/span 2; padding: 12px; border: 1px solid #d9b85477; border-radius: 11px; background: #071e14e8; }
#quest-card .tm-msg.tg-v2 .tg-task h4 { font-size: 12px; gap: 7px; }
#quest-card .tm-msg.tg-v2 .tg-task p { font-size: 12px; line-height: 1.45; }
#quest-card .tm-msg.tg-v2 .tg-keys { gap: 8px; font-size: 11px; }
#quest-card .tm-msg.tg-v2 .tg-keys kbd { font-size: 11px; min-width: 27px; padding: 5px; border-width: 1px; }
#quest-card .tm-msg.tg-v2 .tg-card { border-width: 1px; border-radius: 10px; padding: 10px; }
#quest-card .tm-msg.tg-v2 .tg-card b { font-size: 10px; }
#quest-card .tm-msg.tg-v2 .tg-card strong { font-size: 29px; }
#quest-card .tm-msg.tg-v2 .tg-card.rec strong { font-size: 23px; }
#quest-card .tm-msg.tg-v2 .tg-status { gap: 12px; }
#quest-card .tm-msg.tg-v2 .tg-status .tg-state { font-size: 12px; margin: 0; }
#quest-card .tm-msg.tg-v2 .tg-dots { font-size: 12px; gap: 6px; }
#quest-card .tm-msg.tg-v2 .tg-btn { min-height: 48px; gap: 12px; padding: 10px 16px; border-radius: 10px; }
#quest-card .tm-msg.tg-v2 .tg-btn svg { width: 30px; height: 30px; }
#quest-card .tm-msg.tg-v2 .tg-btn b { font-size: 19px; }
#quest-card .tm-msg.tg-v2 .tg-btn small { font-size: 10px; letter-spacing: normal; }
#quest-card .tm-msg.tg-v2.tg-press .tm-cancel { width: auto; }

@container (max-width: 700px) {
  /* карта на телефоне (владелец 17.11): карта — меньше, слева; справа легенда без прокрутки вбок, статус и расстояние — строкой ниже */
  .tablet-screen #map-page .mp-head small { display: none; }
  .tablet-screen #map-page .mp-head h2 { margin: 0; font-size: 21px; }
  .tablet-screen #map-page .mp-grid { grid-template-columns: minmax(0, 44%) minmax(0, 1fr); gap: 12px; }
  .tablet-screen #map-page .mp-grid > canvas { width: 100% !important; height: auto; }   /* ширину ставит и код (index.html, mapCanvas.style.width) */
  .tablet-screen #map-page.exp-panel .mp-side { max-height: 262px; overflow-x: hidden; }
  .tablet-screen #map-page .mp-hint { margin: 0; font-size: 11.5px; line-height: 1.35; }
  .tablet-screen #map-page.exp-panel .mp-legend li > button:first-child { flex-wrap: wrap; row-gap: 1px; min-height: 0; padding: 6px 8px; gap: 2px 8px; font-size: 12.5px; }
  .tablet-screen #map-page .mp-legend li > button > span { flex: 1 1 calc(100% - 40px); min-width: 0; white-space: normal; line-height: 1.2; }
  .tablet-screen #map-page .mp-legend li > button > small { font-size: 10.5px; white-space: nowrap; }
  .tablet-screen #map-page .mp-legend li > button > small:nth-of-type(1) { margin-left: 32px; }
  .tablet-screen #map-page .mp-mission { padding: 8px 10px; }
  .tablet-screen #map-page .mp-mission b { font-size: 14px; }
  .tablet-screen #map-page .mp-mission p { font-size: 11.5px; }
  #quest-card .tm-v2 .tm-title { font-size: 27px; }
  #quest-card .tm-v2.has-scene .tm-copy { max-width: 83%; }
  #quest-card .tm-v2 .tm-scenery { width: 65%; opacity: .5; }
  #quest-card .tm-v2 .tm-body p { font-size: 14px; }
  #quest-card .tm-v2 .tm-actions { gap: 9px; }
  #quest-card .tm-v2 .tm-go { font-size: 14px; padding: 11px 16px; }
  #quest-card .tm-v2 .tm-key { display: none; }
  #quest-card .tm-msg.tg-v2 .tg-tire-copy > b { font-size: 17px; }
  #quest-card .tm-msg.tg-v2 .tg-tire { min-height: 160px; }
  #quest-card .tm-msg.tg-v2 .tg-tire > img { height: 145px; }
  #quest-card .tm-msg.tg-v2.tg-press { grid-template-columns: 56px minmax(0, 1fr); }
  #quest-card .tm-msg.tg-v2 .tg-task { grid-column: 1/-1; grid-row: auto; display: block; padding: 9px 12px; }
  #quest-card .tm-msg.tg-v2 .tg-task hr, #quest-card .tm-msg.tg-v2 .tg-task .tg-keys, #quest-card .tm-msg.tg-v2 .tg-task h4:last-of-type { display: none; }
  #quest-card .tm-msg.tg-v2.tg-press .tg-layout > .tg { grid-column: 1/-1; }
  .tablet-screen #about.exp-panel .about-body { grid-template-columns: 35% 1fr !important; }
  .tablet-screen .tb-content > section.exp-panel :is(h3, .films-brand b) { font-size: 24px !important; }
}

#quest-card .tm-msg.tg-v2 .tg-bleed { min-height: 48px; padding: 8px 13px; border: 1px solid #9bb79d; border-radius: 10px; background: #102a1d; color: #e6efdc; font: 700 13px/1.2 "Tektur", sans-serif; cursor: pointer; touch-action: none; }
#quest-card .tm-msg.tg-v2 .tg-bleed small { display: block; margin-top: 4px; font: 400 10px/1.2 "Play", sans-serif; }
#quest-card .tm-msg.tg-v2 .tg-bleed.on { background: #35533b; border-color: #d2e3b0; }
/* On a portrait phone the screen becomes a readable front-facing tablet, rather than shrinking
   a 620px landscape document into a 350px-wide physical display. Desktop 3D frame is unchanged. */
@media (max-width: 600px) and (orientation: portrait) {
  .tablet-screen.tb-flat:where(:not(.tb-menu)) {
    width: calc(100vw - 20px) !important; height: calc(100dvh - 24px) !important;
    left: 10px !important; top: 12px !important; transform: none !important;
    border: 6px solid #37372f; outline: 1px solid #b9a56a66; border-radius: 15px !important;
    clip-path: none !important; box-sizing: border-box; box-shadow: 0 12px 70px #000a;
  }
  body:has(.tablet-screen.tb-flat:not(.tb-menu)) .tablet-model { opacity: 0; }
  .tablet-screen.tb-flat:where(:not(.tb-menu)) .tb-bar { height: 43px; padding: 0 9px; }
  .tablet-screen.tb-flat:where(:not(.tb-menu)) .tb-title { font-size: 10px; letter-spacing: .03em; }
  .tablet-screen.tb-flat:where(:not(.tb-menu)) .tb-title .ico { width: 17px; margin-right: 7px; }
  .tablet-screen.tb-flat:where(:not(.tb-menu)) :is(.tb-stripes, .tb-status .tb-signal) { display: none; }
  .tablet-screen.tb-flat:where(:not(.tb-menu)) .tb-status { gap: 5px; }
  .tablet-screen.tb-flat:where(:not(.tb-menu)) .tb-status small { padding-left: 6px; font-size: 10px; }
  .tablet-screen.tb-flat:where(:not(.tb-menu)) .tb-back { margin-right: 7px; min-height: 32px; min-width: 32px; }
  .tablet-screen.tb-flat:where(:not(.tb-menu)) .tb-content { padding: 13px 12px; }
  .tablet-screen.tb-flat #quest-card .tm-v2 { gap: 13px; }
  .tablet-screen.tb-flat #quest-card .tm-heading { grid-template-columns: 48px 1fr; gap: 12px; }
  .tablet-screen.tb-flat #quest-card .tm-icon { width: 46px; height: 48px; }
  .tablet-screen.tb-flat #quest-card .tm-icon svg { width: 34px; height: 34px; }
  .tablet-screen.tb-flat #quest-card .tm-eyebrow { font-size: 10px; letter-spacing: .04em; }
  .tablet-screen.tb-flat #quest-card .tm-title { font-size: 25px; }
  .tablet-screen.tb-flat #quest-card .tm-v2 .tm-copy { max-width: none; }
  .tablet-screen.tb-flat #quest-card .tm-v2 .tm-scenery { right: 0; opacity: .28; }
  .tablet-screen.tb-flat #quest-card .tg-v2 .tg-scenery { right: 0; }
  .tablet-screen.tb-flat #quest-card .tm-v2 :is(.tm-body p, .tm-mission p) { font-size: 15px; }
  .tablet-screen.tb-flat #quest-card .tm-reward b { font-size: 15px; }
  .tablet-screen.tb-flat #quest-card .pl-cap { font-size: 15px; }
  .tablet-screen.tb-flat #quest-card .tm-actions { display: grid; grid-template-columns: 1fr; }
  .tablet-screen.tb-flat #quest-card .tm-go { width: 100%; min-height: 48px; order: -1; margin-left: 0; }
  .tablet-screen.tb-flat #quest-card .tm-cancel { min-height: 44px; }
  .tablet-screen.tb-flat #quest-card .tm-link { text-align: center; justify-content: center; }
  .tablet-screen.tb-flat #quest-card .tm-msg.tg-v2 .tg-pick { grid-template-columns: 1fr; gap: 10px; }
  .tablet-screen.tb-flat #quest-card .tm-msg.tg-v2 .tg-tire { min-height: 158px; grid-template-columns: 39% 1fr; }
  .tablet-screen.tb-flat #quest-card .tm-msg.tg-v2 .tg-tire > img { height: 145px; }
  .tablet-screen.tb-flat #quest-card .tm-msg.tg-v2 .tg-tire-copy > b { font-size: 22px; }
  .tablet-screen.tb-flat #quest-card .tm-msg.tg-v2 .tg-tire li { font-size: 13px; }
  .tablet-screen.tb-flat #quest-card .tm-msg.tg-v2.tg-press .tg-layout > .tg { grid-template-columns: 1fr 1fr; }
  .tablet-screen.tb-flat #quest-card .tg-wheel { grid-column: 1/-1; width: 120px; justify-self: center; }
  .tablet-screen.tb-flat #quest-card .tm-msg.tg-v2.tg-press .tm-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .tablet-screen.tb-flat #quest-card .tg-press .tg-btn { grid-column: 1/-1; grid-row: 1; min-height: 52px; justify-content: center; }
  .tablet-screen.tb-flat #quest-card .tg-press .tg-bleed { grid-column: 1; grid-row: 2; }
  .tablet-screen.tb-flat #quest-card .tg-press .tm-cancel { grid-column: 2; grid-row: 2; }
  .tablet-screen.tb-flat #quest-card .tm-msg.tg-v2 .tg-task p { font-size: 14px; }
  .tablet-screen.tb-flat .exp-camp-reward { padding: 9px 10px; gap: 8px; }
  .tablet-screen.tb-flat .exp-camp-reward em { max-width: 70px; }
  .tablet-screen.tb-flat #map-page .mp-grid { grid-template-columns: 1fr; }
  .tablet-screen.tb-flat #map-page.exp-panel .mp-side { max-height: none; overflow: visible; }
  .tablet-screen.tb-flat .exp-continue { width: 100%; }
  .tablet-screen.tb-flat #map-page .mp-grid > canvas { width: 100%; height: auto; max-height: 280px; object-fit: contain; }
  .tablet-screen.tb-flat #about.exp-panel .about-body { grid-template-columns: 1fr !important; }
  .tablet-screen.tb-flat #about .about-photo { grid-row: auto; max-height: 160px; width: 100%; }
  .tablet-screen.tb-flat #reviews .rv-grid { grid-template-columns: 1fr 1fr !important; grid-template-rows: 125px 125px !important; }
  .tablet-screen.tb-flat #trips .tr-grid { grid-template-columns: 1fr !important; }
  .tablet-screen.tb-flat .exp-panel :is(.cp-fields, .rf-form, .pt-fields) { display: flex; flex-direction: column; align-items: stretch; }
  .tablet-screen.tb-flat #portal .pt-actions { flex-direction: column; align-items: stretch; }
  .tablet-screen.tb-flat #portal .pt-actions button { min-width: 0; width: 100%; white-space: normal; }
  .tablet-screen.tb-flat #portal.exp-panel .pt-next { aspect-ratio: auto !important; width: 100%; min-height: 135px; box-sizing: border-box; }
  .tablet-screen.tb-flat #portal.exp-panel .pt-fields:not([hidden]) { display: flex; flex-direction: column; align-items: stretch; }
}
@media (max-width: 600px) and (max-height: 740px) and (orientation: portrait) {
  .tablet-screen.tb-flat #quest-card .tg-press .tg-wheel { display: none; }
  .tablet-screen.tb-flat #quest-card .tm-msg.tg-v2.tg-press { gap: 7px 10px; grid-template-columns: 46px minmax(0,1fr); }
  .tablet-screen.tb-flat #quest-card .tg-press .tm-icon { width: 44px; height: 44px; }
  .tablet-screen.tb-flat #quest-card .tg-press .tm-eyebrow { font-size: 9px; }
  .tablet-screen.tb-flat #quest-card .tm-msg.tg-v2.tg-press .tm-title { font-size: 22px; }
  .tablet-screen.tb-flat #quest-card .tg-press .tg-step { margin-top: 4px; font-size: 10px; }
  .tablet-screen.tb-flat #quest-card .tg-press .tg-task { padding: 8px 10px; }
  .tablet-screen.tb-flat #quest-card .tg-press .tg-task p { font-size: 13px; }
  .tablet-screen.tb-flat #quest-card .tg-press .tg-card { padding: 7px; }
  .tablet-screen.tb-flat #quest-card .tg-press .tg-card strong { font-size: 24px; }
  .tablet-screen.tb-flat #quest-card .tg-press .tg-card.rec strong { font-size: 20px; }
  .tablet-screen.tb-flat #quest-card .tg-press .tg-reward { padding: 6px 9px; font-size: 11px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .tablet-screen:where(:not(.tb-menu)) .tb-bar { height: 34px; }
  .tablet-screen:where(:not(.tb-menu)) .tb-content { padding: 8px 14px; }
  #quest-card .tm-msg:is(.tm-v2, .tg-v2) :is(.tm-scenery, .tg-scenery) { right: 0; }
  #quest-card .tm-v2 { gap: 8px; }
  #quest-card .tm-v2 .tm-heading { min-height: 54px; grid-template-columns: 50px 1fr; gap: 13px; }
  #quest-card .tm-v2 .tm-icon { width: 48px; height: 48px; }
  #quest-card .tm-v2 .tm-icon svg { width: 34px; height: 34px; }
  #quest-card .tm-v2 .tm-title { font-size: 26px; padding-bottom: 7px; }
  #quest-card .tm-v2 .tm-eyebrow { font-size: 10px; margin-bottom: 5px; }
  #quest-card .tm-v2 .tm-body p { font-size: 13px; }
  #quest-card .tm-v2 .tm-mission { margin-top: 7px; padding: 8px 11px; }
  #quest-card .tm-v2 .tm-mission p { font-size: 13px; }
  #quest-card .tm-v2 .tm-controls { margin-top: 6px; font-size: 12px; }
  #quest-card .tm-v2 .tm-reward { padding: 8px 12px; }
  #quest-card .tm-v2 .tm-reward b { font-size: 14px; }
  #quest-card .tm-v2 .tm-details summary { padding: 7px 0; }
  #quest-card .tm-v2 .tm-chip { padding: 6px 9px; }
  #quest-card .tm-v2 .tm-gallery { margin-top: 6px; }
  #quest-card .tm-v2 .pl-photo { max-height: 70px; }
  #quest-card .tm-v2 .pl-cap { font-size: 14px; }
  #quest-card .tm-msg.tg-v2 { gap: 7px 12px; grid-template-columns: 48px 1fr; }
  #quest-card .tm-msg.tg-v2 .tm-icon { width: 46px; height: 46px; }
  #quest-card .tm-msg.tg-v2 .tm-icon svg { width: 33px; height: 33px; }
  #quest-card .tm-msg.tg-v2 .tm-title { font-size: 25px; padding-bottom: 6px; }
  #quest-card .tm-msg.tg-v2 .tm-eyebrow { margin-bottom: 5px; font-size: 9px; }
  #quest-card .tm-msg.tg-v2 .tg-step { margin-top: 4px; font-size: 10px; }
  #quest-card .tm-msg.tg-v2 .tg-state { margin-bottom: 7px; font-size: 12px; }
  #quest-card .tm-msg.tg-v2 .tg-tire { min-height: 120px; padding: 7px; }
  #quest-card .tm-msg.tg-v2 .tg-tire > img { height: 105px; }
  #quest-card .tm-msg.tg-v2 .tg-tire-copy > b { font-size: 18px; }
  #quest-card .tm-msg.tg-v2 .tg-tire-copy > small { margin-bottom: 7px; font-size: 10px; }
  #quest-card .tm-msg.tg-v2 .tg-tire ul { gap: 5px; padding-top: 6px; }
  #quest-card .tm-msg.tg-v2 .tg-tire li { font-size: 10px; }
  #quest-card .tm-msg.tg-v2 .tg-reward { padding: 6px 10px; font-size: 11px; }
  #quest-card .tm-msg.tg-v2.tg-press { grid-template-columns: 48px minmax(0,1fr) 27%; }
  #quest-card .tm-msg.tg-v2 .tg-task { padding: 9px; }
}
/* Every action area occupies the bottom of the glass; only its content scrolls. */
.tablet-screen .tb-content:has(> :is(#quest-card, .has-actions-dock):is(.open, .tb-last)) { overflow: hidden; }
.tablet-screen .tb-content > #quest-card:is(.open, .tb-last),
.tablet-screen .tb-content > .has-actions-dock:is(.open, .tb-last) {
  height: 100%; min-height: 0; margin-bottom: 0 !important; box-sizing: border-box;
}
.tablet-screen .tb-content > .has-actions-dock:is(.open, .tb-last) { display: flex !important; flex-direction: column; overflow: hidden !important; }
.tablet-screen .exp-panel-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-right: 5px; }
.tablet-screen .exp-panel-actions { flex: none; display: flex; flex-direction: column; gap: 9px; max-height: 60%; overflow-y: auto; padding: 11px 2px 3px; border-top: 1px solid var(--exp-line); }
.tablet-screen .exp-panel-actions [hidden] { display: none !important; }
.tablet-screen .exp-panel-actions :is(.exp-camp-actions, .cp-actions, .pt-actions, .rf-actions) { justify-content: flex-start; margin: 0 !important; padding-top: 0 !important; border-top: 0; }
.tablet-screen .exp-camp-actions { justify-content: flex-start; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.tablet-screen .exp-panel-actions :is(.about-links, footer) { width: auto !important; padding: 0 !important; margin: 0 !important; background: none !important; }
.tablet-screen .exp-panel-actions :is(.cp-form, .pt-notify) { margin: 0; }
.tablet-screen .exp-panel-actions :is(.cp-status, .rf-status, .pt-status):empty { display: none; }
.tablet-screen #portal.exp-panel .exp-panel-actions .pt-fields { grid-template-columns: 1fr 1fr; }
.tablet-screen #portal.exp-panel .exp-panel-actions .pt-submit { grid-column: 1/-1; justify-self: start; }
.tablet-screen #portal.exp-panel .exp-panel-actions .pt-actions button { flex: 0 1 auto; }
body.touch .tablet-screen #portal .exp-panel-actions > .pt-actions { order: -1; }
body.touch .tablet-screen #coupon .cp-fields { grid-template-columns: 1fr 1fr 1.2fr; }
.tablet-screen #coupon .cp-img { max-width: min(620px, 55cqw); }   /* надпись купона целиком над кодом и формой */
body.touch .tablet-screen #coupon:not(:has(.cp-fields[hidden])) .cp-img { display: none; }   /* телефон до заявки: от картинки оставалась полоска; сумма — в тексте, код — ниже */   /* телефон: поля в ряд — код купона и кнопка заявки помещаются в панель */   /* телефон: «Остаться» первой — низ панели уходит под прокрутку */
.tablet-screen #race-finish.exp-panel .exp-panel-actions .rf-form { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; margin: 0; padding: 0; }
.tablet-screen #race-finish.exp-panel .exp-panel-actions .rf-actions { padding-inline: 0; }
.tablet-screen .exp-panel-actions :is(button, a) { margin-left: 0; text-align: left; }
#quest-card .tm-msg:is(.tm-v2, .tg-v2) { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 0; gap: 10px; }
/* Safari на iPhone (17 Pro Max, 17.11): height: 100% внутри прокручиваемого .tb-content он брал от всего экрана планшета —
   окно выходило на высоту шапки и отступа ниже стекла, ряд кнопок обрезался. Без процентов: колонки flex, окно и сообщение тянутся flex: 1. */
body .tablet-screen .tb-content:has(> :is(#quest-card, .has-actions-dock):is(.open, .tb-last)) { display: flex; flex-direction: column; }
body .tablet-screen .tb-content > :is(#quest-card, .has-actions-dock):is(.open, .tb-last) { flex: 1 1 0; height: auto; }
body .tablet-screen .tb-content > #quest-card:is(.open, .tb-last) { display: flex !important; flex-direction: column; }
body .tablet-screen #quest-card .tm-msg:is(.tm-v2, .tg-v2) { flex: 1 1 0; height: auto; }
#quest-card .tm-scroll { position: relative; isolation: isolate; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; overflow-x: hidden; padding: 4px 2px; }
#quest-card .tm-scroll > * { flex-shrink: 0; }
#quest-card .tg-layout { position: relative; isolation: isolate; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; display: grid; grid-template-columns: inherit; align-content: start; gap: inherit; padding: 2px; }
#quest-card .tm-msg:is(.tm-v2, .tg-v2) > .tm-actions { position: static; flex: none; justify-content: flex-start; margin: 0; padding: 11px 2px 3px; border-top: 1px solid #9dbb912e; background: none; }
#quest-card .tm-msg:is(.tm-v2, .tg-v2) .tm-actions :is(.tm-go, .tg-confirm) { margin-left: 0; }
/* ряд кнопок окна — по одной линии: основная и второстепенные одной высоты, у второстепенных такая же «ступенька» тени
   снизу, как у жёлтой (иначе низ жёлтой кнопки торчал на 2–5 px); подсказка клавиши и ссылка — по центру ряда, без отступов */
#quest-card .tm-msg:is(.tm-v2, .tg-v2) > .tm-actions { align-items: center; }
#quest-card .tm-msg:is(.tm-v2, .tg-v2) > .tm-actions > :is(.tm-go, .tg-confirm, .tm-cancel) { box-sizing: border-box; min-height: 46px; margin-top: 0; margin-bottom: 0; align-self: stretch; }   /* все — высотой с самую высокую */
#quest-card .tm-msg:is(.tm-v2, .tg-v2) > .tm-actions > .tm-cancel { display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 3px 0 #06130c; }
#quest-card .tm-msg:is(.tm-v2, .tg-v2) > .tm-actions > :is(.tm-key, .tm-link) { margin: 0; align-self: center; }
#quest-card .tm-msg:is(.tm-v2, .tg-v2) > .tm-actions > .tm-go svg { max-height: 22px; }
#quest-card .tm-v2 .tm-body.with-video { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,36%); align-items: start; gap: 18px; }
#quest-card .tm-v2 .tm-body.with-video .tm-copy { max-width: none; }
#quest-card .tm-v2 .tm-story-media { min-width: 0; }
#quest-card .tm-v2 .tm-story-media .tm-video { max-height: 225px; object-fit: cover; }   /* без полос по бокам: ролик чуть крупнее, края обрезаны */
#quest-card .tm-v2 .tm-story-media.is-portrait .tm-video { aspect-ratio: 9/16; height: 225px; width: auto; margin: 0 auto; }   /* ширина — от высоты, иначе снова широкая рамка */
#quest-card .tm-msg.tg-v2 .tg-tire.is-recommended { border: 2px solid #ffc740; background: radial-gradient(ellipse at 20% 100%,#b8872633,transparent 75%),#10291b; }
#quest-card .tm-msg.tg-v2 .tg-tire[data-kind="road"]:not(.is-selected) { opacity: .75; }
#quest-card .tm-msg.tg-v2 .tg-recommend { display: inline-block; margin-bottom: 7px; padding: 4px 6px; border-radius: 5px; background: #ffc740; color: #192014; font: 700 10px/1.1 "Play",sans-serif; letter-spacing: .03em; text-transform: none; }
#quest-card .tm-msg.tg-v2 .tg-pick-hint { display: flex; align-items: center; gap: 5px; margin-top: 9px; color: #ffce5b; font: 700 11px/1.2 "Play",sans-serif; letter-spacing: normal; text-transform: none; }
#quest-card .tm-msg.tg-v2 .tg-pick-hint .exp-icon { width: 12px; height: 12px; }
@media (max-width: 600px) and (orientation: portrait) {
  #quest-card .tm-v2 .tm-body.with-video { grid-template-columns: 1fr; gap: 12px; }
  #quest-card .tm-v2 .tm-story-media .tm-video { max-height: 185px; }
  #quest-card .tm-v2 .tm-story-media.is-portrait .tm-video { height: 185px; }
  .tablet-screen.tb-flat #quest-card .tg-choose > .tm-actions { flex-direction: column; align-items: stretch; }
  .tablet-screen.tb-flat #quest-card .tg-confirm { width: 100%; }
  .tablet-screen.tb-flat .exp-panel-actions .exp-camp-actions { align-items: stretch; flex-direction: column; }
}
@media (max-height: 500px) and (orientation: landscape) {
  #quest-card .tm-scroll { gap: 8px; }
  #quest-card .tm-v2 .tm-story-media .tm-video { max-height: 155px; }
  #quest-card .tm-v2 .tm-story-media.is-portrait .tm-video { height: 155px; }
  #quest-card .tm-msg.tg-v2 .tg-recommend { padding: 3px 5px; margin-bottom: 4px; font-size: 9px; }
  #quest-card .tm-msg.tg-v2 .tg-pick-hint { margin-top: 5px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .tablet-screen *, .tablet-screen *::before, .tablet-screen *::after { transition: none !important; animation: none !important; scroll-behavior: auto; }
}
