/* ==========================================================================
   开镜 KAIJING · product surface
   ========================================================================== */

.app-body {
  min-height: 100dvh;
  background:
    radial-gradient(900px 600px at 100% -10%, rgba(238, 214, 196, 0.32), transparent 62%),
    var(--paper);
}

.boot {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--paper);
  text-align: center;
}

.boot-mark img {
  border-radius: 13px;
  box-shadow: var(--shadow-md);
}

.boot > .mono {
  margin: 18px 0 8px;
  color: var(--ink-4);
  font-size: 9px;
}

.boot h1 {
  font-size: 24px;
  font-weight: 560;
  letter-spacing: -0.03em;
}

.boot-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 12px;
}

.boot-skeleton {
  width: min(420px, 100%);
  margin-top: 34px;
  opacity: 0.7;
}

.sk-line {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--paper-2), var(--surface), var(--paper-2));
  background-size: 200% 100%;
  animation: sk 1.6s linear infinite;
}

.sk-line.w40 { width: 40%; margin: 0 auto 18px; }

.sk-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.sk-cards i {
  height: 62px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.sk-block {
  height: 160px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
}

@keyframes sk {
  to { background-position: -200% 0; }
}

/* --------------------------------- shell ---------------------------------- */
.app {
  min-height: 100dvh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: 252px;
  padding: 18px 14px 14px;
  background: rgba(251, 247, 239, 0.9);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.sidebar-top {
  padding: 2px 6px 0;
}

.sidebar-top .brand {
  margin-bottom: 16px;
}

.workspace {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.65);
  text-align: left;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.workspace:hover {
  background: var(--surface);
  border-color: var(--line-strong);
}

.workspace-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--surface);
  font-size: 12px;
  font-weight: 600;
  flex: 0 0 auto;
}

.workspace-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.workspace-text b {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-text small {
  margin-top: 2px;
  font-size: 9.5px;
  color: var(--ink-4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace > .icon {
  margin-left: auto;
  width: 14px;
  height: 14px;
  color: var(--ink-4);
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 24px;
  overflow-y: auto;
  padding: 0 2px;
}

.nav-group-label {
  padding: 0 12px;
  margin-bottom: 7px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: var(--ink-4);
  text-transform: uppercase;
}

.nav-group-label-spaced { margin-top: 22px; }

.side-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.28s var(--ease), color 0.28s var(--ease);
}

.side-nav a .icon {
  width: 18px;
  height: 18px;
  color: var(--ink-4);
  transition: color 0.28s var(--ease);
}

.side-nav a:hover {
  background: rgba(255, 253, 248, 0.7);
  color: var(--ink);
}

.side-nav a.is-active {
  background: var(--ink);
  color: var(--surface);
  box-shadow: 0 10px 22px -18px rgba(27, 28, 24, 0.85);
}

.side-nav a.is-active .icon { color: var(--surface); }

.nav-badge {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.06em;
}

.side-nav a.is-active .nav-badge {
  background: rgba(255, 253, 248, 0.15);
  color: var(--surface);
}

.nav-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 9px;
  font-style: normal;
  color: var(--ink-4);
}

.side-nav a.is-active .nav-count { color: rgba(255, 253, 248, 0.55); }

.sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
}

.engine-card {
  display: block;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.55);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.engine-card:hover {
  background: var(--surface);
  border-color: var(--line-strong);
}

.engine-card-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 600;
}

.engine-card-head .icon {
  margin-left: auto;
  width: 13px;
  height: 13px;
  color: var(--ink-4);
}

.engine-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage-deep);
  box-shadow: 0 0 0 3px rgba(76, 101, 82, 0.1);
  flex: 0 0 auto;
}

.engine-dot.is-ai {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(188, 76, 44, 0.1);
}

.engine-card p {
  margin-top: 5px;
  padding-left: 13px;
  font-size: 9px;
  color: var(--ink-4);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  text-align: left;
  transition: background 0.3s var(--ease);
}

.user-card:hover { background: rgba(255, 253, 248, 0.7); }

.avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 650;
  flex: 0 0 auto;
}

.user-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.user-copy b { font-size: 12px; font-weight: 600; }
.user-copy small { font-size: 9px; color: var(--ink-4); margin-top: 2px; }
.user-card > .icon { margin-left: auto; width: 14px; height: 14px; color: var(--ink-4); }

.app-content {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  margin-left: 252px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 70px;
  padding: 0 clamp(18px, 2.4vw, 32px);
  background: rgba(245, 242, 234, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.05);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mobile-menu-btn { display: none; }

.crumb {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  max-width: min(46vw, 520px);
  overflow: hidden;
  font-size: 12px;
  color: var(--ink-4);
  white-space: nowrap;
}

.crumb i {
  font-style: normal;
  color: var(--ink-4);
  opacity: 0.6;
}

.crumb b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink-2);
  font-weight: 550;
}

.search-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(330px, 32vw);
  height: 38px;
  margin-left: 20px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 253, 248, 0.5);
  color: var(--ink-4);
  font-size: 11.5px;
  text-align: left;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.search-trigger:hover {
  background: var(--surface);
  border-color: var(--line-strong);
}

.search-trigger > span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-trigger .icon { color: var(--ink-4); }

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1;
  box-shadow: 0 1px 0 rgba(27, 28, 24, 0.04);
}

.search-trigger kbd { margin-left: auto; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}

.engine-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.45);
  font-size: 9.5px;
  color: var(--ink-3);
  white-space: nowrap;
  transition: background 0.3s var(--ease);
}

.engine-pill:hover { background: var(--surface); }

.topbar-new { min-height: 38px; padding-left: 15px; }
.topbar-new .btn-arrow { width: 26px; height: 26px; }

.avatar-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  transition: transform 0.3s var(--spring), box-shadow 0.3s var(--ease);
}

.avatar-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }

.app-view {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(22px, 2.4vw, 34px) clamp(18px, 2.4vw, 34px) 100px;
  outline: none;
}

.mobile-tabs { display: none; }

/* -------------------------------- page head -------------------------------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.page-head-copy { min-width: 0; }

.page-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  color: var(--ink-4);
  text-transform: uppercase;
}

.page-kicker .dot { background: var(--accent); }

.page-head h1 {
  margin-top: 8px;
  font-size: clamp(1.65rem, 2.4vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.045em;
  font-weight: 560;
  text-wrap: balance;
}

.page-head h1 em {
  font-style: normal;
  color: var(--accent-deep);
}

.page-desc {
  max-width: 620px;
  margin-top: 7px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-3);
}

.page-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
}

.page-actions .btn { min-height: 40px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 11px;
  color: var(--ink-3);
  transition: color 0.3s var(--ease), gap 0.3s var(--ease);
}

.back-link:hover { color: var(--accent-deep); gap: 9px; }
.back-link .icon { width: 14px; height: 14px; }

/* --------------------------------- surfaces -------------------------------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset, var(--shadow-sm);
}

.panel-pad { padding: 22px; }

.section-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-head-row h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section-head-row p {
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--ink-4);
}

.section-head-row a {
  font-size: 10.5px;
  color: var(--accent-deep);
  white-space: nowrap;
}

.section-head-row a:hover { text-decoration: underline; text-underline-offset: 3px; }

.mono-label {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: var(--ink-4);
  text-transform: uppercase;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 9.5px;
  font-weight: 500;
  white-space: nowrap;
}

.tag.is-accent { background: var(--accent-soft); color: var(--accent-deep); }
.tag.is-sage { background: var(--sage-soft); color: var(--sage-deep); }
.tag.is-butter { background: var(--butter-soft); color: #74551f; }
.tag.is-sky { background: var(--sky-soft); color: #3f6067; }
.tag.is-ink { background: var(--ink); color: var(--surface); }

.tag .icon { width: 11px; height: 11px; }

.divider {
  height: 1px;
  margin: 18px 0;
  background: var(--line);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.4);
  color: var(--ink-3);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.icon-btn:hover {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}

.icon-btn.is-danger:hover { color: var(--danger); border-color: rgba(163, 58, 40, 0.3); background: var(--danger-soft); }

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-3);
  font-size: 10.5px;
  transition: color 0.3s var(--ease);
}

.text-btn:hover { color: var(--accent-deep); }
.text-btn.is-danger:hover { color: var(--danger); }

.copy-btn {
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.5);
  color: var(--ink-4);
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
  flex: 0 0 auto;
}

.copy-btn:hover { background: var(--surface); color: var(--accent-deep); }
.copy-btn .icon { width: 13px; height: 13px; }

/* ---------------------------------- KPI ----------------------------------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.kpi {
  position: relative;
  padding: 15px 16px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kpi-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.kpi-icon.is-sage { background: var(--sage-soft); color: var(--sage-deep); }
.kpi-icon.is-butter { background: var(--butter-soft); color: #74551f; }
.kpi-icon.is-sky { background: var(--sky-soft); color: #3f6067; }
.kpi-icon .icon { width: 15px; height: 15px; }

.kpi-delta {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--ink-4);
  white-space: nowrap;
}

.kpi-value {
  margin-top: 12px;
  font-size: 27px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.kpi-value small {
  margin-left: 3px;
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-4);
  letter-spacing: 0;
}

.kpi-label {
  margin-top: 5px;
  font-size: 10.5px;
  color: var(--ink-3);
}

.kpi-spark {
  position: absolute;
  right: 12px;
  bottom: 11px;
  width: 56px;
  height: 22px;
  opacity: 0.45;
}

/* --------------------------------- dashboard ------------------------------- */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.shoot-card {
  position: relative;
  grid-column: span 8;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 0.84fr);
  min-height: 248px;
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  background:
    radial-gradient(460px 300px at 92% 8%, rgba(233, 205, 150, 0.4), transparent 62%),
    var(--surface-2);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.shoot-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.shoot-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.7);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

