@font-face {
  font-family: "Lucide";
  src: url("/static/lucide.woff2") format("woff2");
  font-display: block;
}

:root {
  color-scheme: light;
  --ink: #0f172a;
  --muted: #64748b;
  --muted-strong: #475569;
  --line: rgba(203, 213, 225, 0.72);
  --line-soft: rgba(226, 232, 240, 0.72);
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.84);
  --soft: #f8fafc;
  --soft-teal: #ecfdf9;
  --accent: #14b8a6;
  --accent-hover: #0d9488;
  --accent-ink: #0f766e;
  --danger: #ef4444;
  --danger-ink: #dc2626;
  --radius: 16px;
  --control-radius: 12px;
  --shadow: 0 18px 48px rgba(15, 51, 62, 0.07);
  --shadow-hover: 0 20px 52px rgba(15, 51, 62, 0.11);
  --focus-ring: 0 0 0 4px rgba(20, 184, 166, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -12rem, rgba(45, 212, 191, 0.14), transparent 31rem),
    linear-gradient(180deg, #f8fbfc 0%, #f4f8fb 100%);
  background-attachment: fixed;
  font: 500 15px/1.55 Inter, "HarmonyOS Sans SC", MiSans, "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
  font: inherit;
}

.icon {
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
  font-family: "Lucide" !important;
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  speak: never;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-archive::before { content: "\e041"; }
.icon-arrow-right::before { content: "\e049"; }
.icon-braces::before { content: "\e36a"; }
.icon-calendar-clock::before { content: "\e304"; }
.icon-chevron-down::before { content: "\e06d"; }
.icon-chevron-up::before { content: "\e070"; }
.icon-clock::before { content: "\e087"; }
.icon-cloud::before { content: "\e088"; }
.icon-code-2::before { content: "\e206"; }
.icon-copy::before { content: "\e09e"; }
.icon-download::before { content: "\e0b2"; }
.icon-external-link::before { content: "\e0b9"; }
.icon-eye::before { content: "\e0ba"; }
.icon-file-code-2::before { content: "\e45e"; }
.icon-file-spreadsheet::before { content: "\e326"; }
.icon-file-text::before { content: "\e0cc"; }
.icon-file-up::before { content: "\e32a"; }
.icon-file::before { content: "\e0c0"; }
.icon-files::before { content: "\e0cf"; }
.icon-folder-open::before { content: "\e247"; }
.icon-folder-up::before { content: "\e33d"; }
.icon-folder::before { content: "\e0d7"; }
.icon-globe::before { content: "\e0e8"; }
.icon-hard-drive::before { content: "\e0ed"; }
.icon-image::before { content: "\e0f6"; }
.icon-key-round::before { content: "\e4a3"; }
.icon-link-2::before { content: "\e103"; }
.icon-lock-keyhole::before { content: "\e531"; }
.icon-log-out::before { content: "\e10e"; }
.icon-notebook-pen::before { content: "\e596"; }
.icon-paperclip::before { content: "\e12d"; }
.icon-pen-line::before { content: "\e130"; }
.icon-refresh-cw::before { content: "\e145"; }
.icon-save::before { content: "\e14d"; }
.icon-send::before { content: "\e152"; }
.icon-settings-2::before { content: "\e245"; }
.icon-share-2::before { content: "\e156"; }
.icon-shield-check::before { content: "\e1ff"; }
.icon-sliders-horizontal::before { content: "\e29a"; }
.icon-sticky-note::before { content: "\e303"; }
.icon-trash-2::before { content: "\e18e"; }
.icon-type::before { content: "\e198"; }
.icon-upload-cloud::before { content: "\e091"; }
.icon-x::before { content: "\e1b2"; }

a {
  color: var(--accent-ink);
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
  font-weight: 400;
}

button,
.download-link,
.preview-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: var(--control-radius);
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  color: #ffffff;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(13, 148, 136, 0.16);
  transition:
    transform 200ms ease,
    box-shadow 200ms ease,
    background-color 200ms ease,
    border-color 200ms ease,
    color 200ms ease;
}

