:root {
  color-scheme: light;
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  --ink: #13241d;
  --muted: #65766e;
  --green: #1d7650;
  --green-dark: #153f31;
  --mint: #dff2e7;
  --line: rgba(34, 76, 57, 0.14);
  --surface: rgba(255, 255, 255, 0.88);
  --shadow: 0 24px 64px rgba(24, 65, 46, 0.12);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  background: #f3f7f4;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.public-page {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(121, 197, 154, 0.28), transparent 32rem),
    radial-gradient(circle at 90% 80%, rgba(234, 196, 121, 0.18), transparent 28rem),
    #f5f8f6;
}

.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
}

.ambient-one {
  top: -14rem;
  right: -10rem;
  width: 34rem;
  height: 34rem;
  border: 1px solid rgba(31, 122, 82, 0.12);
  box-shadow: inset 0 0 0 5rem rgba(255, 255, 255, 0.2);
}

.ambient-two {
  bottom: -10rem;
  left: -8rem;
  width: 25rem;
  height: 25rem;
  border: 1px solid rgba(31, 122, 82, 0.1);
}

.public-shell {
  display: grid;
  width: min(1080px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  grid-template-rows: auto 1fr auto;
}

.public-header,
.manage-header,
.mini-brand,
.brand-lockup,
.manage-header-actions,
.freshness-row,
.public-footer,
.preview-status-line,
.section-heading,
.automatic-banner,
.privacy-note,
.remember-row {
  display: flex;
  align-items: center;
}

.public-header {
  justify-content: space-between;
  padding: 28px 0;
}

.mini-brand {
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.mini-brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(145deg, #2b9164, #176845);
  box-shadow: 0 9px 22px rgba(31, 122, 82, 0.2);
  font-weight: 900;
}

.ghost-button,
.text-button,
.primary-button,
.secondary-button {
  border: 0;
  border-radius: 12px;
  font-weight: 800;
}

.ghost-button {
  min-height: 40px;
  padding: 0 15px;
  color: var(--green-dark);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
}

.status-stage {
  align-self: center;
  padding: 6vh 30px 8vh;
  text-align: center;
}

.status-orbit {
  display: grid;
  position: relative;
  width: clamp(130px, 19vw, 190px);
  height: clamp(130px, 19vw, 190px);
  margin: 0 auto 30px;
  place-items: center;
  border: 1px solid rgba(31, 122, 82, 0.15);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 22px rgba(255, 255, 255, 0.32), 0 24px 70px rgba(23, 80, 53, 0.14);
}

.status-orbit::before,
.status-orbit::after {
  position: absolute;
  border: 1px solid rgba(31, 122, 82, 0.08);
  border-radius: 50%;
  content: "";
}

.status-orbit::before {
  inset: -42px;
}

.status-orbit::after {
  inset: 14px;
}

.status-emoji {
  position: relative;
  z-index: 1;
  font-size: clamp(58px, 8vw, 82px);
  filter: drop-shadow(0 10px 18px rgba(16, 48, 34, 0.12));
}

.public-name,
.section-kicker {
  margin: 0;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-stage h1 {
  margin: 12px 0 10px;
  font-size: clamp(52px, 8vw, 94px);
  letter-spacing: -0.07em;
  line-height: 0.98;
}

.status-detail {
  min-height: 1.6em;
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
}

.freshness-row {
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 12px;
}

.source-pill,
.privacy-chip {
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--mint);
  font-weight: 800;
}

.status-studying .status-orbit {
  animation: breathe 2.8s ease-in-out infinite;
  background: rgba(221, 242, 230, 0.78);
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}

.public-footer {
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.connection-state::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #da9a4a;
  content: "";
}

.connection-state.is-live::before {
  background: #2a9b68;
}

.manage-page {
  background:
    radial-gradient(circle at 8% 0%, rgba(142, 206, 169, 0.26), transparent 32rem),
    #f2f6f3;
}

.manage-shell {
  width: min(980px, calc(100% - 36px));
  margin: 0 auto;
  padding-bottom: 56px;
}

.manage-header {
  min-height: 88px;
  justify-content: space-between;
}

.brand-lockup {
  gap: 11px;
}

.brand-lockup strong,
.brand-lockup span {
  display: block;
}

.brand-lockup strong {
  font-size: 17px;
}

.brand-lockup div > span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.manage-header-actions {
  gap: 10px;
}

.text-button {
  padding: 9px 8px;
  color: var(--muted);
  background: transparent;
}

.card {
  border: 1px solid rgba(34, 76, 57, 0.12);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-panel {
  width: min(500px, 100%);
  margin: 8vh auto 0;
  padding: 34px;
}

.login-panel h1 {
  margin: 10px 0;
  font-size: 34px;
  letter-spacing: -0.045em;
}

.login-panel > p:not(.section-kicker) {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.7;
}

.login-form,
.status-form {
  display: grid;
  gap: 14px;
}

.login-form label > span,
.status-form label > span {
  display: block;
  margin-bottom: 7px;
  color: #405149;
  font-size: 12px;
  font-weight: 750;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid #cad7cf;
  border-radius: 11px;
  outline: none;
  color: var(--ink);
  background: #fbfdfc;
}

input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 122, 82, 0.1);
}

.remember-row {
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.remember-row span {
  margin: 0 !important;
}

.primary-button,
.secondary-button {
  min-height: 46px;
  padding: 0 18px;
}

.primary-button {
  color: white;
  background: var(--green);
  box-shadow: 0 10px 22px rgba(31, 122, 82, 0.18);
}

.secondary-button {
  color: var(--green-dark);
  background: var(--mint);
}

.form-error {
  min-height: 1.4em;
  margin: 0;
  color: #b14343;
  font-size: 12px;
}

.dashboard {
  display: grid;
  gap: 16px;
}

.mobile-preview {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 0.62fr);
  gap: 26px;
  padding: 28px;
  background:
    radial-gradient(circle at 8% 0%, rgba(197, 234, 212, 0.72), transparent 22rem),
    rgba(255, 255, 255, 0.9);
}

.preview-status-line {
  gap: 14px;
  margin-top: 13px;
}

.preview-emoji {
  font-size: 46px;
}

.preview-status-line h1,
.preview-status-line p,
.preview-meta {
  margin: 0;
}

.preview-status-line h1 {
  font-size: 32px;
  letter-spacing: -0.045em;
}

.preview-status-line p,
.preview-meta {
  color: var(--muted);
}

.preview-meta {
  margin-top: 12px;
  font-size: 12px;
}

.share-block {
  display: grid;
  align-content: center;
  gap: 9px;
}

.share-block input {
  color: var(--muted);
  font-size: 12px;
}

.automatic-banner {
  gap: 12px;
  padding: 15px 18px;
  border: 1px solid rgba(31, 122, 82, 0.15);
  border-radius: 14px;
  background: #e7f5ed;
}

.automatic-banner strong,
.automatic-banner p {
  display: block;
  margin: 0;
}

.automatic-banner p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: #2a9b68;
  box-shadow: 0 0 0 5px rgba(42, 155, 104, 0.14);
}