.shoot-copy h2 {
  margin-top: 18px;
  font-size: clamp(1.45rem, 2.4vw, 1.95rem);
  line-height: 1.24;
  letter-spacing: -0.04em;
  font-weight: 560;
  text-wrap: balance;
}

.shoot-copy > p {
  margin-top: 9px;
  max-width: 430px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shoot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.shoot-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
}

.shoot-date {
  position: absolute;
  right: 22px;
  top: 20px;
  z-index: 2;
  text-align: right;
}

.shoot-date b {
  display: block;
  font-family: var(--font-mono);
  font-size: 26px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.06em;
  color: var(--accent-deep);
}

.shoot-date span {
  font-size: 9px;
  color: var(--ink-4);
}

.shoot-art {
  position: absolute;
  right: -8%;
  bottom: -22%;
  width: 54%;
  aspect-ratio: 1.18;
  opacity: 0.95;
  pointer-events: none;
  mask-image: radial-gradient(circle at 50% 50%, #000 55%, transparent 76%);
}

.shoot-art img { width: 100%; height: 100%; object-fit: contain; }

.engine-panel {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  background:
    radial-gradient(300px 220px at 100% 0%, rgba(141, 164, 143, 0.2), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.engine-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.engine-panel-head h2 {
  font-size: 13.5px;
  font-weight: 600;
}

.engine-panel-head .engine-dot { margin-left: auto; }

.engine-panel > p {
  margin-top: 8px;
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--ink-3);
}

.engine-meter {
  margin-top: auto;
  padding-top: 16px;
}

.engine-meter-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 9.5px;
  color: var(--ink-4);
}

.engine-meter-bar {
  height: 5px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--paper-2);
  overflow: hidden;
}

.engine-meter-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--sage-deep);
}

.engine-panel .btn {
  margin-top: 14px;
  width: 100%;
  justify-content: space-between;
}

.hotspot-panel {
  grid-column: span 5;
  padding: 18px;
}

.activity-panel {
  grid-column: span 3;
  padding: 18px;
}

.recent-panel {
  grid-column: span 4;
  padding: 18px;
}

.hotspot-mini {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 0;
  border-top: 1px solid var(--line-soft);
  transition: opacity 0.3s var(--ease);
}

.hotspot-mini:first-of-type { border-top: 0; }
.hotspot-mini:hover { opacity: 0.72; }

.hotspot-thumb {
  width: 48px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  flex: 0 0 auto;
  background: var(--paper-2);
}

.hotspot-thumb img { width: 100%; height: 100%; object-fit: cover; }

.hotspot-mini-copy { min-width: 0; flex: 1; }

.hotspot-mini-copy b {
  display: block;
  font-size: 11.5px;
  font-weight: 550;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hotspot-mini-copy span {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  color: var(--ink-4);
}

.hotspot-growth {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--sage-deep);
  background: var(--sage-soft);
  padding: 3px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

.activity-chart {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 104px;
  padding-top: 16px;
}

.activity-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  height: 100%;
  gap: 5px;
}

.activity-bar i {
  display: block;
  width: 100%;
  max-width: 20px;
  min-height: 3px;
  border-radius: 5px 5px 2px 2px;
  background: var(--paper-3);
  position: relative;
  transition: height 0.8s var(--spring), background 0.3s var(--ease);
}

.activity-bar.is-today i { background: var(--accent); }

.activity-bar em {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 7.5px;
  color: var(--ink-4);
}

.activity-bar span {
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: var(--ink-4);
}

.activity-total {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 5px;
}

.activity-total b {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.activity-total span { font-size: 9px; color: var(--ink-4); }

.recent-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line-soft);
}

.recent-item:first-of-type { border-top: 0; }

.recent-thumb {
  width: 42px;
  height: 38px;
  border-radius: 9px;
  overflow: hidden;
  background: var(--paper-2);
  flex: 0 0 auto;
}

.recent-thumb img { width: 100%; height: 100%; object-fit: cover; }

.recent-copy { min-width: 0; flex: 1; }
.recent-copy b {
  display: block;
  font-size: 10.5px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-copy span { display: block; margin-top: 2px; font-size: 8.5px; color: var(--ink-4); }
.recent-item > .icon { width: 13px; height: 13px; color: var(--ink-4); }

@media (max-width: 1200px) {
  .shoot-card { grid-column: span 7; }
  .engine-panel { grid-column: span 5; }
  .hotspot-panel { grid-column: span 6; }
  .activity-panel { grid-column: span 6; }
  .recent-panel { grid-column: span 12; }
}

@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shoot-card,
  .engine-panel,
  .hotspot-panel,
  .activity-panel,
  .recent-panel { grid-column: span 12; }
  .shoot-card { min-height: 230px; }
  .shoot-art { width: 48%; }
}

/* ---------------------------------- forms ---------------------------------- */
.form-card {
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.form-card + .form-card { margin-top: 14px; }

.form-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.section-num {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  flex: 0 0 auto;
}

.form-card-head h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.form-card-head p {
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--ink-4);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field + .field { margin-top: 15px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row .field + .field { margin-top: 0; }

.field label,
.field-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 550;
  color: var(--ink-2);
}

.field label em {
  font-style: normal;
  color: var(--accent);
}

.field-help {
  font-size: 9.5px;
  line-height: 1.6;
  color: var(--ink-4);
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 12.5px;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.input:hover,
.textarea:hover,
.select:hover { border-color: var(--line-strong); }

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(188, 76, 44, 0.1);
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"] { border-color: var(--danger); }

.textarea {
  min-height: 92px;
  padding: 11px 13px;
  resize: vertical;
  line-height: 1.7;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236c6e63' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
  cursor: pointer;
}

.field-error {
  font-size: 9.5px;
  color: var(--danger);
}

.char-count {
  align-self: flex-end;
  margin-top: -2px;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--ink-4);
}

.chip-select {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-3);
  font-size: 10.5px;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.chip-option:hover { border-color: var(--line-strong); color: var(--ink); }

.chip-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip-option:has(input:checked) {
  background: var(--accent-soft);
  border-color: rgba(188, 76, 44, 0.32);
  color: var(--accent-deep);
}

.chip-option:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.chip-option .check {
  display: none;
  width: 11px;
  height: 11px;
}

.chip-option:has(input:checked) .check { display: block; }

.tone-list { display: flex; flex-wrap: wrap; gap: 6px; }

.tone-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--sage-soft);
  color: var(--sage-deep);
  font-size: 10px;
}

.tone-item button {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  opacity: 0.6;
}

.tone-item button:hover { opacity: 1; }
.tone-item .icon { width: 10px; height: 10px; }

.inline-add {
  display: flex;
  gap: 7px;
}

.inline-add .input { flex: 1; }
.inline-add .btn { flex: 0 0 auto; min-height: 44px; }

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

.radio-card {
  position: relative;
  display: block;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.radio-card:hover { border-color: var(--line-strong); }

.radio-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-card .radio-dot {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 14px;
  height: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.radio-card .radio-dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.2s var(--ease);
}

.radio-card b {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  padding-right: 20px;
}

.radio-card span {
  display: block;
  margin-top: 3px;
  font-size: 9.5px;
  line-height: 1.5;
  color: var(--ink-4);
}

.radio-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-wash);
  box-shadow: 0 0 0 2px rgba(188, 76, 44, 0.07);
}

.radio-card:has(input:checked) .radio-dot {
  border-color: var(--accent);
}

.radio-card:has(input:checked) .radio-dot::after {
  background: var(--accent);
}

.radio-card:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}

.switch-row:first-of-type { border-top: 0; }

.switch-copy b { display: block; font-size: 11.5px; font-weight: 550; }
.switch-copy span { display: block; margin-top: 2px; font-size: 9.5px; color: var(--ink-4); }

.switch {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--paper-3);
  border: 1px solid var(--line);
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.switch::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(27, 28, 24, 0.2);
  transition: transform 0.35s var(--spring);
}

.switch[aria-checked="true"] { background: var(--sage-deep); border-color: var(--sage-deep); }
.switch[aria-checked="true"]::after { transform: translateX(16px); }

.save-bar {
  position: sticky;
  bottom: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.86);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-md);
}

.save-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 9.5px;
  color: var(--ink-4);
  white-space: nowrap;
}

.save-status .dot { background: var(--sage-deep); }
.save-status.is-saving .dot { background: var(--warning); animation: blink 1s infinite; }
.save-status.is-error { color: var(--danger); }
.save-status.is-error .dot { background: var(--danger); }

@keyframes blink { 50% { opacity: 0.25; } }

/* --------------------------------- profile -------------------------------- */
.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.profile-main { padding-bottom: 36px; }

.profile-aside {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-preview {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.profile-preview-art {
  position: relative;
  aspect-ratio: 16 / 8;
  background: var(--paper);
  overflow: hidden;
}

.profile-preview-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-preview-art span {
  position: absolute;
  left: 12px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.82);
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--ink-3);
  backdrop-filter: blur(8px);
}

.profile-preview-body { padding: 17px; }

.profile-preview-body .mono-label { margin-bottom: 7px; }

.profile-preview-body h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.profile-preview-body > p {
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--ink-4);
}

.profile-preview-body .tag { margin-top: 12px; }

.completeness {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  flex: 0 0 auto;
}

.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring b { font-size: 15px; font-weight: 600; letter-spacing: -0.03em; }
.ring b small { font-size: 8px; font-weight: 500; color: var(--ink-4); }

