/* [project]/app/globals.css [app-client] (css) */
:root {
  --orange: #ee7203;
  --orange-dark: #cf6203;
  --orange-soft: #fdf1e6;
  --orange-band: #f8e0c6;
  --ink: #1c1c1c;
  --muted: #6f6f6f;
  --line: #e6e2dd;
  --bg: #fff;
  --surface: #f7f5f2;
  --ok: #1d7a3d;
  --err: #c0392b;
  --pick: #1d7a3d;
  --pick-rgb: 29, 122, 61;
}

* {
  box-sizing: border-box;
}

html, body {
  background: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  margin: 0;
  padding: 0;
  font-family: Segoe UI, Roboto, system-ui, -apple-system, BlinkMacSystemFont, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: clip;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--orange-dark);
}

button {
  font: inherit;
}

.container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 15px;
}

.site-header {
  background: #fff;
}

@media (display-mode: standalone) {
  body.page-chat .site-header, body.page-chat .site-footer {
    display: none;
  }

  body.page-chat main.container {
    padding-top: max(12px, env(safe-area-inset-top));
  }
}

body.page-chat > main.container {
  padding-left: 7.5px;
  padding-right: 7.5px;
}

.app-reload {
  color: #fff;
  opacity: .85;
  cursor: pointer;
  background: none;
  border: 0;
  justify-content: center;
  align-items: center;
  width: 44px;
  min-height: 44px;
  margin-left: auto;
  padding: 0;
  display: none;
}

.app-reload:hover {
  opacity: 1;
}

.app-reload:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: -3px;
}

.header-info {
  padding-top: env(safe-area-inset-top);
  background: #444;
}

.header-info .inner {
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0 16px;
  min-height: 57px;
  display: flex;
}

.header-info a, .header-info span {
  color: #fff;
  white-space: nowrap;
  align-items: center;
  gap: 8px;
  padding: 13px 0;
  font-size: 15px;
  text-decoration: none;
  transition: color .2s;
  display: inline-flex;
}

.header-info a:hover {
  color: #ff9f2f;
}

.header-info svg {
  color: #ff9f2f;
  flex: none;
  width: 15px;
  height: 15px;
}

.header-top .inner {
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 24px;
  padding-top: 20px;
  padding-bottom: 20px;
  display: flex;
}

.logo {
  align-items: center;
  margin-right: auto;
  text-decoration: none;
  display: flex;
}

.logo img {
  width: auto;
  height: 50px;
}

.header-search {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 50px;
  flex: 0 560px;
  align-items: center;
  min-width: 220px;
  height: 46px;
  margin-right: auto;
  padding: 3px;
  display: flex;
}

.header-search input[type="search"] {
  color: #444;
  background: none;
  border: 0;
  outline: none;
  flex: 1;
  min-width: 0;
  padding: 0 18px;
  font-size: 15px;
}

.header-search input[type="search"]::placeholder {
  color: #999;
}

.header-search button {
  color: #444;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  background: #ff9f2f;
  border: 0;
  border-radius: 50px;
  flex: none;
  height: 100%;
  padding: 0 30px;
  font-size: 14px;
  font-weight: 600;
  transition: background .2s;
}

.header-search button:hover {
  background: #ffb14f;
}

.header-menu {
  z-index: 40;
  background: #444;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
}

.header-menu .inner {
  scrollbar-width: none;
  align-items: center;
  gap: 2px;
  min-height: 60px;
  display: flex;
  overflow-x: auto;
}

.header-menu .inner::-webkit-scrollbar {
  display: none;
}

.btn-catalog {
  color: #444;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  white-space: nowrap;
  background: #ff9f2f;
  border-radius: 50px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 6px 16px 6px 0;
  padding: 9px 44px;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: none;
  transition: background .2s;
  display: inline-flex;
}

.btn-catalog svg {
  color: #fff;
  width: 18px;
  height: 18px;
}

.btn-catalog:hover {
  background: #ffb14f;
}

.nav {
  margin-left: auto;
  display: flex;
}

.nav a {
  color: #fff;
  white-space: nowrap;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 400;
  text-decoration: none;
  transition: color .2s;
  display: inline-flex;
}

.nav-ico {
  flex: none;
  width: 17px;
  height: 17px;
  margin-right: 7px;
}

.nav a:hover {
  color: #ff9f2f;
}

.nav a.active {
  color: #ff9f2f;
  box-shadow: inset 0 -3px #ff9f2f;
}

.lang-switch {
  color: #ff9f2f;
  cursor: pointer;
  background: none;
  border: 0;
  flex: none;
  align-items: center;
  min-height: 44px;
  margin-left: 10px;
  padding: 0 10px;
  font: 600 14px / 1 inherit;
  transition: color .2s;
  display: inline-flex;
}

.lang-switch:hover {
  color: #ffc37a;
}

.lang-switch:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: -2px;
}

.header-links {
  display: flex;
}

.header-links a {
  color: #fff;
  white-space: nowrap;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  font-size: 15px;
  text-decoration: none;
  transition: color .2s;
  display: inline-flex;
}

.header-links a:hover {
  color: #ff9f2f;
}

@media (max-width: 1150px) {
  .site-header.has-admin .header-links {
    display: none;
  }
}

@media (max-width: 900px) {
  .header-links, .hide-m {
    display: none;
  }

  .logo img {
    height: 40px;
  }

  .header-search {
    flex: 100%;
    order: 3;
    height: 42px;
    margin: 0;
  }

  .header-top .inner {
    gap: 8px 16px;
    padding-top: 10px;
    padding-bottom: 12px;
  }

  .btn-catalog {
    padding: 7px 24px;
    font-size: 14px;
  }

  .header-menu .inner {
    min-height: 58px;
  }
}

.burger, .menu-logo {
  display: none;
}

@media (max-width: 640px) {
  .hide-s {
    display: none;
  }

  .header-info .inner {
    justify-content: center;
  }

  .header-info, .header-top {
    display: none;
  }

  .site-header {
    z-index: 30;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
  }

  .header-menu {
    padding-top: env(safe-area-inset-top);
  }

  .header-menu .inner {
    align-items: center;
    gap: 10px;
    min-height: 56px;
    display: flex;
    overflow: visible;
  }

  .header-menu .nav, .header-menu .btn-catalog {
    display: none;
  }

  .lang-switch {
    margin-left: auto;
    padding: 0 8px;
    font-size: 13px;
  }

  .burger {
    color: #fff;
    cursor: pointer;
    background: none;
    border: 0;
    flex: none;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    margin-left: -8px;
    display: inline-flex;
  }

  .burger span, .burger span:before, .burger span:after {
    background: currentColor;
    border-radius: 2px;
    width: 22px;
    height: 2px;
    transition: transform .18s, opacity .18s;
    display: block;
  }

  .burger span {
    position: relative;
  }

  .burger span:before, .burger span:after {
    content: "";
    position: absolute;
    left: 0;
  }

  .burger span:before {
    top: -7px;
  }

  .burger span:after {
    top: 7px;
  }

  .burger span.on {
    background: none;
  }

  .burger span.on:before {
    transform: translateY(7px)rotate(45deg);
  }

  .burger span.on:after {
    transform: translateY(-7px)rotate(-45deg);
  }

  .header-menu .inner {
    position: relative;
  }

  .menu-logo {
    background: #fff;
    border-radius: 8px;
    align-items: center;
    margin: 0 auto;
    padding: 4px 9px;
    display: inline-flex;
  }

  .menu-logo img {
    width: auto;
    height: 30px;
    display: block;
  }

  .menu-shade {
    z-index: 28;
    background: rgba(20, 22, 24, .5);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
  }

  .menu-panel {
    z-index: 29;
    top: calc(56px + env(safe-area-inset-top));
    max-height: calc(100dvh - 56px - env(safe-area-inset-top));
    padding: 6px 16px calc(16px + env(safe-area-inset-bottom));
    background: #fff;
    flex-direction: column;
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    overflow-y: auto;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .18);
  }

  .menu-panel a {
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    align-items: center;
    padding: 13px 0;
    font-size: 16px;
    text-decoration: none;
    display: flex;
  }

  .menu-panel .nav-ico {
    width: 20px;
    height: 20px;
    margin-right: 12px;
  }

  .menu-panel a.active {
    color: var(--orange-dark);
    font-weight: 600;
  }

  .menu-panel a:last-of-type {
    border-bottom: 0;
  }
}

.site-footer {
  color: #777;
  background: #f9f9f9;
  margin-top: 32px;
  font-size: 14px;
  line-height: 1.6;
}

.site-footer a {
  color: #777;
  text-decoration: none;
  transition: color .2s;
}

.site-footer a:hover {
  color: #365487;
}

.footer-bottom {
  padding: 14px 0 calc(14px + env(safe-area-inset-bottom));
  background: #f4f4f4;
}

.footer-bottom .inner {
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  display: flex;
}

.payments {
  align-items: center;
  gap: 8px;
  display: flex;
}

.payments img {
  width: auto;
  height: 24px;
}

.footer-copy {
  align-items: center;
  gap: 10px;
  display: inline-flex;
}

.footer-corgi {
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: 8px;
  flex: none;
  padding: 0;
  line-height: 0;
}

.footer-corgi:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.footer-corgi:hover .corgi-leg {
  animation: corgi-step-back var(--corgi-step, .6s) linear infinite;
}

.footer-corgi:hover .corgi-leg-front {
  animation-name: corgi-step-front;
}

.footer-corgi:hover .corgi-leg-late {
  animation-delay: calc(var(--corgi-step, .6s) / -2);
}

.footer-corgi:hover .corgi-tail {
  animation: .32s ease-in-out infinite alternate corgi-wag;
}

.footer-corgi:hover .corgi-tongue {
  animation: .4s ease-in-out infinite alternate corgi-tongue;
}

@media (prefers-reduced-motion: reduce) {
  .footer-corgi:hover .corgi-leg, .footer-corgi:hover .corgi-tail, .footer-corgi:hover .corgi-tongue {
    animation: none;
  }
}

.corgi-game {
  z-index: 60;
  background: rgba(20, 16, 12, .55);
  justify-content: center;
  align-items: center;
  padding: 16px;
  display: flex;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.corgi-game-card {
  background: var(--surface, #fff);
  text-align: center;
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  padding: 18px 18px 10px;
  position: relative;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
}

.corgi-game-close {
  width: 36px;
  height: 36px;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: 999px;
  font-size: 26px;
  line-height: 1;
  position: absolute;
  top: 6px;
  right: 10px;
}

.corgi-game-close:hover {
  color: #000;
  background: rgba(0, 0, 0, .06);
}

.footer-corgi .corgi-leg, .footer-corgi .corgi-tail, .footer-corgi .corgi-tongue {
  animation: none;
}

@media (display-mode: standalone) {
  .header-info, .header-top, .site-footer {
    display: none;
  }

  .header-menu {
    padding-top: env(safe-area-inset-top);
  }

  .app-reload {
    margin-left: 6px;
    display: inline-flex;
  }

  .btn-catalog {
    display: none;
  }

  .header-menu .inner {
    justify-content: flex-start;
  }

  .nav {
    margin-left: 0;
  }

  body > main.container {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  body.page-chat > main.container {
    padding-bottom: calc(env(safe-area-inset-bottom) / 2);
  }
}

.gen-overlay.studio-warm {
  display: none;
}

.step.is-warming > .gen-overlay.studio-warm {
  display: flex;
}

.step.is-warming > :not(.step-head):not(.studio-warm) {
  display: none;
}

h1 {
  margin: 12px 0 8px;
  font-size: max(24px, min(5vw, 34px));
  line-height: 1.2;
}

@media (max-width: 760px) {
  .wiz-title {
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    position: absolute;
    overflow: hidden;
  }
}

h2 {
  margin: 32px 0 12px;
  font-size: max(19px, min(4vw, 24px));
}

.lead {
  color: var(--muted);
  margin: 0 0 20px;
}

.btn {
  border: 1px solid var(--line);
  background: var(--bg);
  min-height: 48px;
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  border-radius: 10px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, border-color .15s;
  display: inline-flex;
}

.btn:hover {
  border-color: var(--orange);
}

.btn:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--orange-dark);
}

.btn-danger {
  color: var(--err);
}

.btn-danger.btn-solid {
  background: var(--err);
  border-color: var(--err);
  color: #fff;
}

.btn-danger.btn-solid:hover:not(:disabled) {
  background: #9c2e21;
  border-color: #9c2e21;
}

.btn-lg {
  min-height: 56px;
  padding: 12px 32px;
  font-size: 18px;
}

.share-link {
  text-align: left;
  flex-direction: column;
  flex-basis: 100%;
  align-items: flex-start;
  gap: 4px;
  display: flex;
}

.share-link input[type="text"] {
  max-width: 520px;
  min-height: 40px;
  font-size: 15px;
}

input[type="text"], input[type="password"], textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font-size: 16px;
}

textarea {
  font: inherit;
  resize: vertical;
}

input:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 1px;
}

textarea:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 1px;
}

@media (max-width: 760px) {
  .header-search input[type="search"], input[type="search"], select {
    font-size: 16px;
  }
}

.step {
  scroll-margin-top: calc(var(--hdr-h, 84px)  + 14px);
  margin: 28px 0;
}

.step.step-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 16px;
  margin: 16px 0;
  padding: 14px;
}

.step-card .hscroll-wrap {
  margin: 0 -14px 0 0;
}

@media (max-width: 640px) {
  .step.step-card {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    margin-left: -15px;
    margin-right: -15px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .step-card > .pv, .step-card > .ba-col {
    margin-left: -12px;
    margin-right: -12px;
  }

  .step-card > .pv .pv-stage:not(.pv-fs) {
    margin-left: 12px;
    margin-right: 12px;
  }

  .step > .hscroll-wrap {
    margin-left: -15px;
    margin-right: -15px;
  }

  .step > .hscroll-wrap .hscroll {
    padding-left: 15px;
    padding-right: 15px;
    scroll-padding-left: 15px;
    scroll-padding-right: 15px;
  }

  .step-card > .hscroll-wrap {
    margin-left: -12px;
    margin-right: -12px;
  }

  .step-card > .hscroll-wrap .hscroll {
    padding-left: 12px;
    padding-right: 12px;
    scroll-padding-left: 12px;
    scroll-padding-right: 12px;
  }
}

.step-head {
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  display: flex;
}

.step-head .chips {
  margin-left: auto;
}

.step-help {
  align-items: center;
  margin-left: auto;
  display: inline-flex;
}

.step-help:empty {
  display: none;
}

@media (max-width: 640px) {
  .step-head .chips {
    width: 100%;
    margin-left: 0;
  }
}

.step-num {
  background: var(--orange);
  color: #fff;
  border-radius: 50%;
  flex: none;
  justify-content: center;
  align-items: center;
  width: 34px;
  height: 34px;
  font-weight: 700;
  display: flex;
}

.step-num.done {
  background: var(--ok);
}

.step-head h2 {
  margin: 0;
}

.step-head:has(.step-close) {
  display: block;
}

.step-head:has(.step-close) > .step-num {
  float: left;
  margin-right: 12px;
}

.step-head:has(.step-close) > .step-close {
  float: right;
  margin: -6px -6px 0 12px;
}

.step-head:has(.step-close):after {
  content: "";
  clear: both;
  display: block;
}

.step-close {
  border: 1px solid var(--line);
  background: var(--bg);
  min-width: 44px;
  min-height: 44px;
  color: var(--muted);
  cursor: pointer;
  touch-action: manipulation;
  border-radius: 10px;
  flex: none;
  margin-left: auto;
  font-size: 18px;
  line-height: 1;
  transition: border-color .15s, color .15s;
}

.step-close:hover {
  border-color: var(--orange);
  color: var(--ink);
}

.step-close:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.result-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.result-actions > .share-link, .result-actions > .notice {
  flex: 1 0 100%;
}

.result-actions > .btn .ico {
  font-size: 15px;
  line-height: 1;
}

.result-actions > .btn {
  gap: 6px;
}

@media (max-width: 640px) {
  .result-actions {
    gap: 5px;
  }

  .result-actions > .btn {
    white-space: nowrap;
    flex-direction: column;
    flex: 1 1 0;
    gap: 2px;
    min-width: 0;
    padding: 8px 3px;
    font-size: 11px;
    line-height: 1.2;
  }
}

.hscroll-wrap {
  position: relative;
}

.hscroll {
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  grid-auto-columns: 200px;
  grid-auto-flow: column;
  gap: 12px;
  padding: 4px 2px 8px;
  display: grid;
  overflow-x: auto;
}

.hscroll::-webkit-scrollbar {
  display: none;
}

.hscroll > * {
  scroll-snap-align: start;
}

.hscroll.fade-r {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), rgba(0, 0, 0, 0));
  mask-image: linear-gradient(to right, #000 calc(100% - 56px), rgba(0, 0, 0, 0));
}

.hscroll.fade-l {
  -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0), #000 56px);
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 0), #000 56px);
}

.hscroll.fade-l.fade-r {
  -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0), #000 56px, #000 calc(100% - 56px), rgba(0, 0, 0, 0));
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 0), #000 56px, #000 calc(100% - 56px), rgba(0, 0, 0, 0));
}

.hscroll-arrow {
  border: 1px solid var(--line);
  background: var(--bg);
  width: 44px;
  height: 44px;
  color: var(--ink);
  cursor: pointer;
  z-index: 5;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  padding: 0;
  line-height: 1;
  display: flex;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}

.hscroll-arrow svg {
  width: 18px;
  height: 18px;
  display: block;
}

.hscroll-arrow:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
}

.hscroll-arrow.left {
  left: -8px;
}

.hscroll-arrow.right {
  right: -8px;
}

@media (hover: none) {
  .hscroll-arrow {
    display: none;
  }
}

.grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  display: grid;
}

@media (max-width: 640px) {
  .modal-body .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

@media (min-width: 700px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

.studio-closed {
  border: 1px dashed var(--line);
  background: var(--surface);
  border-radius: 12px;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  display: flex;
}

.studio-closed .muted {
  margin: 0;
}

.fav {
  z-index: 2;
  cursor: pointer;
  color: #fff;
  background: rgba(20, 22, 24, .55);
  border-radius: 999px;
  place-items: center;
  width: 32px;
  height: 32px;
  transition: background .15s, transform .1s;
  display: grid;
  position: absolute;
  top: 8px;
  left: 8px;
}

.fav svg {
  width: 18px;
  height: 18px;
  display: block;
}

.fav:hover {
  background: rgba(20, 22, 24, .78);
}

.fav:active {
  transform: scale(.92);
}

.fav.on {
  background: var(--orange);
}

.fav:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.kill {
  z-index: 2;
  cursor: pointer;
  color: #fff;
  background: rgba(20, 22, 24, .55);
  border-radius: 999px;
  place-items: center;
  width: 32px;
  height: 32px;
  transition: background .15s, transform .1s;
  display: grid;
  position: absolute;
  top: 8px;
  right: 8px;
}

.kill svg {
  width: 18px;
  height: 18px;
  display: block;
}

.kill:hover {
  background: rgba(190, 40, 40, .85);
}

.kill:active {
  transform: scale(.92);
}

.kill:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.card {
  border: 2px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  text-align: left;
  border-radius: 12px;
  flex-direction: column;
  padding: 0;
  transition: border-color .15s, box-shadow .15s;
  display: flex;
  position: relative;
  overflow: hidden;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover {
    border-color: var(--orange);
  }
}

.card.selected {
  border-color: var(--pick);
  box-shadow: 0 0 0 3px rgba(var(--pick-rgb), .35);
  border-width: 3px;
}

.card.selected:after {
  content: "";
  background: var(--pick) var(--tick) center / 13px no-repeat;
  pointer-events: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  position: absolute;
  top: 6px;
  right: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}

.card.selected .badge {
  right: 36px;
}

.card.selected.has-kill:after, .card.has-kill .badge {
  right: 48px;
}

:root {
  --img-spin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='15' fill='none' stroke='%23e3ded6' stroke-width='4'/%3E%3Cpath d='M20 5a15 15 0 0 1 15 15' fill='none' stroke='%23ff7a00' stroke-width='4' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 20 20' to='360 20 20' dur='0.9s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --img-spin-still: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='15' fill='none' stroke='%23e3ded6' stroke-width='4'/%3E%3Cpath d='M20 5a15 15 0 0 1 15 15' fill='none' stroke='%23ff7a00' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --img-spin: var(--img-spin-still);
  }
}

.card .thumb {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--surface) var(--img-spin) center / 36px no-repeat;
  width: 100%;
}

