:root {
  color-scheme: light;
  --page: #f5f5f7;
  --card: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #9ca3af;
  --line: #d2d2d7;
  --line-soft: #d2d2d7;
  --blue: #0071e3;
  --blue-dark: #0077ed;
  --green: #34c759;
  --danger: #ff3b30;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", "SF Mono", ui-monospace, Consolas, monospace;
  --radius: 22px;
  --radius-sm: 12px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 40px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
  font-family: var(--sans);
}

/* Float animation for entrance effects */
@keyframes float-up {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--page);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 48px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(251, 251, 253, 0.8);
  backdrop-filter: saturate(200%) blur(25px);
  -webkit-backdrop-filter: saturate(200%) blur(25px);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
  transition: all 200ms ease;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(980px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  font-size: 0.75rem;
}

.nav-links {
  display: inline-flex;
  align-items: center;
  gap: 32px;
  color: var(--muted);
}

.nav-links button {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  opacity: 1;
  transition: color 160ms ease, opacity 160ms ease;
  position: relative;
}

.nav-links button::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--blue);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}

.nav-links button.is-active {
  color: var(--ink);
}

.nav-links button.is-active::after {
  transform: scaleX(1);
}

.nav-links button:hover {
  color: var(--ink);
}

.nav-spacer {
  display: none;
}

.shell {
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto;
  padding: var(--space-5) 0 96px;
}

.screen.is-hidden {
  display: none !important;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
  min-height: auto;
  font-size: 0.9375rem;
  font-weight: 400;
  cursor: pointer;
}

.text-button::after {
  content: " \203A";
}

.back-home {
  display: block;
  margin-bottom: 4px;
  font-size: 0.8125rem;
}

.back-home::after {
  content: none;
}

.workspace-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.022em;
}

.landing-hero {
  padding: var(--space-3) 0 var(--space-4);
  animation: float-up 600ms ease-out;
}

.landing-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 var(--space-4);
}

.landing-tile {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 12px;
  min-height: 0;
  padding: 28px 28px 32px;
  border: 0;
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
  text-align: left;
  color: var(--ink);
  transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 220ms ease, background 220ms ease, border-color 220ms ease;
  border: 1px solid rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
  animation: float-up 600ms ease-out;
  animation-fill-mode: both;
}

.landing-tile:nth-child(1) {
  animation-delay: 100ms;
}

.landing-tile:nth-child(2) {
  animation-delay: 150ms;
}

.landing-tile:nth-child(3) {
  animation-delay: 200ms;
}

.landing-tile:nth-child(4) {
  animation-delay: 250ms;
}

@media (hover: hover) and (pointer: fine) {
  .landing-tile:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 113, 227, 0.12);
    border-color: rgba(0, 113, 227, 0.2);
  }
}

.landing-tile:active {
  transform: scale(0.985);
}

.landing-tile:focus-visible {
  outline: 2px solid rgba(0, 113, 227, 0.35);
  outline-offset: 2px;
}

.landing-tile-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 0 4px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.08), rgba(0, 113, 227, 0.04));
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.06);
  color: var(--blue);
  transition: all 200ms ease;
}

.landing-tile:hover .landing-tile-icon {
  transform: scale(1.1) rotate(-5deg);
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.12), rgba(0, 113, 227, 0.08));
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.12);
}

.landing-tile-icon svg {
  width: 24px;
  height: 24px;
  display: block;
  transition: transform 200ms ease;
}

.landing-tile strong {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--ink);
}

.landing-tile>span:last-child {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.45;
  font-weight: 400;
  letter-spacing: -0.01em;
  max-width: 28ch;
}

.landing-secondary {
  margin: 0;
}

.drop-zone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 40px 24px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(245, 245, 247, 0.5), rgba(255, 255, 255, 0.3));
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  transition: all 200ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragover {
  border-color: var(--blue);
  background: rgba(0, 113, 227, 0.06);
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.08);
}

.drop-zone-title {
  font-size: 1rem;
  font-weight: 500;
}

.drop-zone-sub {
  color: var(--muted);
  font-size: 0.8125rem;
}

.drop-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  box-shadow: none;
  padding: 0;
}

.file-share-note {
  margin: -4px 0 var(--space-3);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.4;
}

.file-share-note strong {
  color: var(--ink);
  font-weight: 500;
}