.completeness-copy b { display: block; font-size: 11.5px; font-weight: 600; }
.completeness-copy p { margin-top: 3px; font-size: 9.5px; line-height: 1.55; color: var(--ink-4); }

.profile-tips {
  padding: 15px;
  border-radius: 17px;
  background: var(--sage-soft);
  color: var(--sage-deep);
}

.profile-tips .mono-label { color: var(--sage-deep); opacity: 0.65; }
.profile-tips p { margin-top: 6px; font-size: 10.5px; line-height: 1.7; }

.store-switch-wrap { display: flex; align-items: center; gap: 7px; margin-right: 10px; }
.store-switch-wrap .select { min-width: 150px; height: 36px; }
.team-card { padding: 15px; border: 1px solid var(--line-soft); border-radius: 17px; background: rgba(255,255,255,.65); }
.team-card .mono-label { margin: 0; }
.team-card .text-btn { display: inline-flex; align-items: center; gap: 3px; font-size: 8px; color: var(--accent-deep); }
.team-head-actions { display: flex; gap: 8px; align-items: center; }
.invite-result { margin-top: 12px; }
.invite-link { display: flex; gap: 5px; }
.invite-link input { flex: 1; min-width: 0; height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; font-family: var(--font-mono); font-size: 8px; color: var(--ink-2); }
.join-page { min-height: 80vh; display: grid; place-items: center; padding: 24px; }
.join-card { width: min(100%, 460px); padding: 24px; border: 1px solid rgba(255,255,255,.9); border-radius: 26px; background: rgba(255,255,255,.82); box-shadow: var(--shadow-lg); }
.join-brand { display: flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; color: var(--ink-4); }
.join-art { overflow: hidden; aspect-ratio: 16/9; margin-top: 18px; border-radius: 16px; }
.join-art img { width: 100%; height: 100%; object-fit: cover; }
.join-card .mono-label { margin-top: 18px; }
.join-card h1 { margin: 8px 0 0; font-family: var(--font-display); font-size: 34px; line-height: 1.1; letter-spacing: -.05em; }
.join-card h1 em { color: var(--accent-deep); font-style: normal; }
.join-desc { margin: 10px 0 18px; font-size: 11px; line-height: 1.7; color: var(--ink-3); }
.join-card .btn { width: 100%; justify-content: center; }
.join-back { display: block; margin-top: 14px; text-align: center; font-size: 9px; color: var(--ink-4); }
.join-result { margin-bottom: 12px; }
.join-ok, .join-error { padding: 10px 12px; border-radius: 10px; font-size: 9px; }
.join-ok { background: var(--sage-soft); color: var(--sage-deep); }
.join-error { background: var(--danger-soft); color: var(--danger); }
.team-list { display: flex; flex-direction: column; gap: 8px; margin-top: 11px; }
.team-row { display: flex; align-items: center; gap: 7px; }
.team-avatar { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--accent-wash); font-size: 9px; color: var(--accent-deep); }
.team-row b { display: block; font-size: 8.5px; color: var(--ink-2); }
.team-row em { display: block; font-size: 7px; font-style: normal; color: var(--ink-4); }
.profile-actions { display: flex; gap: 8px; }
.profile-actions .btn { flex: 1; justify-content: center; }

.selling-list { display: flex; flex-direction: column; gap: 7px; }

.selling-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 11px;
}

.selling-item .dot { background: var(--accent); }
.selling-item button {
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--ink-4);
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
}
.selling-item button:hover { color: var(--danger); }
.selling-item .icon { width: 12px; height: 12px; }

/* ---------------------------------- radar --------------------------------- */
.radar-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.radar-toolbar .search-inline {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  margin-left: auto;
  min-width: 200px;
}

.radar-toolbar .search-inline .icon { width: 14px; height: 14px; color: var(--ink-4); }
.radar-toolbar .search-inline input {
  border: 0;
  background: transparent;
  outline: none;
  font-size: 11px;
  width: 100%;
}

.radar-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
  padding: 11px 15px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--surface);
  font-size: 10px;
  color: var(--ink-3);
}

.radar-summary b {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.radar-summary .sr-divider { height: 16px; }

.radar-sources { display: flex; flex-wrap: wrap; gap: 7px; margin: -7px 0 14px; }
.radar-source { display: inline-flex; align-items: center; gap: 4px; padding: 6px 9px; border: 1px solid var(--line-soft); border-radius: 999px; background: rgba(255,255,255,.72); font-size: 8px; color: var(--ink-3); }
.radar-source i { width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); }
.radar-source.is-ok i { background: var(--sage); box-shadow: 0 0 0 2px rgba(54,160,130,.12); }
.radar-source.is-fail i { background: var(--warning); }
.radar-source b { font-family: var(--font-mono); font-size: 7px; color: var(--ink-2); }
.radar-source em { font-style: normal; font-size: 7px; color: var(--ink-4); }
.radar-auto { align-self: center; margin-left: auto; font-family: var(--font-mono); font-size: 7px; color: var(--ink-4); }

.hotspot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.hotspot-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: transform 0.45s var(--spring), box-shadow 0.4s var(--ease), border-color 0.3s var(--ease);
}

.hotspot-card:hover {
  transform: translateY(-3px);
  border-color: var(--line);
  box-shadow: var(--shadow-md);
}

.hotspot-card.is-featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
}

.hotspot-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--paper);
  overflow: hidden;
}

.is-featured .hotspot-cover { aspect-ratio: auto; height: 100%; min-height: 240px; }

.hotspot-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--spring);
}

.hotspot-cover.is-type {
  background:
    radial-gradient(80% 90% at 12% 0%, hsla(var(--type-hue), 55%, 72%, .55), transparent 65%),
    radial-gradient(70% 80% at 100% 100%, hsla(calc(var(--type-hue) + 48), 52%, 64%, .38), transparent 70%),
    linear-gradient(145deg, #2d2740, #433955 55%, #2b2637);
}

.hotspot-cover.is-type::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: .22;
  background-image:
    linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(140deg, #000, transparent 70%);
}

.hotspot-type-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px 17px 17px;
  color: #fff;
}

.hotspot-type-cover .type-rank {
  position: absolute;
  top: -16px;
  right: 6px;
  font-family: var(--font-display);
  font-size: 128px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.08em;
  color: rgba(255,255,255,.09);
}

.hotspot-type-cover strong {
  position: relative;
  z-index: 1;
  max-width: 92%;
  font-family: var(--font-display);
  font-size: clamp(18px, 2.1vw, 27px);
  font-weight: 750;
  line-height: 1.18;
  letter-spacing: -.045em;
  text-wrap: balance;
  text-shadow: 0 2px 14px rgba(16,12,26,.25);
}

.hotspot-type-cover em {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 7px;
  font-style: normal;
  letter-spacing: .06em;
  color: rgba(255,255,255,.58);
}

.is-featured .hotspot-type-cover strong { font-size: clamp(24px, 3vw, 38px); }

.hotspot-card:hover .hotspot-cover img { transform: scale(1.03); }

.hotspot-preview { display: flex; flex-direction: column; gap: 11px; }
.hotspot-preview-frame { position: relative; overflow: hidden; border-radius: 16px; background: #201b2b; }
.hotspot-preview-media { display: block; width: 100%; max-height: 56vh; object-fit: contain; background: #201b2b; }
.hotspot-preview-type { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 330px; padding: 24px; overflow: hidden; border-radius: 16px; color: #fff; background: radial-gradient(80% 90% at 12% 0%, hsla(var(--type-hue),55%,72%,.55), transparent 65%), linear-gradient(145deg,#2d2740,#433955 55%,#2b2637); }
.hotspot-preview-type > span { position: absolute; top: 8px; right: 16px; font-family: var(--font-display); font-size: 150px; font-weight: 800; line-height: 1; color: rgba(255,255,255,.08); }
.hotspot-preview-type strong { position: relative; max-width: 90%; font-family: var(--font-display); font-size: 32px; line-height: 1.18; letter-spacing: -.05em; }
.hotspot-preview-type em { position: relative; margin-top: 10px; font-family: var(--font-mono); font-size: 8px; font-style: normal; color: rgba(255,255,255,.58); }
.hotspot-preview-note { position: absolute; right: 10px; bottom: 10px; left: 10px; padding: 7px 9px; border-radius: 7px; background: rgba(20,16,28,.72); color: rgba(255,255,255,.82); font-size: 8px; line-height: 1.5; }
.hotspot-preview p { margin: 0; font-size: 9px; line-height: 1.6; color: var(--ink-4); }
.hotspot-preview .modal-actions { margin-top: 2px; }
.hotspot-play { position: absolute; top: 50%; left: 50%; z-index: 2; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--ink); transform: translate(-50%,-50%); box-shadow: 0 8px 24px rgba(20,15,30,.2); }

.hotspot-platform {
  position: absolute;
  left: 11px;
  top: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.85);
  font-size: 8.5px;
  color: var(--ink-2);
  backdrop-filter: blur(8px);
}

.hotspot-heat {
  position: absolute;
  right: 11px;
  top: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  font-family: var(--font-mono);
  font-size: 8px;
}

.hotspot-heat .icon { width: 10px; height: 10px; color: var(--butter); }
.hotspot-heat em { margin-left: 2px; padding-left: 5px; border-left: 1px solid rgba(255,255,255,.3); font-style: normal; color: var(--butter); }

.hotspot-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 15px;
  min-width: 0;
}

.hotspot-body h3 {
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: -0.025em;
  font-weight: 600;
  text-wrap: balance;
}

.is-featured .hotspot-body h3 { font-size: 18px; }

