:root {
  --bg: #f6f5f0;
  --surface: #fffefa;
  --surface-glass: rgba(255, 254, 250, 0.18);
  --surface-2: #f0eee6;
  --ink: #17211b;
  --text: #253029;
  --muted: #667064;
  --line: #ded9cd;
  --line-strong: #b9b09f;
  --primary: #35b858;
  --primary-hover: #289948;
  --primary-soft: rgba(53, 184, 88, 0.14);
  --primary-ink: #123a24;
  --accent: #e06a3c;
  --danger: #b53327;
  --warning-bg: #fff1e8;
  --code-bg: #111813;
  --radius: 8px;
  --shadow: 0 18px 48px rgba(31, 38, 32, 0.1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --command-height: clamp(660px, calc(100vh - 220px), 720px);
  --tabs-height: 63px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(23, 33, 27, 0.052) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 33, 27, 0.052) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
}

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

:focus-visible {
  outline: 3px solid rgba(53, 184, 88, 0.24);
  outline-offset: 3px;
}

.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #44c866, #1fa24b);
  color: #fffdf6;
  font-weight: 800;
}

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

.brand strong {
  font-size: 20px;
  line-height: 1.1;
}

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

.privacy-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.privacy-strip span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 254, 250, 0.58);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 20px auto 28px;
  align-items: stretch;
}

.command {
  height: var(--command-height);
  min-height: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-glass);
  box-shadow: 0 18px 48px rgba(31, 38, 32, 0.08);
  overflow: hidden;
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: rgba(240, 238, 230, 0.18);
}

.mode {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  transition: background 160ms var(--ease), color 160ms var(--ease), box-shadow 160ms var(--ease);
}

.mode:last-child {
  border-right: 0;
}

.mode-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 8px;
  object-fit: cover;
}

.mode-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.mode-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.mode-copy strong {
  color: inherit;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.1;
}

.mode:hover {
  background: rgba(53, 184, 88, 0.08);
}

.mode.active {
  background: linear-gradient(180deg, rgba(53, 184, 88, 0.18), rgba(53, 184, 88, 0.11));
  color: var(--ink);
  box-shadow: inset 0 -3px 0 var(--primary);
}

.mode.active .mode-copy small {
  color: var(--primary-hover);
}

.panel {
  display: none;
  height: calc(var(--command-height) - var(--tabs-height));
  min-height: 0;
  padding: clamp(22px, 3.2vw, 36px);
  overflow: auto;
  background: rgba(255, 254, 250, 0.03);
}

.panel.active {
  display: flex;
  flex-direction: column;
  animation: panel-in 220ms var(--ease) both;
}

#roomEntry {
  display: flex;
  flex: 1;
  min-height: 100%;
  flex-direction: column;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-kicker {
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

h1 {
  max-width: 680px;
  margin: 0 0 22px;
  color: var(--ink);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: 0;
}

.code-form {
  display: grid;
  grid-template-columns: minmax(240px, 560px) 116px;
  gap: 10px;
  max-width: 700px;
}

.code-field,
.text-editor,
.composer textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  outline: none;
  background: rgba(255, 254, 250, 0.62);
  color: var(--ink);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease);
}

.code-field {
  height: 56px;
  padding: 0 16px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.code-field::placeholder,
.text-editor::placeholder,
.composer textarea::placeholder {
  color: #9a9387;
}

.code-field:focus,
.text-editor:focus,
.composer textarea:focus {
  border-color: var(--primary);
  background: rgba(255, 254, 250, 0.86);
  box-shadow: 0 0 0 4px rgba(53, 184, 88, 0.12);
}

.code-form button,
.wide,
.composer button,
.file-chip,
.room-actions button,
.result-actions button,
.copy-inline,
.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #49c865, #33ae52);
  color: #fffdf6;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  transition: background 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease);
}

.code-form button:hover,
.wide:hover,
.composer button:hover,
.download-btn:hover,
.result-actions button:hover {
  border-color: var(--primary-hover);
  background: linear-gradient(180deg, #38b858, var(--primary-hover));
}

button:active,
.download-btn:active,
.file-chip:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.send-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.kind-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  min-width: 152px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(240, 238, 230, 0.42);
}

