:root {
  color-scheme: light;
  --bg: #f7f7f5;
  --panel: #ffffff;
  --panel-soft: #fbfaf7;
  --line: #e8e6e1;
  --line-strong: #dedbd4;
  --ink: #2b2c31;
  --muted: #85827b;
  --soft-text: #aaa59d;
  --black: #17191d;
  --purple: #a854f5;
  --green: #1cc18a;
  --yellow: #facb36;
  --blue: #4388ff;
  --pink: #ff4db1;
  --shadow: 0 18px 42px rgba(31, 32, 36, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1180px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial,
    sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
}

.brand,
.top-actions,
.section-title,
.profile-card,
.left-tools,
.search-box,
.generated-summary,
.output-top,
.composer-footer,
.mini-plan article {
  display: flex;
  align-items: center;
}

.brand {
  gap: 14px;
  color: #6c6964;
  font-size: 18px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #a854f5, #d87bff);
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.top-actions {
  gap: 18px;
}

.plain-button,
.soft-button,
.left-tools button,
.filter-row button,
.tabs button,
.quick-actions button,
.primary-button,
.secondary-button,
.arrow-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
}

.plain-button {
  min-height: 34px;
  padding: 0 8px;
  border-color: transparent;
  background: transparent;
  font-weight: 700;
}

.plain-button:hover {
  background: #f2f1ee;
}

.app-grid {
  display: grid;
  grid-template-columns: 390px minmax(660px, 1.42fr) 390px;
  height: calc(100vh - 62px);
  overflow: hidden;
}

.side-panel,
.center-panel {
  min-height: 0;
  overflow: auto;
}

.side-panel {
  background: var(--panel);
}

.left-panel {
  border-right: 1px solid var(--line);
}

.right-panel {
  border-left: 1px solid var(--line);
}

.panel-section {
  padding: 22px 18px 28px;
}

.section-title {
  justify-content: space-between;
  min-height: 38px;
  margin-bottom: 16px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 25px;
  line-height: 1.25;
}

h2 {
  margin-bottom: 0;
  font-size: 19px;
  line-height: 1.3;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.menu-group {
  border-top: 1px solid var(--line);
}

.menu-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  list-style: none;
  cursor: pointer;
  font-weight: 800;
}

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

.menu-group summary strong {
  color: var(--soft-text);
  font-weight: 700;
}

.profile-card {
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
}

.avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #f2e8ff;
  color: var(--purple);
  font-weight: 900;
}

.profile-card strong {
  display: block;
  margin-bottom: 3px;
}

.profile-card p,
.model-box p,
.material-feed p,
.mini-plan p,
.history-list p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.profile-tags,
.post-tags,
.quick-actions,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-tags {
  margin: 12px 0 16px;
}

.profile-tags span,
.post-tags span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #f5f4f1;
  color: #6f6b63;
  font-size: 12px;
  font-weight: 700;
}

.model-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.model-box label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

select,
textarea,
input {
  outline: none;
}

select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

.model-box select {
  width: 100%;
  margin-bottom: 9px;
}

.left-tools {
  gap: 8px;
  margin: 14px 0 10px;
}

.left-tools button {
  height: 36px;
  padding: 0 16px;
  font-weight: 800;
}

.search-box {
  gap: 8px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--soft-text);
}

.search-box input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.library-list {
  display: grid;
  gap: 6px;
  margin: 14px 0 18px;
}

.library-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #615e58;
  padding: 0 10px;
  text-align: left;
}

.library-list button.active,
.library-list button:hover {
  background: #f0efec;
}

.library-list strong {
  color: var(--soft-text);
  font-size: 12px;
}

.material-feed {
  display: grid;
  gap: 14px;
}

.material-feed article {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
}

.material-feed strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-icon {
  width: 14px;
  height: 14px;
  margin-top: 4px;
  border-radius: 4px;
}

.feed-icon.blue {
  background: var(--blue);
}

.feed-icon.pink {
  background: var(--pink);
}

.feed-icon.yellow {
  background: var(--yellow);
}

.center-panel {
  padding: 16px 28px 30px;
  background: #fbfbf9;
}

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

.soft-button {
  min-height: 40px;
  padding: 0 18px;
  background: #fff;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(31, 32, 36, 0.05);
}

.model-row {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--muted);
}

.model-row label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.model-row span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f2f1ee;
  font-size: 13px;
}

.calendar-card {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.arrow-button {
  width: 38px;
  height: 38px;
  border-color: transparent;
  background: transparent;
  font-size: 34px;
  line-height: 1;
}

.week {
  text-align: center;
}

.week > p {
  margin-bottom: 10px;
  font-size: 19px;
  font-weight: 800;
}

.days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 9px;
}

.days div {
  display: grid;
  min-height: 62px;
  place-items: center;
  border-radius: 22px;
  color: var(--muted);
}

.days span {
  font-size: 12px;
}