.hotspot-body > p {
  margin-top: 6px;
  font-size: 10.5px;
  line-height: 1.65;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.is-featured .hotspot-body > p { -webkit-line-clamp: 3; font-size: 11px; }

.hotspot-why {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--accent-wash);
  color: var(--accent-deep);
  font-size: 9.5px;
  line-height: 1.55;
}

.hotspot-why b { font-weight: 600; }

.hotspot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.hotspot-meta .tag { font-size: 8.5px; padding: 2px 6px; }

.hotspot-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 13px;
}

.heat-bar {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--paper-2);
  overflow: hidden;
}

.heat-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--butter), var(--accent)); }

.hotspot-foot .mono { font-size: 8px; color: var(--ink-4); }
.hotspot-foot .btn { margin-left: auto; }

/* -------------------------------- studio --------------------------------- */
.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
  align-items: start;
}

.studio-main { min-width: 0; }

.studio-aside {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.studio-summary {
  padding: 19px;
  border: 1px solid var(--line-soft);
  border-radius: 21px;
  background:
    radial-gradient(240px 170px at 100% 0%, rgba(233, 205, 150, 0.3), transparent 65%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.studio-summary h3 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid var(--line-soft);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  color: var(--ink-4);
}

.summary-row b {
  max-width: 62%;
  text-align: right;
  color: var(--ink-2);
  font-weight: 500;
}

.output-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.output-list li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: var(--ink-3);
}

.output-list .icon { width: 13px; height: 13px; color: var(--sage-deep); }

.studio-summary .btn {
  width: 100%;
  justify-content: space-between;
  margin-top: 16px;
}

.studio-estimate {
  margin-top: 10px;
  text-align: center;
  font-size: 9px;
  color: var(--ink-4);
}

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

.pick-card {
  position: relative;
  display: flex;
  gap: 9px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.pick-card:hover { border-color: var(--line-strong); }

.pick-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pick-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-wash);
  box-shadow: 0 0 0 2px rgba(188, 76, 44, 0.07);
}

.pick-cover {
  width: 82px;
  height: 64px;
  border-radius: 9px;
  overflow: hidden;
  flex: 0 0 auto;
  background: var(--paper-2);
}

.pick-cover img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.28); transform-origin: 55% 55%; }

.pick-copy { min-width: 0; padding-top: 1px; }
.pick-copy b {
  display: block;
  font-size: 10.5px;
  line-height: 1.4;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pick-copy span { display: block; margin-top: 3px; font-size: 8.5px; color: var(--ink-4); }

.custom-idea {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.custom-idea .field { margin-top: 0; }

.studio-store-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
}

.store-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--sage-soft);
  color: var(--sage-deep);
  font-size: 14px;
  font-weight: 600;
  flex: 0 0 auto;
}

.studio-store-card b { display: block; font-size: 11.5px; font-weight: 600; }
.studio-store-card span { display: block; margin-top: 2px; font-size: 9px; color: var(--ink-4); }
.studio-store-card a { margin-left: auto; font-size: 9.5px; color: var(--accent-deep); white-space: nowrap; }

.studio-note {
  margin-top: 10px;
  font-size: 9.5px;
  line-height: 1.6;
  color: var(--ink-4);
}

.check-card {
  padding: 19px;
  border-radius: 21px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-xs);
}

.check-card h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
}

.check-card h3 .icon { width: 14px; height: 14px; color: var(--sage-deep); }

.check-rows { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.check-row { display: flex; align-items: flex-start; gap: 7px; font-size: 9.5px; color: var(--ink-3); }
.check-row .icon { width: 12px; height: 12px; margin-top: 2px; color: var(--sage-deep); flex: 0 0 auto; }
.check-row b { color: var(--ink-2); font-weight: 550; }

/* -------------------------------- run screen ------------------------------- */
.run-screen {
  animation: view-in 0.5s var(--ease);
}

.run-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.run-head h1 {
  margin-top: 6px;
  font-size: clamp(1.5rem, 2.2vw, 1.9rem);
  letter-spacing: -0.04em;
  font-weight: 560;
}

.run-head p { margin-top: 4px; font-size: 10.5px; color: var(--ink-4); }

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

.run-grid {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 280px;
  gap: 12px;
  align-items: start;
}

.run-side,
.run-main,
.run-aside {
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.run-side { padding: 17px; }
.run-main { padding: 20px; }
.run-aside { padding: 17px; }

.run-side h3,
.run-aside h3 {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.run-task {
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid var(--line-soft);
}

.run-task b { display: block; font-size: 11px; font-weight: 600; line-height: 1.5; }
.run-task p { margin-top: 4px; font-size: 9px; line-height: 1.6; color: var(--ink-4); }

.run-task-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }

.run-queue { margin-top: 18px; }
.run-queue .mono-label { margin-bottom: 8px; }

.run-queue-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 9.5px;
  color: var(--ink-3);
}

.run-queue-item:first-of-type { border-top: 0; }
.run-queue-item .dot { background: var(--sage); }
.run-queue-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.run-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.run-title-row h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
}

.run-title-row .badge {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--sage-soft);
  color: var(--sage-deep);
  font-family: var(--font-mono);
  font-size: 8px;
}

.run-clock {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}

.run-stream {
  position: relative;
  padding: 8px 0 4px;
}

.run-step {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 0;
  align-items: start;
}

.run-step::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 36px;
  bottom: -10px;
  width: 1px;
  background: var(--line);
}

.run-step:last-child::before { display: none; }

.run-step-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-4);
}

.run-step-icon .icon { width: 13px; height: 13px; }

.run-step.is-running .run-step-icon {
  border-color: rgba(188, 76, 44, 0.3);
  background: var(--accent-wash);
  color: var(--accent-deep);
}

.run-step.is-done .run-step-icon {
  border-color: transparent;
  background: var(--sage-soft);
  color: var(--sage-deep);
}

.run-step.is-failed .run-step-icon {
  border-color: transparent;
  background: var(--danger-soft);
  color: var(--danger);
}

.run-step.is-stopped .run-step-icon {
  border-color: transparent;
  background: var(--warning-soft);
  color: var(--warning);
}

.run-step-copy b {
  display: block;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
}

.run-step-copy p {
  margin-top: 2px;
  font-size: 9.5px;
  line-height: 1.55;
  color: var(--ink-4);
}

.run-step.is-pending .run-step-copy { opacity: 0.45; }

.run-step-dur {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--ink-4);
  white-space: nowrap;
  padding-top: 2px;
}

.run-step.is-running .run-step-dur { color: var(--accent-deep); }

.run-step.is-running .run-step-icon::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 11px;
  border: 1px solid rgba(188, 76, 44, 0.28);
  animation: pulse 2s var(--ease) infinite;
}

.run-evidence {
  grid-column: 2 / -1;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  line-height: 1.6;
  color: var(--ink-3);
  display: none;
}

.run-step.is-done .run-evidence { display: block; }

.run-stream-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.run-stream-foot .btn-stop {
  min-height: 38px;
  padding: 0 16px;
  border-color: rgba(163, 58, 40, 0.25);
  background: var(--danger-soft);
  color: var(--danger);
  justify-content: center;
}

.run-stream-foot .btn-stop:hover { background: rgba(163, 58, 40, 0.12); }

.run-stream-foot .run-hint {
  font-size: 9px;
  color: var(--ink-4);
  margin-left: auto;
}

.run-result-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.aside-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  margin-top: 10px;
  border-radius: 12px;
  background: var(--paper-2);
}

.aside-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aside-cover span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.84);
  color: var(--ink-2);
  font-size: 8.5px;
  backdrop-filter: blur(8px);
}

.run-outputs { margin-top: 12px; }
.run-outputs .output-list { margin-top: 9px; }

.run-receipt {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.run-receipt .mono-label { margin-bottom: 7px; }
.receipt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.receipt-cell { padding: 7px 8px; border-radius: 8px; background: var(--surface-2); }
.receipt-cell span { display: block; font-size: 7.5px; color: var(--ink-4); }
.receipt-cell b { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 9.5px; font-weight: 500; }

.run-approval {
  margin-top: 12px;
  padding: 11px;
  border: 1px solid rgba(188, 76, 44, 0.2);
  border-radius: 11px;
  background: var(--accent-wash);
}

.run-approval b { font-size: 10px; color: var(--accent-deep); }
.run-approval p { margin-top: 3px; font-size: 8.5px; line-height: 1.55; color: var(--ink-3); }

/* ---------------------------------- plan ---------------------------------- */
.plan-hero {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  margin-bottom: 16px;
  border-radius: 26px;
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--shadow-md);
}

.plan-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.plan-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 21, 17, 0.92) 0%, rgba(20, 21, 17, 0.7) 38%, rgba(20, 21, 17, 0.12) 74%, transparent 100%),
    linear-gradient(0deg, rgba(20, 21, 17, 0.55), transparent 60%);
}

.plan-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 300px;
  padding: 25px 28px;
}

.plan-hero-top {
  position: absolute;
  left: 28px;
  top: 22px;
  z-index: 3;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.plan-hero .tag {
  background: rgba(255, 253, 248, 0.13);
  color: rgba(255, 253, 248, 0.8);
  border: 1px solid rgba(255, 253, 248, 0.14);
  backdrop-filter: blur(8px);
}

.plan-hero .tag.is-accent { background: var(--accent); color: #fff9f4; border-color: transparent; }

.plan-hero-inner h1 {
  max-width: 680px;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.16;
  letter-spacing: -0.045em;
  font-weight: 540;
  text-wrap: balance;
}

.plan-hero-inner > p {
  max-width: 560px;
  margin-top: 10px;
  font-size: 11.5px;
  line-height: 1.7;
  color: rgba(255, 253, 248, 0.65);
}

.plan-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 253, 248, 0.14);
  font-size: 9.5px;
  color: rgba(255, 253, 248, 0.5);
}