.editor-card {
  padding: 28px;
}

.section-heading {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 6px 0 0;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.privacy-chip {
  font-size: 11px;
}

.status-options {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.status-option {
  display: grid;
  min-height: 92px;
  gap: 5px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #f9fbfa;
}

.status-option span {
  font-size: 27px;
}

.status-option strong {
  font-size: 12px;
}

.status-option.is-selected {
  color: var(--green-dark);
  border-color: rgba(31, 122, 82, 0.48);
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(31, 122, 82, 0.08);
}

.custom-status-item {
  position: relative;
}

.custom-status-item .status-option {
  width: 100%;
  padding-bottom: 22px;
}

.custom-status-delete {
  position: absolute;
  right: 8px;
  bottom: 6px;
  padding: 2px 6px;
  border: 0;
  color: #8a4b4b;
  background: transparent;
  font-size: 10px;
}

.custom-status-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px auto;
  gap: 10px;
  align-items: end;
  margin: -8px 0 4px;
}

.custom-status-form label > span {
  display: block;
  margin-bottom: 7px;
  color: #405149;
  font-size: 12px;
  font-weight: 750;
}

.save-message {
  min-height: 1.4em;
  margin: 0;
  color: var(--green);
  font-size: 12px;
}

.privacy-note {
  gap: 13px;
  padding: 20px 22px;
  box-shadow: none;
}

.privacy-note strong,
.privacy-note p {
  margin: 0;
}

.privacy-note p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.privacy-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--green-dark);
  background: var(--mint);
  font-weight: 900;
}

@media (max-width: 760px) {
  .public-shell {
    width: min(100% - 28px, 640px);
  }

  .status-stage {
    padding-inline: 0;
  }

  .status-stage h1 {
    font-size: clamp(48px, 15vw, 76px);
  }

  .public-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .manage-shell {
    width: min(100% - 24px, 620px);
  }

  .mobile-preview {
    grid-template-columns: 1fr;
  }

  .status-options {
    grid-template-columns: repeat(3, 1fr);
  }

  .custom-status-form {
    grid-template-columns: 1fr 82px;
  }

  .custom-status-form .secondary-button {
    grid-column: 1 / -1;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .manage-header {
    min-height: 76px;
  }

  .brand-lockup div > span,
  .manage-header .ghost-button {
    display: none;
  }

  .card,
  .login-panel,
  .editor-card,
  .mobile-preview {
    border-radius: 18px;
  }

  .login-panel,
  .editor-card,
  .mobile-preview {
    padding: 21px;
  }

  .preview-status-line h1 {
    font-size: 27px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-studying .status-orbit {
    animation: none;
  }
}
