﻿:root {
  --brand: #0f766e;
  --brand-deep: #115e59;
  --brand-soft: #dff5f2;
  --accent: #f97316;
  --accent-soft: #fff1e7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --bg: #f7f4ed;
  --bg-strong: #f1ece1;
  --card: rgba(255, 255, 255, 0.84);
  --card-solid: #fffdf8;
  --line: rgba(30, 41, 59, 0.12);
  --line-strong: rgba(30, 41, 59, 0.18);
  --text: #1f2937;
  --text-soft: #475569;
  --text-faint: #7c8799;
  --shadow: 0 18px 60px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius: 22px;
  --radius-sm: 16px;
  --max-width: 1180px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.12), transparent 24%),
    linear-gradient(180deg, #f9f6ef 0%, #f5efe4 100%);
}

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

button {
  border: none;
}

.hidden {
  display: none !important;
}

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

.site-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.65;
}

.orb-a {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -120px;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.22), rgba(15, 118, 110, 0));
}

.orb-b {
  width: 460px;
  height: 460px;
  right: -160px;
  top: 12%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.16), rgba(249, 115, 22, 0));
}

.site-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.028) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 80%);
}

.screen {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 28px 16px 52px;
}

.screen-home,
.screen-history,
.screen-setup,
.screen-join {
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen-main {
  padding: 0 0 40px;
}

.home-shell,
.history-shell,
.setup-shell,
.join-shell,
.main-shell,
.hdr-inner {
  width: min(var(--max-width), calc(100vw - 32px));
  margin: 0 auto;
}

.home-shell {
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(320px, 0.95fr);
  gap: 22px;
  align-items: stretch;
}

.hero-panel,
.hc,
.stats-strip,
.toolbar,
.g-card {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.hero-panel,
.hc,
.card,
.join-tip-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 540px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(245, 255, 252, 0.8)),
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.12), transparent 36%);
}

.hero-badge,
.hc-tag,
.field-optional,
.toolbar-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.hero-badge {
  width: fit-content;
  padding: 8px 14px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 800;
}

.home-logo {
  padding: 18px 0 8px;
}

.home-emoji,
.logo-emoji,
.section-icon,
.ev-emoji {
  line-height: 1;
}

.home-emoji {
  font-size: clamp(56px, 6vw, 72px);
}

.home-title,
.logo-name,
.section-title,
.ev-name {
  font-weight: 900;
  letter-spacing: -0.03em;
}

.home-title {
  margin-top: 14px;
  font-size: clamp(34px, 5vw, 52px);
}

.home-desc {
  max-width: 34ch;
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.75;
}

.hero-guide {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-soft);
}

.hero-guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-guide-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--brand-deep);
}

.hero-guide-link {
  padding: 0;
  background: none;
  color: var(--brand-deep);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.hero-guide-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.hero-guide-item {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.hero-metric {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-soft);
}

.hero-metric-value {
  display: block;
  color: var(--brand-deep);
  font-size: 22px;
  font-weight: 900;
}

.hero-metric-label {
  display: block;
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.5;
}

.hero-actions {
  margin-top: auto;
}

.home-cards {
  display: grid;
  gap: 16px;
  align-content: start;
}

.hc {
  padding: 22px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.hc:hover,
.hc:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.16);
  border-color: rgba(15, 118, 110, 0.32);
}

.hc-primary {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.94), rgba(231, 249, 246, 0.92)),
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.12), transparent 40%);
}

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

.hc-ico {
  font-size: 30px;
}

.hc-tag {
  min-width: 76px;
  padding: 6px 12px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--brand-deep);
  font-size: 11px;
  font-weight: 800;
}

.hc-ttl {
  font-size: 20px;
  font-weight: 800;
}

.hc-desc {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
}