.kind {
  min-height: 36px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}

.kind.active {
  background: linear-gradient(180deg, #49c865, #33ae52);
  color: #fffdf6;
}

.send-pane {
  display: none;
  max-width: 760px;
}

.send-pane.active {
  display: block;
}

.dropzone {
  display: grid;
  height: 200px;
  min-height: 200px;
  padding: 24px;
  place-items: center;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(53, 184, 88, 0.08), transparent 58%), rgba(255, 254, 250, 0.48);
  cursor: pointer;
  text-align: center;
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
}

.dropzone:hover,
.dropzone.drag {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(53, 184, 88, 0.14), transparent 58%), rgba(255, 254, 250, 0.68);
}

.drop-icon {
  display: block;
  width: 68px;
  height: 68px;
  margin-bottom: 14px;
  border-radius: var(--radius);
  overflow: hidden;
}

.drop-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropzone strong {
  display: block;
  max-width: 100%;
  min-height: 24px;
  max-height: 54px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  overflow: auto;
  overflow-wrap: anywhere;
}

.dropzone small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.ttl-row,
.download-limit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.download-limit-row {
  align-items: center;
  flex-wrap: nowrap;
  margin-top: -4px;
  min-width: 0;
}

.limit-label,
.download-limit-row small {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.limit-label {
  flex: 0 0 auto;
  margin-right: 2px;
  color: var(--primary-ink);
}

.limit-input {
  display: inline-grid;
  grid-template-columns: 58px 20px;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, 0.58);
  color: var(--text);
  overflow: hidden;
}

.limit-input:focus-within {
  border-color: var(--primary);
  background: rgba(255, 254, 250, 0.76);
  box-shadow: 0 0 0 4px rgba(53, 184, 88, 0.1);
}

.limit-input input {
  width: 58px;
  height: 36px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  text-align: center;
}

.limit-input span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.download-limit-row small {
  min-width: 74px;
  overflow: hidden;
  white-space: nowrap;
}

.ttl-row button {
  min-height: 38px;
  min-width: 58px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, 0.58);
  color: var(--text);
  cursor: pointer;
  font-weight: 750;
  transition: background 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
}

.ttl-row button:hover {
  border-color: var(--primary);
}

.ttl-row button.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-ink);
  box-shadow: inset 0 0 0 1px rgba(53, 184, 88, 0.22);
}

.wide {
  width: 100%;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 860px;
  min-height: 78px;
  margin-top: clamp(22px, 4vw, 36px);
  padding: 10px;
  border: 1px solid rgba(185, 176, 159, 0.68);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, 0.34);
}

.feature-strip div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 3px 10px;
  align-items: center;
  min-width: 0;
  min-height: 56px;
  padding: 7px 10px;
  border-radius: 7px;
}

.feature-strip div + div {
  border-left: 1px solid rgba(222, 217, 205, 0.8);
}

