/* Личный кабинет: вход, регистрация, скин с 3D-просмотром и пароль. Рамки и кнопки — из styles.css,
   цвета — только переменные палитры, поэтому хеллоуинская тема перекрашивает и кабинет. */
.cabinet-page { padding-bottom: 0; }
.cabinet-main:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.button-account.is-current { --face: var(--plum-500); --line: var(--peri-600); }
/* Недоступная кнопка гаснет до тихой каменной, без «грязного» серого поверх цветной */
.button:disabled { --face: var(--plum-600); --hi: var(--plum-500); --lo: var(--plum-800); color: var(--cream-mute); text-shadow: none; cursor: not-allowed; filter: none; }
.button:disabled .icon { color: var(--cream-mute); }
.button:disabled:active { padding-top: 0; padding-bottom: 3px; box-shadow: var(--frame-out), inset 0 var(--u) 0 0 var(--hi), inset 0 calc(var(--u) * -2) 0 0 var(--lo); }
.button[aria-busy="true"] { cursor: progress; }
.button-wide { width: 100%; }
.button-danger:not(.button-primary) .icon { color: var(--peach); }
.button-danger:not(.button-primary):hover:not(:disabled) { --face: var(--peach-700); --hi: var(--peach-600); --lo: var(--plum-950); }
.text-button:disabled { opacity: .5; cursor: default; text-decoration: none; }

/* ── Заголовок и сетка кабинета ── */
.cabinet-band { padding: 54px 0 90px; }
.cabinet-heading { max-width: 760px; margin-bottom: 39px; }
.cabinet-heading h1 { font-size: clamp(30px, 4.2vw, 48px); line-height: 1.1; text-shadow: 5px 5px 0 var(--plum-950); }
.cabinet-heading > p:not(.eyebrow) { margin-top: 18px; color: var(--cream-dim); }
.cabinet-heading .eyebrow .icon { color: var(--peach); }
/* Слева — панели входа или кабинета, справа — 3D-просмотр на всю высоту. Скрытые панели места не занимают. */
.cabinet { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); grid-template-rows: auto auto 1fr; grid-template-areas: "main stage" "more stage" "last stage"; gap: 30px 48px; align-items: start; }
.cab-loading, .cab-auth, .account-card { grid-area: main; }
.cab-perks, .cab-skin { grid-area: more; }
.cab-password { grid-area: last; }
.showcase { grid-area: stage; }

.cab-panel { padding: 27px 27px 30px; }
.cab-title { display: flex; align-items: center; gap: 14px; margin-bottom: 21px; font-size: 20px; line-height: 1.2; }
.cab-badge { display: grid; place-items: center; width: 39px; height: 39px; flex: none; background: var(--peach); color: var(--plum-950); --hi: var(--peach-300); --lo: var(--peach-600); box-shadow: var(--frame-out), var(--frame-in); }
.cab-badge .icon { width: 24px; height: 24px; }
.cab-badge.is-danger { margin-bottom: 3px; }