.hc-list {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.hc-list-history {
  margin-top: 12px;
}

.hc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.hc-item::before,
.setup-note-item::before,
.join-tip-item::before {
  content: "";
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #fb923c);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.hc-log {
  cursor: default;
}

.hc-log[open] {
  background: rgba(255, 255, 255, 0.9);
}

.log-summary {
  display: grid;
  gap: 10px;
  list-style: none;
  cursor: pointer;
}

.log-summary::-webkit-details-marker {
  display: none;
}

.log-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.log-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.log-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.log-item-version {
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 900;
}

.log-item-date,
.log-item-summary {
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1.7;
}

.log-item-title {
  margin-top: 6px;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.history-mini-item,
.history-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.history-mini-item:hover,
.history-mini-item:focus-visible,
.history-entry:hover {
  background: rgba(223, 245, 242, 0.8);
  transform: translateX(2px);
}

.history-mini-item::after {
  content: "→";
  color: var(--brand-deep);
  font-weight: 800;
}

.history-shell {
  max-width: 560px;
}

.section-intro,
.logo-area,
.ev-card {
  text-align: center;
}

.section-intro {
  margin-bottom: 20px;
}

.section-icon {
  font-size: 44px;
}

.section-title {
  margin-top: 12px;
  font-size: 30px;
}

.section-desc {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
}

.history-card {
  max-width: none;
}

.history-list-full {
  display: grid;
  gap: 12px;
}

.history-entry-copy {
  flex: 1;
}

.history-entry-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.history-entry {
  cursor: default;
}

.history-entry-title {
  display: block;
  font-size: 15px;
  font-weight: 800;
}

.history-entry-meta {
  display: block;
  margin-top: 4px;
  color: var(--text-faint);
  font-size: 12px;
}

.history-action-btn {
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.history-action-btn.danger {
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
}

.history-back-btn {
  margin-top: 16px;
}

.setup-shell,
.join-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(320px, 1.08fr);
  gap: 20px;
  align-items: start;
}

.setup-intro,
.join-intro {
  position: sticky;
  top: 28px;
  display: grid;
  gap: 16px;
}

.logo-area,
.setup-note,
.join-tip-card,
.ev-card {
  padding: 24px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.logo-emoji {
  font-size: 58px;
}

.logo-name {
  margin-top: 10px;
  font-size: 32px;
}

.logo-desc,
.ev-meta {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.75;
}

.setup-note-title,
.join-tip-title {
  font-size: 16px;
  font-weight: 800;
}

.setup-note {
  display: grid;
  gap: 12px;
}

.setup-note-item,
.join-tip-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.6;
}

.setup-form,
.join-card {
  display: grid;
  gap: 10px;
}

.card {
  width: 100%;
  max-width: none;
  padding: 24px;
}

.setup-form .card {
  padding: 18px 18px 16px;
}

.card-ttl {
  margin-bottom: 12px;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fg {
  margin-bottom: 14px;
}

.fg:last-child {
  margin-bottom: 0;
}

.fl {
  display: block;
  margin-bottom: 6px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.field-optional {
  margin-left: 6px;
  padding: 2px 8px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--brand-deep);
  font-size: 11px;
  font-weight: 700;
}

.fi,
.tag-wrap {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.78);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.fi {
  padding: 11px 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
}

select.fi {
  min-height: 46px;
  cursor: pointer;
  -webkit-appearance: menulist;
  appearance: auto;
}

select.fi option {
  color: var(--text);
}

.fi:focus,
.tag-wrap.focused {
  border-color: rgba(15, 118, 110, 0.46);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.prompt-input,
.remark-input {
  min-height: 92px;
  resize: vertical;
  line-height: 1.6;
}

.prompt-helper,
.tag-hint,
.prompt-count,
.or-sep,
.resume-box .rb-lbl,
.remark-meta,
.sh-note,
.prompt-body,
.prompt-title,
.ai-draft-meta {
  color: var(--text-faint);
}

.prompt-helper,
.tag-hint,
.or-sep,
.sh-note,
.ai-draft-meta {
  font-size: 12px;
  line-height: 1.55;
}

.ai-create-input {
  min-height: 78px;
}

.create-ai-actions {
  display: grid;
  gap: 8px;
}

.create-ai-btn {
  width: auto;
}

.ai-draft-panel {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  background: linear-gradient(135deg, rgba(223, 245, 242, 0.9), rgba(255, 255, 255, 0.94));
}

.ai-draft-panel.hidden {
  display: none;
}

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

.ai-draft-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--brand-deep);
}

.ai-draft-badge {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 700;
}

.ai-draft-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ai-draft-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.ai-draft-label {
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

.ai-draft-value {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  word-break: break-word;
}

.ai-draft-list {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.ai-draft-list.warning .ai-draft-list-title {
  color: #b45309;
}

.ai-draft-list-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--brand-deep);
  letter-spacing: 0.04em;
}

.ai-draft-list ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
}

.prompt-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.prompt-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prompt-chip {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  background: rgba(223, 245, 242, 0.9);
  color: var(--brand-deep);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.prompt-chip:hover,
.prompt-chip:focus-visible {
  background: rgba(223, 245, 242, 1);
}

.prompt-count {
  font-size: 12px;
  white-space: nowrap;
}

.fi-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tag-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 46px;
  padding: 8px 9px;
  cursor: text;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px 5px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 700;
}

.tag-x {
  padding: 0 3px;
  background: none;
  color: var(--brand-deep);
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
}

.tag-inp {
  min-width: 84px;
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  outline: none;
  font-size: 15px;
}

.btn-p,
.btn-s,
.hdr-btn-alt,
.hdr-btn-share,
.rb-btn,
.tb-btn,
.tutorial-btn {
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-p,
.btn-s {
  width: 100%;
  padding: 14px 18px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
}

.btn-p {
  margin-top: 6px;
  background: linear-gradient(135deg, var(--brand), #14b8a6);
  color: #fff;
  box-shadow: 0 16px 30px rgba(15, 118, 110, 0.28);
}

.btn-s {
  background: rgba(15, 23, 42, 0.06);
  color: var(--text);
}

.btn-p:hover,
.btn-s:hover,
.hdr-btn-alt:hover,
.hdr-btn-share:hover,
.rb-btn:hover,
.tb-btn:hover,
.tutorial-btn:hover,
.btn-p:focus-visible,
.btn-s:focus-visible,
.hdr-btn-alt:focus-visible,
.hdr-btn-share:focus-visible,
.rb-btn:focus-visible,
.tb-btn:focus-visible,
.tutorial-btn:focus-visible {
  transform: translateY(-1px);
}

.btn-hero {
  max-width: 280px;
}

.create-btn {
  margin-top: 0;
}

.ev-card {
  padding: 26px;
}

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

.ev-name {
  margin-top: 10px;
  font-size: 30px;
}

.join-tip-card {
  display: grid;
  gap: 12px;
}

.resume-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(223, 245, 242, 0.95), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(15, 118, 110, 0.14);
}

.resume-box .rb-name {
  margin-top: 4px;
  color: var(--brand-deep);
  font-size: 18px;
  font-weight: 900;
}

.rb-btn {
  padding: 11px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), #14b8a6);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.chips-label {
  margin-bottom: 10px;
}

.chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 8px;
}

