:root {
  --image-blue: #9fc9f5;
  --image-green: #9fd7aa;
  --image-yellow: #f2c94c;
  --bohe: #7eb699;
  --ink: #18302b;
  --deep: #28453f;
  --muted: rgba(24, 48, 43, 0.68);
  --line: rgba(255, 255, 255, 0.42);
  --glass: rgba(255, 255, 255, 0.22);
  --glass-strong: rgba(255, 255, 255, 0.34);
  --button: rgba(255, 255, 255, 0.1);
  --button-glass: rgba(255, 255, 255, 0.24);
  --shadow: 0 18px 50px rgba(53, 84, 77, 0.16);
  --soft-shadow: 0 10px 26px rgba(53, 84, 77, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.82) 62%, rgba(255, 255, 255, 0.9) 100%),
    url("./assets/ruomu-hero.png") center top / cover fixed no-repeat;
  color: var(--ink);
  font-family: "阿里妈妈灵动体", "Alimama Lingdongti", "Alimama DongFangDaKai", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.56) 0 1px, transparent 1.5px),
    radial-gradient(circle at 78% 34%, rgba(255, 255, 255, 0.42) 0 1px, transparent 1.5px),
    radial-gradient(circle at 46% 82%, rgba(255, 255, 255, 0.46) 0 1px, transparent 1.5px);
  background-size: 42px 42px, 58px 58px, 36px 36px;
  opacity: 0.38;
}

body.auth-loading .app-shell {
  display: none !important;
}

body.authenticated .login-screen {
  display: none !important;
}

body.login-active .app-shell {
  display: none !important;
}

body.login-active {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)),
    url("./assets/login-bg.png") center center / cover fixed no-repeat;
}