.file-share-steps {
  margin: 0 0 var(--space-3);
  padding: 0 0 0 1.15rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.file-share-steps li+li {
  margin-top: 6px;
}

.file-share-steps strong {
  color: var(--ink);
  font-weight: 500;
}

.short-link-field {
  display: grid;
  gap: 6px;
  margin-bottom: var(--space-3);
  min-width: 0;
}

.short-link-field span {
  color: var(--muted);
  font-size: 0.8125rem;
}

.short-link-field input {
  width: 100%;
  min-width: 0;
  font-family: var(--mono);
  font-size: 0.8125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-result.has-link .result-lead {
  display: none;
}

.mobile-nav {
  display: none;
}

.hero {
  padding: var(--space-2) 0 var(--space-4);
}

.hero h1 {
  margin: 0;
  max-width: 780px;
  color: var(--ink);
  font-size: clamp(2.5rem, 5.5vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 700;
  animation: float-up 700ms ease-out;
}

.hero-sub {
  margin: 10px 0 0;
  max-width: 520px;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.45;
  font-weight: 400;
  letter-spacing: -0.01em;
  animation: float-up 800ms ease-out;
}

.hero-support {
  margin: 0;
  max-width: 480px;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.45;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.workspace-header {
  position: sticky;
  top: 48px;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin: 0 0 var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid transparent;
  background: rgba(245, 245, 247, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.workspace-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.022em;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 196px;
  min-width: 196px;
  padding: 2px;
  border-radius: 999px;
  background: #e8e8ed;
}

.tab {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #6e6e73;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background 200ms ease, color 200ms ease, box-shadow 200ms ease;
}

.tab.is-active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--space-3);
  align-items: start;
  animation: panelIn 220ms ease;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.workspace.is-hidden,
.is-hidden {
  display: none !important;
}

.editor,
.result,
.viewer,
.capsule {
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.editor,
.viewer {
  overflow: hidden;
}

.band {
  padding: var(--space-4);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.band:last-child {
  border-bottom: 0;
}

.section-heading {
  margin-bottom: var(--space-3);
}

.eyebrow,
.section-heading p {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  text-transform: none;
}

.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.advanced {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: #fafafa;
}

.advanced summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 18px var(--space-4);
  list-style: none;
  cursor: pointer;
  user-select: none;
  transition: background 160ms ease;
}

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

.advanced summary::after {
  content: "";
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-right: 1.5px solid var(--soft);
  border-bottom: 1.5px solid var(--soft);
  transform: rotate(45deg);
  transition: transform 200ms ease;
}

.advanced[open] summary::after {
  transform: rotate(-135deg) translateY(-1px);
}

.advanced summary:hover {
  background: #f3f3f5;
}

.advanced summary>span:first-child {
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
}

.advanced-hint {
  margin-right: auto;
  margin-left: var(--space-2);
  color: var(--soft);
  font-size: 0.8125rem;
  font-weight: 400;
}

.advanced-body {
  display: grid;
  gap: var(--space-3);
  padding: 0 var(--space-4) var(--space-4);
  animation: panelIn 180ms ease;
}

.grid {
  display: grid;
  gap: var(--space-3);
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact {
  margin-bottom: 0;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 400;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--page);
  color: var(--ink);
  outline: none;
  padding: 11px 12px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.advanced-body input,
.advanced-body select,
.advanced-body textarea {
  background: var(--card);
}

input::placeholder,
textarea::placeholder {
  color: var(--soft);
}

input:hover,
select:hover,
textarea:hover {
  background: #efeff2;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.18);
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #6e6e73 50%),
    linear-gradient(135deg, #6e6e73 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 2px),
    calc(100% - 11px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}

.guards {
  display: grid;
  overflow: hidden;
  border-radius: 16px;
  background: var(--page);
}

.check {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 51px;
  align-items: center;
  gap: var(--space-3);
  min-height: 58px;
  padding: 12px var(--space-3);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.check:last-child {
  box-shadow: none;
}

.check input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.check i {
  position: relative;
  grid-column: 2;
  width: 51px;
  height: 31px;
  border-radius: 999px;
  background: #e9e9eb;
  transition: background 200ms ease;
}

.check i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 200ms ease;
}

.check input:checked+i {
  background: var(--green);
}

.check input:checked+i::after {
  transform: translateX(20px);
}

.check input:focus-visible+i {
  outline: 3px solid rgba(0, 113, 227, 0.28);
  outline-offset: 2px;
}

.check span {
  grid-column: 1;
  grid-row: 1;
}

.check strong {
  display: block;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
}

.check small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.3;
  font-size: 0.78rem;
  font-weight: 400;
}

.security-options {
  margin-top: var(--space-3);
}

.actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.actions {
  padding: var(--space-3) var(--space-4) var(--space-4);
}

.primary,
.secondary {
  min-height: 40px;
  border: 0;
  border-radius: 980px;
  padding: 0 18px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.primary {
  background: var(--blue);
  color: #fff;
}

.primary:hover {
  background: var(--blue-dark);
}

.secondary {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.secondary:hover {
  background: rgba(0, 0, 0, 0.03);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.result {
  position: sticky;
  top: 112px;
  padding: var(--space-4);
  border: 0;
}

.result-lead {
  margin: -4px 0 var(--space-3);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.4;
}

.result.has-link .result-lead {
  display: none;
}

.link-summary {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
  margin: 0 0 var(--space-2);
}

.link-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--page);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
}

#shareLink {
  min-height: 148px;
  border-radius: 14px;
  background: #1d1d1f;
  color: #f5f5f7;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.5;
  box-shadow: none;
}

#shareLink::placeholder {
  color: rgba(245, 245, 247, 0.36);
}

.receipt-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-2) 0 var(--space-3);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 400;
}

.seal-chip {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--page);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.secondary-actions {
  margin-top: var(--space-2);
}

.secondary-actions .secondary {
  flex: 1;
  min-width: 0;
}

.result-hint {
  margin: var(--space-2) 0 0;
  color: var(--soft);
  font-size: 0.75rem;
  line-height: 1.35;
}

#linkWarning,
.status.error {
  color: var(--danger);
}

.status {
  min-height: 18px;
  margin: var(--space-2) 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 400;
}

#receivePanel {
  grid-template-columns: minmax(0, 1fr);
}

.viewer {
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  padding: 72px var(--space-4) 56px;
  text-align: center;
}

.empty-state.is-hidden {
  display: none !important;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: var(--space-1);
  border-radius: 20px;
  background: linear-gradient(180deg, #fbfbfd 0%, #f0f0f2 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  color: var(--blue);
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1;
}

.empty-icon::before {
  content: "↓";
}

.empty-state h2 {
  margin: 0;
  font-size: 1.625rem;
  font-weight: 600;
  letter-spacing: -0.022em;
}

.empty-state>p {
  margin: 0;
  max-width: 340px;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.4;
}

.receive-controls {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.receive-controls:has(.unlock.is-hidden):has(.status:empty) {
  display: none;
}

.unlock {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2);
  align-items: end;
}

.capsule {
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: var(--space-4);
}

.capsule header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}

.capsule h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-1);
}

.tag {
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--page);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 400;
}