.nchip {
  padding: 10px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-soft);
}

.nchip.active {
  border-color: rgba(15, 118, 110, 0.4);
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.nchip.done {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.04);
  color: var(--text-faint);
  cursor: default;
}

.app-hdr {
  position: sticky;
  top: 0;
  z-index: 120;
  padding: 14px 0;
  background: linear-gradient(180deg, rgba(14, 116, 108, 0.96), rgba(17, 94, 89, 0.92));
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.18);
}

.hdr-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hdr-info {
  flex: 1;
  min-width: 0;
  color: #fff;
}

.hdr-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 22px;
  font-weight: 900;
}

.hdr-sub {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.hdr-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hdr-btn-alt,
.hdr-btn-share {
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.hdr-btn-alt {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.hdr-btn-share {
  background: #fff;
  color: var(--brand-deep);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.main-shell {
  padding-top: 18px;
}

.stats-strip,
.toolbar,
.tip,
.prompt-card,
.remark-card {
  margin-top: 12px;
}

.stats-strip,
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #86efac;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

.s-lbl {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 800;
}

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

.pbadge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px 7px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.pbadge.me {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.pbadge.required {
  border: 1px solid rgba(180, 83, 9, 0.16);
  background: rgba(255, 247, 237, 0.95);
}

.pbadge-tag,
.mini-priority {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.12);
  color: #b45309;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
}

.pdot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.toolbar-label {
  padding: 6px 12px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--brand-deep);
  font-size: 11px;
  font-weight: 800;
}

.tb-btn {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.86);
  color: var(--text-soft);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.tb-btn.active {
  border-color: rgba(15, 118, 110, 0.38);
  background: var(--brand-soft);
  color: var(--brand-deep);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.08);
}

.tb-btn-ghost {
  margin-left: auto;
  background: rgba(249, 115, 22, 0.08);
  color: #b45309;
  border-color: rgba(249, 115, 22, 0.18);
}

.tb-sep {
  width: 1px;
  height: 24px;
  background: var(--line);
}

.legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.lg-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 700;
}

.lg-box {
  width: 15px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  flex-shrink: 0;
}

.lg-box.empty {
  background: #eff2f5;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.lg-box.avail {
  background: var(--brand);
}

.lg-box.busy {
  background: var(--danger-soft);
  border: 1px solid rgba(220, 38, 38, 0.24);
  color: var(--danger);
  font-size: 9px;
  font-weight: 900;
}

.lg-box.blocked {
  background: repeating-linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0 5px, rgba(71, 85, 105, 0.92) 5px 10px);
  border: 1px solid rgba(15, 23, 42, 0.22);
}