button:hover,
.download-link:hover,
.preview-actions a:hover {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  color: #ffffff;
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 11px 24px rgba(13, 148, 136, 0.22);
}

button:active,
.download-link:active,
.preview-actions a:active {
  transform: translateY(0) scale(0.98);
}

button:focus-visible,
.download-link:focus-visible,
.file-name-btn:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  box-shadow: none;
  transform: none;
}

button.secondary,
.preview-actions button,
.preview-actions a {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted-strong);
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.035);
}

button.secondary:hover,
.preview-actions button:hover,
.preview-actions a:hover {
  border-color: rgba(148, 163, 184, 0.52);
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 9px 20px rgba(15, 23, 42, 0.08);
}

button.retention-btn.is-permanent {
  border-color: rgba(20, 184, 166, 0.16);
  background: #ecfdf9;
  color: var(--accent-ink);
}

button.share-btn.is-shared,
button.folder-share.is-shared {
  border-color: rgba(99, 102, 241, 0.12);
  background: #eef2ff;
  color: #4f46e5;
}

button.danger {
  min-height: 36px;
  border-color: rgba(239, 68, 68, 0.1);
  background: #fff5f5;
  color: var(--danger-ink);
  box-shadow: none;
}

button.danger:hover {
  border-color: rgba(239, 68, 68, 0.18);
  background: #fef2f2;
  color: #b91c1c;
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.09);
}

.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 10%, rgba(45, 212, 191, 0.18), transparent 24rem),
    transparent;
}

