@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./assets/fonts/instrument-serif-regular-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("./assets/fonts/instrument-serif-italic-latin.woff2") format("woff2");
}


:root {
  color-scheme: dark;
  --ink: #f2f7fb;
  --muted: #b4cad7;
  --line: rgb(164 211 235 / 0.24);
  --accent: #8addf4;
  --deep: #021726;
  --display: "Instrument Serif", Georgia, "Songti SC", serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
html, body { width: 100%; min-height: 100%; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--deep); color: var(--ink); font-family: var(--display); font-size: 18px; -webkit-font-smoothing: antialiased; }
body.auth-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 10; padding: 12px 16px; background: var(--ink); color: var(--deep); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.hero { position: relative; min-height: 100dvh; isolation: isolate; }
.hero-background, .hero-shade { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-background { z-index: -3; object-fit: cover; object-position: center; }
.hero-shade { z-index: -1; background: linear-gradient(90deg, rgb(0 15 29 / .68), rgb(0 15 29 / .1) 70%), linear-gradient(180deg, rgb(0 15 29 / .25), transparent 60%, rgb(0 15 29 / .48)); }
.site-header { display: flex; height: 76px; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(20px, 4vw, 64px); border-bottom: 1px solid var(--line); }
.brand { font-size: 24px; letter-spacing: -.02em; font-weight: 400; white-space:nowrap; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.header-action, .account-action, .account-summary button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; font-size: 14px; white-space: nowrap; cursor: pointer; }
.account-action, .account-summary button { border: 0; background: transparent; color: var(--ink); }
.header-action { border: 1px solid rgb(190 226 244 / .5); border-radius: 10px; background: rgb(3 27 44 / .6); }
.header-action:hover { background: #123d53; }
.account-summary:not([hidden]) { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.profile-entry { display:inline-flex; align-items:center; gap:10px; min-height:44px; min-width:0; font-size:18px; border-radius:8px; }
.profile-entry:hover { color:var(--accent); }
.profile-entry [data-user-name] { max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.header-avatar { display:grid; place-items:center; flex-shrink:0; width:34px; height:34px; border-radius:50%; overflow:hidden; background:#24576c; color:var(--ink); }
.header-avatar img { width:100%; height:100%; object-fit:cover; }
.home-workspace { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.15fr); align-items: start; gap: clamp(32px, 5vw, 76px); max-width: 1400px; margin: 0 auto; padding: clamp(40px, 6vh, 72px) clamp(24px, 4vw, 64px) 80px; }
.hero-copy { padding-top: 48px; }
.hero-copy > p:first-child { margin: 0 0 24px; font-size: 14px; color: #c0deea; }
h1 { margin: 0; font-family: var(--display); font-size: clamp(54px, 6vw, 90px); font-weight: 400; line-height: 1.02; letter-spacing: -.035em; text-shadow: 0 2px 24px rgb(0 10 20 / .35); }
.hero-description { max-width: 370px; margin: 28px 0 0; color: #d3e5ed; font-size: 16px; line-height: 1.65; }
.converter { min-width: 0; scroll-margin-top: 24px; }
.converter-panel { border: 1px solid rgb(173 220 241 / .36); border-radius: 20px; background: rgb(3 25 41 / .94); box-shadow: 0 20px 70px rgb(0 12 24 / .28); }
.converter-header { padding: 26px 28px 0; }
.converter-header h2 { margin: 0; font-size: 25px; font-weight: 500; letter-spacing: -.035em; }
.converter-header p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.upload-form, .processing-state, .result-state { padding: 24px 28px 28px; }
.drop-zone { position: relative; display: grid; min-height: 220px; align-content: center; justify-items: center; gap: 14px; padding: 24px 16px; border: 1px dashed #58798d; border-radius: 12px; background: rgb(25 67 91 / .23); cursor: pointer; text-align: center; transition: border-color 180ms, background 180ms; }
.drop-zone:hover, .drop-zone:focus-within, .drop-zone.is-dragging { border-color: var(--accent); background: rgb(28 86 112 / .35); }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-title { font-size: 20px; letter-spacing: -.025em; }
.choose-file { padding: 11px 20px; border: 1px solid #aacddc; border-radius: 8px; background: #e3f3fa; color: #08293c; font-size: 14px; font-weight: 600; }
.drop-help { color: var(--muted); font-size: 12px; line-height: 1.6; }
.file-preview { display: grid; grid-template-columns: 100px minmax(0, 1fr) auto; align-items: center; gap: 18px; min-height: 220px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: rgb(25 67 91 / .23); }
.file-preview img { width: 100px; height: 140px; object-fit: contain; background: #e9edf0; border-radius: 6px; }
.file-preview div { display: grid; gap: 8px; min-width: 0; }
.file-preview strong { overflow: hidden; font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.file-preview span { color: var(--muted); font-size: 12px; }
.file-preview button, .result-actions button, .result-actions a { border: 0; background: transparent; color: var(--ink); cursor: pointer; font-size: 14px; }
.file-preview button { min-height: 44px; padding: 4px; }
.convert-controls { display: grid; gap: 14px; margin-top: 24px; }
.convert-controls > label { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 14px; }
.convert-controls output { color: var(--ink); font-variant-numeric: tabular-nums; }
.convert-controls input[type="range"] { width: 100%; margin: 0; accent-color: var(--accent); cursor: pointer; }
.quality-control { margin-top: 4px; }
.quality-control select { min-width: 0; max-width: 80%; padding: 10px 12px; border: 1px solid #557587; border-radius: 8px; background: #0b2b40; color: var(--ink); font-size: 14px; }
.convert-button { min-height: 48px; margin-top: 8px; padding: 12px 20px; border: 0; border-radius: 10px; background: #d9f1fa; color: #08293c; cursor: pointer; font-size: 15px; font-weight: 600; white-space: nowrap; }
.convert-button:hover:not(:disabled) { background: #f0fbff; }
.convert-button:disabled { cursor: not-allowed; background: #29495d; color: #b5c7d1; }
.convert-button:active:not(:disabled) { transform: translateY(1px); }
.form-status { margin: 16px 0 0; color: #ffb3a6; font-size: 14px; line-height: 1.5; }
.form-status:empty { display: none; }
.processing-state { min-height: 280px; display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.processing-state h3 { margin: 0; font-size: 28px; font-weight: 400; }
.processing-state p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.5; }
.conversion-progress { display: block; width: 100%; height: 12px; border: 0; border-radius: 20px; overflow: hidden; accent-color: var(--accent); }
.conversion-progress:indeterminate { appearance: none; background: linear-gradient(90deg,#173c53 30%,#8addf4 50%,#173c53 70%); background-size: 220% 100%; animation: progress-travel 1.8s linear infinite; }
.conversion-progress:indeterminate::-webkit-progress-bar { background: transparent; }
.conversion-progress:indeterminate::-moz-progress-bar { background: transparent; }
@keyframes progress-travel { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.result-preview { --preview-ratio: 1; --split: 50%; position: relative; aspect-ratio: var(--preview-ratio); margin-inline: auto; overflow: hidden; background: #f3f4f1; transition-property: none; }
.result-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.comparison-before { clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.comparison-divider { position: absolute; left: var(--split); top: 0; bottom: 0; width: 2px; transform: translateX(-50%); background: white; box-shadow: 0 0 3px #08293c; pointer-events: none; }
.comparison-divider span { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #648595; border-radius: 50%; background: #e3f3fa; color: #08293c; font-size: 24px; }
.comparison-slider { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.result-preview:focus-within { outline: 2px solid var(--accent); outline-offset: 5px; }
.comparison-labels { display: flex; justify-content: space-between; margin-top: 12px; font-size: 18px; }
.comparison-help { margin: 10px 0 0; color: var(--muted); font-size: 16px; line-height: 1.4; }
.home-workspace:has(.result-state:not([hidden])) { padding-top: 16px; padding-bottom: 16px; }
.converter .result-state { padding: 12px 20px 16px; }
.result-state .comparison-help { font-size: 14px; margin-top: 6px; }
.result-state .comparison-labels { margin-top: 8px; }
.result-state .result-summary { margin-top: 10px; }
.result-state .result-quality { margin-top: 8px; font-size: 14px; }
.result-state .result-quality:empty { display: none; }
.result-state .result-actions { margin-top: 12px; }
.result-state .result-actions button { width: auto; }
@media (max-width: 900px) {
  .home-workspace:has(.result-state:not([hidden])) .hero-copy { display: none; }
}
.result-summary { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 20px; }
.result-summary div { padding: 0 12px; border-right: 1px solid var(--line); }
.result-summary div:first-child { padding-left: 0; }
.result-summary div:last-child { border: 0; }
.result-summary span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.result-summary strong { font-size: 24px; font-weight: 500; font-variant-numeric: tabular-nums; }
.result-quality { margin: 18px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.result-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.result-actions button { width: 100%; padding: 8px 0; text-align: left; }
.result-actions a { flex: 1; padding: 12px; border: 1px solid #557587; border-radius: 8px; text-align: center; white-space: nowrap; }
.result-actions .download-button { border-color: transparent; background: #d9f1fa; color: #08293c; font-weight: 600; }
.auth-stage {
  position: fixed;
  inset: 0;
  z-index: 9;
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 56px);
  visibility: visible;
  transform: translate3d(0, 0, 0);
  transition: transform 820ms cubic-bezier(0.16, 1.08, 0.3, 1), visibility 0s linear;
}
.auth-stage[aria-hidden="true"] {
  display: none;
}
.auth-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background:
    linear-gradient(120deg, rgb(0 10 20 / 0.94), rgb(1 28 46 / 0.88)),
    url("./assets/ocean-background.webp") center / cover;
  cursor: default;
}
.auth-panel {
  position: relative;
  display: grid;
  width: min(920px, 100%);
  max-height: calc(100dvh - 40px);
  grid-template-columns: 0.84fr 1.16fr;
  overflow: auto;
  border: 1px solid rgb(172 220 242 / 0.28);
  border-radius: 26px;
  background: rgb(4 25 43 / 0.97);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08), 0 30px 90px rgb(0 5 12 / 0.62);
  transform: scale(1);
  transition: transform 760ms cubic-bezier(0.16, 1.1, 0.3, 1);
}
.auth-stage[aria-hidden="true"] .auth-panel { transform: translateY(52px) scale(0.965); }
.auth-visual {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(circle at 52% 46%, rgb(49 198 237 / 0.2), transparent 4%),
    repeating-linear-gradient(90deg, transparent 0 39px, rgb(101 199 228 / 0.07) 40px),
    repeating-linear-gradient(0deg, transparent 0 39px, rgb(101 199 228 / 0.07) 40px),
    linear-gradient(145deg, #04233a, #00111f);
}
.auth-visual::after {
  position: absolute;
  inset: 8% -30% 18% 22%;
  border: 1px solid rgb(104 211 237 / 0.22);
  border-radius: 50%;
  content: "";
  transform: rotate(-28deg);
}
.auth-visual p {
  position: absolute;
  bottom: 34px;
  left: 32px;
  z-index: 2;
  margin: 0;
  font-size: clamp(38px, 4vw, 58px);
  letter-spacing: -0.045em;
  line-height: 0.9;
}
.auth-orbit {
  position: absolute;
  top: 42%;
  left: 48%;
  width: 310px;
  height: 116px;
  border: 1px solid rgb(133 226 247 / 0.32);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-27deg);
  animation: auth-orbit 10s linear infinite;
}
.auth-orbit-two {
  width: 210px;
  height: 310px;
  border-color: rgb(133 226 247 / 0.18);
  animation-duration: 14s;
  animation-direction: reverse;
}
.auth-node {
  position: absolute;
  top: calc(42% - 4px);
  left: calc(48% - 4px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b9f2ff;
  box-shadow: 0 0 24px #50d6f6;
}
@keyframes auth-orbit { to { transform: translate(-50%, -50%) rotate(333deg); } }
.auth-content { position: relative; padding: 48px clamp(32px, 5vw, 68px); }
.auth-close {
  position: absolute;
  top: 24px;
  right: 26px;
  border: 0;
  background: transparent;
  color: #8ea8b7;
  cursor: pointer;
  font-family: var(--display);
  font-size: 14px;
  min-height: 44px;
  text-transform: uppercase;
}
.auth-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.auth-content h2 { margin: 0; font-size: 46px; font-weight: 400; letter-spacing: -0.04em; }
.auth-intro { margin: 10px 0 24px; color: #8fa8b7; font-size: 14px; line-height: 1.4; }
.auth-providers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-providers a:last-child { grid-column: 1 / -1; }
.auth-providers a[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.auth-providers a {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgb(172 220 242 / 0.24);
  border-radius: 999px;
  background: rgb(122 191 221 / 0.06);
  font-size: 13px;
  transition: background 180ms ease, border-color 180ms ease;
}
.auth-providers a:hover { border-color: rgb(172 220 242 / 0.5); background: rgb(122 191 221 / 0.12); }
.auth-providers span { color: var(--accent); font-size: 14px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0 18px; color: #9dbaca; font-size: 14px; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.auth-tabs { display: flex; gap: 22px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.auth-tabs button {
  padding: 0 0 10px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: #7896a8;
  cursor: pointer;
  font-size: 14px;
}
.auth-tabs button[aria-selected="true"] { border-color: var(--accent); color: var(--ink); }
.auth-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.auth-form[hidden] { display: none; }
.auth-register label:first-child { grid-column: 1 / -1; }
.auth-form label { display: grid; gap: 7px; color: #b4cad7; font-size: 16px; }
.auth-form input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid rgb(172 220 242 / 0.22);
  border-radius: 12px;
  outline: none;
  background: rgb(0 13 25 / 0.5);
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  text-transform: none;
}
.auth-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(51 199 239 / 0.1); }
.auth-form small { grid-column: 1 / -1; margin-top: -5px; color: #b4cad7; font-size: 12px; }
.auth-submit {
  grid-column: 1 / -1;
  min-height: 48px;
  margin-top: 3px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #00243a;
  cursor: pointer;
  font-size: 15px;
}
.auth-submit:disabled { cursor: wait; opacity: 0.55; }
.auth-status { min-height: 17px; margin: 12px 0 0; color: #ff9b8e; font-size: 12px; }


@media (max-width: 900px) {
  .home-workspace { grid-template-columns: 1fr; gap: 32px; max-width: 680px; padding-top: 32px; }
  .hero-copy { padding-top: 0; }
  .hero-copy > p:first-child { margin-bottom: 16px; }
  h1 { font-size: clamp(46px, 8vw, 72px); }
  .hero-description { max-width: 480px; margin-top: 16px; }
}
@media (max-width: 560px) {
  .site-header { height: 68px; padding: 0 20px; }
  .header-actions { gap: 4px; }
  .header-action, .account-action { padding: 8px 10px; font-size: 13px; }
  .home-workspace { padding: 28px 16px 40px; gap: 28px; }
  .hero-copy { padding: 0 4px; }
  .hero-copy > p:first-child { font-size: 13px; }
  .hero-description { font-size: 15px; }
  .converter-panel { border-radius: 16px; }
  .converter-header { padding: 22px 20px 0; }
  .upload-form, .processing-state, .result-state { padding: 20px; }
  .drop-zone { min-height: 190px; }
  .file-preview { grid-template-columns: 76px minmax(0, 1fr); gap: 14px; }
  .file-preview img { width: 76px; height: 110px; }
  .file-preview button { grid-column: 2; justify-self: start; }
  .quality-control select { max-width: 78%; font-size: 12px; padding: 10px 6px; }
  .result-summary div { padding: 0 8px; }
  .result-actions a { font-size: 12px; }
  .auth-stage { padding: 0; }
  .auth-panel { width: 100%; min-height: 100dvh; max-height: 100dvh; grid-template-columns: 1fr; border: 0; border-radius: 0; }
  .auth-visual { display: none; }
  .auth-content { align-self: center; padding: 56px 24px 30px; }
  .auth-providers, .auth-form { grid-template-columns: 1fr; }
  .auth-register label:first-child { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; }
}

.mode-control { display: flex; gap: 12px; border: 0; padding: 0; margin: 0; }
.mode-control legend { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.mode-control label { flex: 1; display: flex; align-items: center; gap: 10px; padding: 14px 12px; border: 1px solid #557587; border-radius: 8px; cursor: pointer; font-size: 14px; }
.mode-control label:has(input:checked) { background: #19445b; border-color: var(--accent); }
.mode-control input { accent-color: var(--accent); }
.conversion-price { margin: 0; font-size: 14px; }
.mode-note { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.wallet-section { width:calc(100% - 48px); max-width: 1120px; margin: 32px auto; padding: 32px; background: #031b2c; border: 1px solid var(--line); border-radius: 16px; scroll-margin-top: 24px; }
.wallet-heading { display:flex; justify-content:space-between; gap:16px; align-items:center; }
.wallet-actions { display:flex; flex-wrap:wrap; gap:8px; }
.wallet-heading h2 { margin: 0; }
.wallet-section button { min-height:44px; padding:10px 16px; border:1px solid #557587; border-radius:8px; background:#163d54; color:var(--ink); cursor:pointer; }
.wallet-section button:disabled { opacity:.55; cursor:not-allowed; }
.wallet-section h3 { margin-top:32px; font-size:18px; }
.point-packages { display:flex; flex-wrap:wrap; gap:16px; }
.point-package { flex:1 1 220px; border:1px solid var(--line); border-radius:10px; padding:20px; }
.point-package strong { display:block; font-size:22px; margin-bottom:12px; }
.table-scroll { overflow:auto; }
.table-scroll table { width:100%; border-collapse:collapse; font-size:14px; }
.table-scroll th, .table-scroll td { text-align:left; border-bottom:1px solid var(--line); padding:12px 10px; overflow-wrap:anywhere; }
.table-scroll th { color:var(--muted); font-weight:500; }
[data-wallet-status] { color:var(--muted); line-height:1.6; }
.wallet-heading h2 { font-size:42px; font-weight:400; }
.account-eyebrow { font-size:12px; letter-spacing:.15em; color:var(--muted); }
.account-nav { margin:24px 0; }
.section-tabs { display:flex; gap:4px; overflow-x:auto; border-bottom:1px solid var(--line); padding:4px 4px 0; }
.section-tabs [role=tab] { flex-shrink:0; min-height:48px; padding:12px 20px; border:0; border-bottom:3px solid transparent; border-radius:8px 8px 0 0; color:var(--muted); background:transparent; font-size:18px; cursor:pointer; }
.section-tabs [role=tab]:hover { background:#163d54; color:var(--ink); }
.section-tabs [role=tab][aria-selected=true] { color:var(--accent); background:#163d54; border-bottom-color:var(--accent); }
.section-tabs [role=tab]:focus-visible { outline-offset:-3px; }
[data-account-status] { color:var(--muted); }
[data-account-status]:empty { display:none; }
.wallet-section > section { scroll-margin-top:24px; padding-bottom:24px; }
.wallet-section h3 { font-size:26px; font-weight:400; }
.profile-layout { display:flex; gap:28px; align-items:flex-start; }
.profile-avatar { flex-shrink:0; width:112px; height:112px; display:grid; place-items:center; border-radius:50%; overflow:hidden; background:#24576c; font-size:52px; }
.profile-avatar img { width:100%; height:100%; object-fit:cover; }
.profile-details { flex:1; min-width:0; max-width:640px; }
.profile-details label { display:block; margin-bottom:8px; }
.profile-name-row { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.profile-name-row input { min-width:0; flex:1 1 200px; max-width:100%; }
#profile-name { border:1px solid #557587; border-radius:8px; background:#092638; color:var(--ink); padding:10px 12px; min-height:44px; }
#profile-avatar-file { font-size:16px; }
#profile-avatar-file::file-selector-button { font:inherit; padding:8px 12px; margin-right:10px; border:1px solid #557587; border-radius:8px; background:#163d54; color:var(--ink); cursor:pointer; }
.wallet-section .table-scroll table { min-width:620px; }
.wallet-section .table-scroll th { white-space:nowrap; }
.wallet-section .table-scroll td { min-width:80px; }
.wallet-section .table-scroll { scrollbar-color:#557587 #092638; }
.profile-email, .account-note { color:var(--muted); overflow-wrap:anywhere; }
[data-profile-status] { min-height:1.5em; color:var(--accent); }
.account-balance { font-size:32px; margin:12px 0; }
.conversion-image { display:flex; align-items:center; gap:12px; min-width:160px; }
.conversion-image img { width:64px; height:64px; object-fit:contain; border-radius:6px; background:#14384a; }
.conversion-error { display:block; max-width:220px; color:#ffc1ad; }
.header-action, .account-action, .account-summary button, .choose-file, .convert-button,
.result-actions a, .result-actions button, .auth-submit, .mode-control label { font-size: 18px; }
.converter-header h2 { font-size: 32px; font-weight: 400; }
.hero-description { font-size: 20px; }
.drop-help, .converter-header p, .mode-note, .conversion-price, .result-quality,
.auth-intro, .auth-providers a, .auth-tabs button { font-size: 16px; }
@media(max-width:560px) {
  .header-actions { gap:0; }
  .site-header { gap:8px; padding-inline:16px; }
  .account-summary:not([hidden]) { gap:4px; }
  .account-summary button { padding-inline:8px; font-size:14px; }
  .profile-entry { gap:6px; font-size:16px; }
  .profile-entry [data-user-name] { max-width:52px; }
  .header-avatar { width:28px; height:28px; }
  .brand { font-size:20px; }
  .header-actions .header-action { padding:8px; font-size:12px; }
  .wallet-section { width:calc(100% - 32px); margin:20px 16px 24px; padding:20px; }
  .profile-layout { flex-direction:column; gap:16px; }
  .wallet-heading { flex-wrap:wrap; }
}

/* The same first-screen canvas hosts processing, errors and comparison. */
.home-workspace.is-active {
  --workspace-footer: 148px;
  display:block; width:60%; max-width:none; height:calc(100dvh - 76px);
  padding:16px 0; margin-inline:auto;
}
.is-active .converter { height:100%; }
.is-active .converter-panel { display:flex; flex-direction:column; height:100%; min-height:0; position:relative; }
.is-active .converter-header { flex:0 0 60px; min-height:0; padding:12px 20px; display:flex; align-items:center; }
.is-active .converter-header > div { display:flex; align-items:baseline; justify-content:space-between; width:100%; gap:16px; min-width:0; }
.is-active .converter-header h2 { font-size:24px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.is-active .converter-header p { display:block !important; white-space:nowrap; margin:0; font-size:16px; }
.conversion-canvas { flex:1 1 0; min-height:0; min-width:0; display:grid; place-items:center; margin:0 20px; overflow:hidden; container-type:size; }
.is-active .result-preview { width:min(100cqw,calc(100cqh * var(--preview-ratio))); height:min(100cqh,calc(100cqw / var(--preview-ratio))); }
.is-active .processing-state, .is-active .result-state, .is-active .upload-form {
  flex:0 0 var(--workspace-footer); height:var(--workspace-footer); min-height:0; padding:12px 20px 16px; position:relative;
}
.is-active .processing-state h3 { margin:0 0 10px; font-size:22px; font-weight:400; }
.is-active .processing-state { gap:0; }
.is-active [data-progress-note] { font-size:16px; line-height:1.3; margin:10px 0 0; }
.is-active .comparison-labels { margin:0; font-size:16px; }
.is-active .comparison-help { font-size:14px; margin:4px 0 0; padding-right:64px; }
.is-active .result-actions { margin-top:10px; gap:12px; flex-wrap:nowrap; }
.is-active .result-actions button { width:auto; min-height:44px; padding:8px 0; font-size:16px; }
.is-active .result-actions a { flex:0 0 auto; margin-left:auto; padding:10px 16px; font-size:18px; }
.is-active .result-actions [data-unlock-downloads] { margin-left:auto; padding:10px 16px; border-radius:8px; background:#d9f1fa; color:#08293c; }
.is-active [data-download-status] { position:absolute; bottom:0; left:20px; right:20px; margin:0; font-size:13px; }
.result-details { position:absolute; right:20px; top:30px; font-size:16px; }
.result-details summary { cursor:pointer; min-height:28px; }
.details-content { position:absolute; right:0; bottom:36px; width:min(420px,calc(60vw - 42px)); max-height:50dvh; overflow:auto; padding:20px; border:1px solid var(--line); border-radius:12px; background:#082638; box-shadow:0 8px 32px rgb(0 12 24 / .35); z-index:2; }
.details-content .report-button { display:inline-block; padding:10px 0; color:var(--accent); }
.is-active[data-state=error] .upload-form { display:flex; flex-wrap:wrap; align-content:center; gap:8px 16px; overflow:auto; }
.is-active[data-state=error] .drop-zone, .is-active[data-state=error] .file-preview,
.is-active[data-state=error] .convert-controls > :not(.convert-button) { display:none !important; }
.is-active[data-state=error] .convert-controls { display:contents; }
.is-active[data-state=error] .form-status { order:-1; flex:0 0 100%; margin:0; min-height:0; font-size:16px; }
.is-active[data-state=error] .convert-button { width:auto; padding:8px 16px; min-height:44px; }
.workspace-back { border:0; background:none; color:var(--ink); cursor:pointer; min-height:44px; }
@media(max-width:1100px) {
  .home-workspace.is-active { width:85%; }
  .details-content { width:min(420px,calc(85vw - 42px)); }
}
@media(max-width:600px) {
  .home-workspace.is-active { width:calc(100% - 24px); --workspace-footer:164px; padding:12px 0; }
  .is-active .converter-header { padding-inline:12px; }
  .is-active .converter-header h2 { font-size:20px; }
  .is-active .converter-header p { font-size:14px; }
  .conversion-canvas { margin-inline:12px; }
  .is-active .processing-state, .is-active .result-state, .is-active .upload-form { padding-inline:12px; }
  .is-active .comparison-help { font-size:13px; }
  .is-active .result-actions { gap:8px; }
  .is-active .result-actions button, .is-active .result-actions a { font-size:16px; }
  .details-content { width:calc(100vw - 64px); }
}
@media(max-width:560px) {
  .home-workspace.is-active { height:calc(100dvh - 68px); }
}
@media(max-height:500px) {
  .home-workspace.is-active { --workspace-footer:88px; padding-block:8px; }
  .is-active .converter-header { flex-basis:44px; padding-block:6px; }
  .is-active .comparison-help, .is-active [data-progress-note] { display:none; }
  .is-active .result-actions { margin-top:4px; }
  .result-details { top:8px; }
}