.view-seal {
  margin: 0 0 var(--space-3);
}

.view-seal .seal-chip {
  margin-left: 0;
}

.meta div.is-hidden {
  display: none !important;
}

.meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
}

.meta div {
  min-width: 0;
  padding: 14px;
  border-radius: 14px;
  background: var(--page);
}

.meta dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: -0.01em;
}

.meta dd {
  margin: 4px 0 0;
  font-size: 0.9375rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.readout {
  display: grid;
  gap: var(--space-2);
}

.readout section {
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: var(--page);
}

.readout h3 {
  margin: 0;
  padding: 12px 14px 0;
  border: 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: -0.01em;
}

pre {
  margin: 0;
  padding: 10px 14px 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.55;
  background: transparent;
}

.capsule .button-row {
  margin-top: var(--space-4);
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.file-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 980px;
  background: var(--blue);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.file-button.secondary-file {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.file-button.secondary-file:hover {
  background: rgba(0, 0, 0, 0.03);
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.pack-list {
  display: grid;
  gap: var(--space-1);
  width: min(100%, 400px);
  margin-top: var(--space-4);
  text-align: left;
}

.pack-list button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 14px var(--space-3);
  border: 0;
  border-radius: 14px;
  background: var(--page);
  color: var(--ink);
  text-align: left;
  transition: background 160ms ease;
}

.pack-list button:hover {
  background: #efeff2;
}

.pack-list strong {
  font-size: 0.9rem;
  font-weight: 500;
}

.pack-list span {
  color: var(--muted);
  font-size: 0.75rem;
  font-family: var(--mono);
}

.attach-hint {
  margin: -8px 0 var(--space-3);
  color: var(--soft);
  font-size: 0.8125rem;
  line-height: 1.35;
}

.attach-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 980px;
  background: transparent;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  width: fit-content;
}

.attach-picker:hover {
  background: rgba(0, 0, 0, 0.03);
}

.attach-picker input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  box-shadow: none;
  padding: 0;
}

.attach-list,
.attach-download-list {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-1);
}

