:root {
  color-scheme: light;
  --bg: #f9f9fb;
  --panel: #ffffff;
  --text: #30313a;
  --muted: #777d8b;
  --line: #eceef3;
  --border: #dfe3ea;
  --blue: #0878d8;
  --blue-dark: #0066bd;
  --green: #24945c;
  --red: #d33b3b;
  --shadow: 0 1px 5px rgba(24, 32, 51, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

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

button {
  border: 0;
}

.app-shell {
  width: min(700px, calc(100% - 28px));
  margin: 0 auto;
  padding: 20px 0 34px;
}

.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 12px;
  text-align: center;
}

.profile-avatar-button {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin: 0 auto 8px;
  padding: 3px;
  border: 1px solid #d9e0ea;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(24, 32, 51, 0.13);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.profile-avatar-button:hover,
.profile-avatar-button:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 6px 18px rgba(8, 120, 216, 0.2);
  transform: translateY(-1px);
}

.profile-avatar-button img {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.title-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  color: #2d3440;
  font-size: 1.62rem;
  line-height: 1.2;
}

#appTitle {
  cursor: pointer;
}

#appTitle:focus-visible {
  outline: 3px solid rgba(8, 120, 216, 0.18);
  outline-offset: 4px;
}

h2 {
  color: #373b44;
  font-size: 1rem;
  line-height: 1.25;
}

h3 {
  margin: 0;
  color: #373b44;
  font-size: 0.92rem;
  line-height: 1.25;
}

.messages-card,
.composer-card,
.shortcuts-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.messages-card {
  min-height: 248px;
  max-height: 520px;
  overflow: hidden;
}

.messages-header,
.shortcuts-header,
.dialog-header,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.messages-header,
.shortcuts-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.messages-header p,
.shortcuts-header p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #d7dbe3;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input {
  height: 34px;
  padding: 0 10px;
}

select {
  height: 34px;
  padding: 0 30px 0 10px;
}

.toolbar input {
  width: 140px;
}

textarea {
  min-height: 92px;
  max-height: 180px;
  padding: 12px;
  resize: vertical;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, "Microsoft YaHei", monospace;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(8, 120, 216, 0.12);
}

.text-list {
  max-height: 456px;
  overflow-y: auto;
  padding: 0 12px;
}

.text-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.text-item:last-child {
  border-bottom: 0;
}

.text-item:hover {
  background: #f7f9fc;
}

.text-body {
  margin: 0;
  max-height: 116px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #2f333b;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, "Microsoft YaHei", monospace;
  font-size: 0.94rem;
  line-height: 1.45;
}

.text-link {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.item-meta {
  margin-top: 4px;
  color: #9aa1ad;
  font-size: 0.75rem;
}

.item-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0;
  overflow: visible;
  position: relative;
  transition: opacity 0.16s ease, padding-right 0.16s ease;
}

.text-item:hover .item-actions,
.text-item:focus-within .item-actions,
.text-item.confirming-delete .item-actions {
  opacity: 1;
}

.empty-state {
  padding: 42px 12px;
  color: #999;
  text-align: center;
}

.composer-card {
  margin-top: 12px;
  padding: 12px;
}