/* Проверка входа: три мигающих блока, как загрузка мира */
.cab-loading { display: grid; justify-items: start; gap: 6px; min-height: 240px; align-content: center; }
.cab-loading .cab-title { margin: 12px 0 0; }
.cab-loading .form-message { margin-top: 0; }
.cab-dots { display: flex; gap: 9px; }
.cab-dots i { width: 15px; height: 15px; background: var(--peri); box-shadow: 0 0 0 3px var(--plum-950); animation: cabDot 1.2s steps(2, jump-none) infinite; }
.cab-dots i:nth-child(2) { animation-delay: .2s; } .cab-dots i:nth-child(3) { animation-delay: .4s; }
.cabinet[data-view="offline"] .cab-dots { display: none; }
@keyframes cabDot { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
/* Скрипт кабинета не запустился (файл не дошёл): через 12 с точки и «Проверяем вход…» уступают место объяснению.
   account.js ставит data-started, когда готов, — тогда таймер не действует. Без JavaScript объяснение сразу, из <noscript>. */
.cab-stuck { display: grid; gap: 9px; max-width: 520px; color: var(--cream-dim); font-size: 15px; line-height: 1.55; }
.cab-stuck strong { color: var(--cream); font: 18px/1.3 var(--mc); font-weight: 400; word-spacing: -.3em; }
.cab-stuck .text-button { display: inline; padding: 0; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.cab-late { max-height: 0; overflow: hidden; visibility: hidden; }
.cabinet[data-view="loading"]:not([data-started]) .cab-late { animation: cabLate 0s 12s forwards; }
.cabinet[data-view="loading"]:not([data-started]) :is(.cab-dots, #loading-title, #loading-message) { animation: cabGone 0s 12s forwards; }
@keyframes cabLate { to { max-height: 40em; overflow: visible; visibility: visible; } }
@keyframes cabGone { to { max-height: 0; min-height: 0; margin: 0; overflow: hidden; visibility: hidden; } }
@media (scripting: none) {
  .cab-dots, #loading-title, #loading-message, .cab-late, .showcase { display: none; }
}

/* ── Вкладки «Вход» / «Регистрация» ── */
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 27px; background: var(--inset); box-shadow: var(--frame-out); }
.auth-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 12px 3px; border: 0; background: transparent; color: var(--plum-300); font: 15px/1 var(--mc); word-spacing: -.3em; }
.auth-tabs button:hover { color: var(--cream); }
.auth-tabs button[aria-selected="true"] { background: var(--peach); color: var(--plum-950); box-shadow: inset 0 3px 0 var(--peach-300), inset 0 -3px 0 var(--peach-600); }
.auth-tabs .icon { width: 12px; height: 12px; }
.auth-switch { margin-top: 18px; color: var(--cream-mute); font-size: 14px; line-height: 1.5; }
.auth-switch .text-button { padding: 0; font-size: 13px; }
.auth-switch a { color: var(--peri); text-decoration: underline; text-underline-offset: 3px; }
.auth-switch a:hover { color: var(--cream); }
.auth-switch + .auth-switch { margin-top: 9px; }

/* ── Поля ввода ── */
.field { display: grid; gap: 9px; min-width: 0; margin-bottom: 21px; }
.field-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.field label, .field-head label { color: var(--cream-dim); font: 14px/1.2 var(--mc); word-spacing: -.3em; }
.field-count { color: var(--cream-mute); font: 12px/1 var(--mc); }
.field-count.is-full { color: var(--peach-300); }
.input-wrap { position: relative; display: flex; }
.input { width: 100%; min-width: 0; height: 48px; margin: 0; padding: 0 15px 2px; border: 0; border-radius: 0; background: var(--inset); color: var(--cream); font: 16px/1 var(--body); --hi: var(--inset-hi); --lo: var(--inset-lo); box-shadow: var(--frame-out), var(--frame-in); appearance: none; }
.input-wrap .input { padding-right: 54px; }
.input.is-name { font-family: var(--mc); font-size: 16px; letter-spacing: .02em; }
.input::placeholder { color: var(--plum-400); }
.input:hover { --line: var(--plum-400); }
.input:focus { outline: none; --line: var(--peri-300); }
.input:focus-visible { --line: var(--cream); }
.input[aria-invalid="true"] { --line: var(--peach); }
.input::-ms-reveal { display: none; }
/* Глаз: показать или скрыть пароль */
.peek { position: absolute; right: 6px; top: 6px; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; background: transparent; color: var(--plum-300); }
.peek:hover, .peek[aria-pressed="true"] { color: var(--peri-300); }
.peek .icon { width: 24px; height: 24px; }
.peek:focus-visible { outline-offset: -3px; }
/* Правила ника и пароля, как флажки: пустая клетка, пока поле пустое, зелёная с галочкой — выполнено, персиковая с крестиком — нет.
   Галочку от крестика отличают и без цвета. */
.rules { display: grid; gap: 7px; margin: 3px 0 0; padding: 0; list-style: none; color: var(--cream-mute); font-size: 14px; line-height: 1.35; }
.rules li { display: flex; align-items: center; gap: 11px; }
.rule-mark { display: grid; place-items: center; width: 18px; height: 18px; flex: none; background: var(--plum-800); color: var(--plum-950); box-shadow: inset 0 0 0 3px var(--plum-600); }
.rule-mark .icon { width: 12px; height: 12px; visibility: hidden; }
.rules li[data-state="ok"] { color: var(--sage-300); }
.rules li[data-state="bad"] { color: var(--peach-300); }
.rules li[data-state="ok"] .rule-mark { background: var(--sage); box-shadow: none; }
.rules li[data-state="bad"] .rule-mark { background: var(--peach); box-shadow: none; }
.rules li:is([data-state="ok"], [data-state="bad"]) .rule-mark .icon { visibility: visible; }
.field-error { display: flex; gap: 10px; color: var(--peach-300); font-size: 14px; line-height: 1.4; }
.field-error:empty { display: none; }
.field-error::before { content: "!"; display: grid; place-items: center; width: 18px; height: 18px; flex: none; margin-top: 1px; background: var(--peach); color: var(--plum-950); font: 12px/1 var(--mc); }
.field-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 18px; }
/* Итог отправки формы: место под строку зарезервировано, поэтому сообщение ничего не сдвигает */
.form-message { display: flex; gap: 10px; min-height: 21px; margin-top: 15px; color: var(--cream-dim); font-size: 14px; line-height: 1.5; }
.form-message:empty { visibility: hidden; }
.form-message::before { content: ""; width: 9px; height: 9px; flex: none; margin-top: 6px; background: var(--peri); box-shadow: 0 0 0 3px var(--plum-950); }
.form-message[data-kind="error"] { color: var(--peach-300); }
.form-message[data-kind="error"]::before { background: var(--peach); }
.form-message[data-kind="ok"] { color: var(--sage-300); }
.form-message[data-kind="ok"]::before { background: var(--sage); }