.card .thumb-viz, .mini-card .thumb-viz {
  aspect-ratio: 1;
  object-fit: contain;
}

.hscroll .card .thumb:last-child {
  flex: auto;
}

.card-plot .thumb {
  aspect-ratio: 1;
}

.card-tile .thumb {
  aspect-ratio: 1;
  object-fit: contain;
  background-color: #fff;
}

.card .body {
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px 12px;
  display: flex;
}

.card .title {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
}

.card .sub {
  color: var(--muted);
  font-size: 13px;
}

.card .sub b {
  font-weight: 600;
}

.price-tag {
  background: var(--orange-soft);
  color: var(--orange-dark);
  border-radius: 6px;
  align-self: flex-start;
  padding: 2px 8px;
  font-size: 13.5px;
  font-weight: 700;
  display: inline-block;
}

.step-actions {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  display: flex;
}

.step-actions .photo-add {
  margin-left: auto;
}

.photo-add {
  align-items: center;
  gap: 6px;
  display: inline-flex;
}

.photo-add .photo-add-icon {
  width: 17px;
  height: 17px;
  color: var(--ok);
  flex: none;
}

.photo-add .corgi-loader {
  flex: none;
}

@media (max-width: 640px) {
  .step-actions .btn {
    padding-left: 12px;
    padding-right: 12px;
    font-size: 14px;
  }
}

.card-add {
  text-align: center;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 150px;
  padding: 12px;
}

.card-add .title {
  font-size: 14.5px;
}

.card-add-icon {
  color: var(--orange);
  font-size: 30px;
  line-height: 1;
}

.badge {
  color: #fff;
  background: rgba(28, 28, 28, .75);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
  position: absolute;
  top: 8px;
  left: 8px;
}

@media (max-width: 640px) {
  .hscroll {
    grid-auto-columns: 113px;
    gap: 7px;
  }

  .hscroll .card .body {
    gap: 3px;
    padding: 5px 6px 7px;
  }

  .hscroll .card .title {
    font-size: 11px;
    line-height: 1.25;
  }

  .hscroll .card .sub {
    font-size: 10.5px;
  }

  .hscroll .card-add {
    min-height: 74px;
    padding: 7px;
  }

  .hscroll .card-add .title {
    font-size: 11px;
  }

  .hscroll .card-add-icon {
    font-size: 18px;
  }

  .hscroll .fav {
    width: 26px;
    height: 26px;
    top: 5px;
    left: 5px;
  }

  .hscroll .fav svg {
    width: 14px;
    height: 14px;
  }

  .hscroll.fade-r {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), rgba(0, 0, 0, 0));
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), rgba(0, 0, 0, 0));
  }

  .hscroll.fade-l {
    -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0), #000 28px);
    mask-image: linear-gradient(to right, rgba(0, 0, 0, 0), #000 28px);
  }

  .hscroll.fade-l.fade-r {
    -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0), #000 28px, #000 calc(100% - 28px), rgba(0, 0, 0, 0));
    mask-image: linear-gradient(to right, rgba(0, 0, 0, 0), #000 28px, #000 calc(100% - 28px), rgba(0, 0, 0, 0));
  }
}

.page-head {
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 14px;
  margin-top: 12px;
  display: flex;
}

.page-head h1 {
  margin: 0;
}

.page-head .btn {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 15px;
}

.chips {
  flex-wrap: wrap;
  gap: 10px;
  display: flex;
}

.chip {
  border: 2px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  touch-action: manipulation;
  border-radius: 999px;
  min-height: 44px;
  padding: 8px 18px;
  font-size: 15px;
  font-weight: 600;
}

.chip:hover {
  border-color: var(--orange);
}

