:root {
  --bg: #eef0f4;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --surface-soft: rgba(247, 248, 251, 0.72);
  --text: #17181c;
  --muted: #727b89;
  --line: rgba(112, 122, 137, 0.18);
  --blue: #087ff5;
  --blue-dark: #0066cc;
  --green: #30d158;
  --red: #ff453a;
  --shadow: 0 28px 80px rgba(27, 34, 47, 0.12), 0 3px 12px rgba(27, 34, 47, 0.04);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background: #eef0f4;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
::selection { color: #fff; background: rgba(8,127,245,.72); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: rgba(110,120,135,.28); background-clip: padding-box; }
button, input, textarea { font: inherit; }
button { border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .22s cubic-bezier(.22,1,.36,1), background-color .22s ease, border-color .22s ease, box-shadow .22s ease, color .22s ease, opacity .22s ease; }
button:hover:not(:disabled) { transform: translateY(-1px); }
button:active:not(:disabled) { transform: scale(.96) translateY(0); transition-duration: .08s; }
button:focus-visible { outline: 0; box-shadow: 0 0 0 4px rgba(8,127,245,.16); }
@keyframes ios-rise { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes ios-sheet { from { opacity: 0; transform: translateY(28px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.hidden { display: none !important; }

.center-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.launch-view { display: grid; justify-items: center; gap: 10px; color: var(--text); animation: ios-rise .5s cubic-bezier(.22,1,.36,1) both; }
.launch-view .logo { margin-bottom: 8px; }
.launch-view strong { font-size: 22px; }
.launch-view span { color: var(--muted); font-size: 12px; }
.launch-spinner { width: 20px; height: 20px; margin-top: 7px; border: 2px solid rgba(8,127,245,.16); border-top-color: var(--blue); border-radius: 50%; animation: launch-spin .8s linear infinite; }
@keyframes launch-spin { to { transform: rotate(360deg); } }
.login-card {
  position: relative;
  width: min(430px, 100%);
  padding: 36px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 30px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.98);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  backdrop-filter: blur(28px) saturate(150%);
}
.logo {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: #087ff5;
  box-shadow: 0 12px 28px rgba(8,127,245,.24), inset 0 1px 0 rgba(255,255,255,.28);
  font-size: 24px;
  font-weight: 700;
}
.eyebrow, .section-label { margin: 0; color: var(--blue-dark); font-size: 11px; font-weight: 700; letter-spacing: 0; }
.login-card .eyebrow { margin-top: 28px; }
.login-card h1 { margin: 7px 0 8px; font-size: 34px; line-height: 1.1; letter-spacing: 0; }
.intro { margin: 0 0 24px; color: var(--muted); line-height: 1.55; }
.field { display: block; margin-top: 14px; color: #4e5663; font-size: 13px; }
.field input {
  width: 100%;
  margin-top: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  color: var(--text);
  background: rgba(255,255,255,.76);
}
.field input:focus { border-color: rgba(8,127,245,.6); box-shadow: 0 0 0 4px rgba(8,127,245,.1); }
.primary, .secondary, .quiet { min-height: 42px; border-radius: 13px; padding: 10px 16px; font-weight: 600; }
.primary { color: #fff; background: var(--blue); box-shadow: 0 8px 18px rgba(8,127,245,.2); }
.secondary { color: #333b47; background: rgba(229,232,237,.82); }
.quiet { color: var(--blue-dark); background: transparent; }
.compact { min-height: 36px; padding: 8px 13px; }
.support-button { position: relative; min-height: 36px; padding: 8px 14px 8px 27px; border: 1px solid rgba(151,205,247,.62); border-radius: 999px; color: #47657d; background: rgba(239,248,255,.74); box-shadow: 0 5px 14px rgba(30,126,190,.06), inset 0 1px 0 rgba(255,255,255,.96); font-size: 12px; font-weight: 650; }
.support-button::before { content: "❄"; position: absolute; left: 11px; color: #6ca8d3; font-size: 11px; }
.support-button:hover { background: rgba(226,243,255,.9); border-color: rgba(98,174,236,.78); }
.full { width: 100%; margin-top: 18px; }
.auth-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.help { margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

.app { width: min(1160px, calc(100% - 44px)); margin: 0 auto; padding: 22px 0 52px; }
.app:not(.hidden) .topbar { animation: ios-rise .52s cubic-bezier(.22,1,.36,1) both; }
.app:not(.hidden) .hero { animation: ios-rise .58s .04s cubic-bezier(.22,1,.36,1) both; }
.app:not(.hidden) .panel { animation: ios-rise .62s .1s cubic-bezier(.22,1,.36,1) both; }
.topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 60px;
  padding: 10px 14px;
  background: rgba(255,255,255,.66);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 19px;
  box-shadow: 0 18px 44px rgba(27,34,47,.09), inset 0 1px 0 rgba(255,255,255,.98);
  -webkit-backdrop-filter: blur(30px) saturate(155%);
  backdrop-filter: blur(30px) saturate(155%);
}
.brand { display: flex; align-items: center; gap: 11px; font-size: 21px; font-weight: 700; }
.brand-by, .signature { color: #9ba4b0; font-size: 10px; font-weight: 600; }
.brand .logo { width: 36px; height: 36px; border-radius: 11px; font-size: 16px; }
.user-menu { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #ff8a3d; font-weight: 700; }

.hero { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 0 2px 30px; }
.hero h1 { margin: 6px 0 7px; font-size: 48px; line-height: 1; letter-spacing: 0; }
.hero p:last-child { margin: 0; color: var(--muted); font-size: 16px; }
.status { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.88); border-radius: 999px; background: rgba(255,255,255,.68); box-shadow: 0 12px 28px rgba(27,34,47,.07), inset 0 1px 0 rgba(255,255,255,.96); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(48,209,88,.13); }

.error-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; padding: 16px 18px; border: 1px solid rgba(255,69,58,.2); border-radius: 18px; background: rgba(255,241,240,.85); color: #9e302a; }
.error-card strong { display: block; margin-bottom: 4px; }
.error-card p { margin: 0; font-size: 13px; }

.layout { display: grid; grid-template-columns: minmax(350px,.9fr) minmax(0,1.1fr); gap: 24px; align-items: start; }
.panel {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 28px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.98);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  backdrop-filter: blur(28px) saturate(150%);
}
.panel::before, .login-card::before, .support-sheet::before, .preview-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: rgba(255,255,255,.95);
  pointer-events: none;
}
.panel-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.panel-title { margin: 5px 0 0; font-size: 23px; line-height: 1.1; letter-spacing: 0; }
.panel-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.devices { display: grid; gap: 8px; margin-top: 16px; }
.device { position: relative; width: 100%; min-height: 70px; display: flex; align-items: center; gap: 8px; padding: 7px; text-align: left; color: var(--text); background: rgba(255,255,255,.56); border: 1px solid rgba(255,255,255,.8); border-radius: 17px; box-shadow: 0 8px 22px rgba(27,34,47,.045), inset 0 1px 0 rgba(255,255,255,.9); transition: background .18s, border-color .18s, transform .18s; }
.device:not(:disabled):hover { transform: translateY(-1px); background: rgba(255,255,255,.76); border-color: rgba(157,205,247,.72); }
.device.active { background: rgba(232,244,255,.86); border-color: rgba(133,196,249,.82); box-shadow: 0 10px 26px rgba(0,102,204,.1), inset 0 1px 0 rgba(255,255,255,.96); }
.device.current { cursor: default; }
.device-main { min-width: 0; flex: 1; display: flex; align-items: center; gap: 13px; padding: 6px; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.device-main:disabled { cursor: default; }
.device-main:hover:not(:disabled) { transform: translateX(2px); }
.device-main > span:last-child { min-width: 0; display: block; }
.device-icon { position: relative; flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: var(--blue-dark); background: rgba(255,255,255,.88); box-shadow: 0 4px 12px rgba(27,34,47,.06); font-size: 20px; }
.activity-dot { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border: 2px solid rgba(255,255,255,.96); border-radius: 50%; box-shadow: 0 2px 7px rgba(27,34,47,.16); }
.activity-dot.online { background: var(--green); }
.activity-dot.offline { background: #a5acb7; }
.device.offline:not(.current) .device-icon { color: #717b89; background: rgba(241,243,246,.88); }
.device-name { display: block; overflow: hidden; font-size: 15px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.device-meta { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.device-current-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; }
.selected-mark { margin-right: 8px; color: var(--blue); font-size: 11px; font-weight: 700; }
.device-rename { min-height: 34px; padding: 7px 10px; border-radius: 10px; color: var(--blue-dark); background: rgba(8,127,245,.08); font-size: 11px; font-weight: 650; }
.device-rename:hover { color: #fff; background: var(--blue); }
.device-remove { flex: 0 0 auto; min-height: 34px; padding: 7px 10px; border-radius: 10px; color: #d13a32; background: rgba(255,69,58,.09); font-size: 11px; font-weight: 600; }
.device-remove:hover { color: #fff; background: var(--red); }

.usage { margin-top: 16px; padding: 14px; background: var(--surface-soft); border: 1px solid rgba(255,255,255,.78); border-radius: 16px; box-shadow: inset 0 1px 0 rgba(255,255,255,.9); }
.usage-head { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.usage-track { height: 5px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: rgba(117,128,145,.16); }
.usage-bar { width: 0; height: 100%; border-radius: 999px; background: var(--blue); transition: width .3s; }

.composer { position: relative; margin-top: 16px; padding: 15px; background: rgba(255,255,255,.74); border: 1px solid rgba(255,255,255,.94); border-radius: 20px; box-shadow: 0 18px 38px rgba(27,34,47,.09), inset 0 1px 0 rgba(255,255,255,.98); -webkit-backdrop-filter: blur(24px) saturate(145%); backdrop-filter: blur(24px) saturate(145%); }
.composer:focus-within { border-color: rgba(94,174,249,.8); box-shadow: 0 18px 38px rgba(27,34,47,.09), 0 0 0 4px rgba(8,127,245,.09), inset 0 1px 0 rgba(255,255,255,.98); }
textarea { width: 100%; min-height: 96px; resize: none; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 16px; line-height: 1.5; }
textarea::placeholder { color: #9aa2ae; }
textarea:focus::placeholder { color: #b9c0ca; }
.send-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.hint { min-width: 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; transition: color .22s ease; }
.hint.offline { color: #9a6500; }
.composer-buttons { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.attach, .send-button { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; }
.attach { color: #3d4552; background: rgba(231,234,239,.9); font-size: 21px; cursor: pointer; }
.attach input { display: none; }
.send-button { color: #fff; background: var(--blue); box-shadow: 0 8px 18px rgba(8,127,245,.24); font-size: 23px; font-weight: 700; }
.send-button:disabled { opacity: .34; cursor: not-allowed; box-shadow: none; }
.send-button:hover:not(:disabled) { box-shadow: 0 10px 24px rgba(8,127,245,.32); }
.pending { display: flex; align-items: center; gap: 10px; margin: 8px 0; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.78); }
.pending-preview { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; overflow: hidden; border-radius: 11px; color: var(--blue-dark); background: #eaf4ff; }
.pending-preview img, .pending-preview video { width: 100%; height: 100%; object-fit: cover; }
.pending-info { min-width: 0; flex: 1; }
.pending-name { overflow: hidden; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.pending-meta { margin-top: 3px; color: var(--muted); font-size: 11px; }
.remove { width: 28px; height: 28px; border-radius: 50%; color: #606874; background: #e7e9ed; }
.upload-status { margin-top: 7px; color: var(--blue-dark); font-size: 11px; }

.history-head { align-items: start; }
.filters { width: fit-content; max-width: 100%; display: flex; gap: 2px; margin-top: 16px; padding: 3px; overflow-x: auto; border-radius: 999px; background: rgba(224,227,232,.78); scrollbar-width: none; }
.filters button { min-height: 32px; padding: 7px 13px; border-radius: 999px; color: var(--muted); background: transparent; font-size: 12px; white-space: nowrap; }
.filters button.active { color: var(--text); background: #fff; box-shadow: 0 1px 4px rgba(27,34,47,.12); }
.history { display: flex; flex-direction: column; gap: 9px; margin-top: 15px; }
.history-item { position: relative; padding: 14px; background: rgba(255,255,255,.56); border: 1px solid rgba(255,255,255,.8); border-radius: 17px; box-shadow: 0 8px 22px rgba(27,34,47,.045), inset 0 1px 0 rgba(255,255,255,.9); transition: background .22s, border-color .22s, box-shadow .22s, transform .22s; }
.history-item:hover { background: rgba(255,255,255,.76); border-color: rgba(194,216,238,.92); }
.history-item.unread { background: rgba(235,246,255,.82); border-color: rgba(100,180,247,.58); box-shadow: 0 12px 28px rgba(8,127,245,.09), inset 0 1px 0 rgba(255,255,255,.96); animation: ios-rise .42s cubic-bezier(.22,1,.36,1) both; }
.message-row { display: flex; align-items: center; gap: 11px; }
.file-icon { flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--blue-dark); background: #eaf4ff; font-weight: 650; }
.file-info { min-width: 0; flex: 1; }
.file-name { overflow: hidden; color: #1c2430; font-size: 14px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.file-time, .direction { color: var(--muted); font-size: 11px; }
.direction { display: inline-flex; align-items: center; gap: 6px; }
.unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgba(8,127,245,.1); }
.file-time { margin-top: 4px; }
.message-actions { display: flex; justify-content: flex-end; gap: 5px; margin-top: 9px; }
.message-actions button { min-height: 32px; padding: 6px 11px; border-radius: 999px; color: var(--blue-dark); background: rgba(234,244,255,.9); font-size: 12px; }
.message-actions button:hover { color: #fff; background: var(--blue); }
.image-preview { width: 100%; height: 210px; margin-bottom: 11px; padding: 0; overflow: hidden; border-radius: 13px; color: var(--muted); background: #e7e9ed; }
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.empty { padding: 58px 8px; color: #8992a0; text-align: center; font-size: 13px; line-height: 1.7; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 50; padding: 12px 18px; border-radius: 999px; color: #fff; background: rgba(24,25,29,.88); box-shadow: 0 12px 34px rgba(0,0,0,.22); opacity: 0; pointer-events: none; transform: translate(-50%,20px); transition: opacity .22s, transform .22s; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.toast.receive { padding-left: 37px; background: rgba(20,42,65,.9); }
.toast.receive::before { content: "↓"; position: absolute; left: 15px; top: 50%; width: 15px; height: 15px; display: grid; place-items: center; border-radius: 50%; color: #123250; background: #d8efff; font-size: 10px; font-weight: 800; transform: translateY(-50%); }
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 24px; background: rgba(13,16,22,.48); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.preview-card { position: relative; width: min(900px,100%); padding: 14px; border: 1px solid rgba(255,255,255,.88); border-radius: 26px; background: rgba(255,255,255,.78); box-shadow: 0 34px 100px rgba(0,0,0,.3); -webkit-backdrop-filter: blur(28px); backdrop-filter: blur(28px); }
.modal:not(.hidden) .preview-card { animation: ios-sheet .4s cubic-bezier(.22,1,.36,1) both; }
.preview-card img { display: block; width: 100%; max-height: 75vh; object-fit: contain; border-radius: 15px; }
.preview-title { padding: 10px 44px 2px 4px; font-size: 14px; font-weight: 650; }
.close { position: absolute; top: 22px; right: 22px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; color: #fff; background: rgba(24,25,29,.7); font-size: 18px; }
.device-modal { position: fixed; inset: 0; z-index: 46; display: grid; place-items: end center; padding: 18px; background: rgba(13,16,22,.36); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.rename-sheet { position: relative; width: min(420px,100%); padding: 18px 24px 24px; border: 1px solid rgba(255,255,255,.92); border-radius: 30px; background: rgba(255,255,255,.82); box-shadow: 0 30px 90px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.98); -webkit-backdrop-filter: blur(30px) saturate(150%); backdrop-filter: blur(30px) saturate(150%); }
.device-modal:not(.hidden) .rename-sheet { animation: ios-sheet .4s cubic-bezier(.22,1,.36,1) both; }
.rename-handle { width: 38px; height: 5px; margin: 0 auto 22px; border-radius: 999px; background: rgba(105,113,125,.25); }
.rename-sheet h2 { margin: 7px 0 6px; font-size: 26px; }
.rename-copy { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.rename-field { display: block; margin-top: 20px; padding: 10px 14px 12px; border: 1px solid rgba(255,255,255,.92); border-radius: 16px; background: rgba(247,248,251,.78); box-shadow: inset 0 1px 0 rgba(255,255,255,.98); }
.rename-field span { display: block; color: var(--muted); font-size: 11px; }
.rename-field input { width: 100%; margin-top: 6px; padding: 0; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 17px; font-weight: 600; }
.rename-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.confirm-sheet { position: relative; width: min(390px,100%); padding: 18px 24px 24px; border: 1px solid rgba(255,255,255,.92); border-radius: 30px; background: rgba(255,255,255,.84); box-shadow: 0 30px 90px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.98); text-align: center; -webkit-backdrop-filter: blur(30px) saturate(150%); backdrop-filter: blur(30px) saturate(150%); }
.device-modal:not(.hidden) .confirm-sheet { animation: ios-sheet .4s cubic-bezier(.22,1,.36,1) both; }
.confirm-symbol { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 15px; color: #c9362e; background: rgba(255,69,58,.1); box-shadow: inset 0 1px 0 rgba(255,255,255,.9); font-size: 22px; font-weight: 750; }
.confirm-sheet h2 { margin: 0; font-size: 23px; }
.confirm-sheet p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.destructive-action { min-height: 42px; padding: 10px 16px; border-radius: 13px; color: #fff; background: var(--red); box-shadow: 0 8px 18px rgba(255,69,58,.2); font-weight: 650; }
.destructive-action:hover { background: #e83b32; box-shadow: 0 10px 22px rgba(255,69,58,.28); }
.support-modal { position: fixed; inset: 0; z-index: 45; display: grid; place-items: end center; padding: 18px; background: rgba(13,16,22,.36); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.support-sheet { position: relative; width: min(390px,100%); padding: 30px 26px 24px; border: 1px solid rgba(255,255,255,.92); border-radius: 30px; background: rgba(255,255,255,.8); box-shadow: 0 30px 90px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.98); text-align: center; -webkit-backdrop-filter: blur(30px) saturate(150%); backdrop-filter: blur(30px) saturate(150%); }
.support-modal:not(.hidden) .support-sheet { animation: ios-sheet .4s cubic-bezier(.22,1,.36,1) both; }
.support-close { top: 18px; right: 18px; color: #5f6773; background: rgba(225,228,233,.85); }
.support-icon { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 17px; color: #5d91b6; background: #e9f5ff; box-shadow: 0 10px 24px rgba(30,126,190,.12), inset 0 1px 0 rgba(255,255,255,.95); font-size: 23px; }
.support-sheet h2 { margin: 8px 0 7px; font-size: 25px; }
.support-copy { margin: 0; color: var(--muted); font-size: 13px; }
.support-tabs { display: flex; gap: 3px; width: fit-content; margin: 22px auto 16px; padding: 3px; border-radius: 999px; background: rgba(224,227,232,.82); }
.support-tabs button { min-width: 90px; min-height: 34px; padding: 7px 13px; border-radius: 999px; color: var(--muted); background: transparent; font-size: 12px; }
.support-tabs button.active { color: var(--text); background: #fff; box-shadow: 0 1px 4px rgba(27,34,47,.12); }
.support-qr { width: 206px; height: 206px; display: grid; place-items: center; margin: 0 auto; border-radius: 20px; background: #f2f3f5; box-shadow: inset 0 0 0 1px rgba(112,122,137,.12); }
.support-qr-image { width: 100%; height: 100%; padding: 10px; object-fit: contain; border-radius: 20px; background: #fff; }
.qr-placeholder { display: grid; gap: 8px; padding: 20px; color: #7b8492; }
.qr-placeholder span { font-size: 52px; line-height: 1; }
.qr-placeholder strong { color: #4d5663; font-size: 13px; }
.qr-placeholder small { font-size: 10px; line-height: 1.5; }
.support-later { width: 100%; margin-top: 18px; }

@media (max-width: 820px) {
  .app { width: calc(100% - 20px); padding: 9px 0 calc(30px + env(safe-area-inset-bottom)); }
  .topbar { top: 7px; margin-bottom: 36px; padding: 8px 10px; border-radius: 17px; }
  .brand { font-size: 19px; }
  .brand .logo { width: 34px; height: 34px; }
  .user-menu #userEmail { display: none; }
  .support-button { padding: 8px 10px; }
  .avatar { width: 32px; height: 32px; }
  .hero { display: block; margin: 0 4px 23px; }
  .hero h1 { font-size: 38px; }
  .hero p:last-child { max-width: 290px; font-size: 14px; line-height: 1.45; }
  .status { display: inline-flex; margin-top: 14px; padding: 9px 13px; font-size: 12px; }
  .layout { grid-template-columns: 1fr; gap: 16px; }
  .panel { padding: 17px; border-radius: 24px; box-shadow: 0 20px 52px rgba(27,34,47,.09), inset 0 1px 0 rgba(255,255,255,.98); }
  .panel-title { font-size: 21px; }
  .device { min-height: 66px; padding: 12px; }
  .device-current-actions { gap: 2px; }
  .selected-mark { display: none; }
  .usage { margin-top: 14px; padding: 12px; }
  .composer { position: sticky; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 10; margin-top: 13px; padding: 12px; border-radius: 18px; box-shadow: 0 20px 46px rgba(27,34,47,.16), inset 0 1px 0 rgba(255,255,255,.98); }
  textarea { min-height: 72px; }
  .history-panel { min-height: 360px; }
  .history-head { align-items: center; }
  .history-item { padding: 13px; }
  .direction { display: none; }
  .image-preview { height: 180px; }
  .modal { padding: 12px; align-items: end; }
  .preview-card { border-radius: 24px 24px 18px 18px; }
  .support-modal { padding: 10px; }
  .support-sheet { padding: 27px 20px 20px; border-radius: 27px; }
  .device-modal { padding: 10px; }
  .rename-sheet { padding: 14px 18px 18px; border-radius: 27px; }
  .confirm-sheet { padding: 14px 18px 18px; border-radius: 27px; }
}

@media (hover: none) {
  button:hover:not(:disabled), .device-main:hover:not(:disabled) { transform: none; }
  button:active:not(:disabled) { transform: scale(.95); }
}

@media (max-width: 380px) {
  .app { width: calc(100% - 16px); }
  .topbar { margin-bottom: 30px; }
  .hero h1 { font-size: 34px; }
  .panel { padding: 14px; }
  .filters button { padding-left: 11px; padding-right: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