.plan-hero-meta b { color: rgba(255, 253, 248, 0.85); font-weight: 500; }

.plan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 16px;
  align-items: start;
}

.plan-nav {
  position: sticky;
  top: 84px;
  z-index: 12;
  display: flex;
  gap: 4px;
  margin-bottom: 13px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.86);
  backdrop-filter: blur(12px);
  overflow-x: auto;
  scrollbar-width: none;
}

.plan-nav::-webkit-scrollbar { display: none; }

.plan-nav a {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 9.5px;
  color: var(--ink-3);
  white-space: nowrap;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.plan-nav a:hover { background: var(--surface-2); color: var(--ink); }

.plan-section {
  scroll-margin-top: 140px;
  padding: 21px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.plan-section + .plan-section { margin-top: 13px; }

.plan-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 17px;
}

.plan-section-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.plan-section-head h2 .icon { width: 16px; height: 16px; color: var(--accent-deep); }
.plan-section-head p { margin-top: 3px; font-size: 9.5px; color: var(--ink-4); }

.concept-box {
  padding: 19px;
  border-radius: 15px;
  background:
    radial-gradient(300px 180px at 100% 0%, rgba(233, 205, 150, 0.3), transparent 65%),
    var(--accent-wash);
}

.concept-box .mono-label { color: var(--accent-deep); opacity: 0.65; }
.concept-box h3 {
  margin-top: 7px;
  font-size: clamp(1.25rem, 2.1vw, 1.65rem);
  line-height: 1.35;
  letter-spacing: -0.035em;
  font-weight: 560;
  text-wrap: balance;
}
.concept-box p { margin-top: 6px; font-size: 11px; line-height: 1.7; color: var(--ink-3); }

.direction-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  overflow: hidden;
  background: var(--line-soft);
}

.direction-cell {
  padding: 12px 13px;
  background: var(--surface);
}

.direction-cell span {
  display: block;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  text-transform: uppercase;
}

.direction-cell b {
  display: block;
  margin-top: 4px;
  font-size: 10.5px;
  line-height: 1.6;
  font-weight: 450;
  color: var(--ink-2);
}

.hook-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.hook-card {
  display: flex;
  flex-direction: column;
  min-height: 150px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.hook-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hook-card .tag { font-size: 8px; padding: 2px 6px; }

.hook-card p {
  margin-top: 11px;
  font-size: 12px;
  line-height: 1.65;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-2);
}

.hook-card > span {
  margin-top: auto;
  padding-top: 10px;
  font-size: 8.5px;
  line-height: 1.55;
  color: var(--ink-4);
}

.script-list { border-top: 1px solid var(--line); }

.script-line {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 27px;
  gap: 13px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: start;
}

.script-line:hover { background: rgba(251, 247, 239, 0.5); }

.script-time {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--accent-deep);
  padding-top: 3px;
}

.script-copy b {
  display: block;
  font-size: 13.5px;
  line-height: 1.65;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.script-copy span {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 6px;
  font-size: 9px;
  color: var(--ink-4);
}

.script-copy em {
  font-style: normal;
  color: var(--ink-3);
}

.script-copy em::before {
  content: "·";
  margin-right: 6px;
  color: var(--ink-4);
}

.shot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

.shot-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.shot-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--paper-2);
}

.shot-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.shot-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 21, 17, 0.05), rgba(20, 21, 17, 0.45));
}

.shot-no {
  position: absolute;
  left: 9px;
  top: 9px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(255, 253, 248, 0.9);
}

.shot-size {
  position: absolute;
  right: 9px;
  bottom: 8px;
  z-index: 2;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.2);
  color: rgba(255, 253, 248, 0.9);
  font-size: 8px;
  backdrop-filter: blur(8px);
}

.shot-body { padding: 11px 12px 12px; }
.shot-body h4 { font-size: 10.5px; font-weight: 600; }
.shot-body > span { display: block; margin-top: 3px; font-size: 8.5px; color: var(--ink-4); }
.shot-body p { margin-top: 6px; font-size: 9px; line-height: 1.55; color: var(--ink-3); }
.shot-tip {
  display: flex;
  gap: 5px;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
  font-size: 8px;
  line-height: 1.5;
  color: var(--ink-4);
}
.shot-tip .icon { width: 10px; height: 10px; margin-top: 1px; color: var(--accent-deep); flex: 0 0 auto; }