.chip.selected {
  border-color: var(--orange);
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.chip:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.chip:disabled:hover {
  border-color: var(--line);
}

.size-pattern-row {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px 44px;
  display: flex;
}

.chip-pattern {
  align-items: center;
  gap: 8px;
  display: inline-flex;
}

.gen-cost-estimate {
  color: var(--orange);
  white-space: nowrap;
  font-size: 20px;
  font-weight: 700;
  line-height: 40px;
}

.chip-pattern svg {
  width: 24px;
  height: 24px;
  color: var(--muted);
  flex: none;
  display: block;
}

.chip-pattern:hover svg {
  color: var(--orange);
}

.chip-pattern.selected svg {
  color: var(--orange-dark);
}

.chip-pattern:disabled:hover svg {
  color: var(--muted);
}

.ba-wrap {
  touch-action: pan-y;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  background: var(--surface);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.ba-wrap img {
  pointer-events: none;
  width: 100%;
  height: auto;
  display: block;
}

.ba-zoom {
  transform-origin: 0 0;
  will-change: transform;
  line-height: 0;
  position: relative;
}

.ba-piece {
  pointer-events: none;
  max-width: none;
  position: absolute;
}

.ba-wrap.ba-zoomed {
  cursor: grab;
  touch-action: none;
}

.ba-col {
  max-width: calc(100% - 344px);
}

@media (max-width: 900px) {
  .ba-col {
    max-width: none;
  }
}

.fs-shell {
  position: relative;
}

.fs-btn {
  z-index: 4;
  color: #fff;
  cursor: pointer;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  background: rgba(28, 28, 28, .62);
  border: none;
  border-radius: 10px;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  transition: background .15s;
  display: flex;
  position: absolute;
  top: 10px;
  right: 10px;
}

.fs-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.fs-btn:hover {
  background: var(--orange);
}

.fs-btn:focus-visible {
  outline-offset: 2px;
  outline: 2px solid #fff;
}

.ba-zoom-btns {
  z-index: 2;
  align-items: center;
  gap: 6px;
  display: flex;
  position: absolute;
  top: 10px;
  right: 60px;
}

.ba-zoom-btn {
  font: 600 20px / 1 system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
  position: static;
}

.ba-zoom-btn:disabled {
  opacity: .4;
  cursor: default;
}

.ba-zoom-btn:disabled:hover {
  background: rgba(28, 28, 28, .62);
}

.ba-zoom-level {
  width: auto;
  min-width: 44px;
  padding: 0 9px;
  font: 600 12px / 1 system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
}

@media (max-width: 700px) {
  .ba-zoom-btns {
    gap: 4px;
    top: 14px;
    right: 58px;
  }

  .ba-zoom-btn {
    width: 32px;
    height: 32px;
    font-size: 17px;
  }

  .ba-zoom-level {
    min-width: 40px;
    font-size: 11px;
  }
}

.fs-img {
  object-fit: cover;
  border-radius: 10px;
  width: 100%;
  height: auto;
  max-height: 78dvh;
  display: block;
}

.fs-wait {
  z-index: 3;
  background: rgba(255, 255, 255, .72) var(--img-spin) center / 40px no-repeat;
  border-radius: 10px;
  animation: .12s linear .25s both fs-wait-in;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

@keyframes fs-wait-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.fs-shell.fs-on .fs-wait {
  background-color: rgba(0, 0, 0, .55);
  border-radius: 0;
}

.fs-shell.fs-on {
  z-index: 1000;
  background: #000;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100dvh;
  display: flex;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.fs-shell.fs-on .ba-wrap {
  touch-action: none;
  background: #000;
  border-radius: 0;
  width: 100%;
  height: 100dvh;
  max-height: none;
}

.fs-shell.fs-on .ba-wrap img {
  object-fit: contain;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
}

.fs-shell.fs-on .fs-img {
  object-fit: contain;
  border-radius: 0;
  width: 100vw;
  height: 100dvh;
  max-height: none;
}

.fs-nav {
  z-index: 2;
  color: #fff;
  cursor: pointer;
  background: none;
  border: none;
  align-items: center;
  width: 22vw;
  min-width: 56px;
  max-width: 110px;
  padding: 0;
  display: flex;
  position: absolute;
  top: 22%;
  bottom: 22%;
}

.fs-nav-prev {
  padding-left: max(14px, env(safe-area-inset-left));
  justify-content: flex-start;
  left: 0;
}

.fs-nav-next {
  padding-right: max(14px, env(safe-area-inset-right));
  justify-content: flex-end;
  right: 0;
}

.fs-nav:focus-visible {
  outline: none;
}

.fs-nav-ico {
  opacity: .9;
  background: rgba(20, 22, 24, .5);
  border-radius: 999px;
  place-items: center;
  width: 44px;
  height: 44px;
  padding-bottom: 3px;
  font: 300 30px / 1 system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
  transition: opacity .15s, background .15s;
  display: grid;
}

.fs-nav:hover .fs-nav-ico {
  opacity: 1;
  background: rgba(20, 22, 24, .72);
}

.fs-nav:focus-visible .fs-nav-ico {
  outline-offset: 2px;
  outline: 2px solid #fff;
}

.fs-count {
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 2;
  color: #fff;
  pointer-events: none;
  background: rgba(20, 22, 24, .6);
  border-radius: 999px;
  padding: 5px 12px;
  font: 600 13px / 1 system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
  position: absolute;
  transform: translateX(-50%);
}

.fs-shell.fs-on {
  --safe-top: env(safe-area-inset-top, 0px);
}

.fs-shell.fs-on .fs-btn {
  top: calc(var(--safe-top)  + 12px);
}

.fs-shell.fs-on .ba-zoom {
  width: 100%;
  height: 100%;
}

.fs-shell.fs-on .ba-zoom-btns {
  top: calc(var(--safe-top)  + 12px);
}

.tile-photo .fs-shell:not(.fs-on) {
  width: -moz-fit-content;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.tile-photo .fs-img {
  object-fit: contain;
  width: auto;
  max-width: 100%;
  max-height: 48dvh;
}

.tile-photo-note {
  text-align: center;
  margin: 6px 0 0;
  font-size: 13px;
}

.tile-photo-px {
  text-align: center;
  color: var(--muted);
  letter-spacing: .02em;
  margin: 6px 0 0;
  font: 600 12px / 1.2 system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
  display: block;
}

.tile-photo-row2 {
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

.tile-photo-row2 .btn {
  width: 100%;
  min-height: 44px;
}

.tile-photo-row2 .progress-track {
  margin-top: 8px;
}

.tile-nums-wrap {
  justify-content: center;
  align-items: center;
  gap: 2px;
  margin-top: 8px;
  display: flex;
}

.tile-nums {
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap;
  flex: 0 auto;
  min-width: 0;
  display: flex;
  overflow-x: auto;
}

.tile-nums::-webkit-scrollbar {
  display: none;
}

.tile-num {
  cursor: pointer;
  touch-action: manipulation;
  background: none;
  border: none;
  flex: none;
  padding: 11px 4px;
}

.tile-num-dot {
  border: 2px solid var(--line);
  background: var(--bg);
  width: 22px;
  height: 22px;
  color: var(--ink);
  border-radius: 999px;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  display: flex;
}

.tile-num:hover:not(:disabled) .tile-num-dot {
  border-color: var(--orange);
}

.tile-num.selected .tile-num-dot {
  border-color: var(--orange);
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.tile-num:disabled {
  cursor: default;
}

.tile-num:disabled .tile-num-dot {
  opacity: .45;
}

.tile-num:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: -4px;
  border-radius: 999px;
}

.tile-num-add .tile-num-dot {
  color: var(--orange-dark);
  font-size: 17px;
  font-weight: 600;
}

.tile-nums-arrow {
  width: 26px;
  height: 44px;
  color: var(--muted);
  cursor: pointer;
  touch-action: manipulation;
  background: none;
  border: none;
  flex: none;
  justify-content: center;
  align-items: center;
  padding: 0;
  display: flex;
}

.tile-nums-arrow svg {
  width: 15px;
  height: 15px;
  display: block;
}

.tile-nums-arrow:hover:not(:disabled) {
  color: var(--orange-dark);
}

.tile-nums-arrow:disabled {
  opacity: .25;
  cursor: default;
}

.tile-photo-acts {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-width: 460px;
  margin-top: 8px;
  margin-left: auto;
  margin-right: auto;
  display: grid;
}

.tile-photo-acts .btn {
  text-align: center;
  flex-direction: column;
  gap: 1px;
  min-height: 44px;
  padding: 5px 10px;
  font-size: 14.5px;
  line-height: 1.15;
}

.tile-photo-price {
  opacity: .72;
  font-size: 11.5px;
  font-weight: 600;
}

.tile-width {
  max-width: 460px;
  margin: 8px auto 0;
}

.tile-width-row {
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  display: flex;
}

.tile-width-row label {
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
  font-size: 13px;
  overflow: hidden;
}

.tile-width-row input {
  text-align: center;
  flex: 70px;
  min-width: 60px;
  max-width: 110px;
  min-height: 44px;
  padding: 6px 8px;
}

.tile-width-row .btn {
  flex: none;
  min-height: 44px;
  padding: 6px 12px;
}

.tile-photo-row1 {
  grid-template-columns: 1fr;
  gap: 8px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
  display: grid;
}

.tile-photo-row1.two-col {
  grid-template-columns: 1fr 1fr;
}

.tile-photo-row1 .btn {
  min-height: 44px;
}

.tile-reorder {
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  display: flex;
}

.tile-reorder-btn {
  cursor: pointer;
  touch-action: manipulation;
  background: none;
  border: none;
  flex: none;
  padding: 10px 4px;
}

.tile-reorder-dot {
  border: 2px solid var(--line);
  background: var(--bg);
  width: 24px;
  height: 24px;
  color: var(--ink);
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  display: flex;
}

.tile-reorder-btn:hover:not(:disabled) .tile-reorder-dot {
  border-color: var(--orange);
}

.tile-reorder-btn:disabled {
  cursor: default;
}

.tile-reorder-btn:disabled .tile-reorder-dot {
  opacity: .35;
}

.tile-reorder-btn:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: -4px;
  border-radius: 6px;
}

dialog.modal {
  background: var(--bg);
  border: none;
  border-radius: 14px;
  width: 100%;
  max-width: min(920px, 100vw - 24px);
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: hidden;
}

dialog.modal[open] {
  flex-direction: column;
  display: flex;
}

dialog.modal::backdrop {
  background: rgba(20, 16, 12, .6);
}

.modal-body {
  padding: 16px 16px max(16px, env(safe-area-inset-bottom));
  scrollbar-width: none;
  overscroll-behavior: contain;
  flex: auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
  display: none;
}

.modal-body .fs-shell:not(.fs-on) {
  width: -moz-fit-content;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.modal-body .fs-shell:not(.fs-on) .fs-img {
  object-fit: contain;
  width: auto;
  max-width: 100%;
  max-height: 44dvh;
}

.modal-body .fs-shell:not(.fs-on) .ba-wrap {
  width: -moz-fit-content;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.modal-body .fs-shell:not(.fs-on) .ba-wrap img {
  width: auto;
  max-width: 100%;
  max-height: 56dvh;
}

.modal-actions {
  z-index: 1;
  background: var(--bg);
  border-top: 1px solid var(--line);
  justify-content: center;
  margin: 16px -16px -16px;
  padding: 12px 16px;
  position: -webkit-sticky;
  position: sticky;
  bottom: -16px;
}

.modal-close {
  float: right;
  background: var(--surface);
  cursor: pointer;
  border: none;
  border-radius: 10px;
  min-width: 44px;
  min-height: 44px;
  font-size: 20px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
}

.picker-acts {
  flex-direction: column;
  flex: none;
  align-self: flex-start;
  gap: 6px;
  display: flex;
}

.picker-report {
  justify-content: center;
  align-items: center;
  display: inline-flex;
}

.picker-report svg {
  width: 20px;
  height: 20px;
  color: var(--orange);
}

dialog.modal.confirm-modal {
  border-top: 4px solid var(--orange);
  max-width: min(460px, 100vw - 24px);
  box-shadow: 0 18px 48px rgba(20, 16, 12, .28);
}

.confirm-inner {
  padding: 20px;
}

.confirm-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.confirm-text {
  color: var(--muted);
  margin-top: 10px;
}

.confirm-text p {
  margin: 0 0 8px;
}

.confirm-text p:last-child {
  margin-bottom: 0;
}

.confirm-actions {
  justify-content: flex-end;
  margin-top: 20px;
}

.picker-head {
  padding: max(12px, calc(var(--safe-top, env(safe-area-inset-top))  - 4px)) 16px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  border-radius: 14px 14px 0 0;
  align-items: center;
  gap: 12px;
  display: flex;
}

.picker-head h2, .add-tile .picker-head h3 {
  flex: 1;
  margin: 0;
}

.add-tile-acts {
  flex: none;
  align-items: center;
  gap: 8px;
  display: flex;
}

.picker-head + .modal-body {
  padding-top: 12px;
}

.filter-group {
  margin: 12px 0 0;
}

@media (max-width: 640px) {
  .filter-row .chips {
    flex-wrap: nowrap;
  }

  .filter-row .chip {
    flex: 1 1 0;
    min-width: 0;
    padding-left: 10px;
    padding-right: 10px;
  }

  .picker-head {
    padding-top: max(16px, calc(var(--safe-top, env(safe-area-inset-top))  - 4px));
  }
}

.scroll-top {
  right: 14px;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 4;
  border: 1px solid var(--line);
  background: var(--bg);
  width: 46px;
  height: 46px;
  color: var(--ink);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  border-radius: 999px;
  place-items: center;
  transition: opacity .15s, transform .15s, border-color .15s;
  display: grid;
  position: absolute;
  transform: translateY(6px);
  box-shadow: 0 6px 18px rgba(20, 16, 12, .18);
}

.scroll-top.scroll-top-page {
  right: 16px;
  bottom: calc(72px + env(safe-area-inset-bottom));
  z-index: 899;
  position: fixed;
}

.scroll-top.on {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.scroll-top:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
}

.scroll-top svg {
  width: 22px;
  height: 22px;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-top {
    transition: none;
    transform: none;
  }
}

.filter-label {
  color: var(--muted);
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  display: block;
}

.accordion summary {
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  list-style: none;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary:before {
  content: "▸";
  color: var(--orange);
  margin-right: 6px;
  transition: transform .15s;
  display: inline-block;
}

.accordion[open] summary:before {
  transform: rotate(90deg);
}

.accordion summary:hover {
  color: var(--ink);
}

.accordion > :not(summary) {
  padding-left: 18px;
}

.picker-count {
  color: var(--muted);
  margin-top: 12px;
  font-size: 13.5px;
}

.mini-grid {
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 8px;
  display: grid;
}

.mini-card {
  border: 2px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  text-align: left;
  border-radius: 10px;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  display: flex;
  overflow: hidden;
}

.mini-card:hover {
  border-color: var(--orange);
}

.mini-card.selected {
  border-color: var(--pick);
  box-shadow: 0 0 0 3px rgba(var(--pick-rgb), .35);
}

.mini-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--surface) var(--img-spin) center / 28px no-repeat;
  width: 100%;
}

.mini-card .sub {
  padding: 0 8px 8px;
}

.notice {
  border-radius: 10px;
  margin: 12px 0;
  padding: 12px 16px;
  font-size: 14.5px;
}

.notice.err {
  color: var(--err);
  background: #fdecea;
}

.notice.ok {
  color: var(--ok);
  background: #e8f5ec;
}

.notice.info {
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.corgi-loader {
  flex: none;
  line-height: 0;
  display: inline-block;
}

.page-splash {
  color: var(--muted);
  text-align: center;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 32px 16px;
  display: flex;
}

.page-splash.is-full {
  min-height: min(70vh, 520px);
}

.page-splash p {
  margin: 0;
}

body.nav-going main.container > :not(.nav-splash) {
  display: none;
}

.reload-splash {
  z-index: 9999;
  color: var(--muted);
  text-align: center;
  background: radial-gradient(circle at 50% 0%, var(--orange-soft), transparent 60%), rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(14px) saturate(.5);
  backdrop-filter: blur(14px) saturate(.5);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  display: flex;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.reload-splash p {
  margin: 0;
}

.gen-overlay {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  align-items: center;
  gap: 14px;
  margin: 16px 0;
  padding: 18px 20px;
  display: flex;
}

.studio-slot:has( > .gen-overlay) {
  aspect-ratio: var(--pv-ar);
  display: grid;
}

.studio-slot:has( > .gen-overlay) > .gen-overlay {
  border-radius: 10px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0;
}

.gen-progress {
  flex-wrap: wrap;
  align-items: flex-start;
}

.gen-thumbs {
  color: var(--muted);
  flex: none;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  display: flex;
}

.gen-thumbs img {
  object-fit: cover;
  background: var(--bg);
  border-radius: 8px;
  width: 64px;
  height: 48px;
}

.progress-track {
  background: var(--orange-soft);
  border-radius: 999px;
  height: 8px;
  margin-top: 8px;
  overflow: hidden;
}

.progress-fill {
  background: var(--orange);
  border-radius: 999px;
  height: 100%;
  transition: width .4s linear;
}

.runner-hop {
  animation: runner-hop calc(var(--corgi-step, .6s) / 2) ease-in-out infinite alternate;
  display: inline-block;
}

.corgi {
  flex: none;
  display: block;
  position: relative;
}

.corgi-body {
  position: absolute;
  top: 0;
  left: 0;
}

.corgi-leg {
  transform-origin: 50% 10%;
  animation: corgi-step-back var(--corgi-step, .6s) linear infinite;
  position: absolute;
}

.corgi-leg-front {
  animation-name: corgi-step-front;
}

.corgi-leg-late {
  animation-delay: calc(var(--corgi-step, .6s) / -2);
}

.corgi-tongue {
  transform-box: fill-box;
  transform-origin: 50% 0;
  animation: .4s ease-in-out infinite alternate corgi-tongue;
}

.corgi-bone {
  transform-box: fill-box;
  transform-origin: 50%;
  animation: .32s ease-in-out infinite alternate bone-bob;
}

.corgi-tail {
  transform-box: fill-box;
  transform-origin: 100% 100%;
  animation: .32s ease-in-out infinite alternate corgi-wag;
}

@keyframes runner-hop {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-3px);
  }
}

@keyframes corgi-step-back {
  0% {
    transform: rotate(-26deg)translateY(0);
  }

  50% {
    transform: rotate(30deg)translateY(0);
  }

  62% {
    transform: rotate(20deg)translateY(-23.08%);
  }

  80% {
    transform: rotate(-8deg)translateY(-23.08%);
  }

  92% {
    transform: rotate(-30deg)translateY(-7.69%);
  }

  100% {
    transform: rotate(-26deg)translateY(0);
  }
}

@keyframes corgi-step-front {
  0% {
    transform: rotate(-28deg)translateY(0);
  }

  50% {
    transform: rotate(24deg)translateY(0);
  }

  60% {
    transform: rotate(14deg)translateY(-23.08%);
  }

  78% {
    transform: rotate(-12deg)translateY(-23.08%);
  }

  92% {
    transform: rotate(-32deg)translateY(-7.69%);
  }

  100% {
    transform: rotate(-28deg)translateY(0);
  }
}

@keyframes corgi-tongue {
  from {
    transform: scaleY(.75);
  }

  to {
    transform: scaleY(1.1);
  }
}

@keyframes corgi-wag {
  from {
    transform: rotate(-9deg);
  }

  to {
    transform: rotate(12deg);
  }
}

@keyframes bone-bob {
  from {
    transform: translateY(1px)rotate(-10deg);
  }

  to {
    transform: translateY(-2px)rotate(10deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .runner-hop, .corgi-leg, .corgi-tongue, .corgi-tail, .corgi-bone {
    animation: none;
  }

  .corgi-loader .corgi-leg {
    --corgi-step: 1.6s;
    animation: corgi-step-back var(--corgi-step) linear infinite;
  }

  .corgi-loader .corgi-leg-front {
    animation-name: corgi-step-front;
  }

  .corgi-loader .corgi-leg-late {
    animation-delay: calc(var(--corgi-step) / -2);
  }
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13.5px;
}

.link-btn {
  font: inherit;
  color: var(--orange-dark);
  cursor: pointer;
  background: none;
  border: 0;
  margin: -10px 0;
  padding: 10px 0;
  text-decoration: underline;
}

.link-btn:hover {
  color: var(--orange);
}

.link-btn:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  border-radius: 4px;
}

.row {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  display: flex;
}

.mt8 {
  margin-top: 8px;
}

.mt16 {
  margin-top: 16px;
}

.mt24 {
  margin-top: 24px;
}

.props {
  border-collapse: collapse;
  width: 100%;
  font-size: 14.5px;
}

.props td {
  border-bottom: 1px solid var(--line);
  padding: 7px 10px;
}

.props td:first-child {
  color: var(--muted);
  white-space: nowrap;
}

.props.wrap td:first-child {
  white-space: normal;
}

.tile-studio {
  cursor: pointer;
  align-items: flex-start;
  gap: 8px;
  display: flex;
}

.tile-studio input {
  width: 18px;
  height: 18px;
  accent-color: var(--orange);
  flex: none;
  margin: 1px 0 0;
}

.tile-studio > span {
  flex-direction: column;
  gap: 2px;
  display: flex;
}

.tile-mix-title {
  margin: 0 0 4px;
  font-size: 16px;
}

.tile-mix-hint {
  margin: 4px 0 0;
  font-size: 13px;
}

.tile-mix-rows {
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  display: flex;
}

.tile-mix-row {
  grid-template-columns: 1fr 1fr 1fr 40px;
  align-items: center;
  gap: 6px;
  display: grid;
}

.tile-mix-head {
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  line-height: 1.2;
}

.tile-mix-row input {
  text-align: center;
  min-height: 44px;
  padding: 6px 4px;
}

.tile-mix-del {
  border: 1px solid var(--line);
  min-width: 40px;
  min-height: 44px;
  color: var(--muted);
  background: none;
  border-radius: 8px;
  font-size: 15px;
}

.tile-mix-del:hover {
  color: var(--err);
  border-color: var(--err);
}

.tile-save-all {
  border-top: 1px solid var(--line);
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 8px 18px;
  margin-top: 18px;
  padding-top: 14px;
  display: grid;
}

.tile-save-all > .btn {
  width: 100%;
}

.tile-save-all > .btn:only-of-type, .tile-save-all > .tile-card-copy {
  grid-column: 1 / -1;
}

.tile-save-all > .notice, .tile-save-all > p {
  grid-column: 1 / -1;
  margin: 0;
}

@media (min-width: 720px) {
  .tile-save-all {
    grid-template-columns: minmax(200px, auto) minmax(200px, auto) minmax(180px, auto) 1fr;
  }

  .tile-save-all > .tile-card-copy {
    grid-column: auto;
  }
}

.tile-mix-actions {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  display: flex;
}

.tile-matrix-add {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  display: flex;
}

.tile-matrix-add input {
  flex: 180px;
  min-width: 0;
}

.tile-mix-sum {
  color: var(--muted);
  font-size: 13px;
}

.tile-mix-sum.over {
  color: var(--err);
  font-weight: 600;
}

.props.wrap td + td {
  white-space: nowrap;
}

.props.wrap td.fix-cell {
  white-space: normal;
}

.props.wrap td.fix-cell .btn {
  margin-top: 6px;
}

.disclaimer {
  color: var(--muted);
  margin-top: 10px;
  font-size: 13px;
}

.calc {
  border-top: 1px solid var(--line);
  max-width: 620px;
  margin-top: 18px;
  padding-top: 14px;
}

.calc-area {
  flex: none;
}

.calc-area input {
  width: 170px;
}

.calc-result {
  margin: 10px 0 0;
  font-size: 15px;
}

.chip-sm {
  min-height: 38px;
  padding: 5px 14px;
  font-size: 13.5px;
}

.stats-row {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  display: grid;
}

.stat-tile {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 12px;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  display: flex;
}

.stat-num {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
}

.bar-list {
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  display: flex;
}

.bar-row {
  grid-template-columns: minmax(120px, 240px) 1fr 44px;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  display: grid;
}

.bar-name {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.bar-track {
  background: var(--surface);
  border-radius: 4px;
  height: 14px;
  overflow: hidden;
}

.bar-fill {
  background: var(--orange-dark);
  border-radius: 0 4px 4px 0;
  min-width: 2px;
  height: 100%;
  display: block;
}

.bar-value {
  text-align: right;
  font-weight: 600;
}

.usage-highlight {
  background: var(--orange-soft);
  border: 1px solid var(--orange);
  border-radius: 10px;
  align-items: baseline;
  gap: 14px;
  margin: 4px 0 16px;
  padding: 14px 20px;
  display: inline-flex;
}

.usage-amount {
  color: var(--orange-dark);
  font-variant-numeric: tabular-nums;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}

.usage-caption {
  color: var(--muted);
  max-width: 280px;
  font-size: 14px;
}

.ip-scroll {
  overflow-x: auto;
}

.adm-visits h3 {
  margin: 0 0 4px;
}

.admin-days {
  color: var(--muted);
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 13px;
  display: inline-flex;
}

.admin-days select {
  border: 1px solid var(--line);
  color: var(--ink);
  font: inherit;
  background: #fff;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 13px;
}

.ip-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14.5px;
}

.ip-table th {
  text-align: left;
  color: var(--muted);
  white-space: nowrap;
  padding: 0 10px 6px;
  font-size: 13px;
  font-weight: 600;
}

.ip-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
}

.ip-addr {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
}

.ip-quota {
  white-space: nowrap;
  font-weight: 600;
}

.ip-tag {
  background: var(--orange-soft);
  color: var(--orange-dark);
  white-space: nowrap;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-block;
}

.ip-actions {
  text-align: right;
  white-space: nowrap;
}

.ip-geo-sub {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
  display: block;
}

.ip-del {
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 6px;
  margin-left: 8px;
  padding: 6px 9px;
  font-size: 16px;
  line-height: 1;
}

.ip-del:hover {
  color: var(--err);
  background: #fdecea;
}

.ip-del:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.photo-check {
  z-index: 2;
  cursor: pointer;
  background: rgba(255, 255, 255, .92);
  border-radius: 8px;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  display: flex;
  position: absolute;
  top: 8px;
  left: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}

.photo-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--orange);
  cursor: pointer;
  margin: 0;
}

.photo-hidden {
  color: var(--err);
  font-size: 13px;
  font-weight: 600;
}

.voice {
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  display: flex;
}

.voice-btn {
  color: var(--ink);
  border: 1px solid var(--line);
  cursor: pointer;
  background: #fff;
  border-radius: 999px;
  flex: none;
  align-items: center;
  gap: 6px;
  padding: 5px 11px 5px 9px;
  font-size: 13px;
  line-height: 1.2;
  display: inline-flex;
}

@media (hover: hover) and (pointer: fine) {
  .voice-btn:hover:not(:disabled) {
    border-color: var(--orange);
    color: var(--orange-dark);
  }
}

.voice-btn:disabled {
  opacity: .5;
  cursor: default;
}

.voice-btn.ico {
  gap: 0;
  padding: 6px;
}

@media (hover: none) and (pointer: coarse) {
  .voice-btn.ico, .wish-clip {
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }

  .voice-btn svg, .wish-clip svg {
    width: 20px;
    height: 20px;
  }
}

.voice-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

.voice-btn.on {
  border-color: var(--err);
  color: var(--err);
  font-variant-numeric: tabular-nums;
  background: #fdecea;
}

.voice-dot {
  background: var(--err);
  border-radius: 50%;
  width: 10px;
  height: 10px;
  margin: 0 3px;
  animation: 1.1s ease-in-out infinite voice-pulse;
}

@keyframes voice-pulse {
  0%, 100% {
    opacity: 1;
  }

  50% {
    opacity: .2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .voice-dot {
    animation: none;
  }
}

.voice-note {
  min-width: 0;
  color: var(--muted);
  flex: auto;
  font-size: 12px;
}

.voice-note.err {
  color: var(--err);
}

nextjs-portal {
  display: none !important;
}

.problem-fab {
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 900;
  border: 1px solid var(--line);
  min-height: 44px;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  background: #fff;
  border-radius: 999px;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  transition: border-color .2s, color .2s;
  display: inline-flex;
  position: fixed;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
}

.problem-fab svg {
  width: 18px;
  height: 18px;
  color: var(--orange);
  flex: none;
}

.problem-fab:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
}

.problem-fab:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .problem-fab {
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
  }

  .problem-fab span {
    display: none;
  }

  .problem-fab svg {
    width: 22px;
    height: 22px;
  }
}

.tile-bright-row {
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  display: flex;
}

.tile-step {
  color: #444;
  cursor: pointer;
  background: #fff;
  border: 1px solid #d8d8d8;
  border-radius: 6px;
  flex: none;
  width: 24px;
  height: 24px;
  padding: 0;
  font: 600 15px / 1 system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
}

.tile-step:hover:not(:disabled) {
  border-color: var(--orange);
  color: #b26200;
}

.tile-step:disabled {
  opacity: .4;
  cursor: default;
}

.tile-bright-row input[type="range"] {
  min-width: 0;
  accent-color: var(--orange);
  flex: auto;
}

.tile-bright-val {
  text-align: right;
  font-variant-numeric: tabular-nums;
  flex: none;
  min-width: 58px;
}

.tile-bright-acts {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  display: flex;
}

.tile-lay-box {
  aspect-ratio: 1;
  background: #eceae7;
  border-radius: 10px;
  width: 100%;
  max-width: 600px;
  margin: 8px auto 0;
  position: relative;
  overflow: hidden;
}

.tile-lay-box img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
}

.tile-lay-get {
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 8px 0 0;
  display: flex;
}

.tile-lay-wait {
  opacity: 0;
  justify-content: center;
  align-items: center;
  animation: 0s .4s forwards tile-lay-wait-in;
  display: flex;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

@keyframes tile-lay-wait-in {
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tile-lay-wait {
    opacity: 1;
    animation-delay: 0s;
  }
}

dialog.modal.dl-modal {
  max-width: min(380px, 100vw - 24px);
}

.dl-inner {
  padding: 18px;
}

.dl-title {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.3;
}

.dl-wait {
  color: var(--muted);
  margin: 0;
}

.dl-steps {
  flex-direction: column;
  gap: 8px;
  display: flex;
}

.dl-step {
  text-align: left;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 10px 14px;
  line-height: 1.25;
  display: flex;
}

.dl-step b {
  font-size: 15px;
  font-weight: 700;
}

.dl-step span {
  color: var(--muted);
  font-size: 12px;
}

.dl-step.dl-top {
  border-color: var(--orange);
}

.dl-step.dl-top b {
  color: var(--orange-dark);
}

.dl-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

dialog.modal.problem-modal {
  max-width: min(560px, 100vw - 24px);
}

.problem-text {
  resize: vertical;
  width: 100%;
  min-height: 110px;
}

.problem-voice {
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  display: flex;
}

.problem-voice .voice {
  flex: 0 auto;
  justify-content: flex-start;
  margin-top: 0;
}

.problem-voice .voice-note {
  flex: 0 auto;
}

.problem-fab-spin {
  border: 2px solid var(--line);
  border-top-color: var(--orange);
  border-radius: 50%;
  flex: none;
  width: 18px;
  height: 18px;
  animation: .8s linear infinite problem-shot;
  display: none;
}

.problem-fab.busy {
  pointer-events: none;
  opacity: .8;
}

.problem-fab.busy svg {
  display: none;
}

.problem-fab.busy .problem-fab-spin {
  display: block;
}

@keyframes problem-shot {
  to {
    transform: rotate(360deg);
  }
}

.problem-attach {
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  display: flex;
}

.problem-shots {
  align-items: flex-start;
  gap: 12px;
  display: flex;
}

.problem-shots figure {
  flex-direction: column;
  gap: 4px;
  margin: 0;
  display: flex;
}

.problem-attach img {
  border: 1px solid var(--line);
  border-radius: 8px;
  flex: none;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 128px;
}

.problem-fix {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  margin-top: 14px;
  padding: 10px 12px;
}

.problem-fix-row {
  cursor: pointer;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 600;
  display: flex;
}

.problem-fix-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--orange);
  flex: none;
}

.problem-fix-sub {
  min-height: 38px;
  margin-left: 30px;
  font-size: 14px;
  font-weight: 500;
}

.problem-fix-sub input {
  width: 18px;
  height: 18px;
}

.problem-fix-model {
  cursor: default;
  gap: 8px;
}

.problem-fix-model select {
  min-width: 0;
  height: 34px;
  font: inherit;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: 8px;
  flex: 1;
  padding: 0 8px;
  font-size: 16px;
}

.problem-warn {
  color: var(--muted);
  margin: 4px 0 0;
  padding-left: 24px;
  font-size: 13px;
  position: relative;
}

.problem-warn:before {
  content: "⚠";
  color: var(--orange-dark);
  position: absolute;
  left: 4px;
}

.problem-pick {
  border: 1px solid var(--line);
  width: 34px;
  height: 30px;
  color: var(--muted);
  cursor: pointer;
  background: #fff;
  border-radius: 8px;
  justify-content: center;
  align-items: center;
  padding: 0;
  display: inline-flex;
}

.problem-pick:hover {
  color: var(--ink);
  border-color: var(--muted);
}

.problem-pick input {
  display: none;
}

.problem-pick svg {
  width: 17px;
  height: 17px;
}

.problem-pick input {
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  position: absolute;
}

.problem-pick span {
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  border-radius: 10px;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-size: 14.5px;
  display: inline-flex;
}

.problem-pick span:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
}

