:root {
  color-scheme: light;
  --canvas: #f1f3ef;
  --paper: #fffefb;
  --paper-soft: #f7f8f4;
  --ink: #17211d;
  --muted: #69736e;
  --line: #dce1dc;
  --line-strong: #c6cec8;
  --accent: #0d765d;
  --accent-dark: #095846;
  --accent-soft: #e4f2ec;
  --warm: #f1c66d;
  --danger: #bb3d34;
  --shadow: 0 18px 46px rgba(35, 51, 44, 0.09);
  --radius: 18px;
  --radius-small: 12px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -8%, rgba(13, 118, 93, 0.13), transparent 34rem),
    radial-gradient(circle at 96% 10%, rgba(241, 198, 109, 0.18), transparent 28rem),
    var(--canvas);
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(13, 118, 93, 0.22);
  outline-offset: 2px;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[hidden],
.is-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;
}

.app-shell {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 0 32px;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  box-shadow: 0 9px 22px rgba(35, 51, 44, 0.14);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.05rem;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.74rem;
}

.topbar-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
}

.service-note {
  color: var(--muted);
  font-size: 0.8rem;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(440px, 0.8fr) minmax(400px, 1fr);
  gap: 16px;
  align-items: start;
  padding-top: 18px;
}

.side-column {
  display: grid;
  gap: 16px;
}

.mobile-dock {
  display: none;
}

.panel {
  border: 1px solid rgba(198, 206, 200, 0.85);
  border-radius: var(--radius);
  background: rgba(255, 254, 251, 0.96);
  box-shadow: var(--shadow);
  padding: 22px;
  backdrop-filter: blur(16px);
}

.compose-panel {
  min-height: 0;
  padding: 18px;
}

.compose-panel .eyebrow,
.compose-panel .panel-description {
  display: none;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.compose-panel .panel-heading {
  gap: 12px;
  margin-bottom: 8px;
}

.panel-heading.compact {
  margin-bottom: 8px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  margin-bottom: 0;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.55rem, 3vw, 2rem);
}

h2 {
  font-size: 1.2rem;
}

.panel-description {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.compose-form {
  display: grid;
  gap: 8px;
}

.choice-block {
  display: grid;
  gap: 5px;
}

.choice-label,
label > span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.segmented {
  display: grid;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #eef1ed;
}

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

.five-up {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ttl-options {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.ttl-options.is-public {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ttl-options label[hidden] {
  display: none;
}

.ttl-options label > span {
  padding-inline: 3px;
  font-size: 0.76rem;
  white-space: nowrap;
}

.segmented label {
  position: relative;
  min-width: 0;
}

.segmented input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.segmented label > span {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
  cursor: pointer;
  transition: 150ms ease;
}

.segmented input:checked + span {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 8px 18px rgba(23, 33, 29, 0.16);
}

.mode-hint {
  min-height: 18px;
  margin: 0;
  color: var(--accent-dark);
  font-size: 0.8rem;
  line-height: 1.3;
}

.content-composer {
  display: grid;
  gap: 6px;
}

.drop-zone {
  position: relative;
  min-height: 76px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  overflow: hidden;
  border: 1.5px dashed var(--line-strong);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(13, 118, 93, 0.08), rgba(241, 198, 109, 0.11)),
    var(--paper-soft);
  transition: 160ms ease;
}

.drop-zone.is-dragging {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(13, 118, 93, 0.1);
}

.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.file-picker-actions {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 6px;
}

.drop-zone[data-picker-mode="touch"] .file-picker-actions {
  grid-template-columns: repeat(2, auto);
}

.page-drop-overlay {
  position: fixed;
  inset: 14px;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  border: 3px dashed rgba(255, 255, 255, 0.86);
  border-radius: 24px;
  color: #fff;
  background: rgba(9, 88, 70, 0.92);
  backdrop-filter: blur(9px);
  transition: opacity 120ms ease, visibility 120ms ease;
}

body.is-page-dragging {
  overflow: hidden;
}

body.is-page-dragging .page-drop-overlay {
  visibility: visible;
  opacity: 1;
}

.page-drop-overlay > div {
  display: grid;
  justify-items: center;
  gap: 9px;
  text-align: center;
}

.page-drop-overlay svg {
  width: 54px;
  height: 54px;
}

.page-drop-overlay strong {
  font-size: clamp(1.15rem, 3vw, 1.65rem);
}

.page-drop-overlay span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
}

.file-picker-actions .secondary-button {
  min-height: 36px;
  padding-inline: 10px;
  white-space: nowrap;
}

.drop-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: var(--accent);
}

.drop-icon svg {
  width: 24px;
  height: 24px;
}

.drop-zone strong,
.drop-zone span {
  display: block;
}

.drop-zone strong {
  font-size: 0.92rem;
}

.drop-zone span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
}