.workflow-timeline { position: relative; }
.workflow-phase {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 17px;
}
.workflow-phase:last-child { padding-bottom: 0; }
.workflow-phase::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 26px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.workflow-phase:last-child::before { display: none; }
.phase-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--ink-4);
}
.workflow-phase.is-done .phase-dot { background: var(--sage-deep); border-color: var(--sage-deep); color: var(--surface); }
.phase-body { padding-top: 1px; }
.phase-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.phase-head h4 { font-size: 11.5px; font-weight: 600; }
.phase-head span { font-family: var(--font-mono); font-size: 8px; color: var(--accent-deep); white-space: nowrap; }
.phase-owner { margin-top: 2px; font-size: 8.5px; color: var(--ink-4); }
.phase-tasks { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.task-check {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 9.5px;
  line-height: 1.55;
  color: var(--ink-3);
  cursor: pointer;
}
.task-check input { position: absolute; opacity: 0; pointer-events: none; }
.task-check i {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  flex: 0 0 auto;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.task-check i svg { width: 9px; height: 9px; opacity: 0; color: var(--surface); }
.task-check:has(input:checked) i { background: var(--sage-deep); border-color: var(--sage-deep); }
.task-check:has(input:checked) i svg { opacity: 1; }
.task-check:has(input:checked) span { text-decoration: line-through; text-decoration-color: var(--line-strong); color: var(--ink-4); }
.phase-output { margin-top: 7px; font-size: 8.5px; color: var(--ink-4); }
.phase-output b { color: var(--ink-3); font-weight: 500; }

.publish-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  align-items: start;
}
.publish-fields { display: flex; flex-direction: column; gap: 11px; }
.publish-field { padding: 11px 12px; border: 1px solid var(--line-soft); border-radius: 11px; background: var(--surface-2); }
.publish-field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.publish-field-head span { font-family: var(--font-mono); font-size: 7.5px; letter-spacing: 0.08em; color: var(--ink-4); text-transform: uppercase; }
.publish-field p { margin-top: 5px; font-size: 10.5px; line-height: 1.7; color: var(--ink-2); white-space: pre-line; }
.publish-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.publish-tags span { font-size: 9px; color: var(--accent-deep); }

.phone-preview {
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--ink);
  box-shadow: var(--shadow-md);
}
.phone-screen { overflow: hidden; border-radius: 18px; background: var(--surface); }
.phone-video { position: relative; aspect-ratio: 9 / 13; overflow: hidden; background: var(--paper-2); }
.phone-video img { width: 100%; height: 100%; object-fit: cover; }
.phone-video::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(20, 21, 17, 0.55)); }
.phone-ui { position: absolute; inset: auto 0 0; z-index: 2; padding: 10px; color: #fffdf8; }
.phone-ui b { display: block; font-size: 9px; line-height: 1.5; font-weight: 500; }
.phone-ui span { display: block; margin-top: 3px; font-size: 7.5px; opacity: 0.7; }
.phone-caption { padding: 9px; }
.phone-caption b { display: block; font-size: 8.5px; line-height: 1.5; }
.phone-caption p { margin-top: 3px; font-size: 7.5px; line-height: 1.5; color: var(--ink-4); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.compliance-list { display: flex; flex-direction: column; gap: 7px; }
.compliance-item {
  display: flex;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 9px;
  background: var(--warning-soft);
  color: #74551f;
  font-size: 9.5px;
  line-height: 1.6;
}
.compliance-item .icon { width: 13px; height: 13px; margin-top: 1px; flex: 0 0 auto; }

.plan-aside {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.call-sheet {
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.call-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.call-sheet-head h3 { font-size: 12.5px; font-weight: 600; }
.call-sheet-date {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  margin-top: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.call-sheet-date b { font-family: var(--font-mono); font-size: 30px; line-height: 0.9; font-weight: 500; letter-spacing: -0.06em; color: var(--accent-deep); }
.call-sheet-date span { font-size: 9px; line-height: 1.5; color: var(--ink-4); }
.call-sheet-rows { margin-top: 5px; }
.call-sheet-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 9.5px; }
.call-sheet-row:last-child { border-bottom: 0; }
.call-sheet-row span { color: var(--ink-4); }
.call-sheet-row b { max-width: 60%; text-align: right; font-weight: 500; color: var(--ink-2); }
.call-sheet .btn { width: 100%; justify-content: space-between; margin-top: 13px; }

.aside-block {
  padding: 17px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.aside-block h3 { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; }
.aside-block h3 .icon { width: 14px; height: 14px; color: var(--sage-deep); }
.aside-block .output-list li { font-size: 9.5px; }
.aside-block .output-list .icon { width: 12px; height: 12px; }

.progress-row { display: flex; align-items: center; gap: 11px; margin-top: 11px; }
.progress-row .ring { width: 46px; height: 46px; }
.progress-row .ring b { font-size: 11px; }
.progress-copy b { font-size: 10.5px; font-weight: 600; }
.progress-copy p { margin-top: 2px; font-size: 8.5px; color: var(--ink-4); }

.ai-receipt {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 11px;
}
.ai-receipt span {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: var(--ink-4);
}

.plan-actions { display: flex; flex-wrap: wrap; gap: 7px; }

/* -------------------------------- analysis -------------------------------- */
.analyze-input-card {
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background:
    radial-gradient(420px 260px at 100% 0%, rgba(233, 205, 150, 0.25), transparent 65%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.analyze-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.url-field { position: relative; }
.url-field .icon {
  position: absolute;
  left: 12px;
  bottom: 14px;
  width: 15px;
  height: 15px;
  color: var(--ink-4);
}
.url-field .input { padding-left: 34px; }

.analyze-note {
  display: flex;
  gap: 7px;
  margin-top: 11px;
  padding: 9px 10px;
  border-radius: 9px;
  background: var(--sage-soft);
  color: var(--sage-deep);
  font-size: 9px;
  line-height: 1.6;
}
.analyze-note .icon { width: 12px; height: 12px; margin-top: 1px; flex: 0 0 auto; }

.analyze-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}
.analyze-actions .mono { margin-left: auto; font-size: 8px; color: var(--ink-4); }

.recent-analyses { margin-top: 16px; }

.analysis-hero {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}
.analysis-cover { position: relative; overflow: hidden; border-radius: 14px; background: var(--paper); aspect-ratio: 4/3; }
.analysis-cover img { width: 100%; height: 100%; object-fit: cover; }
.analysis-cover span {
  position: absolute;
  left: 9px;
  top: 9px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.85);
  font-size: 8.5px;
  backdrop-filter: blur(8px);
}
.analysis-hero-copy { display: flex; flex-direction: column; min-width: 0; }
.analysis-hero-copy .mono-label { color: var(--accent-deep); opacity: 0.65; }
.analysis-hero-copy h1 { margin-top: 7px; font-size: clamp(1.3rem, 2.2vw, 1.7rem); line-height: 1.3; letter-spacing: -0.035em; font-weight: 560; text-wrap: balance; }
.analysis-hero-copy > p { margin-top: 7px; font-size: 10.5px; line-height: 1.7; color: var(--ink-3); }
.analysis-hero-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.analysis-hero-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 12px; }

.analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: 13px;
  align-items: start;
}

.structure-card { padding: 20px; border: 1px solid var(--line-soft); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-xs); }
.structure-card h2 { font-size: 14px; font-weight: 600; }
.structure-card > p { margin-top: 3px; font-size: 9.5px; color: var(--ink-4); }

.structure-bar {
  display: flex;
  height: 36px;
  margin-top: 16px;
  border-radius: 9px;
  overflow: hidden;
  gap: 2px;
}
.structure-seg {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 20px;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--surface);
  white-space: nowrap;
  overflow: hidden;
}
.structure-seg:nth-child(1) { background: var(--accent); }
.structure-seg:nth-child(2) { background: #c98a5b; }
.structure-seg:nth-child(3) { background: var(--sage-deep); }
.structure-seg:nth-child(4) { background: #7f8f76; }
.structure-seg:nth-child(5) { background: var(--ink-3); }
.structure-seg:nth-child(6) { background: #9b9c90; }

.structure-legend { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 12px; }
.structure-item span { display: flex; align-items: center; gap: 5px; font-size: 9px; color: var(--ink-3); }
.structure-item i { width: 6px; height: 6px; border-radius: 2px; background: var(--accent); }
.structure-item:nth-child(2) i { background: #c98a5b; }
.structure-item:nth-child(3) i { background: var(--sage-deep); }
.structure-item:nth-child(4) i { background: #7f8f76; }
.structure-item:nth-child(5) i { background: var(--ink-3); }
.structure-item p { margin-top: 3px; font-family: var(--font-mono); font-size: 7.5px; color: var(--ink-4); }

.transcript-list { margin-top: 14px; border-top: 1px solid var(--line); }
.transcript-row { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); align-items: start; }
.transcript-row .mono { font-size: 8.5px; color: var(--accent-deep); padding-top: 3px; }
.transcript-row p { font-size: 10.5px; line-height: 1.65; color: var(--ink-2); }
.transcript-row span.tag { margin-top: 1px; font-size: 8px; padding: 2px 6px; }
.transcript-note { grid-column: 2 / -1; margin-top: -3px; font-size: 8.5px; line-height: 1.5; color: var(--ink-4); }

.technique-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.technique-card { padding: 11px 12px; border: 1px solid var(--line-soft); border-radius: 11px; background: var(--surface-2); }
.technique-head { display: flex; align-items: center; gap: 7px; }
.technique-head b { font-size: 10.5px; font-weight: 600; }
.technique-head span { margin-left: auto; font-size: 8px; color: var(--ink-4); }
.technique-card p { margin-top: 5px; font-size: 9px; line-height: 1.6; color: var(--ink-3); }

.rhythm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 12px; }
.rhythm-cell { padding: 8px 9px; border-radius: 8px; background: var(--surface-2); }
.rhythm-cell span { display: block; font-size: 7.5px; color: var(--ink-4); }
.rhythm-cell b { display: block; margin-top: 2px; font-size: 9.5px; font-weight: 500; }

.recreate-card {
  margin-top: 13px;
  padding: 20px;
  border: 1px solid rgba(188, 76, 44, 0.16);
  border-radius: 20px;
  background:
    radial-gradient(340px 220px at 100% 0%, rgba(233, 205, 150, 0.3), transparent 65%),
    var(--accent-wash);
}
.recreate-card h2 { font-size: 14px; font-weight: 600; }
.recreate-card > p { margin-top: 7px; font-size: 10.5px; line-height: 1.7; color: var(--ink-2); }
.recreate-steps { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; counter-reset: step; }
.recreate-step { display: flex; gap: 9px; font-size: 10px; line-height: 1.6; color: var(--ink-2); }
.recreate-step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--accent-deep);
  padding-top: 2px;
  flex: 0 0 auto;
}
.recreate-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.recreate-chips span { padding: 4px 8px; border-radius: 999px; background: rgba(255, 253, 248, 0.7); border: 1px solid rgba(188, 76, 44, 0.12); font-size: 8.5px; color: var(--ink-3); }
.recreate-actions { display: flex; gap: 8px; margin-top: 14px; }

.takeaway-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.takeaway-item { display: flex; gap: 7px; font-size: 9.5px; line-height: 1.6; color: var(--ink-3); }
.takeaway-item .icon { width: 12px; height: 12px; margin-top: 2px; color: var(--sage-deep); flex: 0 0 auto; }

.ai-notice {
  display: flex;
  gap: 7px;
  margin-top: 12px;
  padding: 9px 10px;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink-4);
  font-size: 8.5px;
  line-height: 1.6;
}
.ai-notice .icon { width: 12px; height: 12px; margin-top: 1px; flex: 0 0 auto; }

/* -------------------------------- library --------------------------------- */
.library-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  gap: 2px;
}

.segmented button {
  padding: 6px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-3);
  font-size: 10px;
  white-space: nowrap;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.segmented button:hover { color: var(--ink); }

.segmented button.is-active {
  background: var(--ink);
  color: var(--surface);
}

.segmented button span { margin-left: 4px; font-family: var(--font-mono); font-size: 7.5px; opacity: 0.6; }

.library-search {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 11px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  min-width: 210px;
}
.library-search .icon { width: 14px; height: 14px; color: var(--ink-4); }
.library-search input { flex: 1; border: 0; background: none; outline: none; font-size: 10.5px; }

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 19px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform 0.4s var(--spring), box-shadow 0.4s var(--ease);
}

.work-new {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 290px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 19px;
  background: rgba(255, 253, 248, 0.35);
  text-align: center;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.work-new:hover {
  background: rgba(255, 253, 248, 0.7);
  border-color: var(--accent);
}

.work-new-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.work-new-icon .icon { width: 17px; height: 17px; }
.work-new b { font-size: 12.5px; font-weight: 600; }
.work-new p { margin-top: 4px; font-size: 9px; color: var(--ink-4); }
.work-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.work-cover { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--paper); }
.work-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--spring); }
.work-card:hover .work-cover img { transform: scale(1.035); }
.work-cover .tag { position: absolute; left: 10px; top: 10px; background: rgba(255, 253, 248, 0.85); backdrop-filter: blur(8px); }
.work-cover .work-type { position: absolute; right: 10px; top: 10px; padding: 3px 7px; border-radius: 999px; background: rgba(20, 21, 17, 0.55); color: rgba(255, 253, 248, 0.9); font-family: var(--font-mono); font-size: 7px; backdrop-filter: blur(8px); }
.work-body { display: flex; flex-direction: column; flex: 1; padding: 13px; }
.work-body h3 { font-size: 12.5px; line-height: 1.45; letter-spacing: -0.02em; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.work-body > p { margin-top: 5px; font-size: 9px; line-height: 1.55; color: var(--ink-4); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.work-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.work-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 11px; }
.work-foot span { font-family: var(--font-mono); font-size: 8px; color: var(--ink-4); }
.work-foot .icon { width: 12px; height: 12px; color: var(--ink-4); margin-left: auto; }
.work-delete {
  position: absolute;
  right: 9px;
  bottom: 9px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 253, 248, 0.7);
  color: var(--ink-4);
  opacity: 0;
  transition: opacity 0.25s var(--ease), color 0.25s var(--ease), background 0.25s var(--ease);
  backdrop-filter: blur(6px);
}
.work-card:hover .work-delete { opacity: 1; }
.work-delete:hover { color: var(--danger); background: var(--danger-soft); }
.work-delete .icon { width: 12px; height: 12px; }

