/* ==========================================================================
   dove · 飞鸽传书，阅后即焚
   主色调：青（主）/ 蓝 / 绿 / 黄
   ========================================================================== */

@font-face {
  font-family: 'myfont';
  src: url('/css/consolas.ttf') format('truetype');
  font-display: swap;
}

/* --------------------------------------------------------------------------
   主题变量
   -------------------------------------------------------------------------- */

:root {
  color-scheme: light;

  /* 品牌色 */
  --teal-300: #5eead4;
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --yellow-400: #fbbf24;
  --yellow-500: #f59e0b;

  /* 语义色 */
  --bg: #f0fbf9;
  --surface: rgba(255, 255, 255, 0.74);
  --surface-solid: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.5);
  --text: #082b29;
  --text-soft: #4c6f6c;
  --text-faint: #78938f;
  --line: rgba(13, 148, 136, 0.16);
  --line-strong: rgba(13, 148, 136, 0.36);
  --field: #fbfdfc;
  --paper-rule: rgba(13, 148, 136, 0.22);

  /* 渐变 */
  --grad-brand: linear-gradient(120deg, #0f766e 0%, #06b6d4 48%, #3b82f6 100%);
  --grad-brand-soft: linear-gradient(
    120deg,
    rgba(20, 184, 166, 0.16),
    rgba(6, 182, 212, 0.14) 48%,
    rgba(59, 130, 246, 0.14)
  );
  --grad-warm: linear-gradient(120deg, #22c55e, #f59e0b);
  --grad-ring: conic-gradient(
    from 180deg,
    #14b8a6,
    #06b6d4,
    #3b82f6,
    #22c55e,
    #f59e0b,
    #14b8a6
  );

  --shadow-card: 0 24px 60px -30px rgba(6, 95, 90, 0.45),
    0 4px 14px -8px rgba(6, 95, 90, 0.18);
  --shadow-btn: 0 12px 24px -12px rgba(13, 148, 136, 0.75);

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --font-sans: 'Inter', 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  --font-mono: Consolas, myfont, ui-monospace, 'SFMono-Regular', Menlo,
    monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html.dark {
  color-scheme: dark;

  --bg: #04100f;
  --surface: rgba(13, 35, 34, 0.66);
  --surface-solid: #0a1f1e;
  --surface-soft: rgba(13, 35, 34, 0.4);
  --text: #e6fffb;
  --text-soft: #a5c9c5;
  --text-faint: #6f918d;
  --line: rgba(94, 234, 212, 0.16);
  --line-strong: rgba(94, 234, 212, 0.4);
  --field: #0a201e;
  --paper-rule: rgba(94, 234, 212, 0.16);

  --shadow-card: 0 28px 70px -34px rgba(0, 0, 0, 0.85),
    0 4px 16px -10px rgba(0, 0, 0, 0.6);
  --shadow-btn: 0 14px 30px -14px rgba(45, 212, 191, 0.45);
}

/* --------------------------------------------------------------------------
   基础
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

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

::selection {
  background: rgba(20, 184, 166, 0.28);
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 3px;
}

/* 滚动条 */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}

/* --------------------------------------------------------------------------
   背景光晕
   -------------------------------------------------------------------------- */

.orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  display: block;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  animation: orb-float 22s var(--ease) infinite alternate;
}

