:root {
  --bg-page: #07131f;
  --bg-page-deep: #08101a;
  --bg-card: rgba(10, 26, 40, 0.88);
  --bg-card-strong: rgba(14, 32, 48, 0.95);
  --bg-field: rgba(4, 15, 24, 0.78);
  --bg-soft: rgba(255, 255, 255, 0.045);
  --border-soft: rgba(154, 183, 199, 0.22);
  --border-strong: rgba(126, 211, 255, 0.38);
  --text-primary: #ecf5fb;
  --text-secondary: rgba(236, 245, 251, 0.72);
  --text-tertiary: rgba(236, 245, 251, 0.58);
  --accent: #7ed3ff;
  --accent-hover: #32c0ff;
  --accent-strong: #1fb6ff;
  --accent-deep: #0d6aa3;
  --success: #72e5a1;
  --warning: #ffd57e;
  --focus-ring: rgba(31, 182, 255, 0.2);
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
  --radius-xl: 26px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --container: 1320px;
  --font-sans: "Manrope", system-ui, sans-serif;
  --font-display: "Space Grotesk", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --fs-body: 1rem;
  --fs-body-sm: 0.9375rem;
  --fs-body-xs: 0.8rem;
  --fs-label: 0.8125rem;
  --fs-chip: 0.8125rem;
  --fs-nav: 0.94rem;
  --fs-section: 1.25rem;
  --fs-page: 1.875rem;
  --fs-display: 3.5rem;
  --fs-code: 0.96rem;
  --fs-code-lg: clamp(1.25rem, 2.3vw, 1.7rem);
  --lh-body: 1.58;
  --lh-copy: 1.56;
  --lh-tight: 1.14;
  --lh-display: 1.07;
  --ls-label: 0.08em;
  --ls-code: 0.08em;
  --bg: var(--bg-page);
  --bg-deep: var(--bg-page-deep);
  --surface: var(--bg-card);
  --surface-strong: var(--bg-card-strong);
  --surface-soft: var(--bg-soft);
  --line: var(--border-soft);
  --line-strong: var(--border-strong);
  --text: var(--text-primary);
  --muted: var(--text-secondary);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg-deep);
  scroll-behavior: smooth;
  overscroll-behavior: none;
}

body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  background:
    radial-gradient(circle at top left, rgba(31, 182, 255, 0.12), transparent 24%),
    radial-gradient(circle at 90% 10%, rgba(114, 229, 161, 0.08), transparent 22%),
    linear-gradient(180deg, var(--bg) 0%, #081521 52%, var(--bg-deep) 100%);
  background-color: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  overflow-x: clip;
  overscroll-behavior: none;
}

body::selection {
  background: rgba(126, 211, 255, 0.3);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.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;
}

.site-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.site-aurora {
  position: absolute;
  border-radius: 999px;
  filter: blur(28px);
  opacity: 0.48;
}

.site-aurora-a {
  width: 380px;
  height: 380px;
  top: -110px;
  left: -90px;
  background: rgba(31, 182, 255, 0.14);
}

.site-aurora-b {
  width: 340px;
  height: 340px;
  right: -60px;
  top: 120px;
  background: rgba(114, 229, 161, 0.09);
}

.site-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 88%);
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
  background: rgba(4, 14, 23, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-inner,
.page-frame {
  width: min(var(--container), calc(100% - 64px));
  margin: 0 auto;
}

.topbar-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 48px;
}

.brand-mark-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 16px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.brand-copy span {
  font-size: var(--fs-label);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
}