.login-panel {
  width: min(420px, 100%);
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(130%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
  box-shadow: var(--shadow);
}

.login-panel h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.login-panel .brand {
  margin-bottom: 24px;
}

.login-panel label {
  display: block;
  margin: 0 0 8px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
}

.app-shell {
  width: min(1400px, calc(100% - 32px));
  margin: 14px auto 28px;
  padding: 0 30px 34px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  box-shadow:
    0 24px 70px rgba(30, 64, 72, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(20, 184, 166, 0.18);
  border-radius: 10px;
  background: linear-gradient(145deg, #f1fffc, #e8faf6);
  color: var(--accent-hover);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 6px 16px rgba(13, 148, 136, 0.09);
  transform: none;
}

.brand-mark.icon {
  font-size: 18px;
}

.brand-mark::before {
  position: static;
  width: auto;
  height: auto;
  border: 0;
  background: none;
}

.brand-mark::after,
.app-footer span::before {
  content: none;
}

.topbar button {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 14px;
  box-shadow: none;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
  align-items: center;
  min-height: 230px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -8rem 22% auto;
  height: 15rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.12), transparent 68%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 38px 4px 34px;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(38px, 4.2vw, 56px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.058em;
}

.hero p {
  max-width: 33rem;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
}

.cloud-visual {
  position: relative;
  height: 220px;
  isolation: isolate;
}

.cloud-haze {
  position: absolute;
  inset: 28px 6px 12px 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 52%, rgba(255, 255, 255, 0.88), rgba(224, 247, 245, 0.5) 42%, transparent 72%);
  filter: blur(2px);
}

.cloud-shape {
  position: absolute;
  z-index: -1;
  right: 12%;
  bottom: 38px;
  width: 250px;
  height: 118px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 60px;
  background: rgba(255, 255, 255, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 22px 60px rgba(13, 148, 136, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: none;
}

.cloud-shape::before,
.cloud-shape::after {
  content: none;
}

.cloud-line {
  position: absolute;
  z-index: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(20, 184, 166, 0.28), transparent);
  transform-origin: center;
}

.line-one { width: 190px; right: 62px; top: 102px; transform: rotate(-11deg); }
.line-two { width: 174px; right: 42px; top: 132px; transform: rotate(14deg); }
.line-three { width: 128px; right: 116px; top: 154px; transform: rotate(-24deg); }

.cloud-chip {
  position: absolute;
  z-index: 2;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 7px;
  min-width: 78px;
  height: 50px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 14px 34px rgba(47, 103, 112, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.cloud-chip .icon {
  color: var(--accent-hover);
  font-size: 18px;
}

.chip-text { right: 240px; top: 62px; }
.chip-link { right: 144px; top: 112px; }
.chip-code { right: 50px; top: 50px; }
.chip-file { right: 4px; top: 124px; }
.chip-share { right: 190px; top: 154px; }

.composer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.panel,
.drop {
  min-height: 284px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: var(--radius);
  background: var(--surface-glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow 200ms ease, transform 200ms ease, border-color 200ms ease;
}

.panel:hover,
.drop:hover {
  border-color: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-hover);
}

.panel {
  display: flex;
  flex-direction: column;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-title .icon {
  color: var(--accent-hover);
  font-size: 19px;
}

textarea,
input[type="password"],
.share-field select,
.share-field input,
.share-result input {
  width: 100%;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: var(--control-radius);
  padding: 13px 14px;
  color: var(--ink);
  background: rgba(248, 250, 252, 0.86);
  outline: none;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
  transition: border-color 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
}

textarea::placeholder,
input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

textarea {
  flex: 1;
  min-height: 152px;
  resize: vertical;
}

textarea:focus,
input[type="password"]:focus,
.share-field select:focus,
.share-field input:focus,
.share-result input:focus {
  border-color: rgba(20, 184, 166, 0.72);
  background: #ffffff;
  box-shadow: var(--focus-ring);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.drop {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.drop.dragging {
  border-color: rgba(20, 184, 166, 0.64);
  background: rgba(236, 253, 249, 0.9);
  box-shadow: var(--focus-ring), var(--shadow-hover);
}

.drop input {
  display: none;
}

.drop-hint {
  margin: -5px 0 19px;
  color: var(--muted);
  font-weight: 400;
}

.upload-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.upload-status {
  min-height: 22px;
  margin-top: 14px;
  font-size: 13px;
}

.upload-limits {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.progress {
  width: 100%;
  height: 6px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2dd4bf, #0d9488);
  transition: width 120ms ease;
}

.records-section {
  margin-top: 32px;
}

.records-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 11px;
}

.records-heading h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.records-heading .muted {
  font-size: 13px;
}

.records {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 30px rgba(15, 51, 62, 0.045);
}

.record,
.shared-record {
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: background-color 200ms ease, box-shadow 200ms ease;
}

.record:last-child,
.shared-record:last-child {
  border-bottom: 0;
}

.record:hover,
.shared-record:hover {
  position: relative;
  z-index: 1;
  background: rgba(248, 250, 252, 0.88);
  box-shadow: inset 3px 0 0 rgba(20, 184, 166, 0.46);
}

.record {
  padding: 18px 20px;
}

.record-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 11px;
}

.record-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.record-head .actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
  margin: 0;
}

.record-head .actions button,
.shared-actions button,
.folder-file button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
  box-shadow: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  border-radius: 999px;
  padding: 3px 9px;
  background: #ecfdf9;
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
}

.record-time {
  margin-left: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.file-summary {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.record-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(20, 184, 166, 0.1);
  border-radius: 12px;
  background: #f0fdfa;
  color: var(--accent-ink);
}

.record-icon .icon {
  font-size: 20px;
}

.record-icon.excel {
  border-color: rgba(22, 134, 75, 0.1);
  background: #f0fdf4;
  color: #15803d;
}

.record-icon.code {
  border-color: rgba(79, 70, 229, 0.1);
  background: #eef2ff;
  color: #4f46e5;
}

.record-icon.folder {
  background: #ecfdf9;
  color: var(--accent-ink);
}

.record-icon.file {
  border-color: rgba(234, 88, 12, 0.08);
  background: #fff7ed;
  color: #c2410c;
}

.record-icon.image {
  border-color: rgba(8, 145, 178, 0.1);
  background: #ecfeff;
  color: #0e7490;
}

.file-details {
  min-width: 0;
}

.file-details strong,
.file-details > span {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-name-btn {
  display: block;
  min-height: 0;
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  box-shadow: none;
}

.file-name-btn:hover {
  background: transparent;
  color: var(--accent-ink);
  transform: none;
  box-shadow: none;
}

.file-name-btn:disabled {
  color: var(--ink);
}

.file-info {
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.record-note {
  margin-top: 12px;
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-note::before {
  content: "备注：";
  color: var(--muted);
}

.download-link {
  flex: none;
  min-height: 36px;
  padding: 7px 12px;
  font-size: 13px;
}

.content {
  color: var(--muted-strong);
  font-weight: 400;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

pre.content {
  margin: 0;
  padding: 15px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: #111c2d;
  color: #e2e8f0;
  font: 400 13px/1.65 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.preview {
  display: block;
  max-width: min(560px, 100%);
  max-height: 360px;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  object-fit: contain;
}

.folder-files {
  display: grid;
  gap: 2px;
  margin: 16px -6px -5px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.9);
}

.folder-file {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 5px 8px 5px 11px;
  border-radius: 9px;
  transition: background-color 180ms ease;
}

.folder-file:hover {
  background: #ecfdf9;
}

.folder-path {
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-file .muted {
  font-size: 12px;
}

.folder-file .download-link {
  min-height: 32px;
  padding: 6px 9px;
}

.shared-section {
  margin-top: 32px;
}

.shared-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 17px 20px;
}

.shared-details {
  min-width: 0;
}

.shared-details strong {
  display: block;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.shared-meta span + span {
  position: relative;
}

.shared-meta span + span::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -7px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #94a3b8;
}

.shared-link {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.records > .panel,
.empty-state {
  min-height: 0;
  padding: 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  text-align: center;
  box-shadow: none;
}

.app-footer {
  margin-top: 27px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 400;
}

.app-footer span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.app-footer .icon {
  color: var(--accent);
  font-size: 15px;
}

.preview-modal,
.share-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.preview-modal {
  z-index: 10;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 18px;
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(1180px, 100%);
  margin: 0 auto 12px;
  color: #ffffff;
}

.preview-title {
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-actions {
  display: flex;
  flex: none;
  gap: 8px;
}

.preview-actions a,
.preview-actions button {
  min-height: 38px;
  padding: 8px 12px;
}

.preview-frame-wrap {
  width: min(1180px, 100%);
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
}

.preview-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

.share-modal {
  z-index: 12;
  display: grid;
  place-items: center;
  padding: 18px;
}

.share-dialog {
  width: min(520px, 100%);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22);
}

.share-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.share-dialog h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.share-file-name {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}

.share-form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.share-field {
  display: grid;
  gap: 7px;
}

.share-field label {
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
}

.share-field select,
.share-field input {
  min-height: 44px;
}

.share-result {
  padding: 13px;
  border: 1px solid rgba(20, 184, 166, 0.16);
  border-radius: 12px;
  background: #f0fdfa;
}

.share-result input {
  margin-top: 8px;
  background: #ffffff;
}

.share-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.error {
  min-height: 22px;
  margin-top: 10px;
  color: var(--danger-ink);
  font-weight: 500;
}

.toast {
  position: fixed;
  z-index: 14;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.24);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 980px) {
  .app-shell {
    padding-right: 22px;
    padding-left: 22px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .cloud-visual {
    transform: scale(0.88);
    transform-origin: right center;
  }

  .record-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .record-head .actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  body {
    background:
      radial-gradient(circle at 50% -5rem, rgba(45, 212, 191, 0.14), transparent 22rem),
      linear-gradient(180deg, #f8fbfc, #f4f8fb);
    font-size: 15px;
  }

  input,
  textarea,
  select {
    font-size: 16px;
  }

  .share-field select,
  .share-field input,
  .share-result input {
    font-size: 16px;
  }

  .app-shell {
    width: 100%;
    margin: 0;
    padding: 0 16px calc(30px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: none;
  }

  .topbar {
    min-height: 60px;
    margin: 0 -16px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .brand {
    font-size: 16px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .topbar button {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 13px;
  }

  .hero {
    display: block;
    min-height: 202px;
  }

  .hero-copy {
    padding: 30px 0 0;
  }

  .hero h1 {
    max-width: 18rem;
    font-size: 34px;
    line-height: 1.06;
  }

  .hero p {
    max-width: 20rem;
    margin-top: 9px;
    font-size: 14px;
    line-height: 1.55;
  }

  .cloud-visual {
    height: 106px;
    margin-top: 2px;
    transform: scale(0.66);
    transform-origin: right top;
  }

  .composer {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .composer > .drop {
    order: 1;
  }

  .composer > .panel {
    order: 2;
  }

  .panel,
  .drop {
    min-height: 0;
    padding: 19px;
    border-radius: 16px;
  }

  .section-title {
    margin-bottom: 10px;
  }

  .drop-hint {
    margin-bottom: 14px;
    font-size: 14px;
  }

  textarea {
    min-height: 120px;
    font-size: 16px;
  }

  .actions button {
    flex: 1;
  }

  .upload-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }

  .upload-buttons button {
    width: 100%;
  }

  .upload-limits {
    margin-top: 13px;
    font-size: 12px;
  }

  .records-section,
  .shared-section {
    margin: 26px -16px 0;
  }

  .records-heading {
    margin: 0;
    padding: 0 16px 10px;
  }

  .records {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .record {
    padding: 12px 16px 13px;
  }

  .record:hover {
    background: transparent;
    box-shadow: none;
  }

  .record-head {
    align-items: center;
    flex-direction: row;
    gap: 8px;
    margin-bottom: 8px;
  }

  .record-meta {
    flex: 1;
    flex-wrap: nowrap;
    gap: 6px;
    overflow: hidden;
  }

  .record-head .actions {
    display: flex;
    flex: none;
    width: auto;
    gap: 4px;
    justify-content: flex-end;
  }

  .record-head .actions button {
    flex: none;
    width: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 10px;
  }

  .record-head .actions .icon {
    font-size: 17px;
  }

  .record-head .actions .button-label,
  .shared-actions .button-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .record-time {
    min-width: 0;
    margin-left: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .record-time::after {
    content: attr(data-compact-time);
    font-size: 12px;
  }

  .file-row {
    align-items: center;
    gap: 10px;
  }

  .file-summary {
    flex: 1;
    gap: 10px;
  }

  .record-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }

  .record-icon .icon {
    font-size: 18px;
  }

  .file-name-btn,
  .file-details strong,
  .file-details > span {
    font-size: 14px;
  }

  .file-info {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .download-link {
    min-height: 35px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .record-note {
    margin-top: 10px;
    font-size: 12px;
  }

  .folder-files {
    margin-top: 13px;
  }

  .file-row > .upload-buttons {
    display: flex;
    flex: none;
    grid-template-columns: none;
    gap: 6px;
  }

  .file-row > .upload-buttons button {
    width: auto;
  }

  .folder-file {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 7px;
  }

  .folder-file .muted {
    display: none;
  }

  .folder-path {
    font-size: 12px;
  }

  .shared-record {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 12px 16px;
  }

  .shared-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    justify-content: flex-end;
  }

  .shared-actions button {
    width: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 10px;
  }

  .app-footer {
    margin-top: 22px;
    font-size: 12px;
  }

  .preview-modal {
    padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  }

  .preview-head {
    margin-bottom: 10px;
  }

  .preview-actions {
    gap: 6px;
  }

  .preview-actions a,
  .preview-actions button {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 13px;
  }

  .share-dialog {
    padding: 22px 18px;
  }

  .login {
    align-items: end;
    padding: 16px;
  }

  .login-panel {
    padding: 26px 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .app-shell,
  .login-panel,
  .panel,
  .drop,
  .cloud-chip,
  .cloud-shape {
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