.composer-footer {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.counter {
  color: #8a909b;
  font-size: 0.8rem;
  text-align: right;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  min-height: 34px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.primary-button {
  width: 100%;
  padding: 0 16px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

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

.primary-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.secondary-button,
.ghost-button {
  padding: 0 12px;
  border: 1px solid #ccd2dc;
  background: #fff;
  color: #555b66;
  font-weight: 700;
}

.secondary-button:hover,
.ghost-button:hover,
.icon-button:hover {
  background: #f2f4f7;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #d7dbe3;
  background: #fff;
  color: #555b66;
  font-size: 1rem;
  line-height: 1;
}

.item-actions .icon-button {
  width: 32px;
  height: 32px;
  min-height: 32px;
}

.delete-action-wrap {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.text-item.confirming-delete .item-actions {
  padding-right: 62px;
}

.item-actions .icon-button.delete-trigger.is-confirming {
  border-color: #f0b8b0;
  background: #fff7f5;
  color: #d92d20;
}

.item-actions .icon-button.text-delete-confirm {
  position: absolute;
  left: calc(100% + 7px);
  top: 50%;
  z-index: 5;
  width: auto;
  min-width: 52px;
  height: 30px;
  min-height: 30px;
  padding: 0 12px;
  border-color: #f0b8b0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(217, 45, 32, 0.15);
  color: #d92d20;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-6px, -50%) scale(0.96);
  animation: textDeleteConfirmIn 0.16s ease forwards;
}

.item-actions .icon-button.text-delete-confirm::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-left: 1px solid #f0b8b0;
  border-bottom: 1px solid #f0b8b0;
  background: #fff;
  transform: translateY(-50%) rotate(45deg);
}

.item-actions .icon-button.text-delete-confirm:hover {
  background: #fff7f5;
}

@keyframes textDeleteConfirmIn {
  to {
    opacity: 1;
    transform: translate(0, -50%) scale(1);
  }
}

.shortcuts-section {
  margin-top: 14px;
  padding-bottom: 14px;
}

.beian-footer {
  display: flex;
  justify-content: center;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.82rem;
}

.beian-footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  color: inherit;
  text-decoration: none;
}

.beian-footer a:hover {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.beian-footer img {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.side-fab {
  position: fixed;
  right: 18px;
  z-index: 24;
  display: grid;
  gap: 2px;
  place-items: center;
  width: 58px;
  min-height: 58px;
  padding: 7px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #31506f;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(24, 32, 51, 0.16);
  transform: translateY(-50%);
  transition: background-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.side-fab:hover {
  background: #f4f8fb;
  box-shadow: 0 8px 24px rgba(24, 32, 51, 0.2);
}

.side-fab.active {
  border-color: var(--blue);
  color: #0a609d;
  background: #eef7ff;
}

.side-fab span:first-child {
  font-size: 1.2rem;
  line-height: 1;
}

.side-fab span:last-child {
  font-size: 0.78rem;
}

.phrase-fab {
  top: calc(50% - 74px);
}

.transfer-fab {
  top: 50%;
}

.transfer-scrim,
.phrase-scrim {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: rgba(18, 24, 38, 0.28);
}

.transfer-panel,
.phrase-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 30;
  display: flex;
  width: min(380px, calc(100% - 18px));
  height: 100vh;
  flex-direction: column;
  border-left: 1px solid #d8dde6;
  background: #ffffff;
  box-shadow: -12px 0 32px rgba(24, 32, 51, 0.2);
  transform: translateX(calc(100% + 16px));
  transition: transform 0.2s ease;
}

.transfer-panel.open,
.phrase-panel.open {
  transform: translateX(0);
}

.transfer-header,
.phrase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 16px 13px;
  border-bottom: 1px solid var(--line);
}

.transfer-header p,
.phrase-header p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.phrase-group-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px;
  gap: 8px;
  padding: 14px 14px 8px;
}

.phrase-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 14px 10px;
}

.phrase-tab-wrap {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

.phrase-tab {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #d4dbe6;
  border-radius: 16px;
  background: #fff;
  color: #566172;
  cursor: pointer;
  font-weight: 700;
}

.phrase-tab.active {
  border-color: var(--blue);
  background: #eaf5ff;
  color: #095f9d;
}

.phrase-group-delete {
  width: 24px;
  height: 24px;
  min-height: 24px;
  margin-left: -5px;
  border: 1px solid #d4dbe6;
  border-radius: 50%;
  background: #fff;
  color: #7a8493;
  cursor: pointer;
  font-weight: 800;
  line-height: 1;
}

.phrase-group-delete:hover {
  background: #f2f4f7;
  color: var(--red);
}

.phrase-form {
  display: grid;
  gap: 8px;
  padding: 0 14px 12px;
}

.phrase-form textarea {
  min-height: 96px;
  max-height: 160px;
}

.phrase-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 14px 8px;
}

.phrase-list-heading span {
  color: var(--muted);
  font-size: 0.8rem;
}

.phrase-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 14px 18px;
}

.phrase-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.phrase-item:last-child {
  border-bottom: 0;
}

.phrase-text {
  margin: 0;
  max-height: 120px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #2f3744;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, "Microsoft YaHei", monospace;
  font-size: 0.9rem;
  cursor: pointer;
}