.topbar-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.topbar-link {
  min-height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--text-secondary);
  font-size: var(--fs-body-sm);
  font-weight: 700;
  line-height: 1.2;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.topbar-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.topbar-link.is-active {
  color: #061420;
  background: linear-gradient(135deg, #9be1ff, #25b8ff);
  box-shadow: 0 10px 24px rgba(31, 182, 255, 0.2);
}

.page-shell {
  padding: 18px 0 40px;
}

.page-frame {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.home-frame {
  gap: 18px;
}

.create-frame {
  width: min(980px, calc(100% - 64px));
}

.narrow-frame {
  width: min(960px, calc(100% - 64px));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 24px 28px;
  display: block;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -96px -132px auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(126, 211, 255, 0.12) 0%, transparent 64%);
}

.hero-copy,
.panel-card,
.editor-card,
.quick-open-card,
.feature-card,
.viewer-card,
.result-card,
.empty-card {
  position: relative;
  z-index: 1;
  min-width: 0;
}

h1,
h2 {
  margin: 0;
  min-width: 0;
}

.display-title,
.page-title,
.section-title,
.code-title {
  margin: 0;
  min-width: 0;
}

.hero-copy {
  max-width: 740px;
}

.display-title {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: -0.05em;
  max-width: 18ch;
  text-wrap: balance;
}

.page-title {
  font-family: var(--font-display);
  font-size: var(--fs-page);
  line-height: var(--lh-tight);
  letter-spacing: -0.04em;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-section);
  line-height: var(--lh-tight);
  letter-spacing: -0.03em;
}

.code-title {
  font-family: var(--font-mono);
  font-size: var(--fs-code-lg);
  line-height: 1.04;
  letter-spacing: var(--ls-code);
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 10px;
  font-size: var(--fs-label);
  font-weight: 700;
  line-height: 1.23;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--accent);
}

.hero-text,
.inline-note,
.feature-item span,
.meta-card p,
.empty-copy {
  color: var(--muted);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-copy);
  overflow-wrap: anywhere;
}

.hero-text {
  max-width: 46ch;
  margin: 10px 0 0;
}

.scenario-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, auto));
  gap: 8px;
  width: fit-content;
  min-width: 0;
  padding: 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.scenario-tab {
  min-height: 48px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: var(--text-secondary);
  font-size: var(--fs-body-sm);
  font-weight: 700;
  line-height: 1.2;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.scenario-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.scenario-tab-active {
  color: #061420;
  background: linear-gradient(135deg, #9be1ff, #25b8ff);
  box-shadow: 0 10px 24px rgba(31, 182, 255, 0.22);
}

.create-mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, auto));
  gap: 8px;
  width: fit-content;
  min-width: 0;
  padding: 6px;
  margin-bottom: 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.create-mode-tab {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--fs-body-sm);
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.create-mode-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.create-mode-tab.is-active {
  color: #061420;
  background: linear-gradient(135deg, #9be1ff, #25b8ff);
  box-shadow: 0 8px 18px rgba(31, 182, 255, 0.18);
}

.create-mode-panel {
  display: none;
}

.create-mode-panel.is-active {
  display: block;
}

.card-lead {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-copy);
}

.stat-pill,
.panel-card,
.meta-card,
.feature-item,
.toggle-card,
.banner,
.text-panel,
.ghost-pill {
  background: var(--surface-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-pill {
  padding: 12px 14px;
  border-radius: 16px;
  min-width: 0;
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.05);
}

.stat-pill span {
  display: block;
  font-size: var(--fs-label);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
}

.stat-pill strong {
  display: block;
  margin-top: 5px;
  font-size: var(--fs-body-sm);
  line-height: 1.4;
}

.stat-value {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.stat-value-url {
  font-size: var(--fs-code);
  color: var(--text);
}

.panel-card {
  width: 100%;
  border-radius: 20px;
  padding: 18px;
}

.panel-label,
.field-label,
.meta-label {
  display: block;
  font-size: var(--fs-label);
  font-weight: 700;
  line-height: 1.23;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--muted);
}

.workspace-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
  min-width: 0;
}

.editor-card,
.quick-open-card,
.feature-card,
.viewer-card,
.result-card,
.empty-card {
  padding: 32px;
}

.editor-card {
  grid-column: span 8;
}

.editor-card-full {
  width: min(980px, 100%);
  margin: 0 auto;
}

.side-stack {
  display: grid;
  grid-column: span 4;
  gap: 24px;
  align-content: start;
  align-self: stretch;
  min-width: 0;
}

.quick-open-card {
  display: grid;
  height: 100%;
  align-content: start;
  gap: 18px;
}