.days strong {
  font-size: 18px;
}

.days .selected {
  background: var(--black);
  color: #fff;
  box-shadow: 0 10px 24px rgba(23, 25, 29, 0.22);
}

.dots {
  width: 54px;
  height: 8px;
  border-radius: 99px;
  background-size: 10px 8px;
}

.dots.green {
  background-image: radial-gradient(circle, var(--green) 3px, transparent 4px);
}

.dots.yellow {
  background-image: radial-gradient(circle, var(--yellow) 3px, transparent 4px);
}

.dots.short {
  width: 34px;
}

.composer-card {
  padding: 20px 26px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.composer-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.composer-top h2 {
  font-size: 22px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f3f2ef;
  color: #6f6b63;
  font-size: 13px;
  font-weight: 800;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 16px;
}

.quick-actions button {
  min-height: 40px;
  border-radius: 12px;
  background: var(--panel-soft);
  font-weight: 800;
}

.main-input {
  display: block;
}

.main-input span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 800;
}

textarea {
  width: 100%;
  min-height: 170px;
  padding: 18px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdf9;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.75;
}

textarea:focus,
select:focus,
input:focus {
  border-color: #cfcac0;
  box-shadow: 0 0 0 4px rgba(31, 32, 36, 0.04);
}

.composer-controls {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.composer-controls label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.composer-footer {
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
}

.composer-footer > div {
  display: flex;
  gap: 10px;
}

.switch {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #d8d5ce;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.switch input:checked + span {
  background: var(--yellow);
}

.switch input:checked + span::after {
  transform: translateX(18px);
}

.primary-button,
.secondary-button {
  min-height: 42px;
  padding: 0 18px;
  font-weight: 900;
}

.primary-button {
  border-color: var(--black);
  background: var(--black);
  color: #fff;
}

.secondary-button {
  border-color: var(--line);
  background: #fff;
}

.mini-plan {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.mini-plan article {
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.heart,
.eye {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  font-weight: 900;
}

.heart {
  background: #fff0f7;
  color: var(--pink);
}

.eye {
  background: #edf4ff;
  color: var(--blue);
}

.output-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.output-card.featured {
  box-shadow: 0 10px 26px rgba(31, 32, 36, 0.05);
}

.current-output {
  margin-bottom: 18px;
}

.output-top {
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--muted);
}

.output-top strong {
  color: var(--green);
  font-size: 13px;
}

.post-preview {
  padding: 14px;
  border-radius: 14px;
  background: var(--panel-soft);
  line-height: 1.75;
}

.post-preview p {
  margin-bottom: 12px;
}

.post-preview p:last-child {
  margin-bottom: 0;
}

.post-tags {
  margin-top: 12px;
}

.history-panel {
  padding-top: 4px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: #f5f4f1;
}

.tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.tabs button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 10px rgba(31, 32, 36, 0.06);
}

.history-search {
  margin-bottom: 12px;
}

.filter-row {
  margin-bottom: 14px;
}

.filter-row button {
  min-height: 30px;
  padding: 0 12px;
  background: #fff;
  color: #68645d;
  font-size: 13px;
  font-weight: 800;
}

.filter-row button.active {
  border-color: var(--black);
  background: var(--black);
  color: #fff;
}

.generated-summary {
  justify-content: space-between;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.generated-summary a {
  color: #715bff;
  font-weight: 800;
}

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

.history-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 14px;
  background: #fbfaf7;
  color: var(--muted);
}

.history-date strong {
  color: var(--ink);
  font-size: 15px;
}

.history-date button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.history-entry {
  padding: 12px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.history-entry-main {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 8px;
  align-items: start;
}

.entry-toggle,
.entry-action {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6f6b63;
  font-weight: 900;
}

.entry-toggle:hover,
.entry-action:hover {
  background: #f2f1ee;
}

.entry-actions {
  display: flex;
  gap: 4px;
}

.entry-title {
  display: block;
  overflow: hidden;
  margin-bottom: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-entry.expanded .entry-title {
  white-space: normal;
}

.entry-full {
  display: none;
  margin-top: 9px;
  color: var(--ink);
  line-height: 1.7;
}

.history-entry.expanded .entry-full {
  display: block;
}

.entry-full p {
  margin: 10px 0 0;
}

.entry-label {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.entry-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f5f4f1;
  color: #6f6b63;
  font-size: 12px;
  font-weight: 700;
}

.entry-tags .green-tag {
  background: #e8fbf3;
  color: #13865e;
  border: 1px solid #9be7c5;
}

.history-empty {
  padding: 22px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  color: var(--muted);
  line-height: 1.7;
  text-align: center;
}

@media (max-width: 1500px) {
  body {
    min-width: 1120px;
  }

  .app-grid {
    grid-template-columns: 300px minmax(560px, 1fr) 320px;
  }

  .panel-section {
    padding-inline: 14px;
  }
}