.selected-strip {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--paper-soft);
}

.selected-strip.is-empty {
  min-height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.selected-strip > strong {
  font-size: 0.84rem;
}

.thumb-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 7px;
  max-height: 78px;
  overflow: auto;
}

.thumb-strip img,
.thumb-file {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.thumb-strip img {
  object-fit: cover;
}

.thumb-file {
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--ink);
  font-size: 0.65rem;
  font-weight: 900;
}

.text-composer {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-soft);
}

.text-composer label {
  display: grid;
  gap: 6px;
}

.text-composer textarea {
  min-height: 130px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink);
  background: var(--paper);
  outline: none;
}

input {
  height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 120px;
  padding: 11px 12px;
  resize: vertical;
  line-height: 1.55;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(13, 118, 93, 0.09);
}

.delivery-options {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-soft);
}

.delivery-options.is-private {
  border-color: #cfe0d8;
  background: var(--accent-soft);
}

.complex-code-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 6px 8px;
  border: 1px solid rgba(13, 118, 93, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
}

.complex-code-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  clip-path: inset(50%);
  pointer-events: none;
}

.check-mark {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--paper);
}

.complex-code-option input:checked + .check-mark {
  border-color: var(--accent);
  background: var(--accent);
}

.complex-code-option input:checked + .check-mark::after {
  width: 8px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  content: "";
  transform: translateY(-1px) rotate(-45deg);
}

.complex-code-option strong,
.complex-code-option small {
  display: block;
}

.complex-code-option strong {
  font-size: 0.82rem;
}

.complex-code-option small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.primary-button,
.secondary-button,
.icon-button {
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
}

.primary-button,
.secondary-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  font-weight: 850;
}

.primary-button {
  border: 0;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 10px 24px rgba(23, 33, 29, 0.16);
}

.primary-button:hover {
  background: #28352f;
}

.primary-button:disabled {
  cursor: not-allowed;
  color: #e1e4e2;
  background: #9aa39e;
  box-shadow: none;
}

.secondary-button {
  position: relative;
  z-index: 2;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: var(--paper);
}

.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
}

.icon-button.subtle {
  color: var(--muted);
  background: var(--paper-soft);
}

.icon-button.inverted {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.send-button {
  width: 100%;
  min-height: 44px;
  justify-content: space-between;
  padding: 0 19px;
}

.progress-wrap {
  display: none;
  align-items: center;
  gap: 10px;
}

.progress-wrap.is-active {
  display: flex;
}

.progress-line {
  flex: 1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dde3de;
}

.progress-line span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 150ms ease;
}

#progressText {
  min-width: 38px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-align: right;
}

.share-result {
  display: grid;
  gap: 12px;
  margin-top: 17px;
  padding: 17px;
  border-radius: 16px;
  color: #fff;
  background:
    radial-gradient(circle at right top, rgba(241, 198, 109, 0.22), transparent 13rem),
    var(--ink);
}

.result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.result-heading span,
.result-heading strong {
  display: block;
}

.result-heading span {
  color: #9ad6c4;
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-heading strong {
  margin-top: 3px;
  font-size: 1.05rem;
}

.share-links {
  display: grid;
  gap: 8px;
}

.share-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
}

.share-link-row strong,
.share-link-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-link-row strong {
  color: #fff;
  font-size: 0.88rem;
}

.share-link-row span {
  margin-top: 3px;
  color: #c5d4cf;
  font-size: 0.78rem;
}

.copy-button {
  min-width: 84px;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  color: var(--ink);
  background: var(--warm);
  font-weight: 900;
  cursor: pointer;
}

.mini-badge {
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 0.76rem;
  font-weight: 850;
}

.pickup-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 15px;
}

#codeInput {
  font-weight: 750;
}

.pickup-card {
  display: grid;
  gap: 8px;
  margin-top: 13px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-soft);
}

.pickup-card > strong,
.pickup-card > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pickup-card > span,
.pickup-card small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 2px 0;
}

.stat-grid div {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
}

.stat-grid dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.stat-grid dd {
  margin: 4px 0 0;
  font-size: 1rem;
  font-weight: 900;
}

