:root {
  color-scheme: dark;
  --color-background: #0d0d12;
  --color-surface: #14141b;
  --color-elevated: #1c1c25;
  --color-border: #2b2b36;
  --color-primary: #ec4899;
  --color-action: #c92370;
  --color-action-hover: #b91c64;
  --color-accent-soft: #321625;
  --color-text: #f5f3f7;
  --color-muted: #a2a1b2;
  --color-subtle: #8a899b;
  --color-danger: #ff7c8a;
  --color-success: #76dfb0;
  --color-warning: #f1c277;
  --font-display: "Segoe UI Variable Display", "Segoe UI", Arial, sans-serif;
  --font-body: "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif;
  --font-mono: "Cascadia Code", Consolas, monospace;
  --radius-control: 9px;
  --radius-panel: 14px;
  --radius-dialog: 20px;
  --space-page: 40px;
  --sidebar-width: 244px;
  --scrollbar-thumb: #454452;
  --scrollbar-track: #14141b;
  --scrollbar-hover: #646274;
  --scrollbar-active: #858194;
}
* {
  box-sizing: border-box;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}
*::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border: 2px solid var(--scrollbar-track);
  border-radius: 6px;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-hover);
}
*::-webkit-scrollbar-thumb:active {
  background: var(--scrollbar-active);
}
html {
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  min-width: 0;
}
body:has(dialog[open]) {
  overflow: hidden;
}
button,
input {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button,
a,
summary {
  touch-action: manipulation;
}
a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button:active:not(:disabled),
.button:active {
  transform: translateY(1px);
}
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.035em;
}
img {
  max-width: 100%;
}
svg {
  flex-shrink: 0;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -70px;
  z-index: 100;
  background: var(--color-text);
  color: var(--color-background);
  padding: 12px;
  border-radius: 8px;
}
.skip-link:focus {
  top: 10px;
}
.icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-small {
  width: 16px;
  height: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.brand img {
  display: block;
  height: auto;
  width: 150px;
  object-fit: contain;
}
.brand-lockup {
  display: block;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}
.brand-app-icon {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}
.boot-brand {
  width: min(340px, calc(100vw - 48px));
}
.download-brand {
  width: min(320px, 100%);
  margin: 0 auto 25px;
}
.button {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-elevated);
  color: var(--color-text);
  min-height: 42px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
  transition:
    background 0.16s,
    border-color 0.16s,
    transform 0.16s;
  position: relative;
}
.button:hover:not(:disabled) {
  background: #262630;
  border-color: #444351;
}
.button-primary {
  background: var(--color-action);
  border-color: var(--color-action);
  color: #fff;
}
.button-primary:hover:not(:disabled) {
  background: var(--color-action-hover);
  border-color: var(--color-action-hover);
}
.button-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--color-muted);
}
.button-ghost:hover:not(:disabled) {
  background: var(--color-elevated);
  border-color: transparent;
  color: var(--color-text);
}
.button-danger {
  color: var(--color-danger);
  background: #35191f;
  border-color: #66313b;
}
.button-danger:hover:not(:disabled) {
  background: #51232d;
  border-color: var(--color-danger);
}
.button-large {
  min-height: 49px;
  padding: 13px 21px;
  font-size: 14px;
}
.button-block {
  width: 100%;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--color-muted);
  width: 36px;
  height: 36px;
  padding: 7px;
}
.icon-button:hover:not(:disabled) {
  background: var(--color-elevated);
  color: var(--color-text);
}
.icon-button.danger:hover:not(:disabled) {
  background: #35191f;
  color: var(--color-danger);
}
.button[aria-busy="true"] .button-label {
  visibility: hidden;
}
.button[aria-busy="true"] > .spinner {
  position: absolute;
  left: calc(50% - 8px);
}
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  color: var(--color-primary);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.muted {
  color: var(--color-muted);
}
.accent {
  color: var(--color-primary);
}
.eyebrow {
  font: 600 11px/1.5 var(--font-body);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--color-border);
  color: var(--color-muted);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.tag-pro {
  color: var(--color-primary);
  border-color: #5b2941;
  background: var(--color-accent-soft);
}
.text-link {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.text-link:hover {
  color: #ff90c5;
}
.boot-state {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.loading-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-muted);
}
.noscript-message {
  padding: 30px;
  text-align: center;
}
/* Public surface: the crop selection is the single expressive signature. */
.public-shell {
  max-width: 1280px;
  margin: auto;
  padding: 0 56px;
}
.public-header {
  height: 102px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #202028;
  gap: 24px;
}
.public-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.public-nav > a:not(.button) {
  font-size: 13px;
  color: var(--color-muted);
}
.public-nav > a:hover {
  color: var(--color-text);
}
.public-header .brand img {
  width: 158px;
  height: auto;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: 52px;
  padding: 100px 0 102px;
  min-height: 636px;
}
.hero-copy {
  min-width: 0;
}
.hero-copy .eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
}
.eyebrow-dot {
  width: 6px;
  height: 6px;
  background: var(--color-primary);
  border-radius: 50%;
}
.hero h1 {
  font-size: clamp(48px, 5.3vw, 72px);
  letter-spacing: -0.058em;
  line-height: 1.08;
  font-weight: 700;
}
.hero h1 span {
  color: var(--color-primary);
}
.hero-intro {
  max-width: 410px;
  margin-top: 25px;
  color: var(--color-muted);
  font-size: 16px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 31px;
}
.hero-note {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 15px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.hero-note .icon {
  width: 14px;
  height: 14px;
}
.hero-visual {
  position: relative;
  padding: 24px 0 51px;
  min-width: 0;
}
.capture-window {
  position: relative;
  border: 1px solid #34333f;
  border-radius: 15px;
  background: #19191f;
  box-shadow: 0 24px 85px #0007;
  transform: rotate(-2deg);
  overflow: visible;
}
.capture-titlebar {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #2e2d37;
  padding: 0 16px;
  font-size: 11px;
  color: var(--color-muted);
}
.window-dots {
  display: flex;
  gap: 5px;
}
.window-dots i {
  width: 6px;
  height: 6px;
  display: block;
  border-radius: 50%;
  background: #4b4855;
}
.capture-titlebar-label {
  display: flex;
  align-items: center;
  gap: 7px;
}
.capture-content {
  padding: 31px 29px 36px;
}
.demo-label {
  font: 10px var(--font-mono);
  letter-spacing: 0.02em;
  color: var(--color-muted);
}
.selection-frame {
  position: relative;
  margin-top: 17px;
  border: 1px solid #ec489975;
  padding: 24px;
  background: #211c29;
  min-height: 200px;
  display: flex;
  align-items: center;
  overflow: visible;
}
.crop-corner {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--color-primary);
  border: 2px solid #19191f;
}
.crop-corner.tl {
  top: -5px;
  left: -5px;
}
.crop-corner.tr {
  top: -5px;
  right: -5px;
}
.crop-corner.bl {
  bottom: -5px;
  left: -5px;
}
.crop-corner.br {
  bottom: -5px;
  right: -5px;
}
.capture-poster {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.capture-poster p {
  font-size: 31px;
  line-height: 1.14;
  letter-spacing: -0.04em;
  font-weight: 650;
  width: 75%;
  position: relative;
  z-index: 1;
}
.capture-poster p span {
  color: #f27cb4;
}
.capture-poster .poster-footer {
  font-size: 9px;
  color: #bbb2c6;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 19px;
}
.poster-orbit {
  position: absolute;
  right: -8px;
  top: 2px;
  width: 120px;
  height: 120px;
  border: 24px solid #914263;
  border-radius: 50%;
  opacity: 0.8;
}
.poster-orbit:after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px solid #f193bf;
  border-radius: 50%;
}
.capture-size {
  position: absolute;
  left: 50%;
  bottom: -23px;
  transform: translateX(-50%);
  font: 10px var(--font-mono);
  color: var(--color-muted);
  white-space: nowrap;
}
.capture-cursor {
  position: absolute;
  right: 5px;
  bottom: 3px;
  transform: translate(70%, 80%);
  width: 24px;
  height: 29px;
  filter: drop-shadow(0 2px 2px #0006);
}
.capture-shortcut {
  position: absolute;
  top: 0;
  right: 20px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  transform: rotate(2deg);
  box-shadow: 0 5px 20px #0005;
  z-index: 2;
}
.capture-shortcut kbd {
  font: 11px var(--font-body);
  color: var(--color-muted);
}
.capture-shortcut > span {
  color: var(--color-subtle);
  font-size: 9px;
}
.result-note {
  position: absolute;
  right: -16px;
  bottom: 11px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #23212b;
  border: 1px solid #49414d;
  border-radius: 11px;
  padding: 15px 18px;
  box-shadow: 0 12px 25px #0006;
  transform: rotate(1deg);
  width: 290px;
}
.result-note > .icon {
  color: var(--color-success);
  width: 25px;
  height: 25px;
}
.result-note strong {
  font-size: 12px;
  display: block;
  font-weight: 600;
}
.result-note code {
  font: 11px var(--font-mono);
  color: var(--color-muted);
}
.result-note .copy-note {
  margin-left: auto;
  color: var(--color-muted);
}
.steps-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 30px 0;
  gap: 33px;
}
.step {
  display: flex;
  gap: 17px;
  padding-right: 16px;
}
.step + .step {
  border-left: 1px solid var(--color-border);
  padding-left: 30px;
}
.step > .icon {
  color: var(--color-primary);
  width: 23px;
  height: 23px;
  margin-top: 1px;
}
.step h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.step p {
  font-size: 12px;
  color: var(--color-muted);
  line-height: 1.65;
}
.public-bottom {
  padding: 45px 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.public-bottom p {
  font-size: 13px;
  color: var(--color-muted);
}
.public-bottom strong {
  font-weight: 500;
  color: var(--color-text);
}
/* The landing page deliberately has one short introduction and two actions. */
.landing-page .hero {
  padding-block: 82px;
  min-height: 520px;
}
.landing-page .hero-intro {
  max-width: 420px;
}
.landing-page .hero-visual {
  padding-top: 0;
  padding-bottom: 24px;
}
.landing-page .selection-frame {
  margin-top: 0;
}
.landing-page .capture-titlebar > .icon {
  width: 18px;
  height: 18px;
}
.landing-page .result-note {
  width: auto;
  padding: 16px;
  right: -12px;
  bottom: 3px;
}
.landing-page .result-note > .icon {
  color: var(--color-primary);
  width: 25px;
  height: 25px;
}
.landing-page .steps-strip {
  padding-block: 26px;
  border-bottom: 0;
}
.landing-page .step {
  display: flex;
  align-items: center;
  gap: 14px;
}
.landing-page .step > .icon,
.landing-page .step h2 {
  margin: 0;
}
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 12px;
  padding: 23px 0 28px;
}
.legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
}
.legal-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  text-underline-offset: 4px;
}
.legal-links a:hover,
.legal-links a[aria-current="page"] {
  color: var(--color-text);
  text-decoration: underline;
}
.legal-links a:active,
.auth-notice a:active,
.legal-content a:active {
  color: var(--color-primary);
}
.auth-notice {
  margin-top: 14px;
  max-width: 440px;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.7;
}
.auth-notice a,
.legal-content a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-notice a:hover,
.legal-content a:hover {
  color: var(--color-primary);
}
.signup-entry {
  max-width: 345px;
}
.public-bottom .auth-notice,
.center-page > .auth-notice {
  font-size: 12px;
  line-height: 1.7;
}
.workspace-footer {
  margin: 0 var(--space-page);
}
.standalone-footer {
  max-width: 1100px;
  margin: 0 40px;
}
.legal-shell {
  max-width: 1100px;
  padding: 0 40px;
  margin: 0 auto;
}
.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--color-border);
}
.legal-main {
  max-width: 780px;
  margin: 0 auto;
  padding: 58px 0 72px;
  overflow-wrap: anywhere;
}
.legal-intro {
  margin-bottom: 34px;
}
.legal-intro h1 {
  margin: 15px 0;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.15;
}
.legal-meta {
  color: var(--color-muted);
  font-size: 13px;
}
.legal-content {
  font-size: 15px;
  line-height: 1.8;
}
.legal-content section + section {
  margin-top: 34px;
}
.legal-content h2 {
  margin: 30px 0 14px;
  font-size: 23px;
  line-height: 1.3;
}
.legal-content h3 {
  margin: 24px 0 12px;
  font-size: 18px;
  line-height: 1.4;
}
.legal-content p + p,
.legal-content ul,
.legal-content ol,
.legal-content dl {
  margin-top: 14px;
}
.legal-content ul,
.legal-content ol {
  padding-left: 24px;
}
.legal-content li + li {
  margin-top: 7px;
}
.legal-content dt {
  font-weight: 650;
}
.legal-content dd {
  margin: 4px 0 16px;
}
.legal-content address {
  font-style: normal;
}
.legal-content :is(h2, h3, section) {
  scroll-margin-top: 24px;
}
.legal-toc,
.legal-callout {
  padding: 20px 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  background: var(--color-surface);
  margin: 24px 0;
}
.legal-toc {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.legal-toc h2 {
  margin: 0 0 6px;
  font-size: 18px;
}
.legal-callout {
  border-left: 3px solid var(--color-primary);
}
.setup-notice {
  padding: 13px 17px;
  border: 1px solid #5c472b;
  border-radius: var(--radius-control);
  background: #261f15;
  color: var(--color-warning);
  font-size: 12px;
  line-height: 1.65;
}
.public-setup {
  margin: 24px 0 -34px;
}
.auth-error {
  margin-top: 18px;
}
.download-disabled {
  min-height: 49px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--color-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  padding: 13px 21px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 600;
}
/* Workspace */
.workspace {
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  background: #101016;
  border-right: 1px solid #24242e;
  display: flex;
  flex-direction: column;
  padding: 31px 20px 20px;
  z-index: 20;
  overflow-y: auto;
}
.sidebar .brand {
  padding-left: 13px;
  margin-bottom: 45px;
}
.sidebar .brand img {
  width: 150px;
  height: auto;
}
.nav-label {
  padding: 0 13px;
  margin: 0 0 13px;
  color: var(--color-subtle);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
}
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 45px;
  padding: 10px 13px;
  color: var(--color-muted);
  font-size: 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  width: 100%;
  font-weight: 500;
}
.nav-item:hover {
  color: var(--color-text);
  background: var(--color-elevated);
}
.nav-item[aria-current="page"] {
  background: var(--color-accent-soft);
  border-color: #4c2137;
  color: #f67db6;
}
.nav-item .tag {
  margin-left: auto;
  font-size: 9px;
  padding: 1px 5px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 45px;
}
.storage-panel {
  padding: 15px 12px 20px;
}
.storage-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--color-muted);
  margin-bottom: 11px;
}
.storage-heading strong {
  font-weight: 500;
  color: var(--color-text);
}
.storage-heading span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.storage-heading .icon {
  width: 14px;
  height: 14px;
}
.storage-track {
  height: 5px;
  border-radius: 5px;
  background: var(--color-border);
  overflow: hidden;
}
.storage-fill {
  height: 100%;
  background: var(--color-primary);
  min-width: 0;
  border-radius: 5px;
  transition: width 0.25s;
}
.storage-detail {
  font-size: 10px;
  color: var(--color-subtle);
  margin-top: 9px;
  line-height: 1.6;
}
.storage-detail.is-full {
  color: var(--color-warning);
}
.sidebar-foot {
  border-top: 1px solid var(--color-border);
  padding: 18px 12px 0;
  font-size: 10px;
  color: var(--color-subtle);
  display: flex;
  justify-content: space-between;
}
.workspace-content {
  margin-left: var(--sidebar-width);
  min-width: 0;
}
.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 var(--space-page);
  border-bottom: 1px solid #24242e;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--color-subtle);
}
.breadcrumb span:last-child {
  color: var(--color-muted);
}
.breadcrumb .icon {
  width: 13px;
  height: 13px;
}
.account {
  position: relative;
}
.account summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 5px 7px;
}
.account summary::-webkit-details-marker {
  display: none;
}
.account summary:hover {
  background: var(--color-elevated);
}
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--color-accent-soft);
  border: 1px solid #553045;
  border-radius: 50%;
  color: #f08bbd;
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.account-name {
  font-size: 12px;
  font-weight: 500;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-chevron {
  width: 13px;
  height: 13px;
  color: var(--color-muted);
}
.account-menu {
  position: absolute;
  right: 0;
  top: 50px;
  width: 245px;
  max-width: calc(100vw - 40px);
  background: var(--color-elevated);
  border: 1px solid #3b3948;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 15px 35px #0008;
  z-index: 30;
}
.account-menu-info {
  padding: 8px 9px 12px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 6px;
}
.account-menu-info strong,
.account-menu-info span {
  display: block;
  overflow-wrap: anywhere;
}
.account-menu-info strong {
  font-size: 13px;
}
.account-menu-info span {
  font-size: 11px;
  color: var(--color-muted);
  margin-top: 2px;
}
.account-menu .button {
  justify-content: flex-start;
}
.account-menu .migration-account-entry {
  white-space: normal;
  text-align: left;
}
.page-content {
  max-width: 1530px;
  margin: auto;
  padding: 37px var(--space-page) 45px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.page-heading h1 {
  font-size: 30px;
  letter-spacing: -0.045em;
}
.page-heading p {
  font-size: 13px;
  color: var(--color-muted);
  margin-top: 9px;
}
.page-heading-actions {
  display: flex;
  gap: 9px;
}
.upload-zone {
  border: 1px dashed #48404c;
  background: #17141c;
  border-radius: var(--radius-panel);
  padding: 26px 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 31px;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.upload-zone:hover,
.upload-zone.dragging {
  border-color: var(--color-primary);
  background: #1d1620;
}
.upload-emblem {
  background: var(--color-accent-soft);
  border: 1px solid #50243a;
  width: 49px;
  height: 49px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  flex-shrink: 0;
}
.upload-emblem .icon {
  width: 23px;
  height: 23px;
}
.upload-copy {
  flex: 1;
  min-width: 0;
}
.upload-copy h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.012em;
}
.upload-copy p {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 6px;
}
.upload-hint {
  font: 11px var(--font-mono);
  color: var(--color-subtle);
  white-space: nowrap;
}
.library-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.library-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 9px;
}
.count-badge {
  min-width: 21px;
  padding: 2px 6px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 10px;
  color: var(--color-muted);
  text-align: center;
  font-weight: 400;
}
.library-controls {
  display: flex;
  align-items: center;
  gap: 17px;
}
.sort-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--color-subtle);
  white-space: nowrap;
}
.sort-label .icon {
  width: 14px;
  height: 14px;
}
.search {
  display: flex;
  align-items: center;
  position: relative;
  width: 245px;
}
.search > .icon {
  position: absolute;
  left: 12px;
  color: var(--color-subtle);
  width: 16px;
  height: 16px;
}
.search input {
  border: 1px solid var(--color-border);
  background: #14141a;
  color: var(--color-text);
  border-radius: var(--radius-control);
  width: 100%;
  height: 38px;
  padding: 8px 38px 8px 36px;
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s;
}
/* File and folder management extends the existing screenshot workbench. */
.upload-pickers {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}
.folder-nav {
  margin: 25px 0 22px;
}
.folder-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 10px;
}
.folder-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  color: var(--color-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.folder-breadcrumb a:hover {
  color: var(--color-primary);
}
.folder-breadcrumb a[aria-current="page"] {
  color: var(--color-text);
}
.folder-breadcrumb > .icon {
  color: var(--color-subtle);
}
.folder-context {
  display: block;
  margin-top: 7px;
  color: var(--color-muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.folder-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 23px;
}
.folder-card {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  padding: 8px;
  position: relative;
}
.folder-card > a {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1;
  min-width: 0;
  padding: 7px;
  font-size: 13px;
}
.folder-card > a .icon {
  color: var(--color-primary);
}
.folder-card > a span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.folder-card > a:hover {
  color: var(--color-primary);
}
.image-card.file-card {
  overflow: visible;
  position: relative;
}
.file-card:has(.item-menu[open]),
.folder-card:has(.item-menu[open]) {
  z-index: 25;
}
.file-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
}
.file-select {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  cursor: pointer;
}
.file-select input,
.selection-bar input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--color-primary);
  cursor: pointer;
}
.file-access {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--color-muted);
  font-size: 10px;
  flex: 1;
}
.file-access.legacy {
  color: var(--color-warning);
}
.file-access.shared {
  color: var(--color-primary);
}
.file-access .icon {
  width: 12px;
  height: 12px;
}
.image-preview.file-placeholder {
  background: var(--color-elevated);
}
.file-type-icon {
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: center;
  color: var(--color-muted);
}
.file-type-icon > .icon {
  width: 40px;
  height: 40px;
  stroke-width: 1.2;
}
.file-type-icon small {
  font-size: 11px;
}
.item-menu {
  position: relative;
  flex-shrink: 0;
}
.item-menu summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  list-style: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--color-muted);
}
.item-menu summary::-webkit-details-marker {
  display: none;
}
.item-menu summary:hover,
.item-menu[open] summary {
  background: var(--color-elevated);
  color: var(--color-text);
}
.item-menu summary:active {
  transform: translateY(1px);
}
.item-menu > div {
  position: absolute;
  right: 0;
  top: calc(100% + 5px);
  z-index: 30;
  min-width: 190px;
  padding: 5px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-elevated);
  box-shadow: 0 9px 25px #0006;
}
.item-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 5px;
  padding: 10px;
  color: var(--color-text);
  font-size: 12px;
}
.item-menu button:hover {
  background: var(--color-border);
}
.item-menu button.danger,
.button.danger {
  color: var(--color-danger);
}
.selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: -1px 0 17px;
  min-height: 36px;
}
.selection-bar > label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--color-muted);
  cursor: pointer;
}
.selection-bar > div,
.selection-bar > form {
  display: flex;
  align-items: center;
  gap: 3px;
}
.selection-bar .button {
  min-height: 33px;
  padding: 5px 8px;
  font-size: 11px;
}
.selection-bar .button .icon {
  width: 15px;
  height: 15px;
}
.field-input,
.field-select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  color: var(--color-text);
  background: var(--color-background);
  font: inherit;
  font-size: 13px;
}
.field-select {
  cursor: pointer;
}
.field-select:hover,
.field-input:hover {
  border-color: var(--color-muted);
}
.field-input[aria-invalid="true"] {
  border-color: var(--color-danger);
}
.kind-filter {
  width: 150px;
  min-height: 38px;
  padding: 7px 9px;
  font-size: 12px;
}
.modal form > label {
  margin-bottom: 7px;
}
.modal form > label span {
  color: var(--color-subtle);
  margin-left: 5px;
}
.modal .field-help {
  margin-top: 8px;
  font-size: 11px;
}
.password-field {
  display: flex;
  position: relative;
}
.password-field input {
  padding-right: 45px;
}
.password-field .icon-button {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 32px;
  height: 32px;
}
.share-existing {
  margin-top: 25px;
}
.share-existing h3,
.share-form h3 {
  font-size: 16px;
  margin-bottom: 13px;
}
#share-list {
  max-height: 245px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.share-form {
  padding-top: 23px;
  margin-top: 22px;
  border-top: 1px solid var(--color-border);
}
.share-card {
  padding: 12px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
}
.share-card + .share-card {
  margin-top: 10px;
}
.share-card > p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 11px;
}
.share-card > p span {
  flex-basis: 100%;
  color: var(--color-subtle);
}
.share-card > a {
  display: block;
  margin: 8px 0 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-primary);
  overflow-wrap: anywhere;
}
.share-card > a:hover {
  text-decoration: underline;
}
.share-card > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}
.share-card .button {
  min-height: 30px;
  padding: 6px 2px;
  font-size: 11px;
}
.share-card .button .icon {
  width: 14px;
  height: 14px;
}
.share-card > small {
  display: block;
  color: var(--color-subtle);
  font-size: 11px;
  margin-block: 6px;
}
.embed-options {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}
.embed-options > summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--color-text);
  min-height: 30px;
}
.embed-options > summary span,
.field-label-row label span {
  color: var(--color-subtle);
  font-size: 11px;
  margin-left: 5px;
  font-weight: 400;
}
.embed-fields {
  margin-top: 20px;
  min-width: 0;
}
.field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 7px;
}
.field-label-row label {
  margin: 0;
}
.field-counter {
  color: var(--color-subtle);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
textarea.field-input {
  display: block;
  resize: none;
  line-height: 1.65;
  min-height: 98px;
}
.embed-example {
  margin-top: 18px;
  padding: 15px 17px;
  background: var(--color-background);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-control);
  overflow-wrap: anywhere;
}
.embed-example > span {
  display: block;
  color: var(--color-subtle);
  font-size: 9px;
  letter-spacing: 0.08em;
  margin-bottom: 7px;
}
.embed-example > strong {
  display: block;
  font-size: 14px;
}
.modal .embed-example > p {
  margin-top: 5px;
  font-size: 12px;
}
.empty-share {
  padding: 16px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-control);
}
.preview-unavailable {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 270px;
  padding: 30px;
  text-align: center;
  background: var(--color-surface);
  border-radius: var(--radius-control);
}
.preview-unavailable > .icon {
  width: 50px;
  height: 50px;
  color: var(--color-muted);
}
.preview-unavailable h3 {
  font-size: 21px;
}
.pdf-preview {
  width: 100%;
  height: min(58vh, 660px);
  min-height: 280px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-background);
}
.audio-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  padding: 50px 20px;
  background: var(--color-surface);
  border-radius: var(--radius-control);
}
.audio-preview > .icon {
  width: 65px;
  height: 65px;
  color: var(--color-primary);
}
.audio-preview audio {
  width: 100%;
  max-width: 550px;
}
.preview-hint {
  margin-top: 10px;
}
.preview-load-error {
  padding: 15px;
  font-size: 12px;
  color: var(--color-muted);
}
.import-status {
  position: fixed;
  z-index: 45;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  background: var(--color-elevated);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
}
@media (max-width: 1000px) {
  .folder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .library-controls {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}
@media (max-width: 640px) {
  .page-heading-actions {
    flex-wrap: wrap;
  }
  .page-heading-actions .button {
    font-size: 12px;
  }
  .upload-pickers {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }
  .upload-pickers .button {
    flex: 1;
    white-space: nowrap;
  }
  .library-controls {
    width: 100%;
    justify-content: stretch;
  }
  .kind-filter {
    flex: 1;
    min-width: 135px;
  }
  .folder-grid {
    grid-template-columns: 1fr;
  }
  .file-access {
    font-size: 9px;
  }
  .file-access .icon {
    display: none;
  }
  .file-card-top {
    gap: 3px;
    padding: 5px;
  }
  .file-select {
    padding: 4px 2px;
  }
  .item-menu summary {
    width: 25px;
  }
  .file-card:nth-child(odd) .item-menu > div {
    left: 0;
    right: auto;
  }
  .file-type-icon > .icon {
    width: 30px;
    height: 30px;
  }
  .selection-bar > div,
  .selection-bar > form {
    flex-wrap: wrap;
  }
  .preview-actions {
    flex-wrap: wrap;
  }
  .preview-actions .button {
    flex: 1;
  }
  .audio-preview {
    padding: 35px 5px;
  }
  .import-status {
    max-width: calc(100vw - 40px);
    width: max-content;
  }
}
.search input:hover {
  border-color: #494653;
}
.search input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px #ec489915;
}
.search input::placeholder {
  color: var(--color-subtle);
}
.search input::-webkit-search-cancel-button {
  display: none;
}
.search .icon-button {
  position: absolute;
  right: 3px;
  width: 31px;
  height: 31px;
}
.search .icon-button .icon {
  width: 15px;
  height: 15px;
}
.gallery-region {
  min-height: 340px;
  position: relative;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 19px;
}
.image-card {
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  overflow: hidden;
  transition:
    border-color 0.18s,
    transform 0.18s;
}
.image-card:hover {
  border-color: #575061;
  transform: translateY(-2px);
}
.image-preview {
  display: flex;
  width: 100%;
  aspect-ratio: 16/10;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: repeating-conic-gradient(#19191f 0% 25%, #1d1d25 0% 50%) 50%/18px
    18px;
  border: 0;
  padding: 0;
  position: relative;
  color: var(--color-muted);
}
.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.25s;
}
.image-preview:hover img {
  transform: scale(1.025);
}
.image-preview .preview-label {
  position: absolute;
  bottom: 9px;
  right: 9px;
  background: #121017df;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #ffffff18;
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 9px;
  color: #dedbe3;
}
.image-preview .preview-label .icon {
  width: 11px;
  height: 11px;
}
.image-info {
  padding: 13px 13px 10px;
}
.image-info h3 {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0;
}
.image-metadata {
  color: var(--color-subtle);
  font-size: 10px;
  margin-top: 5px;
  display: flex;
  justify-content: space-between;
  gap: 5px;
}
.image-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid #25252e;
}
.image-actions > .button {
  min-height: 31px;
  padding: 6px 8px;
  font-size: 11px;
  gap: 6px;
}
.image-actions > .button .icon {
  width: 14px;
  height: 14px;
}
.image-actions > .icon-button {
  width: 31px;
  height: 31px;
}
.image-actions > .icon-button .icon {
  width: 15px;
  height: 15px;
}
.state-panel {
  min-height: 340px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 42px 25px;
  text-align: center;
  background: var(--color-surface);
}
.state-icon {
  position: relative;
  width: 65px;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #463443;
  border-radius: 17px;
  margin-bottom: 23px;
  background: var(--color-accent-soft);
  color: var(--color-primary);
}
.state-icon > .icon {
  width: 29px;
  height: 29px;
}
.state-panel h2 {
  font-size: 19px;
  letter-spacing: -0.025em;
  margin-bottom: 11px;
}
.state-panel p {
  font-size: 12px;
  color: var(--color-muted);
  max-width: 350px;
  line-height: 1.75;
}
.state-panel .button {
  margin-top: 23px;
}
.state-panel.error .state-icon {
  background: #35191f;
  border-color: #683a41;
  color: var(--color-danger);
}
.state-panel .loading-line {
  margin-bottom: 8px;
}
.gallery-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-top: 25px;
  color: var(--color-subtle);
  font-size: 11px;
}
.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pagination .button {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 11px;
}
.pagination .button .icon {
  width: 14px;
  height: 14px;
}
.library-note {
  margin-top: 29px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: var(--color-subtle);
}
.library-note .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
}
.page-content > .inline-alert {
  margin-bottom: 24px;
}
.inline-alert {
  border: 1px solid #69343e;
  border-radius: 9px;
  background: #2b171e;
  padding: 12px 14px;
  color: var(--color-danger);
  font-size: 12px;
  line-height: 1.65;
}
.inline-alert a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.inline-alert .button {
  margin-top: 10px;
}
.inline-info {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-muted);
  padding: 14px 17px;
  border-radius: 10px;
  font-size: 12px;
}
.inline-info strong {
  color: var(--color-text);
  font-weight: 500;
}
/* Device approval and the intentionally unavailable Pro plan. */
.center-page {
  max-width: 660px;
  margin: 35px auto 0;
  padding: 42px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
}
.center-page .state-icon {
  margin-bottom: 28px;
}
.center-page h1 {
  font-size: 29px;
  line-height: 1.2;
  margin-bottom: 15px;
}
.center-page > p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--color-muted);
}
.device-card {
  margin: 29px 0 24px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 19px;
  background: var(--color-background);
}
.device-card > .icon {
  width: 32px;
  height: 32px;
  color: var(--color-muted);
}
.device-card strong {
  font-size: 13px;
  display: block;
}
.device-card span {
  font-size: 11px;
  color: var(--color-muted);
}
.device-code {
  margin-left: auto;
  font: 14px var(--font-mono);
  color: var(--color-primary);
  letter-spacing: 0.1em;
}
.security-note {
  font-size: 11px !important;
  line-height: 1.7 !important;
  margin-bottom: 22px;
}
.center-page .inline-alert {
  margin-bottom: 18px;
}
.center-page .inline-info {
  margin-top: 24px;
}
.center-actions {
  display: flex;
  gap: 11px;
  margin-top: 26px;
}
.center-page .tag {
  margin-bottom: 24px;
}
/* TEX-Uploads uses the shared approval surface and a real four-step sequence. */
.migration-entry {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.6;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.migration-entry:hover {
  color: var(--color-text);
}
.migration-page {
  max-width: 700px;
  overflow-wrap: anywhere;
}
/* Keep the navigation announcement without styling a heading as a control. */
#migration-title[tabindex="-1"]:focus {
  outline: none;
}
.migration-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0 0 25px;
  margin: 0 0 28px;
  border-bottom: 1px solid var(--color-border);
}
.migration-steps li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  color: var(--color-muted);
  font-size: 12px;
}
.migration-steps li > span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
}
.migration-steps [aria-current="step"] {
  color: var(--color-text);
  font-weight: 600;
}
.migration-steps [aria-current="step"] > span {
  color: var(--color-primary);
  background: var(--color-accent-soft);
  border-color: var(--color-primary);
}
.migration-form {
  margin-top: 25px;
}
.migration-form fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.migration-form label {
  display: block;
  margin: 20px 0 8px;
  font-size: 13px;
  font-weight: 600;
}
.migration-form .inline-alert {
  margin-top: 18px;
}
.migration-page .migration-note,
.migration-page .migration-quota {
  font-size: 13px;
  line-height: 1.7;
  margin-top: 22px;
  color: var(--color-muted);
}
.migration-page .center-actions {
  flex-wrap: wrap;
}
.migration-page .button {
  white-space: normal;
}
.migration-source {
  margin: 24px 0;
}
.migration-source span,
.migration-identity span {
  display: block;
  color: var(--color-muted);
  font-size: 12px;
}
.migration-source strong,
.migration-identity strong {
  display: block;
  font-size: 17px;
  margin: 4px 0;
}
.migration-inventory {
  margin-top: 25px;
  padding: 0 20px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  background: var(--color-background);
}
.migration-totals {
  margin: 0;
}
.migration-totals > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  margin-top: 10px;
  font-size: 13px;
}
.migration-totals dt {
  color: var(--color-muted);
}
.migration-totals dd {
  margin: 0;
}
.migration-skips {
  margin-top: 18px;
  font-size: 12px;
  color: var(--color-muted);
}
.migration-skips summary {
  cursor: pointer;
  color: var(--color-text);
}
.migration-skips ul {
  padding-left: 20px;
  margin-bottom: 0;
}
.migration-identity {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 24px;
  padding: 18px 20px;
  border-left: 2px solid var(--color-primary);
  background: var(--color-background);
}
.migration-identity > .icon {
  flex-shrink: 0;
  color: var(--color-primary);
  margin-top: 4px;
}
.migration-identity > div {
  min-width: 0;
}
.migration-quota strong {
  color: var(--color-text);
}
.migration-page .migration-advisory {
  color: var(--color-warning);
  background: var(--color-background);
  border-color: var(--color-border);
}
.migration-refresh,
.migration-recovery {
  margin-top: 16px;
}
.pro-header {
  max-width: 700px;
  padding: 18px 0 35px;
}
.pro-header .eyebrow {
  margin-bottom: 19px;
  color: var(--color-primary);
}
.pro-header h1 {
  font-size: 43px;
  line-height: 1.13;
  margin-bottom: 18px;
}
.pro-header > p {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.75;
  max-width: 550px;
}
.plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 910px;
  gap: 24px;
}
.plan-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 17px;
  padding: 30px;
}
.plan-card.pro {
  border-color: #6b2b49;
  background: linear-gradient(145deg, #241620, var(--color-surface) 60%);
}
.plan-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}
.plan-heading h2 {
  font-size: 20px;
}
.plan-storage {
  font-size: 43px;
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-weight: 600;
}
.plan-storage small {
  font-size: 14px;
  color: var(--color-muted);
  font-weight: 400;
  letter-spacing: 0;
}
.plan-description {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 10px;
  min-height: 42px;
  line-height: 1.75;
}
.feature-list {
  list-style: none;
  padding: 24px 0 26px;
  margin: 18px 0 0;
  border-top: 1px solid var(--color-border);
  min-height: 164px;
}
.feature-list li {
  display: flex;
  gap: 9px;
  font-size: 12px;
  margin: 0 0 13px;
  color: var(--color-muted);
}
.feature-list .icon {
  width: 15px;
  height: 15px;
  color: var(--color-primary);
  margin-top: 2px;
}
.plan-card > .button {
  width: 100%;
}
.plan-caption {
  font-size: 11px;
  color: var(--color-subtle);
  margin-top: 13px;
  text-align: center;
}
.pro-info {
  max-width: 910px;
  margin-top: 23px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
}
.pro-info .icon {
  width: 17px;
  height: 17px;
  margin-top: 2px;
}
.standalone-header {
  border-bottom: 1px solid var(--color-border);
  padding: 25px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.standalone-main {
  padding: 20px 20px 60px;
}
.standalone-main .center-page {
  margin-top: 40px;
}
.connection-banner {
  background: #332819;
  border-bottom: 1px solid #6d532e;
  color: var(--color-warning);
  padding: 9px 20px;
  text-align: center;
  font-size: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.drop-overlay {
  position: fixed;
  inset: 12px;
  border: 2px dashed var(--color-primary);
  border-radius: 20px;
  background: #170f19ee;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  backdrop-filter: blur(8px);
}
.drop-overlay > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.drop-overlay svg {
  width: 56px;
  height: 56px;
  color: var(--color-primary);
}
.drop-overlay strong {
  font: 600 29px var(--font-display);
  letter-spacing: -0.03em;
}
.drop-overlay span {
  font-size: 13px;
  color: var(--color-muted);
}
/* Shared overlays and feedback */
.modal {
  background: var(--color-surface);
  border: 1px solid #41404e;
  color: var(--color-text);
  border-radius: var(--radius-dialog);
  padding: 30px;
  width: min(490px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  box-shadow: 0 30px 100px #0009;
  overflow: auto;
}
.modal::backdrop {
  background: #050508c9;
  backdrop-filter: blur(5px);
}
.modal-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 17px;
}
.modal-top h2 {
  font-size: 23px;
  letter-spacing: -0.025em;
  padding-top: 5px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.modal-top > .icon-button {
  margin: -5px -6px 0 0;
  flex-shrink: 0;
}
.modal p {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.7;
}
.modal p strong {
  color: var(--color-text);
  font-weight: 500;
  overflow-wrap: anywhere;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 27px;
}
.modal .inline-alert {
  margin-top: 17px;
}
.modal .modal-icon {
  width: 49px;
  height: 49px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-soft);
  color: var(--color-primary);
  border-radius: 12px;
  margin-bottom: 17px;
}
.modal-icon.danger {
  background: #35191f;
  color: var(--color-danger);
}
.modal .modal-icon .icon {
  width: 24px;
  height: 24px;
}
.download-steps {
  padding-left: 21px;
  margin: 20px 0 0;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.7;
}
.download-steps li {
  padding: 4px 0 4px 4px;
}
.download-steps strong {
  color: var(--color-text);
  font-weight: 500;
}
.preview-modal {
  width: min(940px, calc(100vw - 32px));
  padding: 23px;
}
.preview-modal .modal-top {
  margin-bottom: 17px;
}
.preview-modal .modal-top h2 {
  font-size: 17px;
  overflow-wrap: anywhere;
}
.preview-large {
  display: block;
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  min-height: 140px;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 9px;
}
.preview-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--color-muted);
  margin: 13px 0 0;
}
.preview-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}
.copy-input {
  width: 100%;
  height: 42px;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  padding: 10px;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.modal label {
  display: block;
  margin-top: 16px;
  font-size: 12px;
  color: var(--color-muted);
}
.modal label + .copy-input {
  margin-top: 7px;
}
.toast-region {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  max-width: min(430px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 11px;
  background: #25232d;
  border: 1px solid #4a4251;
  box-shadow: 0 8px 25px #0006;
  padding: 13px 18px;
  border-radius: 11px;
  font-size: 12px;
  animation: toast-in 0.18s ease-out;
}
.toast .icon {
  color: var(--color-success);
  width: 18px;
  height: 18px;
}
.toast.error .icon {
  color: var(--color-danger);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.upload-region {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  width: 355px;
  max-width: calc(100vw - 32px);
  border: 1px solid #49414f;
  background: var(--color-surface);
  border-radius: 14px;
  box-shadow: 0 16px 40px #0008;
  overflow: hidden;
}
.upload-tray-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  border-bottom: 1px solid var(--color-border);
  gap: 10px;
}
.upload-tray-heading h2 {
  font-size: 13px;
  letter-spacing: 0;
}
.upload-tray-heading .icon-button {
  width: 28px;
  height: 28px;
}
.upload-list {
  max-height: 300px;
  overflow: auto;
}
.upload-item {
  padding: 13px 15px;
  border-bottom: 1px solid #25252e;
}
.upload-item:last-child {
  border-bottom: 0;
}
.upload-item-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.upload-item-top > .icon {
  width: 17px;
  height: 17px;
  color: var(--color-primary);
}
.upload-item-top strong {
  min-width: 0;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  font-weight: 500;
}
.upload-item-top > .icon-button {
  width: 28px;
  height: 28px;
}
.upload-item-top > .icon-button .icon {
  width: 14px;
  height: 14px;
}
.upload-item-status {
  font-size: 10px;
  color: var(--color-muted);
  margin-top: 5px;
  line-height: 1.6;
}
.upload-item.error .upload-item-status {
  color: var(--color-danger);
}
.upload-item.done .upload-item-status {
  color: var(--color-success);
}
.upload-progress {
  height: 3px;
  margin-top: 10px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
}
.upload-progress > span {
  display: block;
  height: 100%;
  background: var(--color-primary);
  transition: width 0.15s;
}
.upload-item-controls {
  display: flex;
  gap: 6px;
  margin-top: 7px;
}
.upload-item-controls .button {
  min-height: 28px;
  font-size: 10px;
  padding: 4px 7px;
}
.upload-item-controls .button .icon {
  width: 12px;
  height: 12px;
}
.upload-idle-note {
  font-size: 10px;
  color: var(--color-muted);
  padding: 10px 15px;
  border-top: 1px solid var(--color-border);
}
@media (min-width: 1600px) {
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1180px) {
  :root {
    --sidebar-width: 216px;
    --space-page: 28px;
  }
  .sidebar {
    padding-left: 15px;
    padding-right: 15px;
  }
  .hero {
    gap: 30px;
    padding-top: 75px;
    padding-bottom: 80px;
  }
  .public-shell {
    padding: 0 38px;
  }
  .hero h1 {
    font-size: 56px;
  }
  .capture-content {
    padding: 27px 22px 34px;
  }
  .selection-frame {
    padding: 21px 17px;
  }
  .capture-poster p {
    font-size: 27px;
  }
  .poster-orbit {
    width: 100px;
    height: 100px;
    right: -12px;
    top: 8px;
  }
  .result-note {
    right: -10px;
    width: 260px;
  }
  .gallery-grid {
    gap: 15px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .upload-zone {
    padding: 23px;
  }
  .upload-hint {
    display: none;
  }
  .library-controls {
    gap: 10px;
  }
  .sort-label {
    display: none;
  }
}
@media (max-width: 860px) {
  :root {
    --sidebar-width: 190px;
    --space-page: 23px;
  }
  .sidebar {
    padding-left: 11px;
    padding-right: 11px;
  }
  .sidebar .brand {
    padding-left: 10px;
  }
  .sidebar .brand img {
    width: 138px;
  }
  .nav-item {
    font-size: 12px;
    gap: 9px;
  }
  .public-nav {
    gap: 20px;
  }
  .public-nav > a:not(.button) {
    display: none;
  }
  .landing-page .hero {
    min-height: auto;
    padding-block: 60px 48px;
  }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding: 65px 0 55px;
  }
  .hero-copy {
    max-width: 580px;
  }
  .hero h1 {
    font-size: 65px;
  }
  .hero-intro {
    max-width: 470px;
  }
  .hero-visual {
    width: min(450px, 100%);
    max-width: 90%;
    margin: 0 auto;
  }
  .capture-poster p {
    font-size: 32px;
  }
  .poster-orbit {
    width: 130px;
    height: 130px;
    right: -4px;
    top: 0;
  }
  .result-note {
    width: 290px;
  }
  .steps-strip {
    gap: 20px;
  }
  .step {
    display: block;
    padding-right: 5px;
  }
  .step > .icon {
    margin-bottom: 14px;
  }
  .step + .step {
    padding-left: 21px;
  }
  .public-bottom {
    align-items: flex-start;
  }
  .public-bottom p {
    max-width: 330px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 27px;
  }
  .page-heading-actions .button {
    font-size: 0;
    width: 42px;
    padding: 10px;
  }
  .page-heading-actions .button .icon {
    width: 20px;
    height: 20px;
  }
  .upload-zone {
    gap: 14px;
    padding: 20px;
  }
  .upload-emblem {
    width: 43px;
    height: 43px;
  }
  .upload-copy h2 {
    font-size: 13px;
  }
  .upload-copy p {
    font-size: 11px;
  }
  .upload-zone > .button {
    font-size: 11px;
    padding: 8px 11px;
  }
  .upload-copy p .format-help {
    display: none;
  }
  .search {
    width: 200px;
  }
  .breadcrumb span:first-child,
  .breadcrumb > .icon {
    display: none;
  }
  .plan-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
  }
  .pro-header h1 {
    font-size: 35px;
  }
  .center-page {
    padding: 28px;
  }
  .center-page h1 {
    font-size: 26px;
  }
  .device-card {
    flex-wrap: wrap;
  }
  .device-code {
    margin-left: 47px;
  }
  .account-name {
    max-width: 95px;
  }
}
@media (max-width: 640px) {
  :root {
    --space-page: 20px;
    --sidebar-width: 0px;
  }
  .sidebar {
    position: static;
    width: 100%;
    padding: 20px 20px 0;
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-background);
  }
  .sidebar .brand {
    padding-left: 0;
    margin-bottom: 22px;
  }
  .sidebar .brand img {
    width: 128px;
  }
  .nav-label,
  .sidebar-bottom {
    display: none;
  }
  .side-nav {
    flex-direction: row;
    gap: 6px;
    padding-bottom: 11px;
  }
  .nav-item {
    min-height: 38px;
    padding: 8px 11px;
    width: auto;
    flex: 1;
    justify-content: center;
    font-size: 12px;
    gap: 8px;
  }
  .nav-item .tag {
    display: none;
  }
  .nav-item .icon {
    width: 17px;
    height: 17px;
  }
  .workspace-content {
    margin-left: 0;
  }
  .topbar {
    position: absolute;
    top: 15px;
    right: 14px;
    height: 42px;
    border: 0;
    padding: 0;
  }
  .breadcrumb {
    display: none;
  }
  .account-name {
    display: none;
  }
  .account summary {
    gap: 6px;
  }
  .account-menu {
    top: 45px;
  }
  .share-card .button {
    min-height: 40px;
  }
  .page-content {
    padding-top: 28px;
    padding-bottom: 28px;
  }
  .page-heading {
    margin-bottom: 22px;
    gap: 12px;
  }
  .page-heading h1 {
    font-size: 27px;
  }
  .page-heading p {
    font-size: 12px;
    max-width: 250px;
  }
  .page-heading-actions .button {
    font-size: 0;
    width: 40px;
    min-height: 40px;
  }
  .upload-zone {
    padding: 20px;
    flex-wrap: wrap;
    gap: 13px;
    margin-bottom: 27px;
  }
  .upload-copy {
    width: calc(100% - 58px);
    flex: auto;
  }
  .upload-copy h2 {
    font-size: 14px;
  }
  .upload-copy p {
    font-size: 11px;
  }
  .upload-zone > .button {
    width: 100%;
    margin-top: 1px;
    font-size: 12px;
    min-height: 38px;
  }
  .library-tools {
    flex-wrap: wrap;
    gap: 15px;
  }
  .library-controls {
    width: 100%;
    order: 2;
  }
  .search {
    width: 100%;
  }
  .search input {
    height: 41px;
  }
  .gallery-region,
  .state-panel {
    min-height: 315px;
  }
  .gallery-grid {
    gap: 13px;
  }
  .image-info {
    padding: 10px 9px 8px;
  }
  .image-info h3 {
    font-size: 11px;
  }
  .image-metadata {
    font-size: 9px;
    flex-wrap: wrap;
    gap: 2px;
  }
  .image-metadata .dimensions {
    display: none;
  }
  .image-actions {
    gap: 0;
  }
  .image-actions > .button {
    font-size: 10px;
    gap: 5px;
    padding: 5px 3px;
  }
  .image-actions > .button .icon {
    width: 12px;
    height: 12px;
  }
  .image-actions > .icon-button {
    width: 28px;
    height: 28px;
  }
  .gallery-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .pagination {
    align-self: flex-end;
  }
  .mobile-storage {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    color: var(--color-muted);
    margin-top: 20px;
  }
  .mobile-storage .icon {
    width: 13px;
    height: 13px;
  }
  .mobile-storage .storage-track {
    width: 70px;
    height: 4px;
  }
  .public-shell {
    padding: 0 24px;
  }
  .public-header {
    height: 83px;
    gap: 15px;
  }
  .public-header .brand img {
    width: 121px;
  }
  .public-nav {
    gap: 0;
  }
  .public-nav .button {
    font-size: 11px;
    min-height: 37px;
    padding: 8px 11px;
  }
  .public-nav .button .icon {
    width: 16px;
    height: 16px;
  }
  .hero {
    padding: 48px 0 46px;
    gap: 31px;
  }
  .landing-page .hero {
    padding-block: 42px 32px;
  }
  .landing-page .hero-visual {
    max-width: 94%;
  }
  .landing-page .steps-strip {
    padding-block: 10px;
  }
  .landing-page .step {
    padding: 15px 0;
  }
  .hero h1 {
    font-size: 48px;
  }
  .hero-copy .eyebrow {
    font-size: 9px;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
  }
  .hero-intro {
    font-size: 14px;
    margin-top: 21px;
    line-height: 1.8;
  }
  .hero-actions {
    margin-top: 25px;
    gap: 10px;
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions > .button {
    font-size: 13px;
    min-height: 46px;
  }
  .hero-note {
    justify-content: center;
    font-size: 10px;
    margin-top: 13px;
  }
  .hero-visual {
    max-width: 94%;
    padding-top: 20px;
    padding-bottom: 45px;
  }
  .capture-titlebar {
    height: 36px;
    font-size: 9px;
    padding: 0 13px;
  }
  .capture-titlebar .icon {
    width: 13px;
    height: 13px;
  }
  .capture-content {
    padding: 23px 21px 31px;
  }
  .selection-frame {
    min-height: 172px;
    padding: 18px;
  }
  .capture-poster p {
    font-size: 27px;
  }
  .capture-poster .poster-footer {
    font-size: 7px;
  }
  .poster-orbit {
    width: 98px;
    height: 98px;
    right: -6px;
    top: 4px;
    border-width: 20px;
  }
  .result-note {
    right: -9px;
    bottom: 9px;
    width: 257px;
    padding: 12px 14px;
    gap: 10px;
  }
  .result-note strong {
    font-size: 11px;
  }
  .result-note code {
    font-size: 9px;
  }
  .result-note > .icon {
    width: 21px;
    height: 21px;
  }
  .capture-shortcut {
    right: 12px;
    top: -1px;
    padding: 5px 7px;
  }
  .capture-shortcut kbd {
    font-size: 10px;
  }
  .steps-strip {
    grid-template-columns: 1fr;
    padding: 6px 0;
    gap: 0;
  }
  .step {
    display: flex;
    gap: 17px;
    padding: 22px 0;
  }
  .step + .step {
    border-left: 0;
    border-top: 1px solid #24242d;
  }
  .step > .icon {
    margin-bottom: 0;
    width: 22px;
    height: 22px;
  }
  .step h2 {
    font-size: 14px;
    margin-bottom: 6px;
  }
  .step p {
    font-size: 12px;
  }
  .public-bottom {
    flex-direction: column;
    gap: 20px;
    padding: 30px 0;
  }
  .public-bottom p {
    max-width: none;
    font-size: 12px;
    line-height: 1.8;
  }
  .public-bottom .button {
    width: 100%;
  }
  .site-footer {
    gap: 12px;
    align-items: flex-start;
    flex-direction: column;
    padding: 20px 0 25px;
  }
  .legal-links {
    gap: 6px 20px;
  }
  .workspace-footer,
  .standalone-footer {
    margin-inline: 20px;
  }
  .signup-entry {
    max-width: none;
    width: 100%;
  }
  .legal-shell {
    padding: 0 20px;
  }
  .legal-header {
    gap: 12px;
    padding: 20px 0;
  }
  .legal-header .brand img {
    width: 120px;
    height: auto;
  }
  .legal-header .button {
    padding-inline: 12px;
  }
  .legal-main {
    padding: 36px 0 45px;
  }
  .legal-content {
    font-size: 14px;
  }
  .legal-content h2 {
    font-size: 21px;
  }
  .legal-toc,
  .legal-callout {
    padding: 17px;
  }
  .public-setup {
    margin: 18px 0 -25px;
    font-size: 11px;
  }
  .center-page {
    padding: 26px 21px;
    margin-top: 5px;
    border-radius: 15px;
  }
  .center-page h1 {
    font-size: 25px;
  }
  .center-page > p {
    font-size: 13px;
  }
  .center-actions {
    flex-direction: column;
  }
  .device-card {
    padding: 15px;
    gap: 12px;
  }
  .device-code {
    font-size: 13px;
  }
  .pro-header {
    padding-top: 6px;
  }
  .pro-header h1 {
    font-size: 34px;
  }
  .pro-header > p {
    font-size: 13px;
  }
  .plan-card {
    padding: 25px;
  }
  .plan-storage {
    font-size: 38px;
  }
  .plan-description {
    min-height: auto;
  }
  .feature-list {
    min-height: auto;
  }
  .standalone-header {
    padding: 21px 24px;
  }
  .standalone-header .brand img {
    width: 122px;
  }
  .standalone-header > .button {
    font-size: 11px;
  }
  .standalone-main {
    padding: 0 17px 30px;
  }
  .standalone-main .center-page {
    margin-top: 25px;
  }
  .upload-region {
    right: 16px;
    bottom: 16px;
    width: calc(100vw - 32px);
  }
  .toast-region {
    bottom: 17px;
    width: max-content;
    max-width: calc(100vw - 32px);
  }
  .upload-region:not([hidden]) ~ .toast-region {
    bottom: 18px;
  }
  .modal {
    padding: 23px;
  }
  .modal-top h2 {
    font-size: 21px;
  }
  .modal-actions {
    flex-wrap: wrap;
  }
  .modal-actions > .button {
    flex: 1;
  }
  .preview-actions {
    flex-wrap: wrap;
  }
  .preview-actions .button {
    font-size: 11px;
    flex: 1;
  }
  .drop-overlay {
    inset: 8px;
  }
  .drop-overlay strong {
    font-size: 23px;
  }
  .drop-overlay span {
    font-size: 11px;
  }
  .connection-banner {
    font-size: 11px;
    padding: 8px 15px;
  }
}
@media (min-width: 641px) {
  .mobile-storage {
    display: none;
  }
}
/* Shared public previews use the same responsive shell as the website. */
.share-page {
  font-size: 16px;
  overflow-wrap: anywhere;
}
.share-page > :is(header, main, footer) {
  width: min(100%, 1000px);
  margin-inline: auto;
  padding: 28px max(24px, env(safe-area-inset-right)) 28px
    max(24px, env(safe-area-inset-left));
}
.share-page > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1px solid var(--color-border);
}
.share-page h1 {
  font-size: clamp(22px, 4vw, 34px);
}
.share-page main p {
  margin-block: 16px;
}
.share-page a:not(.brand, .button) {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.share-page a:not(.brand, .button):hover {
  color: var(--color-text);
}
.share-page .meta {
  color: var(--color-muted);
  font-size: 14px;
}
.share-page main :is(img, video, audio, iframe) {
  display: block;
  max-width: 100%;
  margin: 24px auto;
}
.share-page main :is(img, video) {
  max-height: 75svh;
  height: auto;
  object-fit: contain;
}
.share-page main :is(audio, iframe) {
  width: 100%;
}
.share-page iframe {
  height: 70svh;
  min-height: 300px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
}
.share-page form {
  display: grid;
  gap: 16px;
  max-width: 450px;
}
.share-page :is(input, button) {
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-elevated);
  color: var(--color-text);
}
.share-page button:hover {
  border-color: var(--color-primary);
}
.share-page .button-primary {
  background: var(--color-action);
  color: #fff;
}
.share-password {
  display: flex;
  gap: 8px;
}
.share-password input {
  flex: 1;
  width: 100%;
}
.share-page .share-error {
  color: var(--color-danger);
}
.share-page > footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}
.share-page > footer a,
.share-page > header > a:not(.brand),
.share-page main p > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.image-share > :is(header, main, footer) {
  width: min(100%, 1280px);
}
.image-share figure {
  margin: 24px 0;
  padding: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
}
.image-share figure img {
  margin: auto;
}
.upload-touch-label {
  display: none;
}