.attach-list:empty,
.attach-download-list:empty {
  display: none;
}

.attach-chip,
.attach-download-list li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--page);
}

.attach-chip-info,
.attach-download-list .attach-info {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 2px;
}

.attach-chip-info strong,
.attach-download-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
}

.attach-chip-info span,
.attach-download-list span {
  color: var(--muted);
  font-size: 0.75rem;
}

.attach-chip button,
.attach-download-list button {
  flex-shrink: 0;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 980px;
  background: transparent;
  color: var(--blue);
  font-size: 0.8125rem;
  font-weight: 500;
}

.attach-chip button:hover,
.attach-download-list button:hover {
  background: rgba(0, 113, 227, 0.08);
}

.attach-chip .remove-attach {
  color: var(--muted);
}

.attach-status {
  margin-top: var(--space-2);
}

.attachments-block {
  margin: var(--space-4) 0 0;
}

.attachments-block h3 {
  margin: 0 0 var(--space-2);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

@media (max-width: 980px) {
  .landing-tiles {
    grid-template-columns: 1fr;
  }

  .landing-tile {
    min-height: 112px;
    padding: 24px 22px;
  }

  .nav-links {
    display: none;
  }

  .topbar {
    display: none;
  }

  .nav-inner {
    width: min(980px, calc(100% - 28px));
  }

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

  .result {
    position: static;
  }

  .meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .advanced-hint {
    display: none;
  }

  .mobile-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    min-height: 64px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(251, 251, 253, 0.92);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
  }

  .mobile-nav-item {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 3px;
    min-height: 52px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--muted);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: -0.01em;
  }

  .mobile-nav-item svg {
    width: 22px;
    height: 22px;
    display: block;
  }

  .mobile-nav-item.is-active {
    color: var(--blue);
    background: rgba(0, 113, 227, 0.08);
  }

  .shell {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 24px, 1040px);
    padding-top: 24px;
    padding-bottom: calc(108px + env(safe-area-inset-bottom));
  }

  .hero h1 {
    font-size: clamp(2rem, 9vw, 2.75rem);
  }

  .hero-sub {
    font-size: 1rem;
  }

  .workspace-header {
    top: 0;
    flex-wrap: wrap;
    gap: 8px;
  }

  .mode-switch {
    width: 100%;
    min-width: 0;
  }

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

  .band,
  .result,
  .capsule,
  .empty-state {
    padding-left: 18px;
    padding-right: 18px;
  }

  .advanced summary,
  .advanced-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .actions {
    padding: 16px 18px 20px;
  }

  .primary,
  .secondary,
  .button-row .primary,
  .button-row .secondary {
    width: 100%;
    min-height: 48px;
    font-size: 0.9375rem;
  }

  .secondary-actions {
    width: 100%;
  }

  .secondary-actions .secondary {
    flex: 1 1 100%;
  }

  .actions {
    flex-direction: column;
  }

  .drop-zone {
    padding: 32px 18px;
  }

  .short-link-field input {
    min-height: 48px;
    font-size: 0.75rem;
  }

  .file-share-steps {
    font-size: 0.9375rem;
  }

  .receipt-meta {
    flex-wrap: wrap;
    gap: 8px;
  }

  .capsule header {
    flex-direction: column;
  }

  .tags {
    justify-content: flex-start;
  }

  .empty-actions {
    flex-direction: column;
    width: 100%;
  }

  .file-button {
    width: 100%;
    min-height: 48px;
  }

  .seal-chip {
    margin-left: 0;
  }

  .attach-chip,
  .attach-download-list li {
    flex-wrap: wrap;
  }

  pre {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}