.tip,
.prompt-card {
  border-radius: 20px;
  border: 1px solid rgba(249, 115, 22, 0.18);
  background: rgba(255, 248, 238, 0.9);
  box-shadow: var(--shadow-soft);
}

.tip {
  padding: 14px 16px;
  color: #9a3412;
  font-size: 14px;
  line-height: 1.75;
}

.prompt-card {
  width: 100%;
  max-width: none;
}

.prompt-title {
  margin-bottom: 8px;
  color: #b45309;
  font-size: 12px;
  font-weight: 900;
}

.prompt-body {
  color: #9a3412;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.remark-card {
  max-width: none;
}

.remark-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
}

.grid-content {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.day-sec {
  display: grid;
  gap: 10px;
}

.day-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 4px;
}

.day-date {
  font-size: 22px;
  font-weight: 900;
}

.day-wd {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

.day-wd.we {
  background: rgba(249, 115, 22, 0.12);
  color: #c2410c;
}

.g-card {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.g-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table.sg {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

table.sg.m-tr thead th,
table.sg.m-pr thead th {
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(248, 250, 252, 0.94);
}

table.sg.m-tr thead th {
  height: 54px;
}

table.sg.m-pr thead th {
  height: 48px;
}

table.sg.m-tr thead th.th-lbl,
table.sg.m-pr thead th.th-lbl2,
table.sg.m-tr tbody td.td-lbl,
table.sg.m-pr tbody td.td-plbl {
  position: sticky;
  left: 0;
  z-index: 15;
  background: rgba(248, 250, 252, 0.96);
  border-right: 1px solid rgba(15, 23, 42, 0.08);
}

table.sg.m-tr thead th.th-lbl {
  width: 104px;
  min-width: 104px;
  padding: 0 12px;
  text-align: left;
}

table.sg.m-pr thead th.th-lbl2 {
  width: 90px;
  min-width: 90px;
  padding: 0 10px;
  text-align: left;
}

table.sg.m-tr thead th.th-p,
table.sg.m-tr tbody td.td-c {
  width: 66px;
  min-width: 66px;
}

table.sg.m-pr thead th.th-h,
table.sg.m-pr tbody td.td-h {
  width: 58px;
  min-width: 58px;
}

table.sg.m-tr thead th.th-sum,
table.sg.m-tr tbody td.td-sum,
table.sg.m-pr thead th.th-sum2,
table.sg.m-pr tbody td.td-psum {
  background: rgba(248, 250, 252, 0.94);
  border-left: 1px solid rgba(15, 23, 42, 0.08);
}

table.sg.m-tr thead th.th-sum,
table.sg.m-tr tbody td.td-sum {
  width: 60px;
  min-width: 60px;
}

table.sg.m-pr thead th.th-sum2,
table.sg.m-pr tbody td.td-psum {
  width: 52px;
  min-width: 52px;
}

table.sg.m-tr thead th.th-p {
  padding: 7px 4px;
  border-right: 1px solid rgba(15, 23, 42, 0.04);
}

table.sg.m-tr thead th.th-p .pname {
  display: block;
  max-width: 56px;
  margin: 0 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

table.sg.m-tr thead th.th-p .pmark {
  display: block;
  width: 7px;
  height: 7px;
  margin: 4px auto 0;
  border-radius: 50%;
}

table.sg.m-tr thead th.th-p.is-me .pname {
  color: var(--brand-deep);
}

table.sg.m-tr tbody tr,
table.sg.m-pr tbody tr {
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

table.sg.m-tr tbody td.td-lbl {
  width: 104px;
  min-width: 104px;
  height: 56px;
  padding: 0 10px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

table.sg.m-tr tbody td.td-lbl small {
  display: block;
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 600;
}

table.sg.m-tr tbody td.td-lbl-blocked {
  background: rgba(226, 232, 240, 0.9);
}

table.sg.m-tr tbody td.td-c,
table.sg.m-tr tbody td.td-sum {
  height: 56px;
  padding: 6px;
}

table.sg.m-pr thead th.th-h {
  line-height: 1.45;
}

table.sg.m-pr tbody td.td-plbl {
  width: 90px;
  min-width: 90px;
  height: 54px;
  padding: 0 9px;
}

table.sg.m-pr tbody td.td-plbl .pn {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

table.sg.m-pr tbody td.td-plbl .pn.is-me {
  color: var(--brand-deep);
}

table.sg.m-pr tbody td.td-plbl .pn,
table.sg.m-tr thead th.th-p .pname {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

table.sg.m-pr tbody td.td-plbl .pm {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-top: 3px;
  border-radius: 50%;
}

table.sg.m-pr tbody td.td-h,
table.sg.m-pr tbody td.td-psum {
  height: 54px;
  padding: 5px;
}

table.sg.m-pr tbody tr.sum-row td {
  background: rgba(248, 250, 252, 0.96);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

table.sg.m-pr tbody tr.sum-row td.td-plbl {
  color: var(--text-faint);
}

.toggle-btn-row td {
  padding: 11px !important;
  text-align: center !important;
  background: rgba(15, 23, 42, 0.035) !important;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.toggle-btn-row:hover td {
  background: rgba(15, 118, 110, 0.08) !important;
}

tr.other-row.collapsed {
  display: none;
}

.ci,
.si {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.ci {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  font-size: 14px;
  font-weight: 900;
  transition: opacity 0.08s ease, transform 0.08s ease;
}

.ci:active {
  transform: scale(0.97);
}

.ci.ro {
  cursor: default;
}

.ci.ci-blocked {
  cursor: not-allowed;
  background: repeating-linear-gradient(135deg, rgba(15, 23, 42, 0.86) 0 8px, rgba(71, 85, 105, 0.9) 8px 16px);
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.ci.dim {
  opacity: 0.34;
}

.si {
  background: rgba(15, 23, 42, 0.05);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 900;
}

.si.si-priority {
  box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.18);
}

.si.si-conflict {
  box-shadow: inset 0 0 0 2px rgba(220, 38, 38, 0.22);
}

.si.si-blocked {
  background: repeating-linear-gradient(135deg, rgba(15, 23, 42, 0.86) 0 8px, rgba(71, 85, 105, 0.9) 8px 16px);
  color: transparent;
  border: 1px solid rgba(15, 23, 42, 0.1);
}

.si-meta {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  padding: 1px 4px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.si-meta.pass {
  background: rgba(15, 118, 110, 0.14);
  color: #0f766e;
}

.si-meta.conflict {
  background: rgba(220, 38, 38, 0.14);
  color: #b91c1c;
}

.si-meta.pending {
  background: rgba(100, 116, 139, 0.16);
  color: #475569;
}

.si-person-required {
  position: relative;
}

.si-person-tag {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 1px 4px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.16);
  color: #b45309;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.2;
}

.si-busy {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
}

.pb {
  height: max(28px, env(safe-area-inset-bottom, 28px));
}

.tutorial-overlay,
.ai-summary-overlay,
.overlay {
  position: fixed;
  inset: 0;
  display: none;
  opacity: 0;
  pointer-events: none;
}

.tutorial-overlay {
  z-index: 400;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.5);
  transition: opacity 0.28s ease;
}

.tutorial-overlay.show {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.tutorial-box {
  width: min(360px, 100%);
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.95);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.24);
  animation: slideUp 0.28s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.tutorial-step {
  font-size: 30px;
}

.tutorial-title {
  margin-top: 14px;
  font-size: 22px;
  font-weight: 900;
}

.tutorial-desc {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.8;
}

.tutorial-btns {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.tutorial-btn {
  flex: 1;
  padding: 12px 14px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}

.tutorial-btn-skip {
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-soft);
}

.tutorial-btn-next {
  background: linear-gradient(135deg, var(--brand), #14b8a6);
  color: #fff;
}

.ai-summary-overlay,
.overlay {
  z-index: 320;
  align-items: flex-end;
  background: rgba(15, 23, 42, 0.42);
  transition: opacity 0.25s ease;
}

.ai-summary-overlay.open,
.overlay.open {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.ai-sheet,
.sheet {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 18px 18px 34px;
  border-radius: 28px 28px 0 0;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 -14px 50px rgba(15, 23, 42, 0.18);
  opacity: 0;
}

.ai-summary-overlay.open .ai-sheet,
.overlay.open .sheet {
  animation: sheetRise 0.28s ease forwards;
}

@keyframes sheetRise {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.ai-bar,
.sh-bar {
  width: 44px;
  height: 5px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.14);
}

.ai-title,
.sh-title {
  font-size: 22px;
  font-weight: 900;
}

.ai-content {
  max-height: 62vh;
  margin-top: 14px;
  overflow-y: auto;
}

.ai-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 14px;
}

.ai-loading::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  animation: blink 0.75s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 0.28; }
  50% { opacity: 1; }
}

.ai-section {
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.ai-section-title {
  margin-bottom: 10px;
  color: var(--brand-deep);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.ai-section-body {
  display: grid;
  gap: 8px;
}

.ai-item {
  display: flex;
  gap: 10px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.75;
}

.ai-item-emoji {
  color: var(--accent);
  font-weight: 900;
}

.ai-item-text {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.75;
}

.ai-close-btn {
  margin-top: 16px;
}

.sh-url {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.05);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  word-break: break-all;
}

.sh-note {
  margin: 10px 0 16px;
}

.settings-sheet {
  max-width: 620px;
}

.settings-grid {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.settings-block {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.7);
}

.settings-title {
  color: var(--brand-deep);
  font-size: 15px;
  font-weight: 900;
}

.settings-desc {
  margin-top: 6px;
  color: var(--text-faint);
  font-size: 13px;
  line-height: 1.7;
}

.settings-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.manage-sheet {
  display: flex;
  flex-direction: column;
  max-height: 84vh;
  overflow: visible;
}

.manage-sheet-body {
  min-height: 0;
  margin-top: 14px;
  overflow-y: auto;
  padding-right: 4px;
}

.manage-grid {
  display: grid;
  gap: 14px;
}

.manage-list-input {
  min-height: 110px;
  resize: vertical;
  line-height: 1.7;
}

.sheet-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.manage-participants-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.manage-add-btn,
.manage-row-remove {
  width: auto;
  margin-top: 0;
  padding: 10px 12px;
}

.manage-participants-list {
  display: grid;
  gap: 10px;
}

.manage-participant-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
}

.manage-participant-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.manage-participant-input {
  margin: 0;
}

.manage-required-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.manage-required-toggle input {
  width: 15px;
  height: 15px;
  accent-color: #f97316;
}

:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.2);
  outline-offset: 2px;
}

@media (max-width: 960px) {
  .home-shell,
  .setup-shell,
  .join-shell {
    grid-template-columns: 1fr;
  }

  .setup-intro,
  .join-intro {
    position: static;
  }

  .hero-panel {
    min-height: unset;
  }
}

@media (max-width: 760px) {
  .screen {
    padding: 22px 14px 40px;
  }

  .screen-main {
    padding: 0 0 28px;
  }

  .home-shell,
  .history-shell,
  .setup-shell,
  .join-shell,
  .main-shell,
  .hdr-inner {
    width: min(var(--max-width), calc(100vw - 24px));
  }

  .hero-panel,
  .hc,
  .card,
  .logo-area,
  .setup-note,
  .join-tip-card,
  .ev-card {
    padding: 20px;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .btn-hero {
    max-width: none;
  }

  .fi-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .ai-draft-grid {
    grid-template-columns: 1fr;
  }

  .hdr-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .hdr-actions {
    flex-wrap: wrap;
  }

  .hdr-btn-alt,
  .hdr-btn-share {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
  }

  .toolbar {
    align-items: stretch;
  }

  .tb-btn-ghost {
    margin-left: 0;
  }

  .manage-participants-head,
  .history-entry {
    flex-direction: column;
    align-items: stretch;
  }

  .history-entry-actions {
    justify-content: flex-start;
  }

  .manage-participant-row {
    grid-template-columns: 1fr;
  }

  .manage-participant-dot {
    display: none;
  }

  .tb-sep {
    display: none;
  }

  .legend {
    width: 100%;
  }

  .day-date {
    font-size: 20px;
  }

  table.sg.m-tr thead th.th-lbl,
  table.sg.m-tr tbody td.td-lbl {
    width: 96px;
    min-width: 96px;
  }

  table.sg.m-tr thead th.th-p,
  table.sg.m-tr tbody td.td-c {
    width: 62px;
    min-width: 62px;
  }

  table.sg.m-pr thead th.th-lbl2,
  table.sg.m-pr tbody td.td-plbl {
    width: 84px;
    min-width: 84px;
  }

  .tutorial-box,
  .ai-sheet,
  .sheet {
    width: 100%;
  }
}

#toast {
  position: fixed;
  top: 20px;
  left: 50%;
  z-index: 9999;
  max-width: min(92vw, 480px);
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  transform: translateX(-50%) translateY(-80px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

#toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* =========================================
   1.6.0 设计质感升级附加样式 
   ========================================= */

/* 按钮微动效与呼吸感 */
.btn-p {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s !important;
}
.btn-p:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.25);
  opacity: 0.95;
}
.btn-p:active {
  transform: translateY(0);
}

/* 卡片悬浮与景深 */
.hc, .card {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  will-change: transform, box-shadow;
}
.hc:hover, .card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

/* 输入框与焦点光晕 (Focus Ring) */
.fi, .prompt-input, select, textarea {
  transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
  outline: none;
}
.fi:focus, .prompt-input:focus, select:focus, textarea:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px var(--brand-soft) !important;
}

/* 次要按钮与引导链接 */
.hero-guide-link {
  transition: color 0.2s ease, opacity 0.2s ease !important;
}
.hero-guide-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}