.orb--teal {
  top: -16vmax;
  left: -10vmax;
  background: radial-gradient(circle, #2dd4bf, transparent 68%);
}

.orb--blue {
  top: 8vmax;
  right: -18vmax;
  background: radial-gradient(circle, #60a5fa, transparent 68%);
  animation-delay: -6s;
  animation-duration: 26s;
}

.orb--green {
  bottom: -22vmax;
  left: 12vmax;
  background: radial-gradient(circle, #4ade80, transparent 68%);
  opacity: 0.38;
  animation-delay: -11s;
  animation-duration: 30s;
}

.orb--yellow {
  bottom: -18vmax;
  right: 4vmax;
  background: radial-gradient(circle, #fbbf24, transparent 68%);
  opacity: 0.3;
  animation-delay: -16s;
  animation-duration: 24s;
}

html.dark .orb {
  opacity: 0.26;
}

html.dark .orb--green,
html.dark .orb--yellow {
  opacity: 0.18;
}

@keyframes orb-float {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(4vmax, 3vmax, 0) scale(1.12);
  }
}

/* --------------------------------------------------------------------------
   顶部进度条
   -------------------------------------------------------------------------- */

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.progress.is-active {
  opacity: 1;
}

.progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--grad-brand);
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.65);
  transition: transform 1.4s var(--ease);
}

/* --------------------------------------------------------------------------
   布局
   -------------------------------------------------------------------------- */

.shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 860px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 28px 24px 24px;
}

.head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 8px 4px 30px;
  animation: rise-in 0.6s var(--ease) both;
}

.logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  padding: 0;
  border: none;
  border-radius: 20px;
  background: var(--grad-brand);
  color: #f0fffd;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease,
    filter 0.3s ease;
}

.logo:hover {
  transform: translateY(-2px) rotate(-4deg);
  box-shadow: 0 18px 34px -14px rgba(13, 148, 136, 0.9);
  filter: brightness(1.06);
}

.logo:active {
  transform: translateY(0) scale(0.96);
}

.logo .iconfont {
  font-size: 34px;
  line-height: 1;
}

.brand {
  min-width: 0;
  flex: 1;
}

.title {
  margin: 0;
  font-size: clamp(20px, 3.4vw, 26px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html.dark .title {
  background-image: linear-gradient(120deg, #5eead4, #22d3ee 48%, #93c5fd);
}

.subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-soft);
  letter-spacing: 0.04em;
}

.theme-switch {
  flex: none;
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-card);
}

.theme-option {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease,
    box-shadow 0.2s ease, transform 0.2s var(--ease);
}

.theme-option svg {
  width: 17px;
  height: 17px;
}

.theme-option:hover {
  color: var(--teal-600);
  background: var(--surface-soft);
}

html.dark .theme-option:hover {
  color: var(--teal-300);
}

.theme-option[aria-pressed='true'] {
  color: #f0fffd;
  background: var(--grad-brand);
  box-shadow: 0 6px 14px -8px rgba(13, 148, 136, 0.9);
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 24px;
}

/* --------------------------------------------------------------------------
   卡片
   -------------------------------------------------------------------------- */

.card {
  position: relative;
  width: 100%;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: var(--shadow-card);
  animation: card-in 0.55s var(--ease) both;
  overflow: hidden;
}