body.login-active::after {
  opacity: 0.16;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-card {
  width: min(300px, 86vw);
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 48px rgba(38, 76, 103, 0.2);
  backdrop-filter: blur(28px);
}

.login-brand {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-bottom: 4px;
  text-align: center;
}

.login-logo {
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(38, 76, 103, 0.16);
}

.login-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.login-brand h1 {
  display: block;
  margin: 0;
  font-size: 28px;
  line-height: 1;
  color: #0f1f33;
}

.login-brand p {
  margin: 0;
  color: rgba(15, 31, 51, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.login-card input {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.28);
  color: var(--ink);
  padding: 0 11px;
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    0 10px 24px rgba(38, 76, 103, 0.08);
}

.login-card input:focus {
  background: rgba(255, 255, 255, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 0 0 3px rgba(242, 201, 76, 0.26);
}

.login-error {
  min-height: 18px;
  margin: -4px 0 0;
  color: #9a3f35;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

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

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: block;
  min-height: 100vh;
}

.sidebar {
  margin: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--ink);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  padding: 0;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: var(--soft-shadow);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

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

.brand strong {
  font-size: 24px;
}

.brand span,
.team-panel p,
.team-panel span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav-item {
  border: 0;
  min-height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px;
  text-align: center;
  box-shadow: none;
  backdrop-filter: none;
  white-space: nowrap;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 0 10px 24px rgba(53, 84, 77, 0.1);
}

.icon {
  width: 18px;
  display: inline-grid;
  place-items: center;
  text-align: center;
  line-height: 1;
}

.team-panel {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.main {
  padding: 0 28px 48px;
  min-width: 0;
  max-width: 1440px;
  margin: 0 auto;
}

.topbar,
.section-head,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  position: sticky;
  top: 18px;
  z-index: 20;
  margin: 18px 28px 42px;
  padding: 10px 12px 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 46px rgba(53, 84, 77, 0.14);
  backdrop-filter: blur(22px);
}

.eyebrow {
  margin: 0 0 6px;
  color: rgba(24, 48, 43, 0.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 30px;
}

.product-name {
  font-family: "Songti SC", "STSong", serif;
  font-size: 44px;
}

h2 {
  margin-bottom: 8px;
  font-size: 20px;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

p {
  color: var(--muted);
  line-height: 1.7;
}

.topbar-actions,
menu,
.card-actions,
.draft-actions,
.inspiration-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(242, 201, 76, 0.36);
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(53, 84, 77, 0.1);
  backdrop-filter: blur(18px);
}

.home-hero {
  position: relative;
  min-height: min(620px, calc(100vh - 132px));
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  padding: 72px 18px 96px;
}

.home-hero h1 {
  max-width: 980px;
  margin: 0 auto 18px;
  display: block;
  color: #050505;
  font-size: clamp(42px, 6.2vw, 92px);
  font-weight: 900;
  line-height: 1.05;
}

.home-hero p {
  max-width: 760px;
  margin-bottom: 42px;
  color: rgba(0, 0, 0, 0.76);
  font-size: 20px;
  line-height: 1.7;
}

.hero-primary {
  width: min(224px, 64vw);
  min-height: 58px;
  border: 0;
  border-radius: 999px;
  background:
    radial-gradient(circle at 22% 42%, rgba(185, 214, 255, 0.9), transparent 38%),
    radial-gradient(circle at 78% 42%, rgba(194, 239, 176, 0.92), transparent 42%),
    linear-gradient(90deg, rgba(209, 226, 250, 0.94), rgba(229, 247, 236, 0.96));
  color: rgba(15, 22, 26, 0.88);
  padding: 0 26px;
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 900;
  letter-spacing: 0;
  box-shadow:
    0 18px 36px rgba(58, 90, 110, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(26px);
}

.hero-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 22px 42px rgba(58, 90, 110, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.api-menu-wrap {
  position: relative;
}

.api-status {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.22);
  color: rgba(24, 48, 43, 0.74);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(53, 84, 77, 0.08);
}

.api-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  display: grid;
  gap: 6px;
  min-width: 148px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.api-menu[hidden] {
  display: none;
}

.api-menu button {
  border: 0;
  min-height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.22);
  color: var(--ink);
  padding: 0 12px;
  text-align: left;
  font-weight: 800;
}

.api-menu button:hover {
  background: rgba(255, 255, 255, 0.42);
}

.api-key-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.api-key-row .secondary-button {
  min-height: 44px;
  padding: 0 14px;
}

.api-key-row input:disabled {
  color: rgba(24, 48, 43, 0.62);
  -webkit-text-security: disc;
}

.api-status.ready {
  background: rgba(126, 182, 153, 0.28);
}

.api-status.mock {
  background: rgba(242, 201, 76, 0.28);
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button,
.icon-action,
.small-action,
.chip {
  border: 0;
  min-height: 42px;
  border-radius: 10px;
  background: var(--button-glass);
  color: var(--ink);
  padding: 0 16px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(53, 84, 77, 0.12);
  backdrop-filter: blur(18px);
}

.primary-button {
  background: rgba(126, 182, 153, 0.3);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.24);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.icon-button:hover,
.icon-action:hover,
.small-action:hover,
.chip:hover {
  background: rgba(255, 255, 255, 0.38);
}

.ghost-button,
.icon-button,
.icon-action {
  width: 42px;
  padding: 0;
}

.icon-action {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 42px;
  font-size: 20px;
}

.icon-action::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  border-radius: 10px;
  background: rgba(24, 48, 43, 0.76);
  color: #fff;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: var(--soft-shadow);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.icon-action:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.wide {
  width: 100%;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.workbench-grid,
.project-grid,
.compare-grid,
.inspiration-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.version-tabs,
.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.file-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(159, 201, 245, 0.28);
  padding: 0 12px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.file-pill small {
  color: var(--ink);
}

.file-pill.muted {
  min-height: 0;
  padding: 0;
  background: transparent;
  color: rgba(24, 48, 43, 0.48);
  box-shadow: none;
}

.workbench-card,
.project-card,
.conversation-card,
.gem-card,
.panel,
.material-card,
.draft-card,
.inspiration-card,
.dialog-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.workbench-card,
.project-card,
.conversation-card,
.gem-card,
.material-card,
.draft-card,
.inspiration-card {
  padding: 18px;
}

.workbench-grid {
  margin: 16px 0 26px;
}

.workbench-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.workbench-card .secondary-button {
  margin-top: auto;
}

.workbench-card.active,
.draft-card.active {
  border-color: rgba(126, 182, 153, 0.86);
  background: rgba(255, 255, 255, 0.32);
}

.project-list-head {
  margin-top: 4px;
}

#projectsView .section-head h2 {
  margin-bottom: 4px;
}

#projectsView .section-head p {
  margin-bottom: 0;
}

.project-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-card.active {
  border-color: rgba(126, 182, 153, 0.82);
  background: rgba(255, 255, 255, 0.28);
}

.project-console {
  display: grid;
  grid-template-columns: minmax(220px, 0.2fr) minmax(0, 0.8fr);
  gap: 18px;
  align-items: start;
}

.conversation-rail {
  position: sticky;
  top: 112px;
  min-height: 520px;
  padding-top: 10px;
}

.conversation-rail .panel-head {
  margin-bottom: 18px;
}

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

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

.conversation-card.active {
  border-color: rgba(126, 182, 153, 0.82);
  background: rgba(255, 255, 255, 0.3);
}

.conversation-main {
  display: grid;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: transparent;
  color: inherit;
}

.conversation-main h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.conversation-main p {
  margin: 0;
  font-size: 12px;
}

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

.detail-button {
  justify-self: start;
  margin-top: 4px;
  min-height: 25px;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12px;
  box-shadow: 0 6px 14px rgba(53, 84, 77, 0.09);
}

.rail-title {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 800;
}

.project-flow-actions,
.gem-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gem-actions {
  justify-content: flex-end;
}

.project-flow-actions .secondary-button {
  flex: 1;
  min-width: 110px;
}

.gem-library {
  min-width: 0;
}

.template-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.template-toolbar h2 {
  margin: 0;
  font-size: 18px;
}

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

.gem-card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.gem-card h3 {
  margin-bottom: 0;
  font-size: 22px;
}

.gem-card p {
  margin-bottom: 8px;
}

.template-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(24, 48, 43, 0.58);
  font-size: 12px;
  font-weight: 800;
}

.template-meta span {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  padding: 5px 8px;
}

.gem-card .gem-actions {
  width: 100%;
  margin-top: auto;
}

.detail-rail {
  position: sticky;
  top: 112px;
}

.detail-tabs {
  display: grid;
  gap: 12px;
}

.detail-tab {
  border: 0;
  min-height: 46px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.24);
  color: var(--ink);
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(53, 84, 77, 0.12);
  backdrop-filter: blur(18px);
}

.detail-tab:hover {
  background: rgba(255, 255, 255, 0.38);
}

.detail-overview {
  min-height: 520px;
}

.detail-summary {
  display: grid;
  gap: 14px;
}

.detail-summary h3 {
  margin: 0;
  font-size: 30px;
}

.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-stats span,
.detail-material {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.detail-material {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.detail-material p {
  margin: 0;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.project-meta span {
  border: 0;
  border-radius: 999px;
  min-height: 26px;
  padding: 4px 10px;
  color: var(--ink);
  background: rgba(159, 201, 245, 0.24);
  font-size: 12px;
  font-weight: 800;
}

.type-badge,
.status-badge,
.tag,
.source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  border: 0;
}

.type-badge {
  background: rgba(159, 215, 170, 0.34);
}

.status-badge {
  background: rgba(242, 201, 76, 0.34);
}

.tag {
  background: rgba(159, 215, 170, 0.3);
}

.source-badge {
  background: rgba(159, 201, 245, 0.32);
}

.studio-layout,
.workspace-layout,
.split-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 18px;
  align-items: start;
}

.workspace-results {
  display: none;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: stretch;
  margin-top: 18px;
}

.workspace-results.active {
  display: grid;
}

.results-main {
  display: grid;
  gap: 18px;
}

.panel {
  padding: 20px;
}

label {
  display: grid;
  gap: 8px;
  color: rgba(24, 48, 43, 0.74);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 16px;
}

.field-group {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field-label {
  width: fit-content;
  color: rgba(24, 48, 43, 0.74);
  font-size: 13px;
  font-weight: 800;
}

.skill-upload-row {
  gap: 10px;
}

.skill-upload-row .file-icon-upload {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  box-shadow:
    0 5px 12px rgba(53, 84, 77, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.skill-upload-row .file-glyph {
  width: 10px;
  height: 13px;
  border-width: 1.5px;
  border-radius: 3px;
}

.skill-upload-row .file-glyph::after {
  right: -1.5px;
  top: -1.5px;
  width: 4px;
  height: 4px;
  border-left-width: 1.5px;
  border-bottom-width: 1.5px;
}

.inline-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.skill-file-status {
  color: rgba(24, 48, 43, 0.5);
  font-size: 12px;
  font-weight: 700;
}

.file-icon-upload {
  position: relative;
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  margin: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.24);
  box-shadow:
    0 8px 18px rgba(53, 84, 77, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
  backdrop-filter: blur(18px);
  cursor: pointer;
}

.file-icon-upload:hover {
  background: rgba(255, 255, 255, 0.36);
  transform: translateY(-1px);
}

.file-icon-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-glyph {
  position: relative;
  width: 15px;
  height: 18px;
  display: block;
  border: 2px solid rgba(24, 48, 43, 0.72);
  border-radius: 4px;
}

.file-glyph::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -2px;
  width: 6px;
  height: 6px;
  border-left: 2px solid rgba(24, 48, 43, 0.72);
  border-bottom: 2px solid rgba(24, 48, 43, 0.72);
  background: rgba(255, 255, 255, 0.42);
  border-radius: 0 2px 0 2px;
}

.model-switcher {
  position: relative;
  width: fit-content;
  min-width: 176px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.24);
  color: rgba(24, 48, 43, 0.78);
  padding: 6px 12px 6px 8px;
  box-shadow:
    0 12px 28px rgba(53, 84, 77, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(20px);
}

.model-switcher:hover {
  background: rgba(255, 255, 255, 0.34);
  transform: translateY(-1px);
}

.model-switcher.compact {
  min-width: 214px;
  margin-bottom: 12px;
}

.model-switcher select {
  width: auto;
  min-width: 118px;
  min-height: 34px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  padding: 7px 10px;
  color: var(--ink);
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(16px);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  color: var(--ink);
  padding: 12px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(16px);
}

textarea {
  resize: vertical;
  line-height: 1.7;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(126, 182, 153, 0.88);
  background: rgba(255, 255, 255, 0.3);
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.prompt-mode {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.prompt-mode-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.14);
}

.prompt-mode-card h3 {
  margin-bottom: 6px;
}

.prompt-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.prompt-list li {
  border-left: 3px solid rgba(126, 182, 153, 0.72);
  padding-left: 10px;
  color: rgba(24, 48, 43, 0.76);
  line-height: 1.6;
}

.flow-step {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  min-height: 148px;
  background: rgba(255, 255, 255, 0.13);
}

.flow-step span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  font-weight: 800;
  margin-bottom: 12px;
}

.flow-step.active {
  border-color: rgba(126, 182, 153, 0.8);
}

.flow-step.done span,
.flow-step.active span {
  background: rgba(126, 182, 153, 0.46);
}

.compact {
  margin-bottom: 14px;
}

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

.material-card,
.inspiration-card {
  box-shadow: var(--soft-shadow);
}

.material-card p,
.draft-card p,
.inspiration-card p {
  margin-bottom: 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.draft-card {
  display: grid;
  gap: 14px;
  min-height: 520px;
}

.draft-body {
  white-space: pre-line;
  line-height: 1.75;
  color: rgba(24, 48, 43, 0.9);
  max-width: 92ch;
  max-height: 58vh;
  overflow: auto;
  padding-right: 8px;
}

.draft-actions {
  margin-top: auto;
  align-self: end;
  flex-wrap: wrap;
}

.small-action {
  min-height: 36px;
  padding: 0 10px;
}

.chip {
  min-height: 36px;
  border-radius: 10px;
  padding: 0 14px;
}

.chip.active {
  background: rgba(126, 182, 153, 0.32);
}

.inspiration-toolbar .chip.active {
  background: rgba(242, 201, 76, 0.46);
}

.inspiration-toolbar {
  margin: 14px 0 16px;
  flex-wrap: wrap;
}

.inspiration-card {
  min-height: 180px;
  display: grid;
  gap: 10px;
}

.mini-inspiration {
  position: sticky;
  top: 86px;
  margin-top: 68px;
  min-height: 520px;
  max-height: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  overflow: visible;
}

.mini-inspiration .panel-head {
  gap: 6px;
  min-height: 0;
  margin-bottom: 0;
}

.mini-inspiration .panel-head h2 {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

.mini-ideas {
  display: grid;
  align-content: start;
  gap: 10px;
  margin-bottom: 16px;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding-right: 6px;
}

.mini-idea,
.chat-message,
.inspiration-row,
.selected-draft-box {
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  padding: 12px;
}

.selected-draft-box {
  position: relative;
  display: grid;
  gap: 8px;
  padding-right: 44px;
  background: rgba(126, 182, 153, 0.18);
}

.selected-draft-box h3,
.selected-draft-box p {
  margin-bottom: 0;
}

.close-selected {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  padding: 0;
  box-shadow: 0 8px 18px rgba(53, 84, 77, 0.1);
}

.close-selected:hover {
  background: rgba(242, 201, 76, 0.34);
}

.mini-idea strong {
  display: block;
  margin: 8px 0 4px;
}

.chat-panel {
  display: grid;
  gap: 14px;
}

.revision-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.revision-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.revision-inspiration {
  margin-top: 0;
}

.chat-thread,
.revision-thread {
  display: grid;
  gap: 10px;
  max-height: 62vh;
  overflow: auto;
}

.chat-message.user {
  background: rgba(126, 182, 153, 0.22);
}

.chat-message.assistant,
.chat-message.system {
  background: rgba(255, 255, 255, 0.2);
}

.revision-message {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 16px;
  padding: 14px;
  white-space: pre-line;
  line-height: 1.75;
}

.revision-message span {
  font-size: 12px;
  font-weight: 900;
  color: rgba(24, 48, 43, 0.62);
}

.revision-message.user {
  margin-left: min(12vw, 160px);
  background: rgba(126, 182, 153, 0.22);
}

.revision-message.assistant {
  margin-right: min(8vw, 120px);
  background: rgba(255, 255, 255, 0.2);
}

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

.inspiration-row {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 14px;
}

.delete-inspiration {
  width: fit-content;
  min-height: 28px;
  margin-top: 10px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  color: rgba(24, 48, 43, 0.68);
  font-size: 12px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.delete-inspiration:hover,
.delete-inspiration[data-confirming="true"] {
  background: rgba(242, 201, 76, 0.36);
  color: var(--ink);
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.small-action.active {
  background: rgba(126, 182, 153, 0.34);
}

dialog {
  border: 0;
  background: transparent;
  width: min(760px, calc(100vw - 32px));
}

dialog::backdrop {
  background: rgba(24, 48, 43, 0.28);
  backdrop-filter: blur(12px);
}

.dialog-card {
  padding: 22px;
}

menu {
  padding: 0;
  margin: 20px 0 0;
  justify-content: flex-end;
}

@media (max-width: 1100px) {
  .project-grid,
  .workbench-grid,
  .compare-grid,
  .inspiration-grid,
  .flow-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-layout,
  .studio-layout,
  .workspace-results,
  .revision-layout,
  .split-layout,
  .project-console {
    grid-template-columns: 1fr;
  }

  .conversation-rail {
    position: static;
    min-height: 0;
  }

  .topbar {
    border-radius: 28px;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-list {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    margin: 12px;
    padding: 16px;
  }

  .topbar {
    margin: 12px;
  }

  .nav-list {
    display: flex;
  }

  .nav-item {
    justify-content: center;
    padding: 0 12px;
  }

  .team-panel {
    display: none;
  }

  .main {
    padding: 12px;
  }

  .home-hero {
    min-height: 520px;
    padding: 44px 8px 60px;
  }

  .home-hero p {
    font-size: 16px;
  }

  .hero-primary {
    width: min(210px, 74vw);
    min-height: 54px;
    padding: 0 22px;
    font-size: clamp(21px, 6.4vw, 26px);
  }

  .topbar,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    flex-wrap: wrap;
  }

  .product-name {
    font-size: 38px;
  }

  .project-grid,
  .workbench-grid,
  .gem-grid,
  .compare-grid,
  .inspiration-grid,
  .flow-steps {
    grid-template-columns: 1fr;
  }

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

  .mini-inspiration {
    position: static;
    margin-top: 0;
    top: auto;
  }

  .revision-message.user,
  .revision-message.assistant {
    margin-left: 0;
    margin-right: 0;
  }
}
