.tunera-login{gap:16px;display:grid}.tunera-login label{gap:7px;display:grid}.tunera-login input{background:var(--panel,#f5f6fc);color:inherit;border:1px solid #8884;border-radius:12px;width:100%;padding:13px}.tunera-login a{text-decoration:underline}.tunera-login p,.tunera-login small{line-height:1.5}.tunera-login button{border-radius:24px;padding:13px}.real-history{padding:12px 0 350px}.real-history-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;display:grid}.real-history-grid img,.real-history-grid video{object-fit:contain;border-radius:12px;width:100%;max-height:280px}.real-history-grid p{font-size:13px;line-height:1.5}.real-history-grid .pill{margin:5px 5px 0 0}.history-prompt{overflow-wrap:anywhere;max-height:100px;overflow:auto}.generation-price{color:inherit;white-space:nowrap;font-size:12px}.submission-warning{padding:8px 0;font-size:13px;line-height:1.5}.submission-warning button{margin-left:8px;text-decoration:underline}.generate:disabled{opacity:.45;cursor:wait}.fixed-quality{white-space:nowrap;font-size:13px}@media (max-width:1000px){.real-history-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width:600px){.real-history-grid{grid-template-columns:1fr}.generation-price{font-size:11px}}.tunera-login fieldset{border:0;gap:14px;min-width:0;margin:0;padding:0;display:grid}.tunera-login h3,.tunera-login p{margin:0}.tunera-login input{min-width:0;font-size:16px}.tunera-login .auth-links{flex-wrap:wrap;gap:6px 16px;display:flex}.tunera-login .auth-links button{text-align:left;border-radius:4px;padding:4px 0;font-size:14px;text-decoration:underline}.tunera-login button:disabled{opacity:.55;cursor:default}.tunera-login .auth-error{color:var(--ink);border-left:3px solid #dc6e7a;padding-left:10px}.tunera-login input{background:var(--surface);color:var(--ink);border-color:var(--line)}.small-dialog[data-slot=dialog-content]:has(.tunera-login){overscroll-behavior:contain;max-height:calc(100dvh - 24px);overflow-y:auto}.social-auth{gap:12px;display:grid}.social-auth-buttons{justify-content:center;gap:16px;padding:6px 0 2px;display:flex}.tunera-login .social-auth-icon{color:#fff;width:48px;height:48px;min-height:48px;box-shadow:0 4px 12px color-mix(in srgb,var(--social-color) 28%,transparent),0 0 0 3px color-mix(in srgb,var(--social-color) 10%,transparent);background:var(--social-color);cursor:pointer;border:1px solid #ffffff40;border-radius:50%;flex:0 0 48px;place-items:center;padding:12px;transition:box-shadow .16s,transform .16s;display:grid}.social-auth-telegram{--social-color:#229ed9}.social-auth-vk{--social-color:#07f}.social-auth-icon svg{width:24px;height:24px;display:block}.tunera-login .social-auth-icon:hover:not(:disabled){box-shadow:0 6px 18px color-mix(in srgb,var(--social-color) 38%,transparent),0 0 0 4px color-mix(in srgb,var(--social-color) 16%,transparent);transform:translateY(-1px)}.tunera-login .social-auth-icon:focus-visible{outline:3px solid var(--n-focus,#7956ef);outline-offset:4px}.tunera-login .social-auth-icon:active:not(:disabled){transform:translateY(0)}.social-auth-confirm{gap:10px;display:grid}.social-auth-confirm button{border:1px solid var(--line);background:var(--surface);color:var(--ink);min-height:44px;font-size:14px}.telegram-widget-host{max-width:100%;min-height:44px;overflow:auto}.telegram-widget-host[hidden]{display:none}@media (prefers-reduced-motion:reduce){.tunera-login .social-auth-icon{transition:none}.tunera-login .social-auth-icon:hover:not(:disabled){transform:none}}.miniapp-gate{text-align:center;color:#202437;background:#f5f6fc;place-content:center;gap:14px;min-height:100dvh;padding:24px;display:grid}.miniapp-gate button{background:#fff;border:1px solid #d5d2e6;border-radius:14px;padding:14px}.miniapp-gate p{max-width:520px;margin:auto}.generation-status{border:1px solid var(--line,#d8dbe4);background:color-mix(in srgb,var(--accent,#7750ee) 6%,transparent);border-radius:18px;justify-content:space-between;align-items:center;gap:16px;margin:12px 20px;padding:16px 20px;display:flex}.generation-status>div{gap:5px;display:grid}.generation-status span{opacity:.75;font-size:13px}.generation-status button{flex-shrink:0}.real-history article:focus{outline-offset:4px;outline:2px solid #8854ec}@media (max-width:600px){.generation-status{flex-direction:column;align-items:flex-start;margin:10px;padding:14px}.generation-status button{min-height:44px}}.generation-results{margin:16px 0 28px}.results-heading{justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px;display:flex}.results-heading h2{margin:0;font-size:20px;font-weight:650}.results-heading p,.results-empty{color:var(--n-secondary);margin:6px 0;font-size:13px}.results-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;display:grid}.result-card{background:var(--n-surface);border:1px solid #8883;border-radius:20px;min-width:0;overflow:hidden}.result-cover{background:var(--n-field);min-height:170px}.result-cover>button{cursor:zoom-in;width:100%;display:block}.result-cover img,.result-cover video{object-fit:contain;width:100%;height:230px;display:block}.result-placeholder{flex-direction:column;justify-content:center;min-height:170px;padding:24px;font-size:14px;line-height:1.5;display:flex}.result-placeholder p{color:var(--n-secondary);margin-top:10px}.result-details{padding:16px}.result-details h3{margin:8px 0;font-size:15px;font-weight:600}.result-details time{color:var(--n-secondary);font-size:12px}.result-status{background:var(--n-field);border-radius:20px;padding:4px 9px;font-size:12px}.result-pending .result-status{color:var(--n-accent,#7356cf)}.result-failed .result-status{color:#ce5270}.result-actions{flex-wrap:wrap;gap:8px;display:flex}.result-actions .pill{min-height:36px;padding:8px 12px;font-size:12px}.result-details .result-actions{margin-top:12px}.result-details details{margin-top:12px;font-size:13px}.result-details details p,.result-full-prompt{overflow-wrap:anywhere;white-space:pre-wrap;max-height:180px;line-height:1.5;overflow:auto}.result-audio{place-items:center;gap:18px;min-height:170px;padding:20px;display:grid}.result-audio span{color:var(--n-accent,#7356cf);font-size:36px}.result-audio audio{width:100%;min-width:0}.result-viewer{background:var(--n-surface);max-height:90dvh;color:var(--n-ink);overflow:auto;width:min(94vw,1100px)!important;max-width:1100px!important}.result-viewer img,.result-viewer video{object-fit:contain;width:100%;max-height:65dvh}.result-viewer audio{width:100%}.examples-heading{margin:24px 0 14px;font-size:18px}.generation-results.compact:has(.results-grid:not(:empty)){scroll-margin-top:20px}@media (max-width:1100px){.results-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.results-heading{flex-direction:column;align-items:flex-start}}@media (max-width:600px){.results-grid{grid-template-columns:1fr}.result-cover img,.result-cover video{height:220px}.results-heading h2{font-size:18px}.result-viewer{padding:18px!important}}.composer.is-collapsed{display:none}.composer-reopen{z-index:40;box-shadow:var(--n-shadow);border-radius:28px;padding:14px 20px;font-size:14px;position:fixed;bottom:20px;right:32px}@media (max-width:720px){.composer-reopen{right:16px;bottom:calc(76px + env(safe-area-inset-bottom,0px));max-width:calc(100vw - 32px)}}.result-card>.result-cover{text-align:left;cursor:zoom-in;width:100%;height:100%;color:inherit;border:0;padding:0;display:block;position:relative}.result-card>.result-cover:focus-visible{outline:3px solid var(--n-accent,#7356cf);outline-offset:-3px}.result-cover video{pointer-events:none}.result-video-play{color:#fff;pointer-events:none;background:#0008;border-radius:50%;place-items:center;width:44px;height:44px;padding-left:3px;font-size:20px;display:grid;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.result-metadata dl{grid-template-columns:auto minmax(0,1fr);gap:8px 16px;margin-top:12px;font-size:13px;display:grid}.result-metadata dt{color:var(--n-secondary)}.result-metadata dd{overflow-wrap:anywhere;min-width:0;margin:0}.result-viewer details{min-width:0;font-size:13px}@media (max-width:600px){.generation-results{margin:12px 0 24px}.results-heading{gap:8px;margin-bottom:12px}.results-heading h2{font-size:19px;line-height:1.25}.results-heading p,.results-empty{font-size:13px;line-height:1.5}.results-grid{gap:12px}.result-card{border-radius:18px}.result-cover{min-height:150px}.result-cover img,.result-cover video{aspect-ratio:auto;object-fit:contain;height:auto;max-height:58dvh}.result-placeholder{min-height:150px;padding:20px 16px}.result-details{padding:14px}.result-details h3{overflow-wrap:anywhere;font-size:15px;line-height:1.35}.result-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;display:grid}.result-actions .pill{white-space:normal;text-align:center;overflow-wrap:anywhere;justify-content:center;width:100%;min-width:0;min-height:44px;padding:8px 10px;line-height:1.25}.result-actions .pill:only-child{grid-column:1/-1}.result-details details p,.result-full-prompt{max-height:34dvh}.result-audio{min-height:150px;padding:18px 14px}.result-viewer{top:auto;left:8px;right:8px;bottom:calc(8px + env(safe-area-inset-bottom,0px));max-height:calc(100dvh - 16px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));overscroll-behavior:contain;transform:translate(0,0);--tw-translate-x:0px!important;--tw-translate-y:0px!important;width:auto!important;max-width:none!important;padding:16px!important}.composer-reopen{left:12px;right:12px;bottom:calc(76px + env(safe-area-inset-bottom,0px));text-align:center;white-space:normal;border:1px solid #ffffff47;border-radius:17px;justify-content:center;align-items:center;width:auto;max-width:none;min-height:50px;padding:12px 16px;font-size:14px;line-height:1.25;display:flex}}.result-card-meta{color:var(--n-secondary);justify-content:space-between;align-items:center;gap:10px;font-size:11px;line-height:1.5;display:flex}.result-text{min-height:170px;color:var(--n-ink);flex-direction:column;gap:12px;padding:22px;display:flex}.result-text svg,.result-audio svg{color:var(--n-accent)}.result-text pre{font:inherit;white-space:pre-wrap;overflow-wrap:anywhere;-webkit-line-clamp:5;-webkit-box-orient:vertical;margin:0;font-size:13px;line-height:1.7;display:-webkit-box;overflow:hidden}.result-text.full{background:var(--n-field);border-radius:20px;min-height:0}.result-text.full pre{max-height:48dvh;font-size:14px;display:block;overflow:auto}.result-text small,.result-expiry,.result-voice small{color:var(--n-secondary);font-size:12px;line-height:1.6}.result-voice p{text-align:center;margin:0;font-size:14px}.result-card:not(:has(.result-details))>.result-cover{height:100%}.result-card:has(.result-details)>.result-cover{height:auto}.result-details h3{overflow-wrap:anywhere}.result-expiry{margin:0}.result-card-meta time{font-size:11px}.result-viewer .result-actions{margin:12px 0}.generation-results:not(.compact) .results-grid{grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:12px}.history-tile{aspect-ratio:1;border-color:var(--n-line);border-radius:18px;align-self:start;transition:border-color .15s,box-shadow .15s,transform .1s}.history-tile:hover{border-color:var(--n-accent);box-shadow:0 4px 16px #7356cf12}.history-tile:active{transform:scale(.97)}.history-tile>.result-cover{aspect-ratio:1;background:var(--n-field);min-height:0;overflow:hidden}.history-tile .result-cover :is(img,video){object-fit:cover;width:100%;height:100%;max-height:none;position:absolute;inset:0}.result-tile-icon{color:var(--n-accent,#7356cf);place-items:center;display:grid;position:absolute;inset:0}.result-tile-icon>svg{stroke-width:1.7px;width:34px;height:34px}.history-tile .result-video-play{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background:#0008;width:36px;height:36px;padding-left:2px}.history-tile .result-avatar-symbol{padding-left:0}.result-tile-state{background:var(--n-surface);width:25px;height:25px;color:var(--n-secondary);border-radius:50%;place-items:center;display:grid;position:absolute;bottom:8px;right:8px;box-shadow:0 1px 5px #0001}.result-failed .result-tile-state{color:#ce5270}.result-pending .result-tile-state{color:var(--n-accent)}.result-tile-state.is-spinning>svg{animation:1.2s linear infinite history-tile-spin}@keyframes history-tile-spin{to{transform:rotate(360deg)}}@media (max-width:600px){.generation-results:not(.compact) .results-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.history-tile{border-radius:14px}.result-tile-icon>svg{width:30px;height:30px}.history-tile .result-video-play{width:32px;height:32px}}@media (prefers-reduced-motion:reduce){.history-tile{transition:none;transform:none}.result-tile-state.is-spinning>svg{animation:none}}

/* Every music variant has its own playback and download inside one result. */
.result-music-tracks{display:grid;gap:12px;margin:8px 0}.result-music-track{min-width:0;padding:16px;border:1px solid var(--n-line,#8883);border-radius:16px;background:var(--n-field)}.result-music-track h3{margin:0 0 6px;font-size:15px;font-weight:650}.result-music-track>p{margin:0 0 12px;font-size:13px;color:var(--n-secondary);overflow-wrap:anywhere}.result-music-track audio{display:block;width:100%;min-width:0}.result-music-track .result-actions{margin:10px 0 0}.result-music-track>p.result-music-track-error{margin:10px 0 0;line-height:1.5}


/* r122: выбранное подтверждение Telegram с фотографией и мягкой подсветкой */
.tunera-login .social-auth-confirm{gap:13px;border-top:1px solid var(--line);padding-top:22px;min-width:0}
.social-auth-identity{display:flex;align-items:center;gap:12px;min-width:0;margin:0 0 3px}
.social-auth-identity-text{min-width:0;overflow-wrap:anywhere}.tunera-login .social-auth-identity p{font-size:19px;line-height:1.4}.social-auth-identity strong{font-weight:650}.social-auth-identity small{display:block;margin-top:3px;font-size:14px;color:var(--n-secondary,var(--ink));opacity:.8}
.social-auth-avatar{display:grid;place-items:center;position:relative;width:46px;height:46px;flex:0 0 46px;border-radius:50%;background:#eceafa;color:#5b51b8;font-size:21px;box-shadow:0 0 0 4px rgba(124,58,237,.07),0 5px 18px rgba(93,88,199,.15)}
.social-auth-avatar>img{display:block;width:100%;height:100%;object-fit:cover;border-radius:50%}.social-auth-avatar-badge{position:absolute;right:-2px;bottom:-1px;display:grid;place-items:center;width:19px;height:19px;background:#229ed9;border:2px solid var(--surface,#fff);border-radius:50%;color:#fff}.social-auth-avatar-badge svg{width:11px;height:11px;display:block}
.tunera-login .social-auth-confirm-primary{position:relative;display:flex;justify-content:center;align-items:center;width:100%;min-height:54px;padding:13px 38px;border:0;border-radius:40px;background:linear-gradient(100deg,#2563eb 0%,#7c3aed 55%,#a855f7 100%);color:#fff;font-size:17px;font-weight:500;line-height:1.4;overflow-wrap:anywhere;cursor:pointer}.social-auth-confirm-primary>svg{position:absolute;right:17px;width:20px;height:20px;pointer-events:none}.tunera-login .social-auth-confirm-primary:hover:not(:disabled){box-shadow:0 5px 18px #6749cc35;filter:brightness(1.035)}
.tunera-login .social-auth-other-account{justify-self:center;max-width:100%;min-height:44px;padding:9px 12px;border:0;background:transparent;color:var(--ink);opacity:.75;font-size:15px;line-height:1.45;overflow-wrap:anywhere;cursor:pointer}.tunera-login .social-auth-other-account:hover:not(:disabled){background:color-mix(in srgb,var(--ink) 5%,transparent);opacity:1}.tunera-login .social-auth-confirm button:focus-visible{outline:3px solid var(--n-focus,#7956ef);outline-offset:3px}
@media(max-width:540px){.tunera-login .social-auth-confirm{padding-top:16px;gap:10px}.tunera-login .social-auth-identity p{font-size:18px}.tunera-login .social-auth-confirm-primary{font-size:16px}}
@media(max-width:340px){.social-auth-avatar{width:40px;height:40px;flex-basis:40px}.social-auth-identity{gap:10px}.tunera-login .social-auth-identity p{font-size:17px}.social-auth-identity small{font-size:13px}.tunera-login .social-auth-confirm-primary{font-size:15px}.tunera-login .social-auth-other-account{font-size:14px}}

/* r152: ширина входа и регистрации не зависит от минимальной ширины содержимого. */
.small-dialog[data-slot=dialog-content]:has(.tunera-login){box-sizing:border-box;width:min(530px,calc(100% - 32px));max-width:calc(100% - 32px)!important;min-width:0;grid-template-columns:minmax(0,1fr)}
.small-dialog[data-slot=dialog-content]:has(.tunera-login)>*,.tunera-login,.tunera-login fieldset,.tunera-login label,.tunera-login .social-auth{min-width:0;max-width:100%}
.tunera-login,.tunera-login fieldset,.tunera-login label,.tunera-login .social-auth{grid-template-columns:minmax(0,1fr)}
.tunera-login input,.tunera-login button{box-sizing:border-box;min-width:0;max-width:100%}
.tunera-login p,.tunera-login small,.tunera-login strong,.tunera-login button,.small-dialog:has(.tunera-login) .dialog-head h2{overflow-wrap:anywhere}
.tunera-login button{white-space:normal}
@media(max-width:760px){.small-dialog[data-slot=dialog-content]:has(.tunera-login){--auth-edge-left:max(8px,env(safe-area-inset-left,0px));--auth-edge-right:max(8px,env(safe-area-inset-right,0px));left:var(--auth-edge-left);right:auto;width:calc(100% - var(--auth-edge-left) - var(--auth-edge-right));max-width:calc(100% - var(--auth-edge-left) - var(--auth-edge-right))!important;max-height:calc(100dvh - 16px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))}}

/* r153: keep mobile dialog fields, result details and story actions within the viewport. */
@media(max-width:760px){
.small-dialog[data-slot=dialog-content]{grid-template-columns:minmax(0,1fr);min-width:0}
.small-dialog[data-slot=dialog-content]>*{min-width:0;max-width:100%}
.result-viewer[data-slot=dialog-content]{grid-template-columns:minmax(0,1fr);min-width:0}
.result-viewer[data-slot=dialog-content]>*{min-width:0;max-width:100%}
.model-list button,.model-list button>span{min-width:0;overflow-wrap:anywhere}
.generator-details dl{grid-template-columns:auto minmax(0,1fr)}
.generator-details dd{margin:0;min-width:0;overflow-wrap:anywhere}
.story-start>div{max-width:100%;flex-wrap:wrap;justify-content:center}
.story-editor{grid-template-columns:minmax(0,1fr)}
.story-editor>aside{min-width:0}
}
/* r154: локальный кандидат, НЕ ОПУБЛИКОВАН. Подключать после текущих CSS. */
@media (max-width: 760px) {
  /* Размер 16px предотвращает автоматическое приближение текстовых полей Safari. */
  .small-dialog[data-slot="dialog-content"] :is(
    input:not([type]), input[type="text"], input[type="email"],
    input[type="password"], input[type="search"], input[type="tel"],
    input[type="url"], input[type="number"], textarea
  ) {
    font-size: 16px;
  }

  .nero.is-generator .composer textarea {
    font-size: 16px;
  }
  .nero.is-generator .composer .generation-prompt-field > textarea::placeholder {
    font-size: 14px;
  }

  html[data-tunera-keyboard="open"] .small-dialog[data-slot="dialog-content"] {
    top: auto;
    bottom: calc(var(--tunera-keyboard-bottom) + 8px);
    min-height: 0;
    max-height: max(1px, calc(var(--tunera-keyboard-height) - max(8px, env(safe-area-inset-top, 0px)) - 8px));
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-padding-block: 16px;
  }

  html[data-tunera-keyboard="open"] .composer,
  html[data-tunera-keyboard="open"] .nero.is-generator .composer,
  html[data-tunera-keyboard="open"] .nero.is-generator .composer.is-image,
  html[data-tunera-keyboard="open"] .nero.is-generator .composer.is-video,
  html[data-tunera-keyboard="open"] .nero.is-generator .composer.is-seedance {
    bottom: calc(var(--tunera-keyboard-bottom) + 8px);
    min-height: 0;
    max-height: max(1px, calc(var(--tunera-keyboard-height) - 16px));
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-padding-block: 16px;
  }

  html[data-tunera-keyboard="open"] .nero.is-generator .composer,
  html[data-tunera-keyboard="open"] .nero.is-generator .composer.is-image,
  html[data-tunera-keyboard="open"] .nero.is-generator .composer.is-video,
  html[data-tunera-keyboard="open"] .nero.is-generator .composer.is-seedance {
    position: fixed;
    inset: auto;
    left: 9px;
    right: 9px;
    bottom: calc(var(--tunera-keyboard-bottom) + 8px);
    width: auto;
    margin: 0;
    transform: none;
  }

  html[data-tunera-keyboard="open"] .nero:not(.is-generator) .canvas:has(.assistant-studio) {
    min-height: 0;
    height: var(--tunera-keyboard-assistant-height);
    max-height: var(--tunera-keyboard-assistant-height);
  }
  html[data-tunera-keyboard="open"] .assistant-studio {
    min-height: 0;
  }
}

/* Независимый кандидат для speech CSS: live computed 11px, физический zoom не проверен. */
@media (max-width: 768px) {
  .dict-row input {
    font-size: 16px;
  }
}