/* 顶部渐变描边 */
.card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-brand);
  opacity: 0.85;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.badge {
  margin: 0;
  padding: 5px 14px;
  border: 1px solid rgba(20, 184, 166, 0.35);
  border-radius: 999px;
  background: var(--grad-brand-soft);
  color: var(--teal-700);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

html.dark .badge {
  color: var(--teal-300);
}

.badge--green {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

html.dark .badge--green {
  color: var(--green-400);
}

.badge--yellow {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

html.dark .badge--yellow {
  color: var(--yellow-400);
}

.hint {
  font-size: 13px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   写信
   -------------------------------------------------------------------------- */

textarea {
  --paper-line: 2em;
  --paper-pad-y: 0.9em;
  display: block;
  width: 100%;
  min-height: 360px;
  padding: var(--paper-pad-y) 1.25em 1.25em;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  background-color: var(--field);
  /* 第一层遮住最顶部的横线，第二层才是信纸横线 */
  background-image: linear-gradient(var(--field), var(--field)),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--paper-line) - 1px),
      var(--paper-rule) calc(var(--paper-line) - 1px),
      var(--paper-rule) var(--paper-line)
    );
  background-size: 100% 1em, 100% var(--paper-line);
  background-position: 0 0, 0 var(--paper-pad-y);
  background-repeat: no-repeat, repeat;
  background-attachment: local, local;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: var(--paper-line);
  resize: vertical;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease,
    background-color 0.25s ease;
}

textarea::placeholder {
  color: var(--text-faint);
  opacity: 0.85;
}

textarea:focus {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

/* 有效期选择 */
.ttl {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 0;
}

.ttl-label {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.ttl-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  position: relative;
  display: inline-flex;
}

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

.chip span {
  display: inline-block;
  padding: 6px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease,
    background-color 0.2s ease, box-shadow 0.2s ease;
}

.chip:hover span {
  border-color: var(--line-strong);
  color: var(--teal-600);
}

html.dark .chip:hover span {
  color: var(--teal-300);
}

.chip input:checked + span {
  border-color: var(--teal-500);
  background: rgba(20, 184, 166, 0.14);
  color: var(--teal-700);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

html.dark .chip input:checked + span {
  color: var(--teal-300);
}

.chip input:focus-visible + span {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   按钮与操作区
   -------------------------------------------------------------------------- */

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
}

.actions--end {
  justify-content: flex-end;
}

.secure {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-faint);
}

.secure svg {
  width: 16px;
  height: 16px;
  color: var(--teal-500);
}

.secure--warn {
  color: #b45309;
}

.secure--warn svg {
  color: var(--yellow-500);
}

html.dark .secure--warn {
  color: var(--yellow-400);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  user-select: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease,
    background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease,
    opacity 0.2s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--teal-500);
  color: var(--teal-600);
}

html.dark .btn:hover {
  color: var(--teal-300);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn--primary {
  border: none;
  background: var(--grad-brand);
  background-size: 160% 100%;
  color: #f0fffd;
  box-shadow: var(--shadow-btn);
}

.btn--primary:hover {
  color: #ffffff;
  background-position: 100% 0;
  box-shadow: 0 16px 32px -14px rgba(13, 148, 136, 0.85);
}

.btn--ghost {
  background: var(--surface-soft);
  color: var(--text-soft);
}

.btn--sm {
  padding: 9px 18px;
  font-size: 14px;
}

.btn[disabled] {
  cursor: progress;
  opacity: 0.6;
  transform: none;
}

.btn.is-loading span::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  vertical-align: -1px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --------------------------------------------------------------------------
   二维码
   -------------------------------------------------------------------------- */

.qr-wrap {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.qr-frame {
  position: relative;
  isolation: isolate;
  flex: none;
  padding: 12px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 40px -22px rgba(6, 95, 90, 0.6);
}

.qr-frame::after {
  content: '';
  position: absolute;
  inset: -3px;
  z-index: -1;
  border-radius: 25px;
  background: var(--grad-ring);
  filter: blur(8px);
  opacity: 0.45;
}

.qr-frame img {
  display: block;
  width: 220px;
  height: 220px;
  border-radius: 12px;
  user-select: none;
}

.qr-meta {
  flex: 1;
  min-width: 240px;
}

.qr-tip {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.link-box {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--field);
  transition: border-color 0.25s ease;
}

.link-box:focus-within {
  border-color: var(--teal-500);
}

.link-box input {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
}

.qr-expire {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--text-soft);
}

.qr-expire svg {
  flex: none;
  width: 15px;
  height: 15px;
  color: var(--teal-500);
}

.qr-warn {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 14px 0 0;
  font-size: 13px;
  color: #b45309;
}

html.dark .qr-warn {
  color: var(--yellow-400);
}

.qr-warn svg {
  flex: none;
  width: 16px;
  height: 16px;
}

/* --------------------------------------------------------------------------
   信封 / 读信
   -------------------------------------------------------------------------- */

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

.envelope {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18px 0 10px;
}

.envelope-art {
  position: relative;
  width: 190px;
  height: 128px;
  margin-bottom: 28px;
  border-radius: 16px;
  background: linear-gradient(150deg, #0f766e, #0891b2 55%, #3b82f6);
  box-shadow: 0 24px 44px -20px rgba(13, 148, 136, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  animation: float-soft 5s ease-in-out infinite;
}

.envelope-art::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px 16px 4px 4px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.32), transparent 70%);
  clip-path: polygon(0 0, 50% 62%, 100% 0);
}

.envelope-art::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  border-radius: 0 0 16px 16px;
  background: linear-gradient(0deg, rgba(4, 47, 46, 0.35), transparent);
}

