:root {
  color-scheme: light;
  --page: #edf5fd;
  --paper: #fcfeff;
  --field: #f3f8fe;
  --ink: #172f4d;
  --muted: #4c637c;
  --line: #d3e3f2;
  --blue: #245fb6;
  --blue-deep: #19498f;
  --blue-wash: #eaf4ff;
  --teal: #205b66;
  --teal-wash: #e5f3f7;
  --shadow: 0 17px 36px -26px #3e76ad80, 0 4px 12px #416d9d13;
  --sans: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-width: 280px;
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(ellipse at 87% 0%, #d9eaff 0%, transparent 55%),
    linear-gradient(158deg, #f9fcff, var(--page));
  font: 16px/1.55 var(--sans);
}

.site-header { background: #fcfeffeb; border-bottom: 1px solid var(--line); }
.mast, main {
  width: min(1184px, 100%);
  margin-inline: auto;
  padding-inline: max(24px, env(safe-area-inset-left)) max(24px, env(safe-area-inset-right));
}

.mast {
  min-height: 65px;
  padding-top: max(9px, env(safe-area-inset-top));
  padding-bottom: 9px;
  display: flex;
  align-items: center;
  gap: 17px;
}

.brand { display: flex; align-items: center; gap: 9px; white-space: nowrap; font-size: 16px; }
.brand-icon {
  display: grid;
  place-items: center;
  width: 35px;
  aspect-ratio: 1;
  border-radius: 10px;
  box-shadow: 0 3px 8px #2359a044, inset 0 1px 0 #ffffff5c;
  background: linear-gradient(143deg, #3979c9, var(--blue-deep));
  color: #fff;
  font: bold 20px/1 var(--serif);
}
.mast-label { border-left: 1px solid var(--line); padding-left: 17px; font-size: 13px; color: var(--muted); }
.mast button { margin-left: auto; white-space: nowrap; }
main { padding-top: 28px; padding-bottom: max(32px, env(safe-area-inset-bottom)); }

.hero, .welcome {
  position: relative;
  border: 1px solid #c7dff4;
  overflow: hidden;
  background: radial-gradient(ellipse at 74% 16%, #fafeff 0%, transparent 51%),
    linear-gradient(114deg, #fcfeff 0%, #e5f2ff 55%, #c5dff9 100%);
  isolation: isolate;
}
.hero::before, .welcome::before {
  position: absolute;
  content: "";
  inset: 0;
  background: radial-gradient(#3477ad34 0.6px, transparent 0.85px) 0 0 / 8px 8px;
  mask-image: linear-gradient(98deg, transparent 20%, #000 83%);
  z-index: -1;
}

.hero {
  min-height: 187px;
  display: flex;
  align-items: center;
  padding: 27px 40px;
  margin-bottom: 22px;
  border-radius: 25px;
  box-shadow: inset 0 1px #fff, var(--shadow);
}
.hero h1, .welcome-title {
  margin: 0;
  font: 700 clamp(29px, 4.2vw, 51px)/1.16 var(--serif);
  letter-spacing: .035em;
}
.hero h1 { max-width: 59%; }
.hero img {
  position: absolute;
  width: min(270px, 42%);
  height: 112%;
  right: 8%;
  bottom: -6%;
  object-fit: contain;
}
.workspace { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 22px; align-items: start; }
.sidebar { display: grid; gap: 16px; min-width: 0; }
.card, .login-panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(153deg, #fff 8%, var(--paper) 66%, #f4f9ff 100%);
  box-shadow: inset 0 1px #fff, var(--shadow);
}
.publish { padding: 25px 27px 27px; }
.card-heading, .field-heading, .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-heading { flex-wrap: wrap; }
.card-heading h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}
.publish h2 { font-size: 21px; }
.section-icon { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto; border-radius: 10px; }
.icon-note { background: var(--blue-wash); color: var(--blue); }
.icon-note::before {
  content: ""; width: 12px; height: 14px; border: 1.6px solid currentColor; border-radius: 2.5px;
}
.icon-note::after { content: ""; position: absolute; width: 6px; height: 1.5px; background: currentColor; box-shadow: 0 3.5px currentColor; top: 13px; }
.icon-screen { background: var(--teal-wash); color: var(--teal); }
.icon-screen::before { content: ""; width: 15px; height: 10px; border: 1.6px solid currentColor; border-radius: 2.5px; transform: translateY(-2px); }
.icon-screen::after { content: ""; position: absolute; width: 8px; height: 1.5px; background: currentColor; bottom: 8px; }
.icon-clock { background: #edf2ff; color: #455c9a; }
.icon-clock::before { content: ""; width: 14px; height: 14px; border: 1.6px solid currentColor; border-radius: 50%; }
.icon-clock::after { content: ""; position: absolute; width: 4px; height: 5px; border-left: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; left: 15px; top: 11px; }

form { display: grid; gap: 15px; margin-top: 20px; }
.field { display: grid; gap: 6px; min-width: 0; }
label { font-size: 14px; font-weight: 650; }
.field-note { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.field-heading { flex-wrap: wrap; }
input, textarea, select, button { font: inherit; border: 1px solid transparent; }
input, textarea, select {
  width: 100%;
  min-height: 45px;
  padding: 10px 13px;
  border: 1px solid #b4cbe4;
  border-radius: 11px;
  background: var(--field);
  color: var(--ink);
}
input::placeholder, textarea::placeholder { color: #5b7089; }
textarea { min-height: 112px; resize: vertical; line-height: 1.6; }
input:hover, textarea:hover, select:hover { border-color: #779ec8; }
.publish-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.63fr); align-items: end; gap: 12px; }
button {
  min-height: 42px;
  padding: 8px 13px;
  border-radius: 10px;
  color: white;
  background: linear-gradient(112deg, #2d6bca, var(--blue-deep));
  font-weight: 650;
  cursor: pointer;
}
button:hover { background: linear-gradient(112deg, #225ab0, #173e80); }
button:disabled { opacity: .7; cursor: not-allowed; }
form button { min-height: 47px; box-shadow: 0 4px 11px #285ea44c, inset 0 1px #ffffff33; }
#send { display: inline-flex; gap: 9px; align-items: center; justify-content: center; }
.send-icon { width: 17px; height: 17px; background: currentColor; clip-path: polygon(2% 44%, 98% 4%, 76% 95%, 48% 64%, 77% 26%, 39% 56%); flex: 0 0 auto; }
button.secondary, button.quiet { font-size: 13px; }
button.secondary { background: var(--blue-wash); color: var(--blue-deep); border-color: #c6dcf4; }
button.secondary:hover { background: #dcecff; }
button.quiet { color: var(--muted); background: #f3f8fe; border-color: var(--line); }
button.quiet:hover { background: #e5f0fd; color: var(--ink); }
:focus-visible { outline: 3px solid #3273b5; outline-offset: 3px; }

.pill, .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 20px;
  padding: 4px 9px;
  background: var(--teal-wash);
  color: var(--teal);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.pill:empty { visibility: hidden; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.offline, .expired { color: #4c6075; background: #edf2f7; }
.waiting { color: var(--blue-deep); background: var(--blue-wash); }
ul { list-style: none; margin: 13px 0 0; padding: 0; }
li {
  border-top: 1px solid var(--line);
  padding: 11px 0;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
li:last-child { padding-bottom: 0; }
li.empty { color: var(--muted); font-size: 14px; }
li .row { margin-top: 6px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
li .row button { min-height: 38px; }
.feedback, .code, .network-status {
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--blue-wash);
  color: var(--blue-deep);
  overflow-wrap: anywhere;
}
.feedback { position: fixed; z-index: 1; right: max(20px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); width: min(430px, calc(100% - 40px)); margin: 0; border: 1px solid currentColor; box-shadow: var(--shadow); pointer-events: none; }
.feedback.error, .network-status { color: #82433b; background: #fff0eb; }
.network-status { margin: 0 0 14px; }
.code { font-size: 14px; font-variant-numeric: tabular-nums; font-weight: 650; margin: 11px 0 0; }
.install { margin: 0 0 14px; }
.install p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }

.login {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  align-items: stretch;
  max-width: 905px;
  margin: clamp(10px, 5vh, 48px) auto 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 23px 50px -29px #376aa990, 0 6px 18px #5096d512;
}
.welcome {
  min-height: 390px;
  display: grid;
  justify-items: center;
  align-content: center;
  padding: 27px 22px 13px;
  border: 0;
}
.welcome-title { font-size: clamp(30px, 4vw, 44px); text-align: center; }
.welcome img { object-fit: contain; width: min(300px, 100%); height: 255px; margin-top: 5px; }
.login-panel { align-content: center; padding: clamp(24px, 5vw, 50px); border: 0; border-radius: 0; box-shadow: none; }
.login-panel h1 { margin: 0; font-size: 27px; }
.login-panel p { margin: 6px 0 0; font-size: 14px; }
.login-panel form { margin-top: 24px; gap: 18px; }
.login-panel input { padding-block: 13px; }

@media (max-width: 805px) {
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .hero { min-height: 148px; padding: 23px 26px; margin-bottom: 15px; }
  .hero img { right: 5%; }
  .welcome { min-height: 330px; }
  .welcome img { height: 212px; }
}

@media (max-width: 560px) {
  .mast, main { padding-inline: max(14px, env(safe-area-inset-left)) max(14px, env(safe-area-inset-right)); }
  .mast { min-height: 57px; gap: 9px; }
  .mast-label { padding-left: 9px; font-size: 12px; }
  .mast .quiet { min-height: 40px; padding-inline: 8px; }
  main { padding-top: 14px; }
  .hero { min-height: 111px; border-radius: 18px; padding: 16px 15px; }
  .hero h1 { font-size: clamp(23px, 6.5vw, 34px); max-width: 66%; }
  .hero img { right: 2%; width: 40%; }
  .card { border-radius: 17px; padding: 15px; }
  .sidebar { grid-template-columns: 1fr; }
  .publish h2 { font-size: 19px; }
  .publish form { gap: 11px; margin-top: 14px; }
  .publish textarea { min-height: 96px; }
  .publish-actions { grid-template-columns: minmax(98px, .92fr) minmax(0, 1.33fr); gap: 9px; }
  #send { padding-inline: 7px; font-size: 14px; }
  input, textarea, select { font-size: 16px; }
  .login { grid-template-columns: 1fr; margin-top: 8px; border-radius: 20px; }
  .welcome { min-height: 0; padding: 15px 15px 4px; }
  .welcome-title { font-size: 30px; }
  .welcome img { height: 115px; margin-top: 1px; }
  .login-panel { padding: 19px; }
  .login-panel h1 { font-size: 23px; }
  .login-panel form { margin-top: 15px; }
}

@media (max-width: 340px) {
  .publish-actions { grid-template-columns: 1fr; }
  .mast-label { display: none; }
}