.problem-pick input:focus-visible + span {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.problem-attach.dropping {
  outline: 2px dashed var(--orange);
  outline-offset: 6px;
  border-radius: 10px;
}

.problem-drop-shot {
  color: var(--orange-dark);
  cursor: pointer;
  font: inherit;
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
}

.problem-pick-err {
  color: var(--err);
}

@media (max-width: 640px) {
  .problem-fab.busy .problem-fab-spin {
    width: 22px;
    height: 22px;
  }

  .problem-pick {
    align-self: stretch;
  }

  .problem-pick span {
    justify-content: center;
    display: flex;
  }

  .problem-shots {
    flex-direction: column;
  }
}

.problem-list {
  flex-direction: column;
  gap: 8px;
  display: flex;
}

.problem-item {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
}

.problem-item.done {
  opacity: .62;
}

.problem-item > summary {
  cursor: pointer;
  align-items: baseline;
  gap: 10px;
  padding: 9px 12px;
  font-size: 14px;
  list-style: none;
  display: flex;
}

.problem-item > summary::-webkit-details-marker {
  display: none;
}

.problem-when {
  color: var(--muted);
  white-space: nowrap;
  flex: none;
  font-size: 13px;
}

.problem-line {
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.problem-item > summary > :last-child {
  flex: none;
}

.problem-body {
  padding: 0 12px 12px;
}

.problem-full {
  white-space: pre-wrap;
  margin: 0 0 10px;
}

.problem-shot {
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 100%;
  max-width: 420px;
  margin-bottom: 10px;
  display: block;
}

.problem-body .problem-shots {
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.problem-body .problem-shots figure {
  min-width: 0;
}

.problem-body .problem-shots .problem-shot {
  width: auto;
  max-width: min(100%, 420px);
  max-height: 240px;
  margin-bottom: 0;
}

.problem-edit {
  display: block;
}

.problem-ua {
  color: var(--muted);
  word-break: break-word;
  font-size: 12px;
}

.problem-actions {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.maintenance-screen {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
  background: radial-gradient(circle at 50% 0%, var(--orange-soft), transparent 60%), var(--bg);
  justify-content: center;
  align-items: center;
  display: flex;
}

.maintenance-screen.is-overlay {
  z-index: 9999;
  background: radial-gradient(circle at 50% 0%, var(--orange-soft), transparent 60%), rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(14px) saturate(.5);
  backdrop-filter: blur(14px) saturate(.5);
  min-height: 0;
  animation: .25s ease-out maintenance-appear;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.maintenance-card {
  text-align: center;
  width: 100%;
  max-width: 560px;
}

.maintenance-card h1 {
  margin: 8px 0 10px;
  font-size: 30px;
  line-height: 1.2;
}

.maintenance-lead {
  max-width: 44ch;
  color: var(--muted);
  margin: 0 auto;
  font-size: 17px;
}

.maintenance-note {
  background: var(--orange-soft);
  color: var(--orange-dark);
  border-radius: 999px;
  margin: 14px 0 0;
  padding: 8px 14px;
  font-size: 15px;
  display: inline-block;
}

.maintenance-hint {
  color: var(--muted);
  margin: 18px 0 0;
  font-size: 14px;
}

.maintenance-elapsed {
  white-space: nowrap;
}

.maintenance-study {
  text-align: left;
  max-width: 380px;
  margin: 22px auto 0;
}

.maintenance-study:empty {
  display: none;
}

.wiz-study {
  max-width: 380px;
  margin: 16px 0 28px;
}

.wiz-study:empty {
  display: none;
}

.maintenance-arena {
  height: 212px;
  margin-top: 34px;
  position: relative;
}

.maintenance-ring {
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 425 212'><ellipse cx='212.5' cy='106' rx='175' ry='65' fill='none' stroke='%23e6e2dd' stroke-width='2' stroke-dasharray='7 9' stroke-linecap='round'/></svg>") center / contain no-repeat;
  width: 425px;
  height: 212px;
  margin: -106px 0 0 -212.5px;
  position: absolute;
  top: 50%;
  left: 50%;
}

.maintenance-runner {
  will-change: transform;
  line-height: 0;
  position: absolute;
  top: 0;
  left: 0;
}

.maintenance-depth {
  --jump: 0;
  display: inline-block;
  position: relative;
}

.maintenance-depth:after {
  content: "";
  filter: blur(2.5px);
  width: 44px;
  height: 8px;
  transform: scale(calc(1 - var(--jump) * .4));
  opacity: calc(1 - var(--jump) * .5);
  background: rgba(28, 28, 28, .16);
  border-radius: 50%;
  margin-left: -22px;
  position: absolute;
  bottom: 1px;
  left: 50%;
}

.maintenance-jump, .maintenance-flip {
  display: inline-block;
}

.ring-hurdle {
  transform-origin: 50% 100%;
  will-change: transform, opacity;
  line-height: 0;
  position: absolute;
  top: 0;
  left: 0;
}

.ring-hurdle .hurdle-tall, .ring-hurdle[data-tall="1"] .hurdle-low {
  display: none;
}

.ring-hurdle[data-tall="1"] .hurdle-tall {
  display: block;
}

.maintenance-arena, .ring-score, .ring-hint, .maintenance-card, .corgi-game {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

.ring-score {
  color: var(--muted);
  margin: 6px 0 0;
  font-size: 14px;
}

.ring-score b {
  color: var(--orange);
  font-variant-numeric: tabular-nums;
  font-size: 19px;
  display: inline-block;
}

.ring-score b.is-hit {
  animation: .5s ease-out ring-hit;
}

.ring-hint {
  color: var(--muted);
  margin: 2px 0 0;
  font-size: 13px;
}

@keyframes ring-hit {
  0% {
    color: var(--err);
    transform: scale(1.5);
  }

  40% {
    color: var(--err);
    transform: scale(1);
  }

  60% {
    transform: translateX(-4px);
  }

  80% {
    transform: translateX(4px);
  }

  100% {
    transform: none;
  }
}

@keyframes maintenance-appear {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (max-width: 470px) {
  .maintenance-arena {
    height: 148px;
    margin-top: 14px;
  }

  .maintenance-ring {
    transform: scale(.66);
  }
}

@media (max-width: 420px) {
  .maintenance-card h1 {
    font-size: 25px;
  }

  .maintenance-lead {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .maintenance-screen .corgi-leg, .maintenance-screen .corgi-tail, .maintenance-screen .corgi-tongue {
    --corgi-step: 1.6s;
    animation-duration: var(--corgi-step);
    animation-name: corgi-step-back;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
  }

  .maintenance-screen .corgi-leg-front {
    animation-name: corgi-step-front;
  }

  .maintenance-screen .corgi-leg-late {
    animation-delay: calc(var(--corgi-step) / -2);
  }

  .maintenance-screen .corgi-tail {
    animation-name: corgi-wag;
    animation-direction: alternate;
  }

  .maintenance-screen .corgi-tongue {
    animation-name: corgi-tongue;
    animation-direction: alternate;
  }

  .maintenance-screen .runner-hop {
    animation: none;
  }
}

.not-found {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 0 64px;
}

.not-found-code {
  color: var(--orange-soft);
  margin: 0;
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
}

.not-found h1 {
  margin: 4px 0 10px;
}

.not-found .lead {
  max-width: 44ch;
  margin: 0 auto 24px;
}

.not-found-actions {
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  display: flex;
}

.ghost-corgi {
  margin: 0 auto -12px;
  display: block;
  overflow: visible;
}

.ghost-float {
  animation: 3.4s ease-in-out infinite alternate ghost-float;
}

.ghost-hem-fill {
  animation: 2.4s ease-in-out infinite alternate ghost-hem-fill;
}

.ghost-hem-line {
  animation: 2.4s ease-in-out infinite alternate ghost-hem-line;
}

.ghost-ear {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: 2.3s ease-in-out infinite alternate ghost-ear;
}

.ghost-ear-right {
  animation-delay: -1.15s;
}

.ghost-eye {
  transform-box: fill-box;
  transform-origin: 50%;
  animation: 5.2s ease-in-out infinite ghost-blink;
}

.ghost-eye-right {
  animation-delay: -.02s;
}

.ghost-tongue {
  transform-box: fill-box;
  transform-origin: 50% 0;
  animation: .5s ease-in-out infinite alternate corgi-tongue;
}

.ghost-shadow {
  transform-box: fill-box;
  transform-origin: 50%;
  animation: 3.4s ease-in-out infinite alternate ghost-shadow;
}

.ghost-spark {
  transform-box: fill-box;
  transform-origin: 50%;
  animation: 2.4s ease-in-out infinite alternate ghost-spark;
}

.ghost-spark-late {
  animation-delay: -1.2s;
}

@keyframes ghost-float {
  from {
    transform: translateY(5px)rotate(-1.5deg);
  }

  to {
    transform: translateY(-9px)rotate(1.5deg);
  }
}

@keyframes ghost-hem-fill {
  from {
    d: path("M21 104 C 23.2 115.97, 34.4 115.97, 36.6 104 C 38.8 122.62, 50 122.62, 52.2 104 C 54.4 115.97, 65.6 115.97, 67.8 104 C 70 122.62, 81.2 122.62, 83.4 104 C 85.6 115.97, 96.8 115.97, 99 104 L99 88 L21 88 Z");
  }

  to {
    d: path("M21 104 C 23.2 122.62, 34.4 122.62, 36.6 104 C 38.8 115.97, 50 115.97, 52.2 104 C 54.4 122.62, 65.6 122.62, 67.8 104 C 70 115.97, 81.2 115.97, 83.4 104 C 85.6 122.62, 96.8 122.62, 99 104 L99 88 L21 88 Z");
  }
}

@keyframes ghost-hem-line {
  from {
    d: path("M21 104 C 23.2 115.97, 34.4 115.97, 36.6 104 C 38.8 122.62, 50 122.62, 52.2 104 C 54.4 115.97, 65.6 115.97, 67.8 104 C 70 122.62, 81.2 122.62, 83.4 104 C 85.6 115.97, 96.8 115.97, 99 104");
  }

  to {
    d: path("M21 104 C 23.2 122.62, 34.4 122.62, 36.6 104 C 38.8 115.97, 50 115.97, 52.2 104 C 54.4 122.62, 65.6 122.62, 67.8 104 C 70 115.97, 81.2 115.97, 83.4 104 C 85.6 122.62, 96.8 122.62, 99 104");
  }
}

@keyframes ghost-ear {
  from {
    transform: rotate(-4deg);
  }

  to {
    transform: rotate(5deg);
  }
}

@keyframes ghost-blink {
  0%, 90%, 100% {
    transform: scaleY(1);
  }

  94% {
    transform: scaleY(.1);
  }
}

@keyframes ghost-shadow {
  from {
    opacity: .11;
    transform: scale(1);
  }

  to {
    opacity: .05;
    transform: scale(.76);
  }
}

@keyframes ghost-spark {
  from {
    opacity: .3;
    transform: scale(.7);
  }

  to {
    opacity: .9;
    transform: scale(1.1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ghost-float, .ghost-hem-fill, .ghost-hem-line, .ghost-ear, .ghost-eye, .ghost-tongue, .ghost-shadow, .ghost-spark {
    animation: none;
  }
}

body.page-chat {
  flex-direction: column;
  height: 100dvh;
  display: flex;
  overflow: hidden;
}

body.page-chat main.container {
  flex-direction: column;
  flex: 1;
  min-height: 0;
  display: flex;
}

body.page-chat .site-footer {
  display: none;
}

@media (max-width: 640px) {
  body.page-chat .site-header {
    display: none;
  }
}

body.page-chat .cc {
  flex-direction: column;
  flex: 1;
  min-height: 0;
  display: flex;
}

.cc-answer {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  border-radius: 10px;
  margin: 0 0 10px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.45;
}

.cc-answer, .cc-stale {
  background: var(--orange-soft);
  color: var(--orange-dark);
  border-radius: 10px;
  margin: 0 0 10px;
  padding: 8px 10px;
  font-size: 13px;
}

.cc-queued {
  animation: 5s forwards cc-toast;
}

@keyframes cc-toast {
  0% {
    opacity: 0;
    transform: translateY(-4px);
  }

  6% {
    opacity: 1;
    transform: none;
  }

  88% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-answer, .cc-queued {
    animation: none;
  }
}

.cc-queued {
  background: var(--surface);
  color: var(--ink);
  border-radius: 10px;
  margin: 0 0 10px;
  padding: 8px 10px;
  font-size: 13px;
}

.cc-panel {
  border: 1px solid var(--line);
  background: var(--orange-soft);
  border-radius: 10px;
  margin: 0 0 10px;
  padding: 8px 10px;
  font-size: 13px;
}

.cc-queue.halted {
  background: #fdecea;
  border-color: #f3c2bd;
}

.cc-queue.halted > .cc-queue-head {
  background: #f9dbd6;
}

.cc-queue-head {
  color: var(--ink);
  background: var(--orange-band);
  cursor: pointer;
  white-space: nowrap;
  border-radius: 9px 9px 0 0;
  align-items: center;
  gap: 8px;
  margin: -8px -10px 0;
  padding: 7px 10px;
  font-weight: 600;
  list-style: none;
  display: flex;
}

.cc-queue-head .cc-queue-note {
  white-space: normal;
  flex: auto;
  min-width: 0;
  margin-left: 5px;
  font-weight: 400;
}

.cc-panel:not([open]) {
  padding-bottom: 0;
}

.cc-panel.cc-queue {
  padding-left: 10px;
  padding-right: 10px;
}

.cc-panel:not([open]) {
  background: var(--orange-band);
  border-color: var(--orange-band);
}

.cc-queue.halted:not([open]) {
  background: #f9dbd6;
  border-color: #f9dbd6;
}

.cc-panel:not([open]) > .cc-queue-head {
  border-radius: 9px;
}

.cc-panel[open] > .cc-queue-head {
  margin-bottom: 6px;
}

.cc-queue-head::-webkit-details-marker {
  display: none;
}

.cc-queue-head:after {
  content: "+";
  border: 1px solid var(--orange-dark);
  width: 24px;
  height: 24px;
  color: var(--orange-dark);
  white-space: nowrap;
  border-radius: 999px;
  flex: none;
  justify-content: center;
  align-items: center;
  margin-left: auto;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  display: flex;
}

.cc-panel[open] > .cc-queue-head:after {
  content: "−";
}

.cc-queue-brief {
  color: var(--muted);
  margin: 4px 0 0;
  font-size: 12.5px;
}

.cc-area {
  color: #43505c;
  vertical-align: 1px;
  background: #eef1f4;
  border-radius: 999px;
  margin-right: 7px;
  padding: 1px 8px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-block;
}

.cc-area-tiles {
  color: #8a4b00;
  background: #fff0dd;
}

.cc-area-learn {
  color: #1d6b39;
  background: #e6f5ea;
}

.cc-area-chat {
  color: #4b3ba8;
  background: #ece9fd;
}

.cc-queue-num {
  min-width: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex: none;
}

.cc-queue-shots {
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 0;
  display: flex;
}

.cc-queue-shots img {
  object-fit: cover;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  width: 72px;
  height: 72px;
}

.cc-queue-item > summary .fix-chip {
  margin-left: auto;
}

.cc-queue-item > summary .cc-ask-off {
  font: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  flex: none;
  align-items: center;
  margin: -10px 0 -10px auto;
  padding: 10px 6px;
  display: inline-flex;
}

.cc-queue-list {
  --cc-rows: 10;
  --cc-row: 20.4px;
  --cc-gap: 4px;
  gap: var(--cc-gap);
  max-height: calc(var(--cc-rows) * var(--cc-row)  + (var(--cc-rows)  - 1) * var(--cc-gap));
  scrollbar-width: thin;
  flex-direction: column;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  overflow-y: auto;
}

.cc-queue-list[data-more] {
  -webkit-mask-image: linear-gradient(#000 calc(100% - 9px), rgba(0, 0, 0, 0));
  mask-image: linear-gradient(#000 calc(100% - 9px), rgba(0, 0, 0, 0));
}

.cc-queue-list li {
  display: block;
}

.cc-queue-item > summary {
  cursor: pointer;
  align-items: baseline;
  gap: 6px;
  list-style: none;
  display: flex;
}

.cc-queue-item > summary::-webkit-details-marker {
  display: none;
}

.cc-queue-item[open] > summary {
  font-weight: 600;
}

.cc-queue-text {
  color: var(--ink);
  white-space: pre-wrap;
  background: #fff;
  border-radius: 8px;
  margin: 4px 0 6px;
  padding: 6px 8px;
}

.cc-queue-reply {
  border-left: 3px solid var(--orange);
  background: #fff;
  border-radius: 8px;
  margin: 4px 0 6px;
  padding: 6px 8px;
}

.cc-queue-label {
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 8px 0 2px;
  font-size: 11px;
}

.cc-queue-reply .cc-queue-label {
  margin-top: 0;
}

.cc-queue-said {
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
}

.cc-queue-list:has(.cc-queue-item[open]) {
  max-height: 70vh;
}

.cc-queue-list.editing {
  max-height: none;
}

.cc-queue-edit {
  margin: 4px 0 6px;
}

.cc-queue-area {
  border: 1px solid var(--orange);
  width: 100%;
  min-height: 92px;
  color: var(--ink);
  font: inherit;
  resize: vertical;
  background: #fff;
  border-radius: 8px;
  padding: 6px 8px;
  display: block;
}

.cc-queue-area:disabled {
  color: var(--muted);
}

.cc-queue-list li.on {
  font-weight: 600;
}

.cc-queue-done .cc-queue-list > li > details > summary:before {
  content: "•";
  min-width: 12px;
  color: var(--muted);
  flex: none;
}

.cc-queue-done .cc-queue-list li.ask, .cc-queue .cc-queue-list li.ask {
  box-shadow: inset 3px 0 0 var(--orange);
  background: #ffe4c7;
  border-radius: 6px;
  padding: 1px 4px 1px 7px;
}

.cc-queue-done .cc-queue-list li.ask > details > summary, .cc-queue .cc-queue-list li.ask > details > summary {
  font-weight: 600;
}

.cc-queue-what {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.cc-queue-now {
  color: var(--orange-dark);
  white-space: nowrap;
  margin-left: auto;
}

.cc-queue-move {
  flex-wrap: wrap;
  gap: 12px 14px;
  margin: 6px 0 2px;
  display: flex;
}

.cc-queue-move .cc-queue-drop {
  min-height: 30px;
  margin-left: 0;
}

.cc-queue-drop {
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border: 0;
  margin-left: auto;
  padding: 0;
  text-decoration: underline;
}

.cc-queue-drop:hover {
  color: var(--err);
}

.cc-queue-files {
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 6px 0 0;
  display: flex;
}

.cc-queue-file {
  line-height: 0;
  display: inline-flex;
  position: relative;
}

.cc-queue-file img {
  object-fit: cover;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  width: 54px;
  height: 40px;
}

.cc-queue-file b {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
}

.cc-queue-file-kill {
  border: 1px solid var(--line);
  width: 18px;
  height: 18px;
  color: var(--muted);
  cursor: pointer;
  background: #fff;
  border-radius: 50%;
  padding: 0;
  font-size: 11px;
  line-height: 1;
  position: absolute;
  top: -6px;
  right: -6px;
}

.cc-queue-file-kill:hover {
  color: var(--err);
  border-color: var(--err);
}

.cc-queue-clip {
  width: 40px;
  height: 40px;
  color: var(--muted);
  border: 1px dashed var(--line);
  cursor: pointer;
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  display: inline-flex;
}

.cc-queue-clip svg {
  width: 18px;
  height: 18px;
  display: block;
}

.cc-queue-clip:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
}

.cc-queue-run {
  align-items: center;
  gap: 12px;
}

.cc-queue-model, .cc-queue-flow {
  color: var(--muted);
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  display: inline-flex;
}

.cc-queue-model select {
  font: inherit;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  border-radius: 6px;
  padding: 2px 4px;
  font-size: 11.5px;
}

.cc-queue-flow input {
  width: 13px;
  height: 13px;
  margin: 0;
}

.cc-queue-kill {
  color: var(--err);
}

.cc-queue-cancel {
  border: 1px solid var(--err);
  min-height: 36px;
  color: var(--err);
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border-radius: 8px;
  padding: 4px 12px;
}

.cc-queue-cancel:hover:not(:disabled) {
  background: #fdecea;
}

.cc-queue-cancel:disabled {
  border-color: var(--line);
  color: var(--muted);
  cursor: default;
}

.cc-queue-done > .cc-queue-list {
  --cc-row: 21.4px;
}

.cc-queue-why {
  color: var(--muted);
  white-space: pre-wrap;
  margin: 4px 0 0;
  font-size: 12.5px;
}

.cc-queue-all {
  justify-content: flex-end;
  margin: 6px 0 0;
}

.cc-feed {
  flex: 1;
  min-height: 0;
  max-height: none;
}

.cc-title {
  align-items: center;
  gap: 10px;
  display: flex;
}

.cc-title .cc-live {
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  margin-right: 0;
  font-size: 13px;
  font-weight: 400;
  overflow: hidden;
}

@media (max-width: 430px) {
  .cc-title .cc-live {
    max-width: 9px;
  }
}

.cc-pause {
  border: 1px solid var(--line);
  color: var(--ink);
  white-space: nowrap;
  cursor: pointer;
  background: none;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.1;
}

.cc-pause:hover {
  border-color: var(--muted);
}

.cc-pause.on {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

.cc-pause[disabled] {
  opacity: .55;
  cursor: default;
}

.cc-wipe {
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  background: none;
  border-radius: 999px;
  margin-left: auto;
  padding: 5px 10px;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.1;
}

.cc-wipe:hover {
  color: var(--ink);
  border-color: var(--muted);
}

.cc-reload, .cc-report {
  border: 1px solid var(--line);
  width: 30px;
  height: 30px;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border-radius: 999px;
  justify-content: center;
  align-items: center;
  margin-left: auto;
  padding: 0;
  display: inline-flex;
}

.cc-reload:hover, .cc-report:hover {
  color: var(--ink);
  border-color: var(--muted);
}

.cc-report + .cc-reload {
  margin-left: 0;
}

.cc-down {
  z-index: 3;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  background: rgba(255, 255, 255, .92);
  border-radius: 999px;
  align-self: flex-end;
  align-items: center;
  gap: 6px;
  padding: 7px 14px 7px 11px;
  font-size: 13px;
  display: inline-flex;
  position: -webkit-sticky;
  position: sticky;
  bottom: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}

.cc-down:hover {
  border-color: var(--muted);
}

@media (max-width: 430px) {
  .cc-down {
    padding: 9px;
  }

  .cc-down span {
    display: none;
  }
}

.cc-title .cc-wipe {
  margin-left: 0;
}

@media (max-width: 480px) {
  .cc-title {
    font-size: 22px;
  }

  .cc-wipe, .cc-pause {
    padding: 5px 9px;
  }
}

.cc-bar {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  display: flex;
}

.cc-bar:empty {
  display: none;
}

.cc-live {
  color: var(--muted);
  align-items: center;
  gap: 6px;
  margin-right: auto;
  font-size: 13px;
  display: inline-flex;
}

.cc-live:before {
  content: "";
  background: var(--err);
  border-radius: 50%;
  flex: none;
  width: 9px;
  height: 9px;
}

.cc-live.on:before {
  background: var(--ok);
}

.cc-bar .btn {
  min-height: 44px;
  padding: 8px 16px;
  font-size: 15px;
}

.cc-engine-err .cc-retry {
  background: #fff;
  margin-top: 10px;
}

.cc-feed {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 12px;
  flex-direction: column;
  gap: 10px;
  max-height: min(62vh, 780px);
  padding: 14px;
  display: flex;
  overflow-y: auto;
}

.cc-empty {
  text-align: center;
  max-width: 46ch;
  color: var(--muted);
  margin: 28px auto;
}

.cc-wait {
  color: var(--muted);
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 28px auto;
  display: flex;
}

.cc-wait-spin {
  border: 2px solid var(--line);
  border-top-color: var(--orange);
  border-radius: 50%;
  flex: none;
  width: 18px;
  height: 18px;
  animation: .8s linear infinite cc-wait-turn;
}

.cc-wait-part {
  opacity: .7;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

@keyframes cc-wait-turn {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-wait-spin {
    animation-duration: 2.4s;
  }
}

.cc-msg {
  border: 1px solid var(--line);
  background: var(--surface);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-radius: 12px;
  max-width: 88%;
  padding: 10px 12px;
}

.cc-msg p {
  margin: 0;
}

.cc-msg time {
  color: var(--muted);
  text-align: right;
  margin-top: 4px;
  font-size: 11px;
  display: block;
}

.cc-me {
  background: var(--orange-soft);
  border-color: #f3d9bb;
  align-self: flex-end;
}

.cc-claude {
  align-self: flex-start;
}

.cc-queue {
  color: #7a4b12;
  background: #fff6ec;
  border-radius: 10px;
  margin: 0 0 8px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.4;
}

.cc-queue.halted {
  color: #8d2b2b;
  background: #fdecec;
}

.cc-queue a {
  color: inherit;
}

.fix-queue-head {
  color: var(--muted);
  margin: 8px 0 0;
  font-size: 13px;
}

.fix-pause {
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.fix-pause.on {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

.fix-chip {
  white-space: nowrap;
  color: #555;
  background: #eee;
  border-radius: 999px;
  flex: none;
  padding: 1px 8px;
  font-size: 11.5px;
  line-height: 1.6;
}

.fix-chip.running {
  color: #8a4b0f;
  background: #ffe9d2;
}

.fix-chip.queued {
  color: #3a4b8a;
  background: #eef2ff;
}

.fix-chip.interrupted {
  color: #8d2b2b;
  background: #fdecec;
}

.fix-chip.done {
  color: #1d6b38;
  background: #e6f4ea;
}

.fix-chip.cancelled {
  color: #5a5a5a;
  background: #ececec;
}

.fix-chip.ask {
  background: var(--orange);
  color: #fff;
}

.fix-chip.stage {
  color: #8a4b00;
  background: #fff0dd;
}

.cc-msg-files {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px !important;
}

.cc-msg-docs {
  flex-direction: column;
  gap: 2px;
  display: flex;
  margin-top: 6px !important;
}

.cc-msg-docs a {
  word-break: break-all;
  padding: 5px 0;
  font-size: 12px;
}

dialog.modal.cc-doc-modal {
  max-width: min(860px, 100vw - 16px);
}

.cc-doc-name {
  word-break: break-all;
  margin: 0 44px 10px 0;
  font-size: 15px;
}

.cc-doc-md {
  color: var(--ink);
  overflow-wrap: break-word;
  font-size: 14px;
  line-height: 1.5;
}

.cc-doc-md h1 {
  margin: 18px 0 8px;
  font-size: 19px;
  line-height: 1.25;
}

.cc-doc-md h2 {
  margin: 18px 0 8px;
  font-size: 17px;
  line-height: 1.3;
}

.cc-doc-md h3 {
  margin: 14px 0 6px;
  font-size: 15px;
}

.cc-doc-md h4, .cc-doc-md h5, .cc-doc-md h6 {
  margin: 12px 0 6px;
  font-size: 14px;
}

.cc-doc-md > :first-child {
  margin-top: 0;
}

.cc-doc-md p {
  margin: 0 0 10px;
}

.cc-doc-md ul, .cc-doc-md ol {
  margin: 0 0 10px;
  padding-left: 22px;
}

.cc-doc-md li {
  margin: 0 0 4px;
}

.cc-doc-md blockquote {
  border-left: 3px solid var(--orange);
  background: var(--surface);
  color: var(--muted);
  margin: 0 0 10px;
  padding: 6px 12px;
}

.cc-doc-md code {
  background: var(--surface);
  border-radius: 4px;
  padding: 1px 4px;
  font: 12.5px / 1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.cc-doc-md pre {
  background: var(--surface);
  border-radius: 8px;
  margin: 0 0 10px;
  padding: 10px;
  overflow-x: auto;
}

.cc-doc-md pre code {
  background: none;
  padding: 0;
}

.cc-doc-md hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 14px 0;
}

.cc-doc-md table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 10px;
  font-size: 13px;
  display: block;
  overflow-x: auto;
}

.cc-doc-md th, .cc-doc-md td {
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  padding: 6px 8px;
}

.cc-doc-md th {
  background: var(--surface);
}

.cc-doc-frame {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  width: 100%;
  height: 70dvh;
}

.cc-reply {
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  font-size: 12px;
  text-decoration: underline;
  position: absolute;
  bottom: 6px;
  right: 10px;
}

.cc-reply:hover {
  color: var(--orange-dark);
}

.cc-claude {
  padding-bottom: 22px;
  position: relative;
}

.cc-replying {
  border-left: 3px solid var(--orange);
  background: var(--surface);
  color: var(--muted);
  align-items: baseline;
  gap: 10px;
  margin: 0 0 6px;
  padding: 6px 10px;
  font-size: 12.5px;
  display: flex;
}

.cc-replying span {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.cc-shots {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
  display: flex;
}

.cc-shots a {
  width: 190px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  flex: none;
  text-decoration: none;
  display: block;
  overflow: hidden;
}

.cc-shots img {
  object-fit: cover;
  object-position: top;
  width: 100%;
  height: 128px;
  display: block;
}

.cc-shots span {
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 6px;
  font-size: 11px;
  line-height: 1.3;
  display: block;
  overflow: hidden;
}

.cc-shots a:hover {
  border-color: var(--orange);
}

@media (max-width: 520px) {
  .cc-shots a {
    width: calc(50% - 4px);
  }
}

.cc-typing p:after {
  content: "▍";
  color: var(--orange);
  animation: 1s step-end infinite cc-caret;
}

@keyframes cc-caret {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-typing p:after {
    animation: none;
  }
}

.cc-tool {
  border-left: 3px solid var(--line);
  align-self: stretch;
  padding-left: 10px;
}

.cc-tool summary {
  cursor: pointer;
  min-height: 28px;
  color: var(--muted);
  overflow-wrap: anywhere;
  padding: 4px 0;
  font-size: 13px;
}

.cc-tool[open] summary {
  color: var(--ink);
}

.cc-tool pre {
  background: var(--surface);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-radius: 8px;
  max-height: 260px;
  margin: 4px 0 0;
  padding: 8px 10px;
  font-size: 12px;
  overflow: auto;
}

.cc-err {
  align-self: stretch;
  margin: 0;
}

.cc-note {
  border-left: 3px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  overflow-wrap: anywhere;
  border-radius: 8px;
  align-self: stretch;
  margin: 0;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.45;
}

.cc-note.warn {
  border-left-color: var(--orange-dark);
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.cc-flash {
  border-color: var(--orange-dark);
  animation: 2.4s forwards cc-flash;
}

@keyframes cc-flash {
  0% {
    box-shadow: 0 0 rgba(207, 98, 3, 0);
  }

  8% {
    box-shadow: 0 0 0 4px rgba(207, 98, 3, .35);
  }

  78% {
    box-shadow: 0 0 0 4px rgba(207, 98, 3, .35);
  }

  100% {
    box-shadow: 0 0 rgba(207, 98, 3, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-flash {
    animation: none;
    box-shadow: 0 0 0 3px rgba(207, 98, 3, .35);
  }
}

.cc-work {
  color: var(--muted);
  align-items: center;
  gap: 10px;
  font-size: 14px;
  display: flex;
}

.problem-inbar {
  align-items: center;
  gap: 6px;
  display: inline-flex;
}

.problem-inbar svg {
  width: 16px;
  height: 16px;
}

.problem-inbar .problem-fab-spin {
  display: none;
}

@media (max-width: 520px) {
  .problem-inbar span:last-child {
    display: none;
  }
}

.cc-compose {
  margin-top: 12px;
}

.cc-progress {
  margin-bottom: 10px;
}

.cc-progress-track {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
}

.cc-progress-track i {
  background: var(--orange);
  height: 100%;
  transition: width 1s linear;
  display: block;
}

.cc-progress > span {
  color: var(--muted);
  margin-top: 5px;
  font-size: 13px;
  display: block;
}

.cc-progress-part {
  white-space: nowrap;
}

.cc-progress-part b {
  color: var(--ink);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .cc-progress-track i {
    transition: none;
  }
}

.cc-replies {
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  display: flex;
}

.cc-choices {
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 10px;
  display: flex;
}

.cc-choice {
  border: 1px solid var(--line);
  max-width: calc(50% - 3px);
  min-height: 36px;
  color: var(--ink);
  font: inherit;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  background: #fff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  line-height: 1.3;
  overflow: hidden;
}

.cc-choice:hover:not(:disabled) {
  border-color: var(--orange);
}

.cc-choice:disabled {
  opacity: .5;
  cursor: default;
}

.cc-choice b {
  color: var(--orange-dark);
}

.cc-tools {
  margin: 6px 0;
}

.cc-tools > summary {
  min-height: 32px;
  color: var(--muted);
  cursor: pointer;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  display: flex;
}

.cc-tools-n {
  white-space: nowrap;
  flex: none;
}

.cc-tools-last {
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: auto;
  min-width: 0;
  overflow: hidden;
}

.cc-tools-last:before {
  content: "· ";
}

.cc-tools .cc-tool {
  margin-left: 12px;
}

body.page-chat > main.container, .cc, .cc-feed, .cc-feed > *, .cc-tools > summary, .cc-tools-last {
  min-width: 0;
}

body.page-chat > main.container, .cc, .cc-feed {
  width: 100%;
}

.cc-replies .chip {
  min-height: 44px;
  padding: 6px 14px;
  font-size: 14px;
}

.cc-input {
  min-height: 96px;
}

.cc-actions {
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  display: flex;
}

.cc-pick {
  border: 1px solid var(--line);
  min-width: 0;
  min-height: 34px;
  color: var(--ink);
  background: #fff;
  border-radius: 8px;
  flex: 0 auto;
  padding: 3px 4px;
  font-size: 13.5px;
}

.cc-flow {
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  display: inline-flex;
}

.cc-flow input {
  width: 16px;
  height: 16px;
}

.cc-actions {
  --cc-row: 40px;
}

.cc-flags {
  flex-direction: column;
  flex: none;
  justify-content: center;
  gap: 1px;
  display: flex;
}

.cc-actions > .cc-flags {
  height: auto;
}

.cc-flags label {
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  line-height: 1.1;
  display: inline-flex;
}

.cc-flags input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.cc-paste {
  min-height: 34px;
  padding: 4px 14px;
  font-size: 13px;
}

.cc-actions > * {
  height: var(--cc-row);
  min-height: var(--cc-row);
  box-sizing: border-box;
}

.cc-actions .cc-send {
  align-items: center;
  margin-left: auto;
  padding: 0 14px;
  font-size: 14px;
  display: inline-flex;
}

.cc-actions .cc-clip {
  padding: 0;
}

.cc-actions .cc-pick {
  padding: 0 4px;
}

.cc-actions .cc-flow {
  padding: 0 2px;
}

@media (max-width: 480px) {
  .cc-actions {
    --cc-row: 38px;
    gap: 4px;
  }

  .cc-pick {
    padding: 3px 2px;
    font-size: 12.5px;
  }

  .cc-flow {
    font-size: 11px;
  }

  .cc-actions .cc-send {
    padding: 0 10px;
    font-size: 13px;
  }

  .cc-clip {
    width: 40px;
  }
}

.cc-clip {
  flex: none;
  justify-content: center;
  width: 44px;
  padding: 0;
}

.cc-chips {
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  display: flex;
}

.cc-chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  align-items: center;
  gap: 8px;
  max-width: 240px;
  padding: 4px 6px 4px 4px;
  font-size: 13px;
  display: inline-flex;
}

.cc-chip img {
  object-fit: cover;
  border-radius: 999px;
  width: 34px;
  height: 34px;
}

.cc-chip-name {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.cc-chip button {
  background: var(--surface);
  width: 28px;
  height: 28px;
  color: var(--muted);
  cursor: pointer;
  border: 0;
  border-radius: 50%;
  flex: none;
  font-size: 17px;
  line-height: 1;
}

.cc-chip button:hover {
  color: var(--err);
}

@media (max-width: 640px) {
  .cc-live {
    gap: 0;
    font-size: 0;
  }

  .cc-live:not(.on) {
    gap: 6px;
    font-size: 13px;
  }

  .cc-title {
    white-space: nowrap;
    gap: 8px;
  }

  .cc-pause {
    padding: 5px 10px;
  }

  .cc-wipe {
    padding: 5px 9px;
  }

  .cc-bar .btn {
    padding: 8px 12px;
    font-size: 14px;
  }

  .cc-feed {
    padding: 10px;
  }

  .cc-msg {
    max-width: 94%;
  }
}

.edu-body {
  background: var(--bg);
}

.edu-head {
  z-index: 20;
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
  background: #fff;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
}

.edu-head-inner {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  max-width: 900px;
  min-height: 47px;
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
}

.edu-title {
  font-size: 17px;
  font-weight: 700;
}

.edu-back, .edu-tabs {
  margin-left: auto;
}

.edu-tabs a {
  touch-action: manipulation;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  display: inline-flex;
}

.edu-back {
  color: var(--ink);
  gap: 6px;
  padding-right: 8px;
  font-size: 17px;
  font-weight: 600;
}

.edu-back span {
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.edu-back:hover {
  color: var(--orange-dark);
}

.edu-filters-box {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
}

.edu-filters-box > summary {
  cursor: pointer;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  list-style: none;
  display: flex;
}

.edu-filters-box > summary::-webkit-details-marker {
  display: none;
}

.edu-filters-box > summary:after {
  content: "⌄";
  color: var(--muted);
  margin-left: auto;
  font-size: 18px;
  line-height: 1;
  transform: translateY(-3px);
}

.edu-filters-box[open] > summary:after {
  transform: translateY(2px)rotate(180deg);
}

.edu-filters-title {
  font-size: 15px;
  font-weight: 600;
}

.edu-filters-now {
  color: var(--orange-dark);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  overflow: hidden;
}

.edu-filters-none {
  color: var(--muted);
  font-size: 14px;
}

.edu-filters-clear {
  min-height: 36px;
  color: var(--orange-dark);
  cursor: pointer;
  touch-action: manipulation;
  background: none;
  border: 0;
  margin-left: auto;
  padding: 0 12px;
  font: 600 14px / 1 inherit;
  text-decoration: underline;
}

.edu-filters-clear:hover {
  color: var(--orange);
}

.edu-filters-box > summary:has(.edu-filters-clear):after {
  margin-left: 0;
}

.edu-filters-box .edu-filter-row {
  padding: 0 12px 10px;
}

.edu-filters-box .edu-filter-row:last-child {
  padding-bottom: 12px;
}

.edu-pic {
  margin: 18px 0 0;
}

.edu-pic img {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  width: 100%;
  height: auto;
  display: block;
}

.edu-progress {
  z-index: 5;
  opacity: 0;
  background: none;
  height: 3px;
  transition: opacity .15s;
  position: -webkit-sticky;
  position: sticky;
  top: 48px;
  overflow: hidden;
}

.edu-progress.on {
  opacity: 1;
  background: rgba(238, 114, 3, .16);
}

.edu-progress i {
  background: var(--orange);
  border-radius: 3px;
  width: 40%;
  height: 100%;
  animation: 1.1s ease-in-out infinite edu-run;
  display: block;
}

@keyframes edu-run {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(250%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .edu-progress i {
    opacity: .55;
    width: 100%;
    animation: none;
  }
}

.edu-tabs {
  gap: 2px;
  display: flex;
}

.edu-tabs a {
  color: var(--muted);
  border-bottom: 2px solid rgba(0, 0, 0, 0);
  padding: 0 10px;
  font-size: 15px;
}

.edu-tabs a:hover {
  color: var(--ink);
}

.edu-tab-rec {
  vertical-align: 1px;
  background: #d93025;
  border-radius: 50%;
  width: 8px;
  height: 8px;
  margin-left: 5px;
  animation: 1.6s ease-in-out infinite edu-rec-beat;
  display: inline-block;
}

@keyframes edu-rec-beat {
  0%, 100% {
    opacity: 1;
  }

  50% {
    opacity: .25;
  }
}

@media (prefers-reduced-motion: reduce) {
  .edu-tab-rec {
    animation: none;
  }
}

.edu-tabs a.active {
  color: var(--ink);
  border-bottom-color: var(--orange);
  font-weight: 600;
}

.edu-reload {
  width: 34px;
  min-height: 44px;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: 0;
  justify-content: center;
  align-items: center;
  padding: 0;
  display: inline-flex;
}

.edu-reload:hover {
  color: var(--ink);
}

.edu-reload:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: -3px;
}

.edu-tabs a.going {
  color: var(--ink);
  border-bottom-color: var(--line);
  opacity: .75;
}

.edu-back:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: -3px;
}

.edu-tabs a:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: -3px;
}

.edu-main {
  max-width: 900px;
  padding: 0 15px calc(28px + env(safe-area-inset-bottom));
  margin: 0 auto;
}

.edu-main h1 {
  margin: 18px 0 10px;
  font-size: max(22px, min(5vw, 28px));
}

.edu-shelf-head {
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  display: flex;
}

.edu-off-screen {
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  position: absolute;
  overflow: hidden;
}

.edu-who-btn {
  min-width: 58px;
}

.edu-lang-box {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  display: flex;
}

.edu-lang, .edu-who {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  display: inline-flex;
  overflow: hidden;
}

.edu-lang-btn, .edu-who-btn {
  min-width: 40px;
  min-height: 36px;
  color: var(--muted);
  font: inherit;
  letter-spacing: .02em;
  cursor: pointer;
  touch-action: manipulation;
  background: none;
  border: 0;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 600;
  position: relative;
}

.edu-lang-btn.wait .edu-lang-label, .edu-who-btn.wait .edu-who-label {
  visibility: hidden;
}

.edu-lang-wait, .edu-who-wait {
  border: 2.5px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  animation: .8s linear infinite edu-wait;
  position: absolute;
  top: 50%;
  left: 50%;
}

.edu-lang-btn:not(.on) .edu-lang-wait, .edu-who-btn:not(.on) .edu-who-wait {
  border-color: #c9ced4;
  border-top-color: var(--orange);
}

@media (prefers-reduced-motion: reduce) {
  .edu-lang-wait, .edu-who-wait {
    animation-duration: 2.4s;
  }
}

.edu-lang-btn + .edu-lang-btn, .edu-who-btn + .edu-who-btn {
  border-left: 1px solid var(--line);
}

.edu-lang-btn:hover:not(:disabled), .edu-who-btn:hover:not(:disabled) {
  color: var(--ink);
}

.edu-lang-btn.on, .edu-who-btn.on {
  background: var(--orange);
  color: #fff;
}

.edu-lang-btn:disabled, .edu-who-btn:disabled {
  cursor: default;
}

.edu-lang-err, .edu-who-err {
  color: var(--err);
  font-size: 13px;
}

.edu-shelf {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin: 16px 0;
  display: grid;
}

.edu-book {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  display: flex;
}

.edu-book-head {
  flex-direction: column;
  gap: 8px;
  display: flex;
}

.edu-book-open {
  color: inherit;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  display: flex;
}

.edu-book-open:hover .edu-book-title {
  color: var(--orange-dark);
}

.edu-book-head .edu-book-title {
  margin: 0;
}

.edu-book-cover {
  object-fit: cover;
  object-position: top center;
  border: 1px solid var(--line);
  background: var(--surface) var(--img-spin) center / 36px no-repeat;
  border-radius: 8px;
  width: 100%;
  max-height: 260px;
}

.edu-book-open {
  position: relative;
}

.edu-book-wait, .edu-spin {
  border: 2px solid var(--line);
  border-top-color: var(--orange);
  border-radius: 50%;
  flex: none;
  width: 18px;
  height: 18px;
  animation: .8s linear infinite edu-wait;
  display: none;
}

.edu-book.opening .edu-book-wait {
  border-width: 3px;
  border-color: rgba(255, 255, 255, .65);
  border-top-color: var(--orange);
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
}

.edu-book.opening .edu-book-cover {
  opacity: .55;
}

.edu-book.opening .edu-book-go {
  pointer-events: none;
}

.edu-book.opening .edu-spin {
  display: block;
}

.edu-book-go {
  justify-content: center;
  align-items: center;
  gap: 8px;
  display: inline-flex;
}

@keyframes edu-wait {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .edu-book-wait, .edu-spin {
    animation-duration: 2.4s;
  }
}

.edu-book-title {
  overflow-wrap: anywhere;
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
}

.edu-book-meta {
  color: var(--muted);
  font-size: 14px;
}

.edu-book-err {
  color: var(--err);
  font-size: 14px;
}

.edu-book-warn {
  color: var(--orange);
  font-size: 14px;
}

.edu-bar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
}

.edu-bar i {
  background: var(--orange);
  height: 100%;
  transition: width .4s linear;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .edu-bar i {
    transition: none;
  }
}

.edu-book-tr {
  flex-direction: column;
  gap: 4px;
  display: flex;
}

.edu-book-trline {
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  display: flex;
}

.edu-book-trnote {
  color: var(--muted);
  flex: 160px;
  font-size: 13px;
}

.edu-book-trlink {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  min-height: 44px;
  color: var(--orange-dark);
  font: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 8px 0;
  font-size: 14px;
  text-decoration: underline;
}

.edu-book-trlink:hover {
  color: var(--orange);
}

.edu-book-actions {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
  display: flex;
}

.edu-book-actions .btn {
  min-height: 44px;
  padding: 8px 14px;
  font-size: 15px;
}

.edu-empty {
  border: 1px dashed var(--line);
  text-align: center;
  color: var(--muted);
  border-radius: 12px;
  margin: 24px 0;
  padding: 28px 16px;
}

.edu-note {
  color: var(--muted);
  font-size: 14px;
}

.edu-err {
  color: var(--err);
}

.edu-reader {
  padding-bottom: calc(60px + env(safe-area-inset-bottom));
}

.edu-page {
  max-width: 34em;
  margin: 0 auto;
  padding: 16px 0 8px;
  font-size: 21px;
  line-height: 1.75;
}

.edu-page p {
  content-visibility: auto;
  contain-intrinsic-size: auto 6em;
  overflow-wrap: break-word;
  margin: 0 0 .9em;
}

.edu-page.edu-page-wait {
  opacity: .5;
}

.edu-page .w {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  border-radius: 4px;
}

.edu-page .w-dict {
  background: #fbdfc0;
  box-shadow: 0 0 0 2px #fbdfc0;
}

.edu-page .w-on {
  background: var(--orange-soft);
  box-shadow: 0 0 0 3px var(--orange-soft), inset 0 -2px 0 var(--orange);
}

@media (hover: hover) {
  .edu-page .w:hover {
    background: var(--surface);
  }
}

.edu-reader-note {
  max-width: 34em;
  color: var(--muted);
  margin: 24px auto;
}

.edu-reader-note h1 {
  margin: 0 0 8px;
}

.edu-reader-note .btn {
  margin-top: 12px;
}

.edu-pager {
  z-index: 15;
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  justify-content: center;
  align-items: center;
  gap: 20px;
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
}

.edu-page-btn {
  border: 1px solid var(--line);
  min-width: 56px;
  min-height: 44px;
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  background: #fff;
  border-radius: 10px;
  font-size: 24px;
  line-height: 1;
}

.edu-page-btn:disabled {
  color: var(--line);
  cursor: default;
}

.edu-page-btn:not(:disabled):hover {
  border-color: var(--orange);
  color: var(--orange-dark);
}

.edu-page-no {
  text-align: center;
  min-width: 6.5em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.edu-body:has(.edu-pager) .problem-fab {
  bottom: calc(68px + env(safe-area-inset-bottom));
}

.edu-body:has(dialog.edu-sheet[open]) .problem-fab {
  display: none;
}

dialog.modal.edu-sheet {
  background: #fff;
  border-radius: 18px 18px 0 0;
  max-width: min(560px, 100vw);
  max-height: 86dvh;
  margin: auto auto 0;
  transition: transform .18s ease-out;
  box-shadow: 0 -14px 40px rgba(20, 16, 12, .22);
}

dialog.modal.edu-sheet[open] {
  animation: .2s ease-out edu-sheet-up;
}

@keyframes edu-sheet-up {
  from {
    transform: translateY(100%);
  }

  to {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  dialog.modal.edu-sheet[open] {
    animation: none;
  }

  dialog.modal.edu-sheet {
    transition: none;
  }
}

.edu-sheet-grip {
  background: var(--line);
  border-radius: 999px;
  width: 42px;
  height: 4px;
  margin: 8px auto 2px;
}

.edu-sheet-head {
  border-bottom: 1px solid var(--line);
  align-items: center;
  gap: 12px;
  padding: 6px 16px 12px;
  display: flex;
}

.edu-sheet-word {
  overflow-wrap: anywhere;
  flex: auto;
  min-width: 0;
  font-size: 26px;
  line-height: 1.2;
}

.edu-speak, .edu-report {
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  touch-action: manipulation;
  border-radius: 12px;
  flex: none;
  min-width: 48px;
  min-height: 48px;
  font-size: 22px;
  line-height: 1;
}

.edu-speak:disabled {
  opacity: .6;
  cursor: default;
}

.edu-speak:not(:disabled):hover {
  border-color: var(--orange);
}

.edu-report {
  justify-content: center;
  align-items: center;
  display: inline-flex;
}

.edu-report:hover {
  border-color: var(--orange);
}

.edu-report svg {
  width: 22px;
  height: 22px;
  color: var(--orange);
}

.edu-report:hover svg {
  color: var(--orange-dark);
}

.edu-sheet-body {
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
  overscroll-behavior: contain;
  flex: auto;
  min-height: 0;
  overflow-y: auto;
}

.edu-sheet-fig {
  flex-direction: column;
  align-items: center;
  margin: 0 0 14px;
  display: flex;
}

.edu-sheet-shot {
  border: 1px solid var(--line);
  object-fit: cover;
  background: var(--surface);
  border-radius: 14px;
  width: 160px;
  height: 160px;
}

.edu-slot {
  margin-bottom: 14px;
}

.edu-slot-label {
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 2px;
  font-size: 12px;
  display: block;
}

.edu-slot-soon {
  color: var(--muted);
  margin: 0;
  font-size: 15px;
}

.edu-translation {
  overflow-wrap: break-word;
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.edu-word-meta {
  color: var(--muted);
  margin: 4px 0 0;
  font-size: 13px;
}

.edu-word-sense {
  color: var(--ink);
  opacity: .8;
  margin: 4px 0 0;
  font-size: 14px;
}

.edu-sentence-ru {
  overflow-wrap: break-word;
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
}

.edu-skel {
  background: linear-gradient(90deg, var(--surface) 25%, var(--line) 50%, var(--surface) 75%);
  background-size: 260% 100%;
  border-radius: 6px;
  margin: 0;
  animation: 1.3s ease-in-out infinite edu-skel-run;
}

.edu-skel-word {
  max-width: 220px;
  height: 22px;
}

.edu-skel-line {
  height: 18px;
}

@keyframes edu-skel-run {
  from {
    background-position: 130% 0;
  }

  to {
    background-position: -130% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .edu-skel {
    background: var(--surface);
    animation: none;
  }
}

.edu-sentence {
  overflow-wrap: break-word;
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
}

.edu-sentence b, .edu-sentence-ru b {
  background: var(--orange-soft);
  box-shadow: inset 0 -2px 0 var(--orange);
  border-radius: 3px;
}

.edu-sheet-err {
  color: var(--err);
  margin: 0 0 12px;
  font-size: 15px;
}

.edu-sheet-actions {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 4px;
  display: flex;
}

.edu-sheet-actions .btn {
  min-height: 44px;
}

.edu-sheet-note {
  color: var(--muted);
  font-size: 13px;
}

.edu-filters {
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 6px;
  display: flex;
}

.edu-read-opts {
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  display: flex;
}

.edu-filter-row {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  display: flex;
}

.edu-filter-label {
  min-width: 84px;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 13px;
}

.edu-filters .chip {
  min-height: 34px;
  padding: 4px 12px;
  font-size: 15px;
}

.edu-search {
  border: 1px solid var(--line);
  min-width: 0;
  min-height: 38px;
  color: var(--ink);
  background: #fff;
  border-radius: 10px;
  flex: 200px;
  padding: 6px 12px;
  font-size: 16px;
}

.edu-search:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: -1px;
}

.edu-panel {
  z-index: 4;
  background: var(--bg);
  position: -webkit-sticky;
  position: sticky;
  top: 48px;
}

.edu-panel:has(.edu-filters-box[open]) {
  z-index: auto;
  position: static;
}

.edu-play {
  background: var(--bg);
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin: 0 0 8px;
  padding: 4px 0;
  display: flex;
}

.edu-play-btns {
  gap: 8px;
  display: flex;
}

.edu-play-btn, .edu-play-stop {
  min-height: 38px;
  padding: 6px 16px;
  font-size: 15px;
}

.edu-rate {
  color: var(--muted);
  align-items: center;
  gap: 8px;
  font-size: 13px;
  display: inline-flex;
}

.edu-rate .edu-rate-pick {
  min-height: 36px;
}

.edu-phrase {
  min-height: 32px;
  color: var(--muted);
  cursor: pointer;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  display: inline-flex;
}

.edu-phrase input {
  width: 20px;
  height: 20px;
  accent-color: var(--orange);
}

.edu-play-note {
  min-width: 0;
  color: var(--muted);
  flex: 220px;
  font-size: 13px;
}

.edu-play.on {
  box-shadow: 0 6px 12px -10px rgba(0, 0, 0, .55);
}

.edu-panel:has(.edu-play.deep) {
  box-shadow: 0 8px 14px -12px rgba(0, 0, 0, .6);
}

@media (max-width: 720px) {
  .edu-play.deep .edu-play-hint {
    display: none;
  }
}

.edu-more td {
  border: 0;
  padding: 16px 4px 24px;
}

.edu-more-box {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  display: flex;
}

.edu-more-btn {
  min-height: 44px;
  padding: 8px 18px;
  font-size: 15px;
}

.edu-more-note {
  color: var(--muted);
  font-size: 13px;
}

.edu-top {
  right: 16px;
  bottom: calc(72px + env(safe-area-inset-bottom));
  z-index: 900;
  border: 1px solid var(--line);
  width: 44px;
  height: 44px;
  color: var(--ink);
  cursor: pointer;
  background: #fff;
  border-radius: 999px;
  justify-content: center;
  align-items: center;
  padding: 0;
  display: inline-flex;
  position: fixed;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}

.edu-top svg {
  width: 20px;
  height: 20px;
}

.edu-top:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
}

.edu-main:has(.edu-words) {
  max-width: 1180px;
}

.edu-words {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.edu-words.edu-words-wait {
  opacity: .55;
}

.edu-words th {
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-align: left;
  white-space: nowrap;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
}

.edu-words td {
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  padding: 10px;
}

.edu-words tr.edu-w-busy {
  opacity: .6;
}

.edu-words tr.edu-w-now > td {
  background: var(--orange-soft);
}

.edu-c-pic {
  width: 112px;
}

.edu-c-word {
  width: 10em;
}

.edu-c-cat {
  width: 9.5em;
}

.edu-c-level {
  width: 6em;
}

.edu-c-mastery {
  width: 15em;
}

.edu-c-kill {
  width: 48px;
}

.edu-fig {
  margin: 0;
}

.edu-shot {
  border: 1px solid var(--line);
  object-fit: cover;
  background: var(--surface) var(--img-spin) center / 24px no-repeat;
  border-radius: 10px;
  width: 64px;
  height: 64px;
  display: block;
}

.edu-w-pic-acts {
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  display: flex;
}

.edu-w-at {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.edu-w-again, .edu-w-edit {
  border: 1px solid var(--line);
  min-height: 28px;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  background: #fff;
  border-radius: 8px;
  margin-top: 4px;
  padding: 4px 8px;
  font-size: 12px;
}

.edu-w-again:hover:not(:disabled), .edu-w-edit:hover:not(:disabled) {
  border-color: var(--orange);
  color: var(--ink);
}

.edu-w-again:disabled, .edu-w-edit:disabled {
  opacity: .6;
  cursor: default;
}

.edu-notice {
  color: var(--muted);
}

.study {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  display: flex;
}

.study-title {
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  display: flex;
}

.study-book {
  color: #1a6699;
  flex: none;
  width: 1.2em;
  height: 1.2em;
}

.study-fs .study-title {
  font-size: 20px;
}

.study-head {
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 8px;
  display: flex;
}

.study-learned {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 12px;
}

.study-mark-title, .study-pick-title {
  color: var(--muted);
  font-size: 12px;
}

.study-sound {
  border: 1px solid var(--line);
  min-height: 28px;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  background: #fff;
  border-radius: 8px;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 4px 8px;
  font-size: 12px;
  display: inline-flex;
}

.study-sound svg {
  width: 15px;
  height: 15px;
}

.study-sound:hover {
  border-color: var(--orange);
  color: var(--ink);
}

.study-sound.on {
  border-color: var(--orange);
  color: #b26200;
  font-weight: 600;
}

.study-picks {
  flex-wrap: wrap;
  align-items: end;
  gap: 8px 10px;
  display: flex;
}

.study-pick {
  flex-direction: column;
  flex: 110px;
  align-items: stretch;
  gap: 2px;
  min-width: 0;
  display: flex;
}

.study-pick.study-pick-level {
  flex: 0 auto;
}

.study-pick.study-pick-level select {
  flex: none;
  width: auto;
}

.study-pick-title {
  white-space: nowrap;
  flex: none;
}

.study-pick select {
  border: 1px solid var(--line);
  min-width: 0;
  color: var(--ink);
  font: inherit;
  background: #fff;
  border-radius: 8px;
  flex: auto;
  padding: 6px 8px;
  font-size: 13px;
}

.study-pick select:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}

.study-empty {
  color: var(--muted);
  margin: 0;
  font-size: 13px;
}

.study-card {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: 10px;
  display: grid;
}

.study-pic {
  flex: none;
}

.study-body {
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  display: flex;
}

.study-body b {
  overflow-wrap: break-word;
  font-size: 17px;
}

.study-ru {
  overflow-wrap: break-word;
}

.study-ctx {
  color: var(--muted);
  overflow-wrap: break-word;
  font-size: 13px;
}

.study-mark {
  flex-direction: column;
  gap: 4px;
  display: flex;
}

.study-mark .edu-m {
  flex: 1 1 0;
  min-width: 0;
  min-height: 34px;
  padding: 0;
}

.study-err {
  color: var(--err);
  font-size: 12px;
}

.study-nav {
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  display: flex;
}

.study-step {
  border: 1px solid var(--line);
  width: 32px;
  min-height: 28px;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  background: #fff;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
}

.study-step:hover {
  border-color: var(--orange);
  color: var(--ink);
}

.study-at {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

.study .fs-btn {
  border: 1px solid var(--line);
  width: auto;
  min-height: 28px;
  color: var(--muted);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: #fff;
  border-radius: 8px;
  padding: 4px 8px;
  position: static;
}

.study .fs-btn:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
  background: #fff;
}

.study .fs-btn svg {
  width: 17px;
  height: 17px;
}

.study-head .fs-btn {
  margin-left: 0;
}

.study.study-fs {
  z-index: 1000;
  padding: calc(12px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
  border: none;
  border-radius: 0;
  justify-content: safe center;
  gap: 16px;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  overflow-y: auto;
}

.study.study-fs > * {
  width: min(640px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.study.study-fs .study-learned {
  font-size: 15px;
}

.study.study-fs .study-pick select, .study.study-fs .study-pick-title {
  font-size: 16px;
}

.study.study-fs .study-card {
  align-items: center;
  column-gap: 20px;
}

.study.study-fs .study-pic {
  border-radius: 16px;
  width: 200px;
  height: 200px;
}

.study.study-fs .study-body {
  gap: 6px;
}

.study.study-fs .study-body b {
  font-size: 40px;
  line-height: 1.1;
}

.study.study-fs .study-ru {
  font-size: 24px;
}

.study.study-fs .study-ctx {
  font-size: 18px;
}

.study.study-fs .study-mark-title {
  font-size: 15px;
}

.study.study-fs .study-mark .edu-m {
  min-height: 56px;
  font-size: 20px;
}

.study.study-fs .study-step {
  width: 56px;
  min-height: 48px;
  font-size: 24px;
}

.study.study-fs .study-at {
  font-size: 15px;
}

.study.study-fs .study-empty {
  font-size: 16px;
}

@media (max-width: 480px) {
  .study.study-fs .study-card {
    text-align: center;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    row-gap: 12px;
  }

  .study.study-fs .study-pic {
    width: 160px;
    height: 160px;
  }

  .study.study-fs .study-body {
    align-items: center;
  }

  .study.study-fs .study-body b {
    font-size: 32px;
  }

  .study.study-fs .study-ru {
    font-size: 20px;
  }

  .study.study-fs .study-ctx {
    font-size: 16px;
  }
}

.edu-w-thumb {
  border: 1px solid var(--line);
  background: var(--surface);
  width: 64px;
  height: 64px;
  color: var(--muted);
  border-radius: 10px;
  justify-content: center;
  align-items: center;
  font-size: 22px;
  font-weight: 700;
  display: flex;
}

.edu-w-word b {
  overflow-wrap: break-word;
  font-size: 17px;
  display: block;
}

.edu-w-word {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: 8px;
  display: grid;
}

.edu-w-word > :not(.edu-w-say) {
  grid-column: 2;
}

.edu-w-num {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-right: 7px;
  font-size: 12px;
  font-weight: 400;
}

.edu-w-say {
  width: 34px;
  height: 34px;
  color: var(--muted);
  cursor: pointer;
  background: #fff;
  border: 1px solid #d8d8d8;
  border-radius: 9px;
  grid-area: 1 / 1;
  justify-content: center;
  align-items: center;
  padding: 0;
  display: inline-flex;
}

.edu-w-say svg {
  width: 18px;
  height: 18px;
}

.edu-w-say:hover {
  border-color: var(--orange);
  color: var(--ink);
}

.edu-w-say.on {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

.edu-w-lemma, .edu-w-sense, .edu-w-context {
  color: var(--muted);
  overflow-wrap: anywhere;
  font-size: 13px;
  display: block;
}

.edu-w-en-missing {
  color: var(--muted);
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  display: flex;
}

.edu-w-en-go {
  margin-top: 0;
}

.edu-w-translation {
  overflow-wrap: anywhere;
  font-size: 16px;
  display: block;
}

.edu-w-context {
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-top: 2px;
  display: -webkit-box;
  overflow: hidden;
}

.edu-w-en {
  color: var(--muted);
  overflow-wrap: anywhere;
  margin-top: 2px;
  font-size: 13px;
  display: block;
}

.edu-w-phrases {
  margin-top: 8px;
  display: block;
}

.edu-w-phrases .edu-w-context {
  margin-top: 0;
}

.edu-w-lang {
  color: #1d5fbf;
  font-weight: 600;
}

.edu-pick {
  border: 1px solid var(--line);
  max-width: 100%;
  min-height: 40px;
  color: var(--ink);
  cursor: pointer;
  background: #fff;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 15px;
}

.edu-pick-level {
  min-width: 72px;
}

.edu-pick:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: -1px;
}

.edu-own {
  align-items: center;
  gap: 6px;
  display: inline-flex;
}

.edu-own-input {
  border: 1px solid var(--orange);
  width: 8em;
  min-width: 0;
  min-height: 40px;
  color: var(--ink);
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 16px;
}

.edu-own-ok {
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  border-radius: 10px;
  min-width: 44px;
  min-height: 40px;
  font-size: 14px;
  font-weight: 600;
}

.edu-mastery {
  gap: 4px;
  display: flex;
}

.edu-m {
  border: 1px solid var(--line);
  min-width: 40px;
  min-height: 40px;
  color: var(--muted);
  cursor: pointer;
  touch-action: manipulation;
  background: #fff;
  border-radius: 8px;
  flex: auto;
  font-size: 14px;
  font-weight: 700;
}

.edu-m.on {
  background: var(--orange-soft);
  border-color: var(--orange);
  color: var(--orange-dark);
}

.edu-m:not(:disabled):hover {
  border-color: var(--orange);
}

.edu-m:disabled {
  cursor: default;
}

.edu-m {
  position: relative;
}

.edu-m.wait {
  border-color: var(--orange);
}

.edu-m.wait .edu-m-num {
  visibility: hidden;
}

.edu-m-wait {
  border: 2.5px solid #c9ced4;
  border-top-color: var(--orange);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  animation: .8s linear infinite edu-wait;
  position: absolute;
  top: 50%;
  left: 50%;
}

@media (prefers-reduced-motion: reduce) {
  .edu-m-wait {
    animation-duration: 2.4s;
  }
}

.edu-w-in {
  border: 1px solid var(--line);
  width: 100%;
  min-height: 34px;
  color: var(--ink);
  font: inherit;
  background: #fff;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 15px;
}

.edu-w-in-big {
  font-size: 17px;
  font-weight: 700;
}

.edu-w-in:focus {
  border-color: var(--orange);
  outline: none;
}

.edu-w-edit-acts {
  gap: 4px;
  display: flex;
}

.edu-w-edit-acts .edu-w-edit {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
}

.edu-w-save {
  border-color: var(--orange);
  color: var(--orange-dark);
  font-weight: 600;
}

.edu-kill {
  min-width: 44px;
  min-height: 44px;
  color: var(--muted);
  cursor: pointer;
  touch-action: manipulation;
  background: none;
  border: 1px solid rgba(0, 0, 0, 0);
  border-radius: 10px;
  font-size: 18px;
  line-height: 1;
}

.edu-kill:hover {
  border-color: var(--err);
  color: var(--err);
}

.edu-empty .btn {
  margin-top: 12px;
}

@media (max-width: 720px) {
  .edu-words, .edu-words tbody, .edu-words td {
    display: block;
  }

  .edu-words thead {
    display: none;
  }

  .edu-words tr {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 12px;
    grid-template-columns: 92px minmax(0, 1fr) 44px;
    grid-template-areas: "pic word word"
                         "pic ru ru"
                         "cat cat lvl"
                         "mast mast mast";
    align-items: start;
    gap: 8px;
    margin-bottom: 10px;
    padding: 12px;
    display: grid;
    position: relative;
  }

  .edu-words td {
    border: none;
    padding: 0;
  }

  .edu-w-pic {
    grid-area: pic;
    width: auto;
  }

  .edu-words td.edu-w-word {
    grid-area: word;
    display: grid;
  }

  .edu-w-ru {
    grid-area: ru;
  }

  .edu-w-cat {
    grid-area: cat;
  }

  .edu-w-level {
    grid-area: lvl;
    justify-self: end;
  }

  .edu-w-mastery {
    grid-area: mast;
  }

  .edu-words td.edu-w-kill {
    z-index: 1;
    position: absolute;
    top: 0;
    right: 0;
  }

  .edu-w-kill .edu-kill {
    justify-content: flex-end;
    align-items: flex-start;
    padding: 5px 8px 0 0;
    display: flex;
  }

  .edu-w-kill .edu-kill:hover {
    border-color: rgba(0, 0, 0, 0);
  }

  .edu-words td.edu-w-word > b {
    padding-right: 16px;
  }

  .edu-pick, .edu-w-again, .edu-w-edit {
    width: 100%;
    min-height: 44px;
  }

  .edu-w-edit-acts {
    flex-direction: column;
  }

  .edu-w-en-go {
    width: auto;
    padding: 0 12px;
  }

  .edu-lang-btn, .edu-who-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .edu-who-btn {
    min-width: 46px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .edu-w-say {
    width: 44px;
    height: 44px;
  }

  .edu-w-say svg {
    width: 22px;
    height: 22px;
  }

  .edu-shot, .edu-w-thumb {
    width: 92px;
    height: 92px;
  }

  .edu-pick-level {
    width: auto;
  }

  .edu-m {
    min-height: 44px;
  }

  .edu-own-input {
    flex: auto;
    width: auto;
  }

  .edu-filter-label {
    min-width: 100%;
  }

  .edu-play-btns {
    flex: 1 0 100%;
  }

  .edu-play-btns .btn {
    flex: 1 1 0;
    min-height: 38px;
    padding: 6px 10px;
  }

  .edu-rate .edu-rate-pick {
    min-height: 36px;
  }

  .edu-play-note {
    flex: 100%;
  }

  .edu-words tr.edu-w-now {
    border-color: var(--orange);
    background: var(--orange-soft);
  }

  .edu-words tr.edu-more {
    background: none;
    border: 0;
    margin: 0;
    padding: 0;
    display: block;
  }
}

.edu-video {
  flex-direction: column;
  display: flex;
}

.edu-view {
  display: none;
}

.edu-view.on {
  background: #101214;
  border-radius: 14px;
  margin: 0 0 12px;
  display: block;
  position: relative;
  overflow: hidden;
}

.edu-view-pic {
  object-fit: contain;
  width: 100%;
  max-height: 60vh;
  display: block;
}

.edu-view-time {
  color: #fff;
  letter-spacing: .02em;
  background: rgba(16, 18, 20, .72);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 600;
  position: absolute;
  top: 10px;
  left: 10px;
}

.edu-video-acts {
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  display: flex;
}

.edu-video-btn {
  min-height: 48px;
  padding: 10px 22px;
  font-size: 16px;
}

.edu-video-note {
  color: var(--muted);
  font-size: 13px;
}

.edu-video-keep {
  white-space: nowrap;
  min-height: 38px;
  padding: 6px 14px;
  font-size: 15px;
}

.edu-pickrow {
  align-items: center;
  gap: 10px;
  margin: 10px 0 0;
  display: flex;
}

.edu-pickrow-lbl {
  min-width: 68px;
  color: var(--muted);
  font-size: 13px;
}

.edu-cam-pick, .edu-grade-pick {
  max-width: 260px;
  min-height: 38px;
}

.edu-cam-pick:disabled, .edu-grade-pick:disabled {
  opacity: .55;
  cursor: default;
}

.edu-span-pick {
  max-width: 200px;
  min-height: 38px;
}

.edu-span-all {
  white-space: nowrap;
  min-height: 32px;
  color: var(--orange-dark);
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0 10px;
  font: 13px / 1 inherit;
  text-decoration: underline;
}

.edu-span-all:hover {
  color: var(--orange);
}

.edu-span-days {
  gap: 8px;
}

.edu-date {
  flex: 1 1 0;
  min-width: 0;
  min-height: 38px;
}

.edu-date-dash {
  min-width: 0;
}

.edu-run-strip {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  gap: 8px;
  display: flex;
  overflow-x: auto;
}

.edu-run-strip .edu-run-slide {
  scroll-snap-align: center;
  scroll-snap-stop: always;
  flex: 0 0 100%;
  width: 100%;
}

.edu-run-foot {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  display: flex;
}

.edu-run-dots {
  gap: 5px;
  display: inline-flex;
}

.edu-run-dots i {
  background: var(--line);
  border-radius: 50%;
  width: 6px;
  height: 6px;
}

.edu-run-dots i.on {
  background: var(--orange);
}

.edu-run-count {
  color: var(--orange-dark);
  font-size: 13px;
}

.edu-run-sum {
  color: var(--muted);
  font-size: 12px;
}

.edu-clips {
  flex-direction: column;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
}

.edu-clip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  display: flex;
}

.edu-clip-pic {
  background: #101214;
  border-radius: 10px;
  flex: auto;
  width: 100%;
  min-width: 0;
  max-height: 40vh;
}

.edu-clip-side {
  flex-direction: column;
  flex: none;
  gap: 6px;
  max-width: 40%;
  display: flex;
}

.edu-clip-meta {
  color: var(--muted);
  font-size: 13px;
}

.edu-clip-kill {
  border: 1px solid var(--line);
  min-height: 36px;
  color: var(--muted);
  cursor: pointer;
  background: #fff;
  border-radius: 8px;
  align-self: flex-start;
  padding: 0 10px;
  font-size: 13px;
}

.edu-clip-kill:hover {
  color: #b3261e;
  border-color: #b3261e;
}

.edu-clip-save {
  border: 1px solid var(--line);
  color: var(--orange-dark);
  background: #fff;
  border-radius: 8px;
  align-self: flex-start;
  padding: 5px 10px;
  font-size: 13px;
  text-decoration: none;
}

.edu-clip-save:hover {
  border-color: var(--orange);
}

.edu-clip-acts {
  align-items: center;
  gap: 8px;
  display: flex;
}

@media (max-width: 720px) {
  .edu-clip {
    flex-direction: column;
  }

  .edu-clip-side {
    flex-flow: wrap;
    align-items: center;
    gap: 10px;
    max-width: none;
  }

  .edu-clip-side b {
    flex: 100%;
  }

  .edu-run-strip {
    width: 100%;
  }

  .edu-clip-acts {
    margin-left: auto;
  }

  .edu-clip-save, .edu-clip-kill {
    align-self: center;
    margin-left: 0;
  }

  .edu-video-btn {
    flex: auto;
  }

  .edu-video-note {
    flex: 1 0 100%;
  }

  .edu-cam-pick, .edu-grade-pick {
    flex: auto;
    max-width: none;
  }

  .edu-span-pick {
    flex: 0 190px;
    width: auto;
  }
}

.edu-saved {
  min-height: 44px;
  color: var(--ok);
  align-items: center;
  font-weight: 600;
  display: inline-flex;
}

.edu-save-err {
  margin: 8px 0 0;
}

.edu-drill-side {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  display: flex;
}

.edu-drill-phrase {
  min-height: 44px;
  color: var(--muted);
  cursor: pointer;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  display: inline-flex;
}

.edu-drill-phrase input {
  width: 20px;
  height: 20px;
  accent-color: var(--orange);
}

@media (max-width: 480px) {
  .edu-drill-phrase {
    flex: 1 0 100%;
    order: 3;
    justify-content: flex-end;
    min-height: 32px;
  }
}

.edu-sound {
  border: 1px solid var(--line);
  width: 44px;
  min-height: 44px;
  color: var(--orange-dark);
  cursor: pointer;
  background: #fff;
  border-radius: 12px;
  justify-content: center;
  align-items: center;
  padding: 0;
  display: inline-flex;
}

.edu-sound[aria-pressed="false"] {
  background: var(--surface);
  color: var(--muted);
}

.edu-sound:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: -3px;
}

.edu-drill-quiet {
  color: var(--muted);
  margin: 0 0 8px;
  font-size: 13px;
}

.edu-drill {
  border: 1px solid var(--line);
  text-align: center;
  background: #fff;
  border-radius: 16px;
  max-width: 560px;
  min-height: 380px;
  margin: 10px auto 0;
  padding: 18px 16px 20px;
}

.edu-drill-ask {
  color: var(--muted);
  margin: 0 0 10px;
  font-size: 14px;
}

.edu-drill-word {
  overflow-wrap: break-word;
  margin: 0;
  font-size: max(24px, min(7vw, 34px));
  font-weight: 700;
  line-height: 1.2;
}

.edu-drill-hint {
  color: var(--muted);
  overflow-wrap: break-word;
  margin: 4px 0 0;
  font-size: 15px;
}

.edu-drill-meta {
  color: var(--muted);
  margin: 8px 0 0;
  font-size: 13px;
}

.edu-drill-mastery {
  vertical-align: middle;
  gap: 3px;
  display: inline-flex;
}

.edu-drill-mastery i {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 50%;
  width: 8px;
  height: 8px;
}

.edu-drill-mastery i.on {
  border-color: var(--orange);
  background: var(--orange);
}

.edu-drill-pic {
  border: 1px solid var(--line);
  object-fit: cover;
  background: var(--surface) var(--img-spin) center / 40px no-repeat;
  border-radius: 12px;
  width: 160px;
  height: 160px;
  margin: 0 auto 12px;
  display: block;
}

.edu-drill-opts {
  gap: 10px;
  margin: 16px 0 0;
  display: grid;
}

.edu-drill-opt {
  border: 1px solid var(--line);
  min-height: 52px;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  overflow-wrap: break-word;
  touch-action: manipulation;
  background: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 17px;
  line-height: 1.3;
}

.edu-drill-opt:not(:disabled):hover {
  border-color: var(--orange);
}

.edu-drill-opt:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: -3px;
}

.edu-drill-opt:disabled {
  cursor: default;
}

.edu-drill-opt.right {
  border-color: var(--ok);
  color: var(--ok);
  background: #eef7f0;
  font-weight: 600;
}

.edu-drill-opt.wrong {
  border-color: var(--err);
  color: var(--err);
  background: #fdefed;
}

.edu-drill-opt.dim {
  opacity: .5;
}

.edu-drill-say {
  min-height: 24px;
  margin-top: 12px;
  font-size: 15px;
}

.edu-drill-ok {
  color: var(--ok);
  font-weight: 600;
}

.edu-drill-miss {
  color: var(--muted);
}

.edu-drill-score {
  color: var(--orange-dark);
  font-weight: 600;
}

.edu-drill-next {
  min-height: 44px;
  margin-top: 4px;
}

@media (max-width: 720px) {
  .edu-drill {
    margin-top: 6px;
    padding: 14px 12px 16px;
  }

  .edu-drill-pic {
    width: 128px;
    height: 128px;
  }
}

.spend-total {
  border-color: var(--orange);
  background: var(--orange-soft);
}

.spend-test {
  background: var(--surface);
}

.spend-test .stat-num {
  color: var(--muted);
}

.spend-wait {
  opacity: .45;
  transition: opacity .15s;
}

.gate {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
  background: radial-gradient(circle at 50% 0%, var(--orange-soft), transparent 60%), var(--bg);
  justify-content: center;
  align-items: center;
  display: flex;
}

.gate-card {
  text-align: center;
  width: 100%;
  max-width: 460px;
}

.gate-logo {
  width: auto;
  height: 46px;
}

.gate-card h1 {
  margin: 14px 0 10px;
  font-size: 27px;
  line-height: 1.2;
}

.gate-lead {
  max-width: 40ch;
  color: var(--muted);
  margin: 0 auto;
  font-size: 16px;
}

.gate-form {
  gap: 10px;
  margin: 18px 0 0;
  display: flex;
}

.gate-form input {
  border: 1px solid var(--line);
  min-width: 0;
  min-height: 46px;
  font: inherit;
  background: #fff;
  border-radius: 10px;
  flex: auto;
  padding: 10px 14px;
  font-size: 16px;
}

.gate-form input:focus {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}

.gate-form .btn {
  white-space: nowrap;
  min-height: 46px;
}

.gate-err {
  text-align: left;
  margin-top: 12px;
}

.gate-hint {
  color: var(--muted);
  margin: 14px 0 0;
  font-size: 14px;
}

.gate-hint a {
  color: var(--orange-dark);
}

.gate-card .maintenance-arena {
  margin-top: 18px;
}

@media (max-width: 480px) {
  .gate-card h1 {
    font-size: 23px;
  }

  .gate-form {
    flex-wrap: wrap;
  }

  .gate-form .btn {
    flex: 100%;
  }
}

.tx-hint {
  margin-bottom: 8px;
}

.tx-list {
  flex-direction: column;
  gap: 8px;
  display: flex;
}

.tx-item {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
}

.tx-item.tx-lvl-bad {
  border-left: 3px solid var(--err);
}

.tx-item.tx-lvl-warn {
  border-left: 3px solid var(--orange);
}

.tx-item.tx-lvl-ok {
  border-left: 3px solid var(--ok);
}

.tx-item > summary {
  cursor: pointer;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  list-style: none;
  display: flex;
}

.tx-item > summary::-webkit-details-marker {
  display: none;
}

.tx-item[open] > summary {
  border-bottom: 1px solid var(--line);
}

.tx-thumb {
  border: 1px solid var(--line);
  object-fit: cover;
  background: #fff;
  border-radius: 6px;
  flex: none;
  width: 38px;
  height: 38px;
}

.tx-thumb-none {
  background: repeating-linear-gradient(45deg, #fff, #fff 4px, var(--line) 4px, var(--line) 8px);
  display: block;
}

.tx-head {
  flex-direction: column;
  flex: 0 380px;
  min-width: 0;
  display: flex;
}

.tx-name {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.25;
}

.tx-scale {
  color: var(--muted);
  font-size: 12.5px;
}

.tx-flags {
  flex-wrap: wrap;
  flex: auto;
  gap: 4px;
  display: flex;
}

.tx-flag {
  white-space: nowrap;
  border: 1px solid rgba(0, 0, 0, 0);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
}

.tx-flag-bad {
  color: var(--err);
  background: #fdecea;
}

.tx-flag-warn {
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.tx-flag-ok {
  color: var(--ok);
  background: #e8f5ec;
}

.tx-body {
  background: var(--bg);
  border-radius: 0 0 8px 8px;
  padding: 10px 12px 12px;
}

.tx-notes {
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  display: flex;
}

.tx-note {
  background: var(--surface);
  border-left: 3px solid var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 7px 10px;
  font-size: 13.5px;
}

.tx-note-bad {
  border-left-color: var(--err);
  background: #fdecea;
}

.tx-note-warn {
  background: var(--orange-soft);
  border-left-color: var(--orange);
}

.tx-cols {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 12px 22px;
  display: grid;
}

.tx-body h3 {
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin: 0 0 4px;
  font-size: 13px;
}

.tx-facts {
  grid-template-columns: minmax(90px, auto) 1fr;
  gap: 2px 10px;
  margin: 0;
  font-size: 13.5px;
  display: grid;
}

.tx-facts dt {
  color: var(--muted);
}

.tx-facts dd {
  overflow-wrap: anywhere;
  min-width: 0;
  margin: 0;
}

.tx-bad {
  color: var(--err);
}

.tx-swatch {
  border: 1px solid var(--line);
  vertical-align: -1px;
  border-radius: 3px;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  display: inline-block;
}

.tx-formats-head {
  margin-top: 14px !important;
}

.tx-formats {
  border-collapse: collapse;
  width: 100%;
  max-width: 520px;
  font-size: 13px;
}

.tx-formats th {
  text-align: left;
  color: var(--muted);
  padding: 0 10px 2px 0;
  font-size: 12px;
  font-weight: 400;
}

.tx-formats td {
  white-space: nowrap;
  padding: 2px 10px 2px 0;
}

.tx-formats tr.tx-row-bad td {
  color: var(--err);
}

.tx-legend {
  max-width: 60ch;
  margin: 8px 0 0;
  font-size: 12.5px;
}

.tx-crops {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  margin-top: 14px;
}

.tx-crops > summary {
  cursor: pointer;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 4px;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  display: flex;
}

.tx-crops > summary::-webkit-details-marker {
  display: none;
}

.tx-crops > summary:before {
  content: "▸";
  color: var(--muted);
  margin-right: 6px;
}

.tx-crops[open] > summary:before {
  content: "▾";
}

.tx-crops[open] > summary {
  border-bottom: 1px solid var(--line);
}

.tx-crops > summary .muted {
  font-weight: 400;
}

.tx-crops-body {
  padding: 8px 10px 12px;
}

.tx-crops-lead {
  max-width: 70ch;
  margin: 0 0 10px;
  font-size: 12.5px;
}

.tx-crops-auto {
  color: var(--muted);
  border-left: 3px solid var(--line);
  max-width: 70ch;
  margin: 0 0 8px;
  padding-left: 8px;
  font-size: 12.5px;
}

.tx-crops-canvas {
  max-width: 70ch;
  margin: 0 0 10px;
  font-size: 12.5px;
}

.tx-crops-fmt + .tx-crops-fmt {
  margin-top: 12px;
}

.tx-crops-fmt h4 {
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
}

.tx-crops-fmt h4 .muted {
  font-size: 12.5px;
  font-weight: 400;
}

.tx-crops-acts {
  flex: none;
  gap: 6px;
  margin-left: auto;
  display: flex;
}

.tx-crops-acts .btn {
  white-space: nowrap;
  min-height: 30px;
  padding: 3px 4px;
  font-size: 10.5px;
}

.tx-crops-empty {
  color: var(--err);
  max-width: 70ch;
  margin: 0;
  font-size: 13px;
}

.tx-crops-few {
  color: var(--muted);
  max-width: 70ch;
  margin: 0 0 6px;
  font-size: 12.5px;
}

.tx-crops-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  place-items: start center;
  gap: 8px 6px;
  display: grid;
}

.tx-crop {
  text-align: left;
  cursor: pointer;
  background: none;
  border: 0;
  max-width: 100%;
  padding: 0;
  font-family: inherit;
  display: block;
}

.tx-crop-img {
  width: calc(var(--cw) * var(--k, 1));
  height: calc(var(--ch) * var(--k, 1));
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 2px;
  margin-bottom: 2px;
  display: block;
  position: relative;
  overflow: hidden;
}

.tx-crop-img:before {
  content: "";
  left: calc(var(--ox) * var(--k, 1));
  top: calc(var(--oy) * var(--k, 1));
  width: calc(var(--bw) * var(--k, 1));
  height: calc(var(--bh) * var(--k, 1));
  background-image: var(--tx-img);
  transform-origin: calc(var(--tox) * var(--k, 1)) calc(var(--toy) * var(--k, 1));
  transform: rotate(var(--cr));
  background-size: 100% 100%;
  position: absolute;
}

.tx-crop-tall {
  width: calc(var(--ch) * var(--k, 1));
  height: calc(var(--cw) * var(--k, 1));
  position: relative;
}

.tx-crop-tall .tx-crop-img {
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%)rotate(90deg);
}

.tx-crop:hover .tx-crop-img {
  border-color: var(--accent, #888);
}

.tx-crop-bad {
  color: var(--err);
}

.tx-crop-bad .tx-crop-img {
  border-color: var(--err);
  box-shadow: 0 0 0 2px #fdecea;
}

.tx-crop-auto .tx-crop-img {
  opacity: .92;
}

.look-edit-wrap {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  padding: calc(8px + var(--safe-top)) calc(8px + var(--safe-right)) calc(8px + var(--safe-bottom)) calc(8px + var(--safe-left));
  background: none;
  border: 0;
  justify-content: center;
  align-items: center;
  margin: 0;
  display: flex;
}

.look-edit-wrap::backdrop {
  background: rgba(0, 0, 0, .55);
}

.look-edit {
  background: var(--surface);
  border-radius: 12px;
  flex-direction: column;
  gap: 8px;
  width: min(560px, 100%);
  max-height: 100%;
  padding: 10px 12px 12px;
  display: flex;
  overflow: auto;
}

.look-edit-head {
  z-index: 3;
  background: #fff;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  font-size: 14px;
  display: flex;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
}

.look-edit-names {
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  display: flex;
}

.look-edit-names > strong, .look-edit-title {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.look-edit-acts {
  flex-direction: column;
  flex: none;
  gap: 6px;
  display: flex;
}

.look-edit-acts .modal-close {
  width: 36px;
  height: 36px;
}

.look-edit-title {
  margin: 0;
  font-size: 12px;
}

.look-edit-stage {
  background: #222;
  border-radius: 8px;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  display: flex;
  position: relative;
  overflow: hidden;
}

.look-edit-canvas {
  max-width: 100%;
  max-height: min(58vh, 520px);
  display: block;
}

.look-edit-wait {
  color: #ddd;
  font-size: 13px;
  position: absolute;
}

.look-edit-cap {
  text-align: left;
  font-size: 11px;
  line-height: 1.2;
}

.look-edit .tile-bright-row {
  margin: 0;
}

.look-edit-save {
  width: 100%;
}

.look-edit-note {
  margin: 0;
  font-size: 12px;
}

.crop-edit-wrap {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  padding: calc(8px + var(--safe-top)) calc(8px + var(--safe-right)) calc(8px + var(--safe-bottom)) calc(8px + var(--safe-left));
  background: none;
  border: 0;
  justify-content: center;
  align-items: center;
  margin: 0;
  display: flex;
}

.crop-edit-wrap::backdrop {
  background: rgba(0, 0, 0, .55);
}

.crop-edit {
  background: var(--surface);
  border-radius: 12px;
  flex-direction: column;
  gap: 8px;
  width: min(560px, 100%);
  max-height: 100%;
  padding: 10px 12px 12px;
  display: flex;
  overflow: auto;
}

.crop-edit-head {
  z-index: 3;
  background: #fff;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 14px;
  display: flex;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
}

.crop-edit-head > strong {
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
}

.crop-edit-acts {
  flex-direction: column;
  flex: none;
  gap: 6px;
  display: flex;
}

.crop-edit-acts .modal-close {
  width: 36px;
  height: 36px;
}

.crop-edit-stage {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  display: flex;
}

.crop-edit-wait {
  pointer-events: none;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
  gap: 6px;
  font: 500 12.5px / 1.2 system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
  display: grid;
  position: absolute;
  top: auto;
  bottom: 12px;
  left: 12px;
  right: 12px;
}

.crop-edit-wait i {
  background: rgba(255, 255, 255, .25);
  border-radius: 2px;
  height: 4px;
  display: block;
  overflow: hidden;
}

.crop-edit-wait i:after {
  content: "";
  background: var(--orange);
  border-radius: 2px;
  width: 40%;
  height: 100%;
  animation: 1.1s ease-in-out infinite crop-wait;
  display: block;
}

@keyframes crop-wait {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(250%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .crop-edit-wait i:after {
    opacity: .7;
    width: 100%;
    animation: none;
  }
}

.crop-edit-view {
  aspect-ratio: 1;
  touch-action: none;
  cursor: grab;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  background: #222;
  border-radius: 8px;
  flex: 260px;
  min-width: 240px;
  position: relative;
  overflow: hidden;
}

.crop-edit-img {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: none;
  max-width: none;
  max-height: none;
  position: absolute;
}

.crop-edit-frame {
  pointer-events: none;
  border: 2px solid #fff;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .45);
}

.crop-edit-frame-bad {
  border-color: var(--err);
}

.crop-edit-side {
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  display: flex;
}

.crop-edit-prev {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 2px;
  flex: none;
  position: relative;
  overflow: hidden;
}

.crop-edit-prev > i {
  left: var(--px);
  top: var(--py);
  width: var(--pw);
  height: var(--ph);
  background-image: var(--pimg);
  transform-origin: var(--pox) var(--poy);
  transform: rotate(var(--pr));
  background-size: 100% 100%;
  position: absolute;
}

.crop-edit-tools {
  flex-direction: column;
  gap: 6px;
  display: flex;
}

.crop-edit-tools label {
  align-items: center;
  gap: 8px;
  font-size: 12px;
  display: flex;
}

.crop-edit-tools label span {
  min-width: 64px;
}

.crop-edit-tools input[type="range"] {
  flex: 1;
  min-height: 32px;
}

.crop-edit-foot {
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  display: flex;
}

.crop-edit .btn-sm {
  min-height: 36px;
}

@media (max-width: 520px) {
  .crop-edit {
    gap: 6px;
    padding: 8px;
  }

  .crop-edit .btn-sm {
    min-height: 44px;
  }

  .crop-edit-stage {
    gap: 6px;
  }

  .crop-edit-view {
    aspect-ratio: 4 / 3;
  }

  .crop-edit-side {
    flex-flow: wrap;
    align-items: center;
    gap: 8px;
  }

  .crop-edit-save {
    flex: 110px;
    width: auto;
    margin-top: 0;
  }

  .crop-edit-promo {
    flex: 1 0 100%;
    margin-top: 0;
  }

  .crop-edit-cut, .crop-edit-cut-tap {
    flex: 1 0 100%;
    margin-top: 6px;
  }
}

@media (max-height: 640px) {
  .crop-edit-view {
    aspect-ratio: auto;
    height: 30vh;
    min-height: 150px;
  }

  .crop-edit-save, .crop-edit-promo {
    flex: 46%;
  }

  .crop-edit-cut, .crop-edit-cut-tap {
    flex: 46%;
    margin-top: 0;
  }

  .crop-edit-side > span:first-child {
    display: none;
  }
}

.crops-prepare {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  display: flex;
}

.crops-prepare .notice {
  margin: 8px 0;
}

.tx-crops-section {
  margin-top: 14px;
}

.tile-crops-actions {
  padding: 8px 10px 0;
}

.crop-edit-promo-look {
  flex-direction: column;
  gap: 2px;
  width: 100%;
  display: flex;
}

.crop-edit-promo-look .tile-bright-row {
  margin: 0;
}

.crop-edit-look-cap {
  text-align: left;
  font-size: 11px;
  line-height: 1.2;
}

.tx-link-row {
  margin: 0 0 4px;
}

.tx-link {
  border: 1px solid var(--line);
  background: var(--surface);
  min-height: 34px;
  color: var(--muted);
  border-radius: 999px;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  font-size: 13.5px;
  text-decoration: none;
  display: inline-flex;
}

.tx-link:after {
  content: "→";
}

.tx-link:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
}

.tx-lead {
  max-width: 80ch;
  font-size: 14.5px;
}

@media (max-width: 640px) {
  .tx-item > summary {
    flex-wrap: wrap;
  }

  .tx-head {
    flex: auto;
  }

  .tx-flags {
    flex-basis: 100%;
    padding-left: 48px;
  }

  .tx-link {
    min-height: 44px;
    padding: 8px 15px;
  }

  .tx-totals .stat-tile {
    padding: 9px 12px;
  }

  .tx-totals .stat-num {
    font-size: 21px;
  }

  .tx-totals .stat-label {
    font-size: 12px;
  }

  .tx-lead {
    font-size: 13.5px;
  }
}

.tile-photo-acts .tile-photo-wide {
  grid-column: 1 / -1;
}

.crops-progress {
  align-self: stretch;
  max-width: 460px;
  margin-top: 10px;
}

.crops-progress-hint {
  margin-top: 6px;
  font-size: 13px;
}

.tile-photo-px {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.35;
}

.cc-usage {
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
}

.crop-edit-busy {
  color: var(--muted);
  align-items: center;
  gap: 6px;
  font-size: 13px;
  display: inline-flex;
}

.tiles-head ~ .chips {
  margin-top: 10px;
}

.add-tile-body {
  flex-direction: column;
  gap: 10px;
  display: flex;
}

.add-tile-f {
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  display: flex;
}

.add-tile-f > span {
  color: var(--muted);
}

.tile-card-edit {
  flex-direction: column;
  gap: 10px;
  display: flex;
}

.tile-card-copy, .tile-card-kill {
  min-height: 36px;
}

.add-tile-f input[type="text"] {
  border: 1px solid var(--line);
  font: inherit;
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 15px;
}

.add-tile-hint {
  margin: -4px 0 0;
  font-size: 12px;
  line-height: 1.35;
}

.add-tile-warn {
  margin: 4px 0 0;
}

.add-tile-go {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
}

.crop-edit-save {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
}

.crop-edit-promo, .crop-edit-cut, .crop-edit-cut-tap {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
}

.crop-edit-promo-shot {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
  display: flex;
}

.crop-edit-promo-shot img {
  object-fit: contain;
  background: var(--bg);
  border-radius: 10px;
  width: 100%;
  max-height: 32dvh;
}

.crop-edit-promo-shot > span {
  text-align: right;
  font-size: 12px;
}

.crop-edit-promo-shot .btn {
  min-height: 44px;
}

.crop-edit-promo-cover {
  margin-top: 2px;
}

.crop-edit-hint {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.35;
}

.tile-photo-busy {
  align-items: center;
  gap: 6px;
  display: flex;
}

.tile-photo-busy .problem-fab-spin, .crop-edit-busy .problem-fab-spin {
  display: block;
}

/*# sourceMappingURL=app_globals_71f961d1.css.map*/