/* ── Что даёт аккаунт ── */
.perks { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.perks li { display: flex; gap: 15px; align-items: flex-start; }
.perks .icon { width: 24px; height: 24px; margin-top: 1px; color: var(--peri); }
.perks span { display: grid; gap: 4px; color: var(--cream-dim); font-size: 15px; line-height: 1.45; }
.perks strong { color: var(--cream); font: 15px/1.25 var(--mc); font-weight: 400; word-spacing: -.3em; }

/* ── Карточка аккаунта ── */
.account-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 21px; align-items: center; }
.head-frame { display: grid; place-items: center; width: 90px; height: 90px; background: var(--inset); --hi: var(--inset-hi); --lo: var(--inset-lo); box-shadow: var(--frame-out), var(--frame-in), 0 0 24px color-mix(in srgb, var(--peri) 18%, transparent); }
.head-frame canvas { display: block; width: 66px; height: 66px; image-rendering: pixelated; filter: drop-shadow(3px 3px 0 var(--plum-950)); }
.account-info { min-width: 0; }
.account-kind { display: flex; align-items: center; gap: 9px; color: var(--peach); font: 12px/1 var(--mc); letter-spacing: .06em; word-spacing: -.3em; }
.account-kind .icon { width: 12px; height: 12px; }
.account-name { margin: 9px 0 8px; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.1; overflow-wrap: anywhere; text-shadow: 3px 3px 0 var(--plum-950); }
.account-name:focus { outline: none; }
.account-meta { color: var(--cream-dim); font-size: 14px; }
.account-logout { grid-column: 3; grid-row: 1; align-self: start; min-height: 39px; font-size: 14px; }
.account-id { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 15px; background: var(--inset); --hi: var(--inset-hi); --lo: var(--inset-lo); box-shadow: var(--frame-out), var(--frame-in); }
.account-id .label { color: var(--cream-mute); font-size: 12px; }
.account-id code { min-width: 0; color: var(--cream-dim); font: 13px/1.3 Consolas, "Cascadia Mono", monospace; overflow-wrap: anywhere; user-select: all; }
.account-id .text-button { margin-left: auto; }