.snippet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.snippet-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 150px;
  padding: 17px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform 0.4s var(--spring), box-shadow 0.4s var(--ease);
}
.snippet-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.snippet-card .tag { align-self: flex-start; }
.snippet-card p { margin-top: 13px; font-size: 13px; line-height: 1.7; font-weight: 450; letter-spacing: -0.01em; color: var(--ink-2); }
.snippet-foot { display: flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 16px; font-size: 8px; color: var(--ink-4); }
.snippet-foot .copy-btn { margin-left: auto; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  padding: 34px;
  border: 1px dashed var(--line-strong);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.45);
  text-align: center;
}
.empty img { width: 180px; margin-bottom: 18px; opacity: 0.9; }
.empty h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.empty p { max-width: 360px; margin-top: 7px; font-size: 10.5px; line-height: 1.7; color: var(--ink-4); }
.empty .btn { margin-top: 15px; }

/* -------------------------------- settings -------------------------------- */
.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

.settings-stack { display: flex; flex-direction: column; gap: 13px; }

.settings-card {
  padding: 21px;
  border: 1px solid var(--line-soft);
  border-radius: 21px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.settings-card h2 { font-size: 14px; font-weight: 600; letter-spacing: -0.02em; }
.settings-card > p { margin-top: 5px; font-size: 10.5px; line-height: 1.7; color: var(--ink-3); }

.usage-grid { display: flex; flex-direction: column; gap: 12px; margin-top: 15px; }
.usage-item > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 9px; color: var(--ink-3); }
.usage-item b { font-family: var(--font-mono); font-size: 8px; color: var(--ink-2); }
.usage-track { height: 6px; margin-top: 5px; overflow: hidden; border-radius: 99px; background: rgba(72,60,112,.08); }
.usage-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sage), var(--accent)); }

.engine-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--surface-2);
}
.engine-banner-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--sage-soft); color: var(--sage-deep); flex: 0 0 auto; }
.engine-banner-icon.is-ai { background: var(--accent-soft); color: var(--accent-deep); }
.engine-banner-copy b { display: block; font-size: 11.5px; font-weight: 600; }
.engine-banner-copy span { display: block; margin-top: 2px; font-size: 9px; color: var(--ink-4); }
.engine-banner .tag { margin-left: auto; }

.code-block {
  position: relative;
  margin-top: 12px;
  padding: 13px;
  border-radius: 11px;
  background: #25261f;
  color: rgba(255, 253, 248, 0.8);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.8;
  overflow-x: auto;
  white-space: pre;
}
.code-block .copy-btn { position: absolute; right: 8px; top: 8px; background: rgba(255, 253, 248, 0.08); border-color: rgba(255, 253, 248, 0.12); color: rgba(255, 253, 248, 0.6); }

.pref-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 15px; }
.pref-grid .field + .field { margin-top: 0; }

.danger-card { border-color: rgba(163, 58, 40, 0.18); }
.danger-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.danger-row:first-of-type { border-top: 0; }
.danger-row b { display: block; font-size: 11px; font-weight: 600; }
.danger-row p { margin-top: 2px; font-size: 9px; color: var(--ink-4); }
.danger-row .btn { flex: 0 0 auto; }

.settings-aside { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 12px; }
.about-card { padding: 20px; border: 1px solid var(--line-soft); border-radius: 20px; background: var(--surface-2); }
.about-card .brand { margin-bottom: 13px; }
.about-card p { font-size: 9.5px; line-height: 1.75; color: var(--ink-3); }
.about-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; }
.about-meta span { padding: 3px 7px; border-radius: 999px; background: var(--surface); font-family: var(--font-mono); font-size: 7.5px; color: var(--ink-4); }
.about-links { display: flex; flex-direction: column; gap: 8px; margin-top: 15px; }
.about-links a { display: flex; align-items: center; gap: 7px; font-size: 10px; color: var(--ink-3); }
.about-links a:hover { color: var(--accent-deep); }
.about-links .icon { width: 13px; height: 13px; }

/* ---------------------------------- modal --------------------------------- */
.modal {
  width: min(560px, calc(100vw - 32px));
  max-height: min(86dvh, 820px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal::backdrop {
  background: rgba(27, 28, 24, 0.34);
  backdrop-filter: blur(6px);
}

.modal.is-wide { width: min(880px, calc(100vw - 32px)); }

.modal-inner { padding: 24px; overflow-y: auto; max-height: inherit; }

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.modal-head h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.03em; }
.modal-head p { margin-top: 4px; font-size: 10.5px; line-height: 1.6; color: var(--ink-4); }
.modal-close { flex: 0 0 auto; }

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.modal-actions .btn { min-height: 40px; }
.metric-import textarea { width: 100%; min-height: 190px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-family: var(--font-mono); font-size: 9px; line-height: 1.7; color: var(--ink-2); resize: vertical; }
.metric-import p { margin: 8px 2px 0; font-size: 8px; line-height: 1.6; color: var(--ink-4); }
.modal-note { margin-right: auto; font-size: 9px; color: var(--ink-4); }

.toasts {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: 340px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.95);
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.6;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  pointer-events: auto;
  animation: toast-in 0.4s var(--spring);
}
.toast.is-leaving { animation: toast-out 0.3s var(--ease) forwards; }
.toast .icon { width: 15px; height: 15px; margin-top: 1px; color: var(--sage-deep); flex: 0 0 auto; }
.toast.is-error .icon { color: var(--danger); }
.toast.is-warning .icon { color: var(--warning); }

@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