.phrase-text:focus-visible {
  outline: 3px solid rgba(8, 120, 216, 0.14);
  outline-offset: 2px;
}

.phrase-delete {
  min-width: 42px;
}

.phrase-empty {
  padding: 30px 12px;
  color: #9098a6;
  text-align: center;
}

.transfer-connection {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  margin: 14px;
  padding: 12px;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  background: #fbfcfe;
}

.transfer-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: #9aa4b2;
}

.transfer-dot.waiting {
  background: #ca8a04;
}

.transfer-dot.paired {
  background: var(--green);
}

.transfer-connection strong,
.transfer-connection span {
  display: block;
}

.transfer-connection strong {
  color: #2f3744;
  font-size: 0.92rem;
}

.transfer-connection span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.transfer-drop {
  position: relative;
  display: grid;
  min-height: 128px;
  margin: 0 14px;
  padding: 18px;
  place-items: center;
  border: 1.5px dashed #9fb1c6;
  border-radius: 8px;
  background: #f7fafc;
  color: #536172;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.transfer-drop:hover,
.transfer-drop.dragover {
  border-color: var(--blue);
  background: #eef7ff;
}

.transfer-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.transfer-drop-title,
.transfer-drop-hint {
  display: block;
}

.transfer-drop-title {
  color: #334155;
  font-size: 0.98rem;
  font-weight: 800;
}

.transfer-drop-hint {
  margin-top: 6px;
  color: #748094;
  font-size: 0.82rem;
}

.transfer-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 8px;
  padding: 12px 14px;
}

.transfer-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 12px 14px 0;
}

.transfer-tools label {
  display: grid;
  gap: 5px;
  color: #5a6372;
  font-size: 0.82rem;
  font-weight: 800;
}

.transfer-speed-test {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.transfer-speed-test .secondary-button {
  width: 100%;
}

.transfer-speed-test span {
  color: #7c8797;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.transfer-actions .primary-button,
.transfer-actions .ghost-button {
  width: 100%;
}

.transfer-files-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 14px 8px;
}

.transfer-files-heading span {
  color: var(--muted);
  font-size: 0.8rem;
}

.transfer-files-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.transfer-files-heading-actions .icon-button {
  width: 30px;
  height: 30px;
  min-height: 30px;
  font-size: 1.05rem;
}

.transfer-files-heading-actions .icon-button.active {
  border-color: rgba(8, 120, 216, 0.32);
  background: #eef6fd;
  color: var(--blue);
}

.transfer-file-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 14px 18px;
}

.transfer-file-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.transfer-file-item:last-child {
  border-bottom: 0;
}

.transfer-file-name {
  overflow: hidden;
  color: #2f3744;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transfer-file-meta {
  margin-top: 4px;
  color: #8590a0;
  font-size: 0.78rem;
}

.transfer-progress {
  width: min(100%, 260px);
  height: 5px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5eaf1;
}

.transfer-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 0.16s ease;
}

.transfer-file-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.transfer-file-actions .secondary-button {
  min-width: 62px;
}

.transfer-file-actions .ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.66;
}

.transfer-delete-button {
  border-color: #f0b7b7;
  color: var(--red);
}

.transfer-delete-button:hover {
  background: #fff5f5;
}

.transfer-stop-button {
  border-color: #f2c27c;
  color: #9a5b00;
}

.transfer-stop-button:hover {
  background: #fff8ed;
}

.transfer-empty {
  padding: 30px 12px;
  color: #9098a6;
  text-align: center;
}

.shortcut-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  padding: 14px 14px 0;
}

.shortcut-card {
  position: relative;
  display: flex;
  width: 76px;
  min-height: 82px;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: center;
}

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

.shortcut-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(24, 32, 51, 0.13);
}

.shortcut-icon.has-image {
  border: 1px solid #e2e7ef;
  background: #fff;
}

.shortcut-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.shortcut-name {
  display: block;
  width: 76px;
  overflow: hidden;
  color: #555b66;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shortcut-domain {
  display: none;
}