/* ── Скин: файл, модель рук и действия ── */
.dropzone { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; padding: 18px 21px 18px 18px; background: var(--inset); --hi: var(--inset-hi); --lo: var(--inset-lo); box-shadow: var(--frame-out), var(--frame-in); cursor: pointer; transition: background .15s; }
.dropzone:hover, .dropzone.is-over { --line: var(--peach); background: color-mix(in srgb, var(--peach) 10%, var(--inset)); }
.dropzone:has(input:focus-visible) { outline: 3px solid var(--cream); outline-offset: 3px; }
.dropzone-icon { display: grid; place-items: center; width: 54px; height: 54px; background: var(--peach); color: var(--plum-950); --hi: var(--peach-300); --lo: var(--peach-600); box-shadow: var(--frame-out), var(--frame-in); }
.dropzone-icon .icon { width: 36px; height: 36px; }
.dropzone-text { display: grid; gap: 7px; min-width: 0; }
.dropzone strong { font: 15px/1.3 var(--mc); font-weight: 400; word-spacing: -.3em; }
.dropzone small { color: var(--cream-mute); font-size: 14px; line-height: 1.45; }
.dropzone .tap-copy { display: none; }
/* На сенсорном экране файл не перетащить — остаётся только выбор. Узкое окно с мышью перетаскивание сохраняет. */
@media (hover: none) and (pointer: coarse) {
  .dropzone .drop-copy { display: none; }
  .dropzone .tap-copy { display: inline; }
}
/* Скин в игре без своего: какой он и кто его видит */
.skin-note { margin: -6px 0 21px; color: var(--cream-mute); font-size: 14px; line-height: 1.5; }
.models { margin: 24px 0 0; padding: 0; border: 0; min-width: 0; }
.models legend { margin-bottom: 12px; padding: 0; color: var(--cream-dim); }
.models-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 15px; }
.model-option { position: relative; display: flex; align-items: center; gap: 15px; min-width: 0; padding: 12px 15px; background: var(--plum-800); color: var(--cream-dim); --hi: var(--plum-600); --lo: var(--plum-950); box-shadow: var(--frame-out), var(--frame-in); cursor: pointer; }
.model-option:hover { --line: var(--cream); color: var(--cream); }
.model-option:has(input:checked) { background: var(--peri); color: var(--plum-950); --hi: var(--peri-300); --lo: var(--peri-600); }
.model-option:has(input:focus-visible) { outline: 3px solid var(--cream); outline-offset: 3px; }
.model-text { display: grid; gap: 5px; min-width: 0; }
.model-text strong { font: 14px/1.2 var(--mc); font-weight: 400; word-spacing: -.3em; }
.model-text small { font-size: 13px; opacity: .8; }
/* Схема модели: голова, тело и руки шириной 4 или 3 пикселя скина (по 3 px экрана на пиксель) */
.model-glyph { display: grid; grid-template-columns: auto 24px auto; grid-template-rows: 21px 33px; column-gap: 3px; flex: none; }
.model-glyph::before { content: ""; grid-column: 2; grid-row: 1; width: 21px; height: 18px; justify-self: center; background: currentColor; }
.model-glyph i { grid-row: 2; width: calc(var(--arm) * 3px); height: 30px; background: currentColor; opacity: .6; }
.model-glyph b { grid-row: 2; grid-column: 2; background: currentColor; }
.skin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 21px; margin-top: 27px; }
.skin-actions .button { min-width: 228px; }
.cab-skin .form-message { margin-top: 12px; }
.skin-tools { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 12px; padding-top: 21px; box-shadow: inset 0 3px 0 var(--plum-800); }
.skin-tools .button { min-height: 39px; font-size: 14px; }