/* Controls keep readable labels and usable targets on phones and tablets. */
@media (max-width: 860px), (pointer: coarse) {
  .button,
  .public-nav .button,
  .share-card .button,
  .selection-bar .button,
  .pagination .button,
  .upload-item-controls .button,
  .image-actions > .button,
  .item-menu button,
  .nav-item,
  .account summary,
  .folder-card > a,
  .folder-breadcrumb a,
  .legal-links a,
  .legal-toc a,
  .migration-entry,
  .embed-options > summary,
  .migration-skips summary,
  .selection-bar > label {
    min-height: 44px;
  }
  .icon-button,
  .image-actions > .icon-button,
  .search .icon-button,
  .password-field .icon-button,
  .upload-tray-heading .icon-button,
  .upload-item-top .icon-button,
  .item-menu summary,
  .file-select {
    width: 44px;
    min-width: 44px;
    height: 44px;
    justify-content: center;
    flex-shrink: 0;
  }
  .field-input,
  .field-select,
  .search input {
    min-width: 0;
    min-height: 48px;
    font-size: 16px;
  }
  .password-field input {
    padding-right: 52px;
  }
  .password-field .icon-button {
    top: 2px;
    right: 2px;
  }
  .search input {
    height: 48px;
    padding-right: 50px;
  }
  .file-select input,
  .selection-bar input {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }
  .page-heading {
    flex-wrap: wrap;
  }
  .page-heading-actions {
    flex-wrap: wrap;
  }
  .page-heading-actions .button {
    width: auto;
    min-height: 44px;
    font-size: 13px;
    padding: 10px 12px;
  }
  .upload-zone {
    flex-wrap: wrap;
  }
  .upload-pickers {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }
  .upload-pickers .button {
    flex: 1 1 150px;
  }
  .button {
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
  }
  .folder-breadcrumb a {
    min-width: 0;
    max-width: 100%;
  }
  .folder-card > a span {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .preview-label {
    opacity: 1;
    transform: none;
  }
  .image-info h3 {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .item-menu > div {
    max-width: calc(100vw - 40px);
    max-height: min(300px, 65dvh);
    overflow-y: auto;
  }
}
@media (pointer: coarse) {
  .upload-desktop-label {
    display: none;
  }
  .upload-touch-label {
    display: inline;
  }
}
@media (max-width: 640px) {
  :root {
    --space-page: clamp(16px, 4vw, 24px);
  }
  .public-shell,
  .legal-shell {
    padding-inline: max(var(--space-page), env(safe-area-inset-left))
      max(var(--space-page), env(safe-area-inset-right));
  }
  .hero h1 {
    font-size: clamp(32px, 9.3vw, 48px);
    overflow-wrap: anywhere;
  }
  .hero-intro,
  .legal-content {
    font-size: 16px;
  }
  .hero-actions > .button {
    min-height: 48px;
    padding-inline: 12px;
    font-size: 14px;
  }
  .landing-page .hero-visual {
    max-width: 94%;
  }
  .capture-poster p {
    width: 100%;
    font-size: clamp(19px, 5.5vw, 27px);
  }
  .capture-content {
    padding-inline: clamp(14px, 4vw, 21px);
  }
  .selection-frame {
    padding-inline: 12px;
    min-height: 150px;
  }
  .migration-entry {
    max-width: 100%;
    font-size: 13px;
  }
  .site-footer {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
  .legal-links {
    gap: 2px 20px;
    font-size: 13px;
  }
  .standalone-header {
    gap: 12px;
    flex-wrap: wrap;
    padding: 20px max(var(--space-page), env(safe-area-inset-right)) 20px
      max(var(--space-page), env(safe-area-inset-left));
  }
  .standalone-main {
    padding-inline: max(var(--space-page), env(safe-area-inset-left))
      max(var(--space-page), env(safe-area-inset-right));
  }
  .standalone-main #public-page.page-content {
    padding-inline: 0;
  }
  .plan-card,
  .center-page {
    padding: 24px 18px;
    min-width: 0;
  }
  .plan-heading {
    flex-wrap: wrap;
    gap: 12px;
  }
  .migration-steps {
    gap: 6px;
  }
  .sidebar {
    padding: max(20px, env(safe-area-inset-top))
      max(var(--space-page), env(safe-area-inset-right)) 0
      max(var(--space-page), env(safe-area-inset-left));
  }
  .side-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }
  .nav-item {
    min-width: 0;
    min-height: 64px;
    flex-direction: column;
    gap: 6px;
    padding: 9px 4px;
    text-align: center;
    font-size: 12px;
  }
  .topbar {
    top: max(15px, env(safe-area-inset-top));
    right: max(var(--space-page), env(safe-area-inset-right));
  }
  .workspace:has(#session-banner:not([hidden])) .topbar {
    z-index: 21;
  }
  body:has(#offline-banner:not([hidden])) .workspace {
    position: relative;
  }
  .page-content {
    padding-inline: max(var(--space-page), env(safe-area-inset-left))
      max(var(--space-page), env(safe-area-inset-right));
  }
  .page-heading-actions {
    width: 100%;
  }
  .page-heading-actions .button {
    flex: 1 1 130px;
  }
  .page-heading p {
    max-width: none;
    font-size: 14px;
  }
  .upload-zone {
    padding: 16px;
  }
  .upload-copy p {
    font-size: 13px;
  }
  .library-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .kind-filter,
  .search {
    width: 100%;
  }
  .file-card-top {
    padding: 4px;
    gap: 4px;
  }
  .file-access {
    min-width: 0;
    font-size: 11px;
    overflow-wrap: anywhere;
  }
  .file-card:nth-child(odd) .item-menu > div {
    left: auto;
    right: 0;
  }
  .image-info {
    padding: 12px;
  }
  .image-info h3 {
    font-size: 14px;
  }
  .image-metadata {
    font-size: 12px;
    gap: 4px 10px;
  }
  .image-actions > .button {
    font-size: 13px;
    padding: 8px;
  }
  .image-actions > .button .icon {
    width: 18px;
    height: 18px;
  }
  .selection-actions {
    width: 100%;
    gap: 4px;
  }
  .selection-actions > .button {
    flex: 1;
    padding-inline: 8px;
  }
  .pagination {
    align-self: stretch;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }
  .mobile-storage {
    flex-wrap: wrap;
    font-size: 12px;
  }
  .modal {
    width: calc(100% - 24px);
    max-width: 640px;
    max-height: calc(
      100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)
    );
    padding: 20px;
    overflow-wrap: anywhere;
    overscroll-behavior: contain;
    scroll-padding-block: 20px;
  }
  .modal-top > .icon-button {
    margin-top: -4px;
  }
  .modal-actions,
  .preview-actions {
    gap: 8px;
  }
  .modal-actions > .button,
  .preview-actions > .button {
    font-size: 13px;
    flex: 1 1 120px;
  }
  .share-card > div .button {
    font-size: 12px;
    padding-inline: 6px;
  }
  .preview-unavailable {
    padding: 24px 12px;
    min-height: 180px;
  }
  .device-code {
    margin-left: 0;
    overflow-wrap: anywhere;
  }
  .device-card > div {
    min-width: 0;
  }
  .upload-region {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    width: calc(
      100% - 24px - env(safe-area-inset-right) - env(safe-area-inset-left)
    );
  }
  .upload-list {
    max-height: min(300px, 40dvh);
  }
  .toast-region,
  .import-status {
    bottom: max(16px, env(safe-area-inset-bottom));
  }
  .import-status {
    flex-wrap: wrap;
    padding: 12px;
  }
  .upload-region:not([hidden]) ~ .toast-region {
    top: max(16px, env(safe-area-inset-top));
    bottom: auto;
  }
  .share-page > :is(header, main, footer) {
    padding-inline: max(16px, env(safe-area-inset-left))
      max(16px, env(safe-area-inset-right));
  }
  .share-page > header .brand img {
    width: 120px;
  }
}
@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .image-preview {
    aspect-ratio: 16 / 9;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .image-card:hover {
    transform: none;
  }
}
@media (forced-colors: active) {
  * {
    scrollbar-color: auto;
  }
  button,
  .button,
  .image-card,
  .state-panel,
  .upload-zone,
  .plan-card,
  .storage-track,
  .modal {
    border: 1px solid CanvasText;
  }
  .storage-fill,
  .upload-progress > span {
    background: Highlight;
  }
  .nav-item[aria-current="page"] {
    border-color: Highlight;
  }
  .icon {
    forced-color-adjust: auto;
  }
  .crop-corner {
    background: Highlight;
  }
  .poster-orbit {
    border-color: Highlight;
  }
}