/* --------------------------------- search --------------------------------- */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 11vh 18px 18px;
  background: rgba(27, 28, 24, 0.32);
  backdrop-filter: blur(8px);
}
.search-panel {
  width: min(640px, 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: search-in 0.35s var(--spring);
}
@keyframes search-in { from { opacity: 0; transform: translateY(-8px) scale(0.985); } }
.search-field { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.search-field .icon { width: 18px; height: 18px; color: var(--ink-4); }
.search-field input { flex: 1; border: 0; background: none; outline: none; font-size: 14px; }
.search-field kbd { flex: 0 0 auto; }
.search-results { max-height: 54vh; overflow-y: auto; padding: 7px; }
.search-group-label { padding: 8px 9px 5px; font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.1em; color: var(--ink-4); }
.search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  color: var(--ink-2);
}
.search-item:hover,
.search-item.is-active { background: var(--surface-2); }
.search-item .search-thumb { width: 38px; height: 32px; border-radius: 6px; overflow: hidden; background: var(--paper-2); flex: 0 0 auto; }
.search-item .search-thumb img { width: 100%; height: 100%; object-fit: cover; }
.search-item-copy { min-width: 0; flex: 1; }
.search-item-copy b { display: block; font-size: 10.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item-copy span { display: block; margin-top: 2px; font-size: 8.5px; color: var(--ink-4); }
.search-item .tag { flex: 0 0 auto; }
.search-empty { padding: 26px; text-align: center; font-size: 10.5px; color: var(--ink-4); }
.search-foot { display: flex; align-items: center; gap: 14px; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 8.5px; color: var(--ink-4); }
.search-foot span { display: inline-flex; align-items: center; gap: 4px; }
.search-foot span:last-child { margin-left: auto; }

/* --------------------------------- popover -------------------------------- */
.popover {
  position: fixed;
  top: 66px;
  right: 26px;
  z-index: 120;
  width: 236px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.popover-head { display: flex; align-items: center; gap: 9px; padding: 9px; margin-bottom: 4px; }
.popover-head b { display: block; font-size: 10.5px; font-weight: 600; }
.popover-head small { display: block; margin-top: 2px; font-size: 8px; color: var(--ink-4); }
.popover a { display: flex; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 8px; font-size: 10px; color: var(--ink-3); }
.popover a:hover { background: var(--surface-2); color: var(--ink); }
.popover .icon { width: 14px; height: 14px; }
.popover hr { border: 0; border-top: 1px solid var(--line-soft); margin: 5px 0; }

.mobile-sheet { position: fixed; inset: 0; z-index: 210; background: rgba(27, 28, 24, 0.32); backdrop-filter: blur(6px); }
.mobile-sheet-panel { position: absolute; inset: 0 auto 0 0; width: min(320px, 88vw); padding: 20px; background: var(--paper); display: flex; flex-direction: column; animation: sheet-in 0.4s var(--spring); }
@keyframes sheet-in { from { transform: translateX(-100%); } }
.mobile-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.mobile-sheet-head .brand { gap: 8px; }
.mobile-sheet nav { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.mobile-sheet nav a { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 520; letter-spacing: -0.02em; }
.mobile-sheet nav a span { font-family: var(--font-mono); font-size: 8px; color: var(--ink-4); padding-top: 5px; }
.mobile-sheet-note { margin-top: auto; font-size: 9px; color: var(--ink-4); }

/* ------------------------------- responsive -------------------------------- */
@media (max-width: 1180px) {
  .sidebar { width: 228px; }
  .app-content { margin-left: 228px; }
  .search-trigger { width: 230px; }
  .engine-pill { display: none; }
  .profile-layout { grid-template-columns: minmax(0, 1fr) 290px; }
  .studio-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .run-grid { grid-template-columns: 200px minmax(0, 1fr) 250px; }
  .plan-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .snippet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .topbar-new { display: none; }
  .search-trigger { margin-left: 8px; }
  .studio-layout { grid-template-columns: minmax(0, 1fr); }
  .studio-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .studio-aside .check-card { grid-column: span 2; }
  .profile-layout { grid-template-columns: minmax(0, 1fr); }
  .profile-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .profile-aside .profile-tips { grid-column: span 2; }
  .run-grid { grid-template-columns: minmax(0, 1fr); }
  .run-side { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .run-queue { margin-top: 0; }
  .run-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .run-aside .run-outputs { grid-column: 1; }
  .run-aside .run-receipt { grid-column: 2; margin-top: 0; border-top: 0; padding-top: 0; }
  .run-aside .run-approval { grid-column: span 2; }
  .plan-layout { grid-template-columns: minmax(0, 1fr); }
  .plan-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .plan-aside .call-sheet { grid-row: span 2; }
  .analysis-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .settings-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .sidebar { display: none; }
  .app-content { margin-left: 0; }
  .mobile-menu-btn {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(255, 253, 248, 0.4);
  }
  .mobile-menu-btn .icon { width: 16px; height: 16px; }
  .topbar { height: 62px; padding: 0 16px; gap: 10px; }
  .search-trigger { width: 38px; margin-left: auto; padding: 0; justify-content: center; border-radius: 9px; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .topbar-right { margin-left: 0; }
  .app-view { padding-bottom: 100px; }
  .mobile-tabs {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 60px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 253, 248, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-md);
  }
  .mobile-tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; flex: 1; height: 100%; border-radius: 12px; color: var(--ink-4); font-size: 8px; }
  .mobile-tabs a .icon { width: 18px; height: 18px; }
  .mobile-tabs a.is-active { background: var(--ink); color: var(--surface); }
  .engine-pill { display: none; }
  .hotspot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hotspot-card.is-featured { grid-column: span 2; }
  .page-head { align-items: flex-start; }
  .page-head h1 { font-size: 1.5rem; }
  .plan-hero-inner { padding: 20px; }
  .plan-hero-top { left: 20px; top: 18px; }
  .analysis-hero { grid-template-columns: 200px minmax(0, 1fr); }
  .publish-grid { grid-template-columns: 1fr 190px; }
}

@media (max-width: 720px) {
  .app-view { padding: 16px 14px 96px; }
  .plan-toolbar { flex-wrap: wrap; gap: 8px; }
  .plan-toolbar .back-link { width: 100%; margin-bottom: 0; }
  .plan-toolbar .page-actions { width: 100%; }
  .plan-toolbar .page-actions .btn { flex: 1; justify-content: center; }
  .plan-toolbar .page-actions .icon-btn { flex: 0 0 40px; }
  .plan-section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .plan-section-head > .page-actions,
  .plan-section-head > .tag { width: 100%; }
  .plan-section-head .page-actions .btn { flex: 1; justify-content: center; }
  .plan-section-head .text-btn { margin-left: auto; }
  .crumb { font-size: 11px; }
  .crumb span:first-child, .crumb i { display: none; }
  .topbar-right .avatar-btn { display: none; }
  .page-head { flex-direction: column; gap: 12px; margin-bottom: 18px; }
  .page-head h1 { font-size: 1.45rem; }
  .page-desc { font-size: 11.5px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; justify-content: center; }
  .kpi-grid { gap: 8px; }
  .kpi { padding: 12px; border-radius: 15px; }
  .kpi-value { font-size: 23px; }
  .kpi-icon { width: 26px; height: 26px; }
  .kpi-spark { display: none; }
  .shoot-card { grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 18px; }
  .shoot-copy { min-height: 190px; }
  .shoot-date { right: 18px; top: 16px; }
  .shoot-art { width: 62%; right: -16%; bottom: -20%; opacity: 0.55; }
  .hotspot-panel, .activity-panel, .recent-panel, .engine-panel { padding: 15px; }
  .hotspot-grid { grid-template-columns: minmax(0, 1fr); }
  .hotspot-card.is-featured { grid-column: span 1; display: flex; }
  .is-featured .hotspot-cover { min-height: 0; aspect-ratio: 16/9; }
  .hotspot-body h3, .is-featured .hotspot-body h3 { font-size: 14px; }
  .is-featured .hotspot-body > p { -webkit-line-clamp: 2; font-size: 10.5px; }
  .radar-toolbar .search-inline { margin-left: 0; width: 100%; min-width: 0; }
  .radar-summary { flex-wrap: wrap; gap: 8px 14px; }
  .radar-summary .sr-divider { display: none; }
  .hotspot-picker { grid-template-columns: minmax(0, 1fr); }
  .studio-aside { grid-template-columns: minmax(0, 1fr); }
  .studio-aside .check-card { grid-column: auto; }
  .field-row { grid-template-columns: 1fr; gap: 15px; }
  .field-row .field + .field { margin-top: 0; }
  .radio-grid { grid-template-columns: 1fr; }
  .form-card { padding: 17px; }
  .save-bar { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .profile-aside { grid-template-columns: minmax(0, 1fr); }
  .profile-aside .profile-tips { grid-column: auto; }
  .hook-grid { grid-template-columns: 1fr; }
  .hook-card { min-height: 0; }
  .shot-grid { grid-template-columns: 1fr; }
  .script-line { grid-template-columns: 56px minmax(0, 1fr) 24px; gap: 9px; }
  .script-copy b { font-size: 12.5px; }
  .publish-grid { grid-template-columns: minmax(0, 1fr); }
  .phone-preview { max-width: 230px; margin: 0 auto; }
  .plan-aside { grid-template-columns: minmax(0, 1fr); }
  .plan-aside .call-sheet { grid-row: auto; }
  .plan-section { padding: 17px; scroll-margin-top: 120px; }
  .plan-nav { top: 70px; }
  .plan-hero { min-height: 260px; }
  .plan-hero-inner { min-height: 260px; }
  .plan-hero-inner h1 { font-size: 1.55rem; }
  .analysis-hero { grid-template-columns: minmax(0, 1fr); }
  .analysis-cover { aspect-ratio: 16/9; }
  .analysis-hero-actions { margin-top: 10px; }
  .analyze-form-grid { grid-template-columns: minmax(0, 1fr); }
  .analyze-input-card { padding: 17px; }
  .structure-legend { grid-template-columns: repeat(3, 1fr); }
  .works-grid { grid-template-columns: minmax(0, 1fr); }
  .snippet-grid { grid-template-columns: minmax(0, 1fr); }
  .library-search { margin-left: 0; width: 100%; }
  .run-side, .run-aside { grid-template-columns: minmax(0, 1fr); }
  .run-aside .run-outputs, .run-aside .run-receipt { grid-column: auto; margin-top: 12px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
  .run-aside .run-approval { grid-column: auto; }
  .run-head { flex-direction: column; }
  .run-head-actions { width: 100%; }
  .run-head-actions .btn { flex: 1; justify-content: center; }
  .run-main { padding: 15px; }
  .settings-aside { grid-template-columns: minmax(0, 1fr); }
  .pref-grid { grid-template-columns: minmax(0, 1fr); }
  .toasts { right: 14px; left: 14px; bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }
  .toast { max-width: none; }
  .popover { right: 14px; top: 60px; }
  .search-overlay { padding-top: 8vh; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 21px; }
  .engine-banner { flex-wrap: wrap; }
  .engine-banner .tag { margin-left: 0; }
  .direction-grid { grid-template-columns: 1fr; }
  .run-result-actions { flex-direction: column; }
  .works-grid { gap: 10px; }
}

/* ------------------------------- finishing -------------------------------- */
.page-head h1 .icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-left: 4px;
  vertical-align: -1px;
  color: var(--accent);
}

.field label em,
.field-label em {
  font-style: normal;
  color: var(--accent);
}

.analyze-note.is-warning {
  background: var(--warning-soft);
  color: #74551f;
}

.library-section + .library-section {
  margin-top: 28px;
}

.work-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.work-cover .work-type {
  right: auto;
  left: 10px;
  top: 38px;
}

.work-delete {
  top: 9px;
  right: 9px;
  bottom: auto;
}

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

.plan-toolbar .back-link { margin-bottom: 0; }

.plan-nav a.is-active {
  background: var(--ink);
  color: var(--surface);
}

.app-view.is-entering {
  animation: view-in 0.4s var(--ease);
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.shot-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
}

.shot-thumb.tone-0 {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.5), transparent 36%),
    linear-gradient(160deg, #b7c4b8, #6d8074);
}
.shot-thumb.tone-1 {
  background:
    radial-gradient(circle at 72% 22%, rgba(255, 243, 219, 0.9), transparent 34%),
    linear-gradient(155deg, #e7b996, #bd7652);
}
.shot-thumb.tone-2 {
  background:
    linear-gradient(90deg, rgba(255, 246, 227, 0.9), transparent 55%),
    linear-gradient(165deg, #d4dfd5, #90a394);
}
.shot-thumb.tone-3 {
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 246, 230, 0.8), transparent 40%),
    linear-gradient(145deg, #d9c5a9, #a7805d);
}

.shot-glyph {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.2);
  border: 1px solid rgba(255, 253, 248, 0.4);
  color: rgba(255, 253, 248, 0.9);
  backdrop-filter: blur(6px);
}

.shot-glyph .icon { width: 18px; height: 18px; }

.shot-label {
  position: absolute;
  right: 9px;
  top: 9px;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.12em;
  color: rgba(255, 253, 248, 0.65);
}

.prompter {
  padding: 6px 0 0;
}

.prompter-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--ink-4);
}

.prompter-line {
  min-height: 138px;
  margin-top: 22px;
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  line-height: 1.42;
  letter-spacing: -0.035em;
  font-weight: 520;
  color: var(--ink);
  text-wrap: balance;
}

.prompter-action {
  min-height: 42px;
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--ink-4);
}

.prompter-bar {
  height: 3px;
  margin-top: 22px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.prompter-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.35s var(--ease);
}

.prompter .modal-actions { margin-top: 16px; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .run-step.is-running .run-step-icon::after,
  .pulse-dot::after,
  .save-status.is-saving .dot { animation: none !important; }
  .app-view.is-entering { animation: none; }
}