.feature-strip img {
  grid-row: span 2;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.feature-strip strong {
  min-width: 0;
  color: var(--primary-ink);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feature-strip span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.transfer-banner {
  position: relative;
  max-width: 860px;
  width: 100%;
  height: clamp(176px, 20vw, 236px);
  margin: auto 0 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.transfer-banner > img:first-child {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.transfer-banner .banner-qr {
  position: absolute;
  top: 28.6%;
  left: 45%;
  width: clamp(48px, 7vw, 78px);
  height: clamp(48px, 7vw, 78px);
  padding: 3px;
  border: 1px solid rgba(185, 176, 159, 0.56);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(31, 38, 32, 0.08);
  transform: translate(-50%, -50%);
}

.text-editor {
  min-height: 210px;
  max-height: 420px;
  resize: vertical;
  padding: 16px;
  font-family: Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.6;
}

.editor-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.progress {
  height: 8px;
  margin-top: 14px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #49c865, var(--primary-hover));
  transition: width 160ms var(--ease);
}

.share-result,
.receive-result:not(:empty) {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 176px;
  gap: 18px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, 0.54);
}

.code-display {
  width: fit-content;
  max-width: 100%;
  margin: 2px 0 4px;
  color: var(--ink);
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
}

.countdown {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  margin: 10px 0 14px;
  padding: 0 10px;
  border: 1px solid rgba(181, 51, 39, 0.22);
  border-radius: 999px;
  background: var(--warning-bg);
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
}

.result-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, 0.62);
}

.result-meta span,
.result-meta small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.result-meta strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.link-line {
  display: block;
  max-width: 100%;
  max-height: 44px;
  margin: 12px 0 14px;
  color: var(--primary-hover);
  font-size: 14px;
  font-weight: 700;
  overflow: auto;
  overflow-wrap: anywhere;
}

.qr {
  width: 176px;
  height: 176px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  object-fit: cover;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 44px;
}

.result-actions .secondary,
.room-actions button,
.copy-inline,
.file-chip {
  border-color: var(--line-strong);
  background: rgba(255, 254, 250, 0.58);
  color: var(--text);
}

.result-actions .secondary:hover,
.room-actions button:hover,
.copy-inline:hover,
.file-chip:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-ink);
}

.result-actions .danger,
.room-actions .danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #fffdf6;
}

.text-view {
  width: 100%;
  min-height: 240px;
  max-height: 56vh;
  margin: 14px 0;
  padding: 18px;
  border: 1px solid rgba(185, 176, 159, 0.78);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(23, 33, 27, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 33, 27, 0.035) 1px, transparent 1px),
    rgba(255, 254, 250, 0.62);
  background-size: 28px 28px;
  color: var(--ink);
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.62;
}

.code-view code {
  display: block;
}

.code-keyword {
  color: #24804b;
  font-weight: 800;
}

.code-key {
  color: #1d6d85;
  font-weight: 750;
}

.code-string {
  color: #9a542e;
}

.code-number {
  color: #8c4fb5;
  font-weight: 750;
}

.code-comment {
  color: #7b8578;
  font-style: italic;
}

.download-card {
  max-width: 640px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, 0.54);
}

.download-card strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.download-card small {
  display: block;
  margin: 8px 0 14px;
  color: var(--muted);
  font-weight: 650;
}

.status-panel {
  position: sticky;
  top: 22px;
  display: grid;
  grid-template-rows: 126px auto minmax(0, 1fr);
  gap: 12px;
  align-self: start;
  height: var(--command-height);
  max-height: calc(100vh - 44px);
}

.time-card,
.status-stack,
.side-note {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, 0.34);
  box-shadow: 0 10px 30px rgba(31, 38, 32, 0.045);
}

.time-card {
  position: relative;
  padding: 16px 18px;
  overflow: hidden;
}

.card-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  opacity: 0.9;
}

.time-card span,
.time-card small,
.status-stack span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.time-card strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--ink);
  font-size: 32px;
  line-height: 1;
}

.status-stack {
  display: grid;
  grid-template-rows: repeat(3, 84px);
  overflow: hidden;
}

.status-stack div {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  grid-template-rows: auto auto;
  gap: 5px 14px;
  align-content: center;
  align-items: center;
  min-height: 84px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}

.status-stack div:first-child {
  border-top: 0;
}

.status-stack strong {
  display: block;
  margin-top: 0;
  color: var(--ink);
  font-size: 18px;
  grid-column: 1;
  line-height: 1.12;
}

.status-stack img {
  grid-column: 2;
  grid-row: span 2;
  justify-self: end;
  align-self: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
}

.side-note {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 5px 12px;
  align-items: start;
  min-height: 0;
  padding: 16px 18px;
  overflow: hidden;
}

.side-note-icon {
  grid-row: span 2;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
}

.side-note strong {
  color: var(--ink);
  font-size: 15px;
}