.shortcut-actions {
  position: absolute;
  top: -7px;
  right: 3px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.shortcut-card:hover .shortcut-actions,
.shortcut-card:focus-within .shortcut-actions {
  opacity: 1;
}

.shortcut-actions .icon-button {
  width: 22px;
  height: 22px;
  min-height: 22px;
  border-radius: 50%;
  background: #687180;
  color: #fff;
  font-size: 0.72rem;
  box-shadow: 0 2px 5px rgba(24, 32, 51, 0.18);
}

.shortcut-actions .icon-button:hover {
  background: #4d5664;
}

.shortcut-add {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  min-height: 56px;
  border: 2px dashed #adb5bd;
  border-radius: 12px;
  background: #eef0f3;
  color: #69727f;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.shortcut-add:hover {
  background: #e5e8ed;
  border-color: #818a96;
}

.shortcut-dialog,
.settings-dialog,
.manual-copy-dialog {
  width: min(400px, calc(100% - 28px));
  border: 0;
  border-radius: 12px;
  padding: 0;
  color: var(--text);
  box-shadow: 0 14px 44px rgba(24, 32, 51, 0.26);
}

.shortcut-dialog::backdrop,
.settings-dialog::backdrop,
.manual-copy-dialog::backdrop {
  background: rgba(0, 0, 0, 0.46);
}

.shortcut-form,
.settings-form,
.manual-copy-form {
  padding: 18px;
}

.shortcut-form label {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  color: #555b66;
  font-size: 0.9rem;
  font-weight: 700;
}

.shortcut-form label input {
  color: var(--text);
  font-weight: 400;
}

.manual-copy-hint {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.manual-copy-text {
  min-height: 160px;
  max-height: 46vh;
  margin-top: 12px;
}

.settings-placeholder {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 22px 8px 4px;
  color: var(--muted);
  text-align: center;
}

.settings-placeholder img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 3px 12px rgba(24, 32, 51, 0.14);
}

.settings-section {
  display: grid;
  gap: 12px;
  padding-top: 14px;
}

.settings-section p {
  color: var(--muted);
  font-size: 0.88rem;
}

.settings-section label {
  display: grid;
  gap: 6px;
  color: #555b66;
  font-size: 0.9rem;
  font-weight: 700;
}

.settings-password-form {
  display: grid;
  gap: 10px;
}

.settings-section small {
  color: #8b95a5;
  line-height: 1.4;
}

.settings-device {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  color: #667084;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.settings-device-list {
  display: grid;
  gap: 8px;
}

.settings-device-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  overflow-wrap: anywhere;
}

.settings-device-card strong {
  color: #394252;
  font-size: 0.9rem;
}

.settings-device-card span,
.settings-device-card small {
  color: #7e8796;
  font-size: 0.78rem;
  line-height: 1.4;
}

.settings-device-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 4px;
}

.settings-device-actions .secondary-button,
.settings-device-actions .ghost-button {
  width: 100%;
  min-height: 30px;
}

.settings-menu-button,
.settings-back-button {
  width: 100%;
}

.settings-back-button {
  margin-bottom: 2px;
}

.settings-error {
  min-height: 18px;
  color: var(--red);
  font-size: 0.82rem;
}

.settings-form .dialog-actions .primary-button {
  width: 100%;
}

.dialog-actions {
  margin-top: 18px;
}

.dialog-actions .primary-button,
.dialog-actions .ghost-button {
  width: 50%;
}

.manual-copy-form .dialog-actions .primary-button {
  width: 100%;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 20;
  min-width: 118px;
  max-width: min(420px, calc(100% - 32px));
  transform: translate(-50%, 12px);
  padding: 8px 14px;
  border-radius: 6px;
  background: #333846;
  color: #fff;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(24, 32, 51, 0.22);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

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

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

@media (hover: none) {
  .item-actions,
  .shortcut-actions {
    opacity: 1;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 20px, 700px);
    padding-top: 14px;
  }

  .transfer-fab {
    top: auto;
    right: 14px;
    bottom: 18px;
    transform: none;
  }

  .phrase-fab {
    top: auto;
    right: 14px;
    bottom: 88px;
    transform: none;
  }

  .transfer-panel,
  .phrase-panel {
    width: 100%;
  }

  .title-row {
    display: flex;
  }

  .toolbar input {
    width: min(120px, 34vw);
  }

  .messages-header,
  .shortcuts-header {
    padding: 11px 12px;
  }

  .text-list {
    padding: 0 10px;
  }

  .text-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .item-actions {
    flex-direction: column;
  }
}