/* ── Витрина: рама картины с 3D-моделью ── */
.showcase { position: sticky; top: 90px; display: grid; gap: 21px; }
.skin-frame { position: relative; height: clamp(440px, calc(100vh - 230px), 620px); margin: 18px; overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse 58% 46% at 50% 40%, rgba(167, 172, 201, .16), transparent 72%), linear-gradient(to top, var(--plum-850) 0 14%, transparent 34%), var(--plum-950) url("textures/deep.png") 0 0 / 64px 64px;
  box-shadow: 0 0 0 3px var(--plum-950), 0 0 0 6px var(--peach), 0 0 0 15px var(--plum), 0 0 0 18px var(--plum-950), 0 36px 80px 18px rgba(10, 6, 12, .5); }
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .skin-frame { background: radial-gradient(ellipse 58% 46% at 50% 40%, color-mix(in srgb, var(--peri) 20%, transparent), transparent 72%), linear-gradient(to top, var(--plum-850) 0 14%, transparent 34%), var(--plum-950) url("textures/deep.png") 0 0 / 64px 64px; }
}
.skin-stage { position: absolute; inset: 0; z-index: 0; }
.skin-host { position: absolute; inset: 0; }
.frame-chip { position: absolute; z-index: 2; left: 15px; top: 15px; display: inline-flex; align-items: center; gap: 8px; max-width: calc(50% - 21px); height: 30px; padding: 0 11px 2px; overflow: hidden; background: var(--plum-800); color: var(--cream-dim); font: 12px/1 var(--mc); word-spacing: -.3em; white-space: nowrap; text-overflow: ellipsis; box-shadow: 0 0 0 3px var(--plum-950), inset 0 3px 0 var(--plum-600); pointer-events: none; }
.frame-chip.is-dirty { background: var(--peach); color: var(--plum-950); box-shadow: 0 0 0 3px var(--plum-950), inset 0 3px 0 var(--peach-300), inset 0 -3px 0 var(--peach-600); }
.frame-chip.is-saved { background: var(--sage); color: var(--plum-950); box-shadow: 0 0 0 3px var(--plum-950), inset 0 3px 0 var(--sage-300), inset 0 -3px 0 var(--sage-600); }
.frame-model { left: auto; right: 15px; }
.frame-hint { position: absolute; z-index: 2; left: 50%; bottom: 15px; display: inline-flex; align-items: center; gap: 9px; padding: 7px 12px 8px; background: rgba(23, 19, 26, .82); color: var(--cream-dim); font: 12px/1 var(--mc); word-spacing: -.3em; white-space: nowrap; box-shadow: 0 0 0 3px var(--plum-950); transform: translateX(-50%); pointer-events: none; transition: opacity .4s; }
.frame-hint .icon { width: 12px; height: 12px; color: var(--peri); }
.skin-frame.is-touched .frame-hint { opacity: 0; }
/* Файл над страницей: рамка подсказывает, что его можно отпустить прямо сюда */
.frame-drop { position: absolute; z-index: 3; inset: 15px; display: none; place-items: center; align-content: center; gap: 15px; padding: 21px; background: rgba(23, 19, 26, .78); color: var(--peach-300); font: 15px/1.3 var(--mc); text-align: center; word-spacing: -.3em; box-shadow: inset 0 0 0 3px var(--peach); pointer-events: none; }
.frame-drop .icon { width: 36px; height: 36px; }
.is-dragging .cabinet[data-view="account"] .frame-drop { display: grid; }
.stage-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 15px; padding: 0 18px; }
.stage-tools .button { min-height: 42px; font-size: 14px; }
.segmented { display: inline-flex; background: var(--inset); box-shadow: var(--frame-out); }
.segmented button { display: inline-flex; align-items: center; gap: 9px; height: 42px; padding: 0 16px 3px; border: 0; background: transparent; color: var(--plum-300); font: 14px/1 var(--mc); word-spacing: -.3em; }
.segmented button:hover { color: var(--cream); }
.segmented button[aria-pressed="true"] { background: var(--peri); color: var(--plum-950); box-shadow: inset 0 3px 0 var(--peri-300), inset 0 -3px 0 var(--peri-600); }
.segmented .icon { width: 12px; height: 12px; }
/* Поворот с клавиатуры: стрелки поворачивают модель на 45°, между ними — сброс.
   Обе группы растягиваются: в одну строку — сплошная полоса, а если не влезли, каждая занимает свою строку целиком. */
.turns { display: flex; gap: 9px; }
.segmented, .turns { flex: 1 1 auto; }
.segmented button { flex: 1; justify-content: center; }
.turns #pose-reset { flex: 1 1 auto; }
.stage-tools .turn { flex: none; width: 42px; padding: 0 0 3px; }
.icon.is-mirrored { transform: scaleX(-1); }