.pickup-download {
  width: 100%;
}

.sync-line {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 5px 0 12px;
  color: var(--muted);
  font-size: 0.76rem;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(13, 118, 93, 0.08);
}

.public-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  max-height: 470px;
  overflow: auto;
}

.public-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper-soft);
}

.file-button {
  width: 100%;
  aspect-ratio: 1.35;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--ink);
  background: #e9ede9;
  text-decoration: none;
}

.file-button:hover {
  background: #e1e7e2;
}

.file-fallback {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: var(--ink);
  font-size: 0.68rem;
  font-weight: 950;
}

.file-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-button .file-fallback {
  display: none;
}

.image-button.is-preview-broken img {
  display: none;
}

.image-button.is-preview-broken .file-fallback {
  display: grid;
}

.text-button .file-fallback {
  color: #fff;
  background: var(--accent);
}

.public-item-info {
  padding: 9px;
}

.public-item-info strong,
.public-item-info span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-item-info strong {
  font-size: 0.82rem;
}

.public-item-info span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 126px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.empty-state.is-error {
  color: var(--danger);
}

.text-preview-overlay {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 24, 20, 0.58);
  backdrop-filter: blur(10px);
}

.text-preview-sheet {
  width: min(720px, 100%);
  max-height: calc(100dvh - 44px);
  display: grid;
  gap: 12px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(198, 206, 200, 0.9);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(15, 24, 20, 0.28);
}

.text-preview-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.text-preview-heading .eyebrow {
  margin-bottom: 3px;
}

.text-preview-name {
  max-width: 34rem;
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-preview-status {
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 10px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.text-preview-status.is-error {
  color: var(--danger);
  background: #faeae8;
}

#textPreviewContent {
  min-height: 300px;
  max-height: min(52dvh, 520px);
  padding: 14px;
  resize: none;
  color: var(--ink);
  background: #fbfcf9;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.text-preview-actions {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) auto;
  gap: 8px;
}

.text-preview-actions .secondary-button,
.text-preview-actions .primary-button {
  min-height: 42px;
}

.toast {
  min-height: 18px;
  margin-top: 5px;
  color: var(--accent-dark);
  font-size: 0.8rem;
  line-height: 1.45;
}

.toast.is-error {
  color: var(--danger);
}

.settings-menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 30;
  width: min(360px, calc(100vw - 24px));
  max-height: 430px;
  overflow: hidden;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 254, 251, 0.98);
  box-shadow: 0 20px 50px rgba(35, 51, 44, 0.16);
}

.settings-menu-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.history-list {
  display: grid;
  gap: 7px;
  max-height: 320px;
  overflow: auto;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-soft);
}

.history-item strong,
.history-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-item strong {
  font-size: 0.8rem;
}

.history-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
}

.history-item em {
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 850;
}

@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .compose-panel {
    min-height: auto;
  }

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

@media (min-width: 901px) {
  .compose-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 8px;
  }

  .compose-form > .secret-row,
  .compose-form > .content-composer,
  .compose-form > .delivery-options,
  .compose-form > .progress-wrap,
  .compose-form > .send-button {
    grid-column: 1 / -1;
  }

  .compose-form > .choice-block {
    align-content: start;
  }
}