.seal {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(140deg, #fbbf24, #f59e0b);
  color: #4a2c00;
  font-size: 26px;
  box-shadow: 0 8px 18px -6px rgba(180, 83, 9, 0.75),
    inset 0 0 0 3px rgba(255, 255, 255, 0.35);
  transform: translate(-50%, -50%);
}

@keyframes float-soft {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.envelope-title {
  margin: 0;
  font-size: clamp(19px, 3vw, 23px);
  font-weight: 700;
}

.envelope-sub {
  margin: 8px 0 24px;
  font-size: 14px;
  color: var(--text-soft);
}

.envelope-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.letter {
  animation: card-in 0.45s var(--ease) both;
}

.letter-text {
  margin: 0;
  padding: 22px;
  border: 1.5px solid var(--line);
  border-left: 4px solid var(--teal-500);
  border-radius: var(--radius-md);
  background: var(--field);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-height: 60vh;
  overflow: auto;
}

/* --------------------------------------------------------------------------
   页脚 / GitHub / Toast
   -------------------------------------------------------------------------- */

.foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 0 6px;
  text-align: center;
}

.foot-intro {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

.foot-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 12px;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease,
    background-color 0.2s ease;
}

.foot-link .iconfont {
  font-size: 15px;
}

.foot-link:hover {
  color: var(--teal-600);
  border-color: var(--line);
  background: var(--surface-soft);
}

html.dark .foot-link:hover {
  color: var(--teal-300);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 128px;
  z-index: 80;
  max-width: min(86vw, 420px);
  padding: 12px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-solid);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 20px 44px -20px rgba(6, 95, 90, 0.55);
  opacity: 0;
  transform: translate(-50%, 16px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s var(--ease);
}

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

.toast--success {
  border-color: rgba(34, 197, 94, 0.45);
  color: #15803d;
}

html.dark .toast--success {
  color: var(--green-400);
}

.toast--error {
  border-color: rgba(239, 68, 68, 0.45);
  color: #b91c1c;
}

html.dark .toast--error {
  color: #fca5a5;
}

/* --------------------------------------------------------------------------
   动画
   -------------------------------------------------------------------------- */

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .shell {
    padding: 18px 16px 16px;
  }

  .head {
    gap: 14px;
    padding-bottom: 22px;
  }

  .logo {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }

  .logo .iconfont {
    font-size: 28px;
  }

  .subtitle {
    display: none;
  }

  .title {
    font-size: 18px;
  }

  .theme-switch {
    padding: 3px;
  }

  .theme-option {
    width: 30px;
    height: 30px;
  }

  .theme-option svg {
    width: 16px;
    height: 16px;
  }

  .card {
    padding: 20px;
    border-radius: 20px;
  }

  textarea {
    --paper-pad-y: 0.8em;
    min-height: 280px;
    padding: var(--paper-pad-y) 1em 1em;
  }

  .actions {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 14px;
  }

  .actions--end {
    flex-direction: row;
    justify-content: stretch;
  }

  .actions--end .btn {
    flex: 1;
  }

  .btn {
    width: 100%;
  }

  .secure {
    justify-content: center;
  }

  .qr-wrap {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .qr-frame img {
    width: min(60vw, 220px);
    height: min(60vw, 220px);
  }

  .qr-meta {
    width: 100%;
    min-width: 0;
  }

  .qr-warn {
    justify-content: center;
  }

  .qr-expire {
    justify-content: center;
  }

  .toast {
    bottom: 118px;
  }
}

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