/* ── Как играть со скином ── */
.howto { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.howto li { position: relative; padding: 27px 24px 27px; background: rgba(23, 19, 26, .45); box-shadow: var(--frame-out), inset 0 0 0 3px var(--plum-800); }
.howto-step { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 18px; background: var(--peach); color: var(--plum-950); font: 18px/1 var(--mc); --hi: var(--peach-300); --lo: var(--peach-600); box-shadow: var(--frame-out), var(--frame-in); }
.howto h3 { margin-bottom: 10px; color: var(--cream); font-size: 16px; line-height: 1.3; }
.howto p { color: var(--cream-dim); font-size: 15px; line-height: 1.55; }
.howto-more { display: flex; justify-content: center; margin-top: 42px; }

/* ── Подтверждение удаления ── */
.confirm { width: min(460px, 100% - 32px); max-width: none; padding: 0; border: 0; background: transparent; color: var(--cream); overflow: visible; }
.confirm::backdrop { background: rgba(10, 6, 12, .7); }
.confirm-card { display: grid; justify-items: start; gap: 15px; padding: 27px; }
.confirm-card .cab-title { margin: 0; }
.confirm-card p { color: var(--cream-dim); font-size: 15px; line-height: 1.55; }
.confirm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 15px; justify-self: stretch; margin-top: 9px; }
.confirm[open] { animation: confirmIn .22s steps(4) both; }
@keyframes confirmIn { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast { z-index: 70; }

/* ── Узкие экраны: одна колонка, витрина сразу после входа или карточки аккаунта ── */
@media (max-width: 1100px) {
  .account-card { grid-template-columns: auto minmax(0, 1fr); }
  .account-logout { grid-column: 1 / -1; grid-row: auto; justify-self: start; }
  .howto { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .cabinet { position: relative; grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "main" "stage" "more" "last"; gap: 30px; }
  .showcase { position: static; }
  /* Пока проверяется вход, неизвестно, что встанет над витриной: карточка аккаунта или форма входа (она выше).
     Витрина ждёт невидимой и вне потока, а сетка держит высоту экрана, чтобы блоки ниже были за краем:
     после проверки модель появляется сразу на своём месте, и ничего видимое не сдвигается. */
  .cabinet[data-view="loading"] { min-height: 100vh; align-content: start; }
  .cabinet[data-view="loading"] .showcase { position: absolute; top: 0; left: 0; right: 0; visibility: hidden; }
  .skin-frame { height: auto; aspect-ratio: 5 / 6; max-height: 640px; }
  /* Рама по высоте не больше 640 px, значит и по ширине не больше 533 px: витрина такой же ширины и по центру,
     чтобы кнопки под рамой не были шире неё и рама не прилипала к левому краю на планшете. */
  .showcase { width: 100%; max-width: calc(640px * 5 / 6 + 36px); margin-inline: auto; }
  .account-card { grid-template-columns: auto minmax(0, 1fr) auto; }
  .account-logout { grid-column: 3; grid-row: 1; }
}
@media (max-width: 680px) {
  .cabinet-band { padding: 36px 0 60px; }
  .cabinet-heading { margin-bottom: 27px; }
  .cab-panel { padding: 21px 18px 24px; }
  .cab-title { font-size: 18px; }
  .account-card { grid-template-columns: auto minmax(0, 1fr); gap: 18px; }
  .head-frame { width: 72px; height: 72px; }
  .head-frame canvas { width: 54px; height: 54px; }
  .account-logout { grid-column: 1 / -1; grid-row: auto; justify-self: stretch; }
  .account-id .text-button { margin-left: 0; }
  .field-pair { grid-template-columns: minmax(0, 1fr); }
  .dropzone { grid-template-columns: minmax(0, 1fr); justify-items: start; padding: 18px; }
  .models-grid { grid-template-columns: minmax(0, 1fr); }
  .skin-actions .button, .skin-tools .button { flex: 1 1 100%; min-width: 0; }
  .skin-frame { margin: 15px; aspect-ratio: 4 / 5; }
  .showcase { max-width: calc(640px * 4 / 5 + 30px); }
  /* На телефоне рамка узкая: модель ниже полосы с подписью, а модель рук видна в выборе прямо под просмотром. */
  .frame-chip { max-width: calc(100% - 30px); }
  .frame-model { display: none; }
  .skin-stage { top: 39px; bottom: 36px; }
  .stage-tools { padding: 0 6px; }
  .turns, .segmented { flex: 1 1 100%; }
  .howto { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .cab-dots i { animation: none; opacity: .8; }
}