.quick-open-card-standalone {
  width: min(640px, 100%);
  margin: 0 auto;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head > * {
  min-width: 0;
}

.section-head.compact {
  margin-bottom: 0;
}

.section-head-form {
  margin-bottom: 18px;
}

.ghost-pill {
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: var(--fs-chip);
  line-height: 1.2;
  background: rgba(255, 255, 255, 0.03);
}

.stack-form {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.field-block {
  display: grid;
  gap: 12px;
  min-width: 0;
}

textarea,
input[type="text"],
select,
input[type="file"] {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-field);
  color: var(--text);
  padding: 0 18px;
  font-size: var(--fs-body);
  line-height: var(--lh-copy);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

textarea::placeholder,
input[type="text"]::placeholder {
  color: var(--text-tertiary);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-copy);
}

input[type="text"] {
  min-height: 56px;
}

select,
input[type="file"] {
  min-height: 56px;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(236, 245, 251, 0.72) 50%),
    linear-gradient(135deg, rgba(236, 245, 251, 0.72) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 16px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

input[type="file"] {
  padding: 10px 12px;
  color: var(--text-secondary);
}

input[type="file"]::file-selector-button {
  height: 36px;
  margin-right: 12px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

textarea {
  padding: 16px 18px;
  resize: vertical;
  min-height: 340px;
}

textarea:focus-visible,
input[type="text"]:focus-visible,
select:focus-visible,
input[type="file"]:focus-visible {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

textarea[aria-invalid="true"],
input[type="text"][aria-invalid="true"],
input[type="file"][aria-invalid="true"] {
  border-color: rgba(255, 131, 154, 0.42);
  box-shadow: 0 0 0 3px rgba(255, 131, 154, 0.08);
}

.field-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.field-hint,
.field-counter {
  color: var(--text-secondary);
  font-size: var(--fs-body-sm);
  line-height: 1.4;
}

.field-counter {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.field-error {
  min-height: 18px;
  margin: -2px 0 0;
  color: #ffd8de;
  font-size: var(--fs-body-xs);
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.field-error.is-visible {
  opacity: 1;
}

.toggle-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  padding: 16px 18px;
  border-radius: 22px;
  align-items: start;
  cursor: pointer;
}

.toggle-hit {
  width: 40px;
  height: 40px;
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
}

.toggle-card input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.toggle-box {
  width: 20px;
  height: 20px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(4, 15, 24, 0.82);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.toggle-card input:checked + .toggle-box {
  border-color: rgba(126, 211, 255, 0.65);
  background:
    linear-gradient(135deg, rgba(155, 225, 255, 0.98), rgba(37, 184, 255, 0.98));
  box-shadow: 0 0 0 3px rgba(31, 182, 255, 0.12);
}

.toggle-card input:checked + .toggle-box::after {
  content: "";
  position: relative;
  display: block;
  width: 10px;
  height: 6px;
  margin: 5px auto 0;
  border-left: 2px solid #061420;
  border-bottom: 2px solid #061420;
  transform: rotate(-45deg);
}

.toggle-card input:focus-visible + .toggle-box {
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.toggle-copy {
  display: grid;
  gap: 4px;
}

.toggle-copy strong {
  font-size: var(--fs-body);
  line-height: 1.34;
}

.toggle-copy span {
  color: var(--text-secondary);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-copy);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.upload-progress {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.upload-progress[hidden] {
  display: none;
}

.upload-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.upload-progress-label,
.upload-progress-value {
  font-size: var(--fs-body-sm);
  line-height: 1.4;
}

.upload-progress-label {
  color: var(--text-secondary);
}

.upload-progress-value {
  color: var(--text);
  font-family: var(--font-mono);
}

.upload-progress-track {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.upload-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, #9be1ff, #25b8ff);
  box-shadow: 0 0 18px rgba(31, 182, 255, 0.22);
  transition: width 0.18s ease;
}

.upload-progress-track.is-indeterminate .upload-progress-bar {
  width: 34%;
  animation: upload-progress-indeterminate 1.05s ease-in-out infinite;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.action-row-form {
  margin-top: 2px;
}

.action-row-centered {
  justify-content: center;
}

.btn {
  min-height: 56px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: 1.2;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #061420;
  background: linear-gradient(135deg, #9be1ff, #25b8ff);
  box-shadow: 0 18px 34px rgba(31, 182, 255, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #a6e5ff, #32c0ff);
  box-shadow: 0 20px 38px rgba(31, 182, 255, 0.32);
}

.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-strong {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(126, 211, 255, 0.18);
}

.btn:focus-visible,
.ghost-link:focus-visible,
.scenario-tab:focus-visible,
.topbar-link:focus-visible,
.brand:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.btn[disabled] {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn.is-loading[disabled] {
  opacity: 0.82;
}

.btn.is-loading {
  cursor: progress;
}

.btn.is-loading::after {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-top-color: currentcolor;
  animation: button-spin 0.8s linear infinite;
}

.btn.is-success {
  color: #03141d;
  background: linear-gradient(135deg, rgba(157, 240, 190, 0.96), rgba(111, 218, 149, 0.96));
  border-color: rgba(114, 229, 161, 0.3);
}

.btn-inline {
  min-height: 44px;
  white-space: nowrap;
}

.banner {
  padding: 16px 18px;
  border-radius: 18px;
}

.banner-error {
  color: #ffd8de;
  background: rgba(122, 36, 54, 0.3);
  border-color: rgba(255, 131, 154, 0.22);
}

.banner-warn {
  color: #ffe4b8;
  background: rgba(135, 91, 18, 0.24);
  border-color: rgba(255, 213, 126, 0.2);
}

.feature-list {
  display: grid;
  gap: 12px;
}

.feature-item {
  border-radius: 18px;
  padding: 14px 16px;
  min-width: 0;
}

.feature-item strong {
  display: block;
  margin-bottom: 5px;
  font-size: var(--fs-body);
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.feature-item span {
  font-size: var(--fs-body-sm);
}

.code-input,
.big-code,
.inline-code,
.paste-text,
.link-value {
  font-family: var(--font-mono);
}

.code-input {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--fs-code);
}

.code-input::placeholder {
  letter-spacing: 0.04em;
  font-size: var(--fs-body-sm);
}

@keyframes button-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes upload-progress-indeterminate {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(320%);
  }
}

.result-card {
  display: grid;
  gap: 20px;
}

.result-hero {
  display: grid;
  gap: 10px;
}

.result-hero > * {
  min-width: 0;
}

.result-lead {
  max-width: 48ch;
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-copy);
}

.result-main-panel {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.result-code-panel,
.result-link-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.result-code-panel {
  justify-items: start;
}

.link-value {
  min-height: 56px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 15, 24, 0.72);
  color: var(--text);
  font-size: var(--fs-code);
  line-height: 1.52;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.big-code {
  min-height: 72px;
  padding: 0 18px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  background: rgba(3, 17, 27, 0.76);
  border: 1px solid rgba(126, 211, 255, 0.24);
  font-size: var(--fs-code-lg);
  letter-spacing: var(--ls-code);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.result-big-code {
  min-height: 118px;
  width: 100%;
  padding: 0 24px;
  justify-content: center;
  font-size: clamp(2rem, 4vw, 2.6rem);
  letter-spacing: 0.12em;
  background: rgba(3, 17, 27, 0.92);
  border-color: rgba(126, 211, 255, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  user-select: all;
  cursor: text;
  text-align: center;
}

.result-link-value {
  min-height: 72px;
  display: block;
  padding: 18px;
  line-height: 1.62;
  background: rgba(6, 18, 28, 0.52);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
}

.result-copy-btn {
  min-height: 54px;
}

.result-copy-btn {
  min-width: 180px;
}

.result-warning {
  margin: -2px 0 0;
}

.result-meta-grid {
  margin-top: 0;
}

.result-meta-grid-compact {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.meta-card-compact {
  padding: 14px 16px;
}

.meta-card-compact strong time {
  font: inherit;
  color: inherit;
}

.ghost-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
}

.ghost-link:hover {
  color: var(--text);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.result-meta-grid {
  margin-top: 2px;
}

.meta-card {
  border-radius: 20px;
  padding: 16px;
}

.meta-card strong {
  display: block;
  margin-top: 6px;
  font-size: var(--fs-body);
  line-height: 1.36;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.meta-card p {
  margin: 8px 0 0;
  font-size: var(--fs-body-sm);
}

.viewer-head {
  margin-bottom: 0;
}

.file-panel {
  margin-top: 20px;
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.file-panel-body {
  display: grid;
  gap: 18px;
  padding: 20px 18px 22px;
}

.file-summary {
  display: grid;
  gap: 6px;
}

.file-name {
  font-size: var(--fs-section);
  line-height: 1.24;
  overflow-wrap: anywhere;
}

.file-meta-text {
  color: var(--text-secondary);
  font-size: var(--fs-body-sm);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.text-panel {
  margin-top: 20px;
  border-radius: 22px;
  overflow: hidden;
}

.text-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  font-size: var(--fs-label);
}

.paste-text {
  margin: 0;
  padding: 18px 18px 20px;
  min-height: 240px;
  max-height: min(60vh, 520px);
  overflow: auto;
  scrollbar-gutter: stable;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: var(--fs-code);
  line-height: 1.58;
  color: #dff0fb;
}

.empty-card {
  text-align: center;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 28px 24px;
}

.empty-stack {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.empty-copy {
  max-width: 40ch;
  margin: 0;
}

.inline-code {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: var(--fs-code);
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 1080px) {
  :root {
    --fs-display: 2.5rem;
    --fs-page: 1.625rem;
    --fs-section: 1.25rem;
    --fs-code-lg: clamp(1.18rem, 3vw, 1.52rem);
    --lh-display: 1.1;
  }

  .topbar-inner,
  .page-frame,
  .narrow-frame {
    width: min(var(--container), calc(100% - 48px));
  }

  .workspace-grid,
  .result-layout {
    grid-template-columns: 1fr;
  }

  .editor-card,
  .side-stack {
    grid-column: 1 / -1;
  }

  .editor-card,
  .quick-open-card,
  .feature-card,
  .viewer-card,
  .result-card,
  .empty-card {
    padding: 24px;
  }

  .scenario-switch {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scenario-tab,
  .create-mode-tab {
    width: 100%;
  }

  .create-mode-switch {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-card {
    padding: 22px 24px;
  }

  .hero-copy {
    max-width: 100%;
  }

  .display-title {
    max-width: 16ch;
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  :root {
    --fs-body: 0.94rem;
    --fs-body-sm: 0.85rem;
    --fs-body-xs: 0.76rem;
    --fs-label: 0.76rem;
    --fs-chip: 0.76rem;
    --fs-nav: 0.9rem;
    --fs-section: 1.125rem;
    --fs-page: 1.375rem;
    --fs-display: 1.875rem;
    --fs-code: 0.88rem;
    --fs-code-lg: 1.14rem;
    --lh-display: 1.133;
  }

  .topbar-inner,
  .page-frame,
  .narrow-frame {
    width: min(var(--container), calc(100% - 48px));
  }

  .topbar-inner {
    min-height: 68px;
    padding: 14px 0;
  }

  .topbar-inner {
    flex-wrap: wrap;
  }

  .topbar-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-card,
  .editor-card,
  .quick-open-card,
  .feature-card,
  .viewer-card,
  .result-card,
  .empty-card {
    padding: 24px;
    border-radius: 22px;
  }

  .hero-card {
    padding: 20px 22px;
  }

  .result-hero {
    gap: 8px;
  }

  .field-meta {
    align-items: flex-start;
  }

  .action-row {
    flex-direction: column;
    align-items: stretch;
  }

  .action-row-centered {
    align-items: stretch;
  }

  .big-code {
    justify-content: center;
    width: 100%;
    letter-spacing: 0.12em;
  }

  .result-big-code {
    min-height: 104px;
    padding: 0 18px;
  }

  .result-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .scenario-switch {
    padding: 6px;
    gap: 6px;
  }

  .scenario-tab,
  .create-mode-tab {
    min-height: 46px;
    padding: 0 14px;
  }

  .text-panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-inline,
  .result-copy-btn {
    width: 100%;
  }

  textarea {
    min-height: 240px;
  }
}