@media (max-width: 680px) {
  body {
    padding-bottom: calc(62px + env(safe-area-inset-bottom));
  }

  .app-shell {
    width: min(100% - 16px, 560px);
    padding: 8px 0 10px;
  }

  .topbar {
    min-height: 38px;
  }

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

  .brand {
    gap: 8px;
  }

  .brand strong {
    font-size: 1rem;
  }

  .brand small,
  .service-note {
    display: none;
  }

  .workspace {
    display: block;
    padding-top: 8px;
  }

  .side-column {
    display: block;
  }

  .compose-panel,
  .pickup-panel,
  .public-panel {
    display: none;
  }

  body[data-mobile-view="send"] .compose-panel,
  body[data-mobile-view="receive"] .pickup-panel,
  body[data-mobile-view="public"] .public-panel {
    display: block;
  }

  .panel {
    padding: 12px;
    border-radius: 16px;
  }

  .compose-panel .panel-heading {
    align-items: center;
    margin-bottom: 5px;
  }

  h1 {
    font-size: 1.28rem;
  }

  .compose-panel .icon-button {
    width: 36px;
    height: 36px;
  }

  .compose-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .compose-form > .secret-row,
  .compose-form > .content-composer,
  .compose-form > .delivery-options,
  .compose-form > .progress-wrap,
  .compose-form > .send-button {
    grid-column: 1 / -1;
  }

  .compose-form > .choice-block {
    align-content: start;
  }

  .choice-block {
    gap: 3px;
  }

  .choice-label,
  label > span {
    font-size: 0.72rem;
  }

  .compose-form > .choice-block .segmented svg,
  .mode-hint {
    display: none;
  }

  .segmented {
    gap: 2px;
    padding: 3px;
    border-radius: 12px;
  }

  .segmented label > span {
    min-height: 34px;
    padding: 3px 4px;
    font-size: 0.78rem;
  }

  .ttl-options {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2px;
  }

  .ttl-options.is-public {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ttl-options label > span {
    min-height: 32px;
    padding-inline: 1px;
    font-size: 0.65rem;
  }

  .drop-zone {
    min-height: 64px;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 10px;
    border-radius: 13px;
  }

  .drop-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .drop-icon svg {
    width: 20px;
    height: 20px;
  }

  .drop-zone strong {
    font-size: 0.84rem;
  }

  .drop-zone span {
    font-size: 0.72rem;
  }

  .file-picker-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .drop-zone[data-picker-mode="touch"] .file-picker-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .drop-zone .secondary-button {
    display: inline-flex;
    min-height: 32px;
    padding: 4px 8px;
    font-size: 0.72rem;
  }

  .selected-strip.is-empty {
    min-height: 16px;
    font-size: 0.76rem;
  }

  .delivery-options {
    gap: 6px;
    padding: 7px;
    border-radius: 13px;
  }

  .complex-code-option {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 7px;
    min-height: 36px;
    padding: 4px 7px;
  }

  .check-mark {
    width: 18px;
    height: 18px;
  }

  .complex-code-option strong {
    font-size: 0.76rem;
  }

  .complex-code-option small {
    margin-top: 0;
    font-size: 0.66rem;
    line-height: 1.25;
  }

  .send-button {
    min-height: 40px;
  }

  .text-composer {
    padding: 8px;
    border-radius: 13px;
  }

  .text-composer textarea {
    min-height: 92px;
  }

  .pickup-panel .panel-description {
    margin-bottom: 10px;
  }

  .public-panel {
    max-height: calc(100dvh - 118px - env(safe-area-inset-bottom));
    overflow: hidden;
  }

  .public-panel .public-grid {
    max-height: calc(100dvh - 236px - env(safe-area-inset-bottom));
    overflow-y: auto;
  }

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

  .text-preview-overlay {
    align-items: end;
    padding: 8px;
  }

  .text-preview-sheet {
    max-height: calc(100dvh - 16px);
    gap: 9px;
    padding: 14px;
    border-radius: 20px 20px 14px 14px;
  }

  #textPreviewContent {
    min-height: 42dvh;
    max-height: 52dvh;
    padding: 11px;
    font-size: 0.82rem;
    line-height: 1.55;
  }

  .text-preview-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .text-preview-actions .secondary-button,
  .text-preview-actions .primary-button {
    min-height: 40px;
    padding-inline: 8px;
    font-size: 0.78rem;
  }

  .mobile-dock {
    position: fixed;
    z-index: 30;
    right: max(8px, env(safe-area-inset-right));
    bottom: max(6px, env(safe-area-inset-bottom));
    left: max(8px, env(safe-area-inset-left));
    height: 54px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(198, 206, 200, 0.92);
    border-radius: 17px;
    background: rgba(255, 254, 251, 0.94);
    box-shadow: 0 14px 34px rgba(23, 33, 29, 0.2);
    backdrop-filter: blur(18px);
  }

  .mobile-dock button {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 0;
    border-radius: 12px;
    color: var(--muted);
    background: transparent;
    font-size: 0.78rem;
    font-weight: 850;
  }

  .mobile-dock button[aria-selected="true"] {
    color: #fff;
    background: var(--ink);
    box-shadow: 0 7px 16px rgba(23, 33, 29, 0.18);
  }

  .mobile-dock svg {
    width: 17px;
    height: 17px;
  }
}

@media (max-width: 410px) {
  .five-up {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .five-up label > span {
    padding-inline: 2px;
  }

  .pickup-form {
    grid-template-columns: 1fr;
  }

  .share-link-row {
    grid-template-columns: 1fr;
  }

  .copy-button {
    width: 100%;
  }
}