.side-note span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.side-note-qr {
  grid-column: 1 / -1;
  justify-self: center;
  align-self: center;
  width: min(136px, 78%);
  aspect-ratio: 1;
  height: auto;
  padding: 8px;
  border: 1px solid rgba(185, 176, 159, 0.58);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, 0.82);
  box-shadow: 0 12px 28px rgba(31, 38, 32, 0.055);
}

.room-bar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.room-bar span {
  color: var(--muted);
  font-weight: 750;
}

.room-bar strong {
  margin-left: 8px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.room-bar small {
  display: block;
  margin-top: 5px;
  color: var(--danger);
  font-weight: 750;
}

.room-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.room-invite {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 18px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(229, 247, 233, 0.62);
}

.room-invite img {
  width: 92px;
  height: 92px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
}

.room-invite a {
  color: var(--primary-hover);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.message-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 180px;
  max-height: 340px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow: auto;
}

.message {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, 0.72);
}

.empty-message {
  display: grid;
  min-height: 168px;
  place-items: center;
  gap: 8px;
  border-style: dashed;
  background: rgba(255, 254, 250, 0.64);
}

.empty-message img {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: var(--radius);
  object-fit: cover;
}

.empty-message pre {
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 750;
}

.message pre {
  margin: 0;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.58;
}

.message-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

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

.message-file strong {
  display: block;
  max-height: 44px;
  font-weight: 800;
  overflow: auto;
  overflow-wrap: anywhere;
}

.message-file small {
  color: var(--muted);
  font-weight: 650;
}

.composer {
  margin-top: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, 0.64);
  overflow: hidden;
}

.composer textarea {
  min-height: 104px;
  padding: 14px;
  resize: vertical;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.composer-bar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: min(1180px, calc(100% - 32px));
  min-height: 44px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.site-footer a {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 11px;
  border: 1px solid rgba(185, 176, 159, 0.7);
  border-radius: 999px;
  background: rgba(255, 254, 250, 0.32);
  color: var(--primary-hover);
  text-decoration: none;
  transition: border-color 160ms var(--ease), background 160ms var(--ease), color 160ms var(--ease);
}

.site-footer a:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-ink);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 30;
  max-width: calc(100% - 32px);
  padding: 11px 14px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fffdf6;
  box-shadow: 0 18px 42px rgba(23, 33, 27, 0.22);
  transform: translateX(-50%);
}

.hidden {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

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

  .status-panel {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    height: auto;
    max-height: none;
  }

  .time-card strong {
    font-size: 28px;
  }
}

@media (max-width: 640px) {
  .topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .privacy-strip {
    justify-content: flex-start;
  }

  .shell {
    width: min(100% - 20px, 1120px);
    margin-top: 12px;
  }

  .command {
    height: auto;
    min-height: 0;
  }

  .mode {
    min-height: 54px;
    font-size: 14px;
  }

  .panel {
    height: auto;
    min-height: 0;
    padding: 20px;
  }

  .panel.active,
  #roomEntry {
    display: block;
  }

  h1 {
    margin-bottom: 20px;
  }

  .send-head,
  .room-bar,
  .message-file {
    align-items: stretch;
    flex-direction: column;
  }

  .kind-switch,
  .code-form,
  .result-grid,
  .result-meta,
  .room-invite,
  .status-panel {
    grid-template-columns: 1fr;
  }

  .feature-strip {
    grid-template-columns: 1fr;
  }

  .download-limit-row {
    flex-wrap: wrap;
  }

  .feature-strip div + div {
    border-top: 1px solid rgba(222, 217, 205, 0.8);
    border-left: 0;
  }

  .transfer-banner {
    margin-top: 22px;
    height: 168px;
  }

  .transfer-banner .banner-qr {
    width: 48px;
    height: 48px;
  }

  .dropzone {
    height: 190px;
    min-height: 190px;
    padding: 22px;
  }

  .qr {
    width: 154px;
    height: 154px;
  }

  .room-actions,
  .composer-bar,
  .result-actions {
    justify-content: flex-start;
  }

  .result-actions button,
  .room-actions button,
  .copy-inline,
  .download-btn,
  .file-chip {
    min-width: 0;
  }
}
