:root {
  color-scheme: light;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --surface-3: #eef3fb;
  --border: #e6eaf2;
  --border-strong: #cfd6e4;
  --text: #111827;
  --muted: #687386;
  --muted-2: #9aa5b6;
  --primary: #2457ff;
  --primary-strong: #153bd7;
  --mint: #13c6a3;
  --sun: #ffb84d;
  --rose: #f34f73;
  --success: #0f9f6e;
  --danger: #d92d20;
  --shadow: 0 22px 60px rgba(17, 24, 39, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-view {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 32px;
  background: #f7f8fb;
}

.login-panel {
  position: relative;
  overflow: hidden;
  width: min(430px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.10);
  padding: 34px;
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: #111827;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: #111827;
  color: #ffffff;
  border-radius: 8px;
  font-weight: 800;
  margin-bottom: 22px;
}

.brand-mark.small {
  width: 34px;
  height: 34px;
  margin: 0;
  font-size: 13px;
}

.login-panel h1 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 0;
}

.login-panel p {
  margin: 0 0 26px;
  color: var(--muted);
  line-height: 1.6;
}

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

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0 12px;
  color: var(--text);
  background: var(--surface);
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(21, 108, 254, 0.12);
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  min-height: 36px;
  border-radius: var(--radius);
  padding: 0 13px;
  border: 1px solid transparent;
  font-weight: 700;
  white-space: nowrap;
}

.primary-btn {
  background: var(--primary);
  color: #ffffff;
}

.primary-btn:hover {
  background: var(--primary-strong);
}

.secondary-btn {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.ghost-btn {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
}

.ghost-btn.danger {
  color: var(--danger);
}

.icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  color: var(--muted);
}

.message {
  min-height: 20px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.message.error {
  color: var(--danger);
}

.message.success {
  color: var(--success);
}

.local-preview {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

.local-preview button {
  margin: 12px 8px 0 0;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.app-shell {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding-left: 80px;
  background: var(--bg);
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 80px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(18px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.sidebar-brand {
  min-height: 84px;
  padding: 18px 10px 12px;
  display: grid;
  place-items: center;
  border-bottom: 0;
}

.sidebar-brand > div:last-child {
  display: none;
}

.brand-mark.small {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background:
    radial-gradient(circle at 70% 20%, rgba(19, 198, 163, 0.95), transparent 28%),
    linear-gradient(135deg, #111827, #243b6b 58%, #2457ff);
  box-shadow: 0 16px 34px rgba(36, 87, 255, 0.22);
}

.nav-list {
  padding: 6px 10px;
  display: grid;
  gap: 10px;
  overflow: auto;
}

.nav-item {
  width: 100%;
  min-height: 58px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: #344054;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 760;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.85);
}

.nav-item.active {
  color: var(--text);
  background: #ffffff;
  border-color: var(--border);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}

.nav-icon {
  color: var(--muted-2);
  display: grid;
  place-items: center;
}

.nav-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item.active .nav-icon {
  color: var(--primary);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-top: 0;
}

.sidebar-footer .ghost-btn {
  min-height: 40px;
  padding: 0 6px;
  font-size: 11px;
}

.main-area {
  min-width: 0;
  display: grid;
  grid-template-rows: 68px minmax(0, 1fr);
}

.topbar {
  background: rgba(244, 246, 251, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(230, 234, 242, 0.72);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.topbar h2 {
  margin: 2px 0 0;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}

.kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 6px;
  border: 1px solid rgba(207, 214, 228, 0.78);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: #344054;
  font-size: 13px;
  white-space: nowrap;
}

.user-avatar {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.user-role {
  color: var(--muted);
}

.content {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.home-page {
  padding: 24px 28px 32px;
  display: grid;
  gap: 22px;
}

.home-hero {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  display: grid;
  align-content: end;
  gap: 18px;
  padding: 32px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 80% 22%, rgba(19, 198, 163, 0.34), transparent 24%),
    radial-gradient(circle at 18% 18%, rgba(255, 184, 77, 0.32), transparent 24%),
    linear-gradient(135deg, #ffffff 0%, #eef4ff 56%, #f8fbff 100%);
  border: 1px solid rgba(207, 214, 228, 0.8);
  box-shadow: 0 22px 60px rgba(17, 24, 39, 0.08);
}

.home-hero::after {
  content: "";
  position: absolute;
  right: 42px;
  top: 34px;
  width: 190px;
  height: 150px;
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.94), rgba(36, 87, 255, 0.92)),
    #111827;
  box-shadow: 0 30px 70px rgba(36, 87, 255, 0.28);
  transform: rotate(-4deg);
}

.home-hero::before {
  content: "";
  position: absolute;
  right: 112px;
  top: 92px;
  z-index: 1;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sun), var(--rose));
  box-shadow: -62px 32px 0 -20px var(--mint), 52px 34px 0 -24px #ffffff;
}

.home-hero-copy,
.home-search,
.home-chips {
  position: relative;
  z-index: 2;
}

.soft-pill {
  width: max-content;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(207, 214, 228, 0.78);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.72);
  color: #46556b;
  font-size: 12px;
  font-weight: 800;
}

.home-hero h3 {
  max-width: 720px;
  margin: 12px 0 8px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: 0;
}

.home-hero p {
  margin: 0;
  color: #526071;
  font-size: 16px;
  line-height: 1.55;
}

.home-search {
  width: min(760px, 100%);
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(207, 214, 228, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.08);
}

.home-search input {
  min-height: 46px;
  border: 0;
  background: transparent;
  font-size: 15px;
}

.home-search input:focus {
  box-shadow: none;
}

.home-search .primary-btn {
  min-height: 46px;
  border-radius: 16px;
  padding: 0 22px;
}

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

.home-chips button {
  min-height: 34px;
  border: 1px solid rgba(207, 214, 228, 0.86);
  border-radius: 999px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.7);
  color: #38445a;
  font-size: 13px;
  font-weight: 760;
}

.home-tool-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.home-tool-card {
  min-height: 250px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 150px auto;
  border-radius: 18px;
  border: 1px solid rgba(207, 214, 228, 0.8);
  background: #ffffff;
  box-shadow: 0 16px 44px rgba(17, 24, 39, 0.08);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.home-tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 70px rgba(17, 24, 39, 0.13);
}

.home-tool-card > div:last-child {
  padding: 16px;
}

.home-tool-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.home-tool-card h4 {
  margin: 6px 0 8px;
  font-size: 22px;
  line-height: 1.18;
}

.home-tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.tool-visual {
  position: relative;
  overflow: hidden;
  background: #edf2fb;
}

.tool-visual::before,
.tool-visual::after {
  content: "";
  position: absolute;
  border-radius: 999px;
}

.visual-library {
  background: linear-gradient(135deg, #111827, #2457ff);
}

.visual-library::before {
  inset: 24px auto auto 26px;
  width: 54%;
  height: 42%;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
}

.visual-library::after {
  right: 32px;
  bottom: 24px;
  width: 96px;
  height: 96px;
  background: linear-gradient(135deg, var(--sun), var(--rose));
  box-shadow: -88px -14px 0 -34px var(--mint);
}

.visual-static {
  background: linear-gradient(135deg, #fff7e8, #dff9f1);
}

.visual-static::before {
  left: 28px;
  top: 28px;
  width: 58%;
  height: 74px;
  border-radius: 18px;
  background: #111827;
}

.visual-static::after {
  right: 34px;
  top: 34px;
  width: 112px;
  height: 112px;
  background: linear-gradient(135deg, var(--mint), #79e2d4);
  box-shadow: -92px 72px 0 -38px var(--primary);
}

.visual-dynamic {
  background: linear-gradient(135deg, #eef4ff, #fff0f4);
}

.visual-dynamic::before {
  left: 44px;
  top: 36px;
  width: 74px;
  height: 74px;
  background: var(--primary);
  box-shadow: 92px 26px 0 -10px var(--sun), 188px 4px 0 -18px var(--rose);
}

.visual-dynamic::after {
  left: 54px;
  bottom: 24px;
  width: 72%;
  height: 18px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.88);
}

.home-showcase {
  display: grid;
  gap: 14px;
}

.section-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-row h3 {
  margin: 0 0 5px;
  font-size: 21px;
}

.section-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.inspiration-wall {
  columns: 5 180px;
  column-gap: 14px;
}

.inspiration-card {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 14px;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(17, 24, 39, 0.09);
  break-inside: avoid;
}

.inspiration-card img {
  width: 100%;
  display: block;
}

.inspiration-card.tall img {
  aspect-ratio: 4 / 5;
  object-fit: contain;
}

.inspiration-card.wide img {
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.inspiration-card span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 12px;
  font-weight: 820;
  backdrop-filter: blur(8px);
}

/* Creative platform visual refresh */
.app-shell {
  grid-template-columns: 64px minmax(0, 1fr);
  background:
    radial-gradient(circle at 50% 0%, rgba(214, 226, 245, 0.5), transparent 34%),
    #f5f7fb;
}

.app-shell[data-route="home"] .main-area {
  grid-template-rows: minmax(0, 1fr);
}

.app-shell[data-route="home"] .topbar {
  display: none;
}

.sidebar {
  background: rgba(255, 255, 255, 0.78);
  border-right: 1px solid rgba(213, 220, 231, 0.72);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.7) inset;
}

.sidebar-brand {
  min-height: 72px;
  padding: 18px 0 8px;
}

.brand-mark.small {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 13px;
  background: #07080b;
  color: transparent;
  font-size: 0;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.brand-mark.small::before {
  content: "";
  position: absolute;
  width: 19px;
  height: 24px;
  background: #ffffff;
  clip-path: polygon(48% 0, 100% 0, 66% 39%, 98% 39%, 31% 100%, 49% 56%, 12% 56%);
}

.nav-list {
  padding: 24px 7px 8px;
  gap: 14px;
}

.nav-item {
  min-height: 64px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #7e8896;
  gap: 6px;
  padding: 6px 0;
  font-size: 12px;
  font-weight: 620;
}

.nav-item:hover,
.nav-item.active {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.nav-item.active {
  color: #171a20;
}

.nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  color: #8893a2;
  background: transparent;
}

.nav-item.active .nav-icon {
  color: #111318;
}

.nav-icon svg {
  width: 21px;
  height: 21px;
  stroke-width: 2;
}

.sidebar-footer {
  padding: 10px 8px 18px;
}

.sidebar-footer .ghost-btn {
  min-height: 30px;
  border: 0;
  background: transparent;
  color: #7e8896;
  font-size: 11px;
}

.topbar {
  height: 58px;
  padding: 10px 24px;
  background: rgba(245, 247, 251, 0.88);
  border-bottom-color: rgba(213, 220, 231, 0.76);
}

.topbar h2 {
  font-size: 18px;
}

.content {
  background: transparent;
}

.home-page {
  width: 100%;
  max-width: 1720px;
  min-height: 100%;
  margin: 0 auto;
  padding: 36px 44px 64px;
  gap: 54px;
}

.home-composer {
  width: min(1020px, 100%);
  margin: 0 auto;
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.home-announcement {
  min-width: 286px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid rgba(213, 224, 237, 0.92);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(231, 251, 248, 0.9), rgba(239, 243, 255, 0.92)),
    #ffffff;
  color: #202733;
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
  box-shadow: 0 10px 34px rgba(42, 55, 81, 0.06);
}

.home-announcement strong {
  font-size: 14px;
}

.home-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 86px;
  color: #111318;
}

.home-title-row > span:first-child {
  color: #4b4f57;
  font-size: 42px;
  line-height: 1;
  font-weight: 780;
}

.home-title-row h3 {
  margin: 0;
  font-size: 42px;
  line-height: 1.12;
  font-weight: 860;
  letter-spacing: 0;
}

.home-aurora-mark {
  position: relative;
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background:
    radial-gradient(circle at 26% 26%, rgba(103, 232, 249, 0.96), transparent 34%),
    radial-gradient(circle at 72% 34%, rgba(250, 204, 21, 0.9), transparent 34%),
    radial-gradient(circle at 44% 76%, rgba(52, 211, 153, 0.94), transparent 34%),
    linear-gradient(135deg, #111827, #1d4ed8 58%, #f97316);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.18), inset 0 0 42px rgba(255, 255, 255, 0.24);
  transform: rotate(-4deg) translateY(4px);
}

.home-aurora-mark::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.85), transparent 20%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.03));
  mix-blend-mode: screen;
}

.home-aurora-mark::after {
  content: "";
  position: absolute;
  right: -10px;
  bottom: -8px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: -40px -42px 30px rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}

.home-search {
  width: min(920px, 100%);
  min-height: 166px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 18px;
  border: 1px solid #dce5f5;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 56px rgba(72, 88, 118, 0.09);
}

.home-search textarea {
  width: 100%;
  min-height: 76px;
  resize: none;
  border: 0;
  outline: none;
  background: transparent;
  color: #1d2430;
  font: inherit;
  font-size: 14px;
  line-height: 1.65;
}

.home-search textarea::placeholder {
  color: #a2adbd;
}

.home-search-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-tool-switches {
  display: flex;
  gap: 8px;
  align-items: center;
}

.home-tool-switches button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #dce5f5;
  border-radius: 10px;
  padding: 0 12px;
  background: #f8fafd;
  color: #202733;
  font-size: 13px;
  font-weight: 680;
}

.home-tool-switches button svg,
.home-mini-search svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-submit-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #b8c1ca;
  color: #ffffff;
  font-size: 25px;
  line-height: 1;
  font-weight: 500;
}

.home-tool-row {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.home-tool-card {
  position: relative;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  border: 0;
  border-radius: 13px;
  padding: 0 18px;
  color: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.12);
}

.home-tool-card::before,
.home-tool-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.home-tool-card span,
.home-tool-card strong {
  position: relative;
  z-index: 2;
}

.home-tool-card span {
  color: #ffffff;
  font-size: 15px;
  font-weight: 720;
}

.home-tool-card strong {
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.home-recent-projects {
  width: min(920px, 100%);
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.home-recent-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #303642;
  font-size: 13px;
  font-weight: 760;
}

.home-recent-head small {
  min-width: 22px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #ffffff;
  color: #667085;
  border: 1px solid #d7dfeb;
}

.home-recent-list {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.home-project-chip {
  max-width: 220px;
  min-height: 48px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid #dce5f5;
  border-radius: 12px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.82);
  color: #1d2430;
  text-align: left;
  box-shadow: 0 10px 26px rgba(72, 88, 118, 0.06);
}

.home-project-chip:hover {
  background: #ffffff;
  border-color: #c9d5e8;
}

.home-project-chip span,
.home-project-chip small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-project-chip span {
  font-size: 13px;
  font-weight: 760;
}

.home-project-chip small {
  color: #7e8896;
  font-size: 11px;
  font-weight: 600;
}

.library-card-visual {
  background: linear-gradient(100deg, #07445a, #0b1d24 70%, #040507);
}

.library-card-visual::after {
  right: 28px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(194, 255, 214, 0.8);
  box-shadow: inset 0 0 0 1px rgba(194, 255, 214, 0.25);
}

.static-card-visual {
  background: linear-gradient(100deg, #123c64, #13283e 62%, #06111c);
}

.static-card-visual::after {
  right: 26px;
  width: 72px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fafc, #a7f3d0 45%, #1e293b 46%);
  transform: rotate(8deg);
  opacity: 0.84;
}

.poster-card-visual {
  background: linear-gradient(100deg, #0f526a, #0f172a 70%, #030712);
}

.poster-card-visual::after {
  right: 20px;
  width: 84px;
  height: 42px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent),
    linear-gradient(90deg, #22d3ee, #f97316);
  filter: blur(0.2px);
  opacity: 0.72;
}

.dynamic-card-visual {
  background: linear-gradient(100deg, #1d3760, #07101e 68%, #030508);
}

.dynamic-card-visual::after {
  right: 18px;
  width: 98px;
  height: 28px;
  background: repeating-linear-gradient(90deg, #5eead4 0 3px, #2563eb 3px 6px, transparent 6px 9px);
  filter: drop-shadow(0 0 12px rgba(94, 234, 212, 0.56));
  opacity: 0.82;
}

.request-card-visual {
  background: linear-gradient(100deg, #2f1d5f, #111827 68%, #050507);
}

.request-card-visual::after {
  right: 22px;
  width: 74px;
  height: 42px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 28% 34%, #f0abfc, transparent 34%),
    radial-gradient(circle at 72% 44%, #38bdf8, transparent 34%),
    radial-gradient(circle at 48% 78%, #facc15, transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  filter: blur(0.3px);
  opacity: 0.92;
}

.home-discovery {
  position: relative;
  display: grid;
  gap: 16px;
}

.home-tabs,
.home-channel-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
}

.home-tabs button,
.home-channel-row button {
  border: 0;
  background: transparent;
  color: #818a98;
  padding: 0;
  font-size: 15px;
  font-weight: 540;
}

.home-tabs button.active {
  position: relative;
  color: #15181e;
  font-weight: 760;
}

.home-tabs button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 3px;
  background: #15181e;
}

.home-mini-search {
  width: 212px;
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 4px;
  background: #e9edf5;
  padding: 0 9px;
}

.home-mini-search input {
  min-height: 32px;
  border: 0;
  padding: 0;
  background: transparent;
  font-size: 12px;
}

.home-mini-search input:focus {
  box-shadow: none;
}

.home-filter-actions {
  position: absolute;
  top: 44px;
  right: 0;
  display: flex;
  gap: 12px;
}

.home-filter-actions button {
  min-height: 34px;
  border: 1px solid #d7dfeb;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  color: #667085;
  padding: 0 14px;
  font-size: 13px;
}

.home-gallery {
  columns: 4 250px;
  column-gap: 10px;
  padding-top: 6px;
}

.inspiration-card {
  position: relative;
  width: 100%;
  display: inline-block;
  margin: 0 0 10px;
  border-radius: 8px;
  box-shadow: none;
  background: #e5ebf2;
  break-inside: avoid;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.inspiration-card.tall {
  aspect-ratio: 4 / 5.35;
}

.inspiration-card.portrait {
  aspect-ratio: 4 / 4.55;
}

.inspiration-card.short {
  aspect-ratio: 16 / 9.4;
}

.inspiration-card img,
.inspiration-card.tall img,
.inspiration-card.portrait img,
.inspiration-card.short img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
}

.inspiration-overlay {
  position: absolute;
  inset: auto 0 0;
  min-height: 70px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
  color: #ffffff;
}

.inspiration-overlay span {
  position: static;
  max-width: none;
  min-height: 0;
  display: block;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: #ffffff;
  font-size: 16px;
  font-weight: 760;
  backdrop-filter: none;
}

.inspiration-overlay button {
  min-height: 32px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 0 13px;
  font-size: 13px;
  backdrop-filter: blur(8px);
}

.library-page {
  max-width: 1740px;
  margin: 0 auto;
  padding: 28px 34px 48px;
  gap: 16px;
}

.library-head {
  align-items: center;
  padding: 0;
}

.library-head h3 {
  font-size: 30px;
  font-weight: 860;
}

.library-filterbar.panel {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
  grid-template-columns: minmax(220px, 360px) repeat(3, minmax(132px, 180px)) auto;
}

.library-filterbar label span {
  display: none;
}

.library-filterbar input,
.library-filterbar select,
.library-filterbar .ghost-btn {
  min-height: 38px;
  border-color: #d7dfeb;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.library-board {
  grid-template-columns: minmax(0, 1fr) 316px;
  gap: 18px;
}

.library-grid {
  columns: 4 238px;
  column-gap: 10px;
}

.library-card {
  margin-bottom: 10px;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  background: #ffffff;
}

.library-card:hover,
.library-card.selected {
  transform: translateY(-1px);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.10);
}

.library-thumb {
  border-bottom: 0;
  background: #eef2f7;
}

.library-card-body {
  gap: 7px;
  padding: 12px;
}

.library-card h4 {
  font-size: 14px;
  font-weight: 780;
}

.library-tags,
.library-fileline {
  display: none;
}

.library-card-actions {
  gap: 5px;
}

.library-card-actions .secondary-btn,
.library-card-actions .ghost-btn {
  min-height: 28px;
  border-radius: 7px;
  padding: 0 8px;
  font-size: 12px;
}

.inspector-sticky,
.inspector-empty {
  border: 0;
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.request-page {
  min-height: 100%;
  padding: 48px;
  display: grid;
  align-content: start;
  gap: 18px;
}

.request-hero {
  min-height: 260px;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 34px;
  padding: 42px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(243, 247, 252, 0.84)),
    radial-gradient(circle at 86% 18%, rgba(20, 184, 166, 0.22), transparent 28%),
    radial-gradient(circle at 16% 82%, rgba(250, 204, 21, 0.24), transparent 28%);
  border: 1px solid rgba(213, 220, 231, 0.84);
  box-shadow: 0 24px 70px rgba(72, 88, 118, 0.09);
}

.request-visual {
  width: 160px;
  aspect-ratio: 1;
  border-radius: 36px;
  background:
    radial-gradient(circle at 28% 24%, #67e8f9, transparent 30%),
    radial-gradient(circle at 76% 34%, #facc15, transparent 30%),
    radial-gradient(circle at 46% 74%, #34d399, transparent 32%),
    linear-gradient(135deg, #111827, #2457ff 58%, #f97316);
  box-shadow: 0 28px 70px rgba(37, 99, 235, 0.18), inset 0 0 48px rgba(255, 255, 255, 0.26);
}

.request-hero h3 {
  margin: 8px 0 10px;
  font-size: 40px;
  line-height: 1.12;
}

.request-hero p {
  margin: 0;
  color: #667085;
  font-size: 15px;
}

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

.request-steps article {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 8px;
  border-radius: 14px;
  border: 1px solid rgba(213, 220, 231, 0.82);
  background: rgba(255, 255, 255, 0.76);
  padding: 18px;
}

.request-steps span {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 800;
}

.request-steps strong {
  color: #1d2430;
  font-size: 17px;
}

.card,
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.card {
  padding: 18px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.card p,
.muted {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.tool-layout {
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}

.tool-notice {
  background: #fffaf0;
  color: #8a4b00;
  border-bottom: 1px solid #f7d994;
  padding: 10px 18px;
  font-size: 13px;
  line-height: 1.5;
}

.tool-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

.panel-page {
  padding: 22px;
  display: grid;
  gap: 16px;
}

.library-page {
  padding: 24px 28px 32px;
  display: grid;
  gap: 18px;
}

.library-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 4px 2px 2px;
}

.library-head h3 {
  margin: 2px 0 6px;
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: 0;
}

.library-head p {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.library-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding-top: 2px;
}

.role-pill {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.library-filterbar {
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(132px, 0.8fr)) auto;
  gap: 12px;
  align-items: end;
  border-radius: 18px;
}

.library-search-field input {
  min-height: 42px;
}

.library-filterbar label span {
  color: #475467;
  font-size: 11px;
  font-weight: 760;
}

.library-filterbar label,
.library-form-grid label {
  min-width: 0;
}

.library-status {
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.library-stat {
  min-height: 40px;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 0 12px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.library-stat small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.library-stat strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.library-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.library-grid {
  columns: 3 236px;
  column-gap: 14px;
}

.library-card {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 14px;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  break-inside: avoid;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease, outline-color 120ms ease;
}

.library-card:hover {
  border-color: #c8d2e0;
  box-shadow: 0 14px 32px rgba(16, 24, 40, 0.08);
  transform: translateY(-1px);
}

.library-card.selected {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12), 0 14px 32px rgba(16, 24, 40, 0.08);
}

.library-card:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.16);
  outline-offset: 2px;
}

.library-thumb-wrap {
  position: relative;
}

.library-thumb {
  display: block;
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
}

.library-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.file-pill {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(208, 213, 221, 0.88);
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.92);
  color: #344054;
  font-size: 11px;
  font-weight: 820;
  backdrop-filter: blur(8px);
}

.favorite-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.favorite-btn.active {
  color: #b7791f;
  background: #fff8db;
  border-color: #f6d06f;
}

.library-card-body {
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.library-card h4 {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 780;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.library-subline {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.library-meta,
.library-tags,
.library-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.library-meta {
  color: var(--muted);
  font-size: 12px;
}

.library-meta span:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: var(--muted-2);
}

.library-fileline {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.library-card-actions {
  margin-top: auto;
  padding-top: 4px;
  gap: 6px;
}

.library-card-actions .secondary-btn,
.library-card-actions .ghost-btn {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 680;
}

.empty-card {
  display: inline-flex;
  width: 100%;
  min-height: 220px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  place-items: center;
  padding: 20px;
  color: var(--muted);
  border: 1px dashed var(--border-strong);
  background: var(--surface);
  border-radius: var(--radius);
}

.empty-card strong {
  color: var(--text);
  font-size: 15px;
}

.empty-card span {
  font-size: 13px;
}

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

.inspector-sticky,
.inspector-empty {
  position: sticky;
  top: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.08);
  overflow: hidden;
}

.inspector-empty {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 22px;
  text-align: center;
}

.inspector-empty strong {
  color: var(--text);
}

.inspector-empty span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.inspector-preview {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
}

.inspector-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.inspector-content {
  padding: 16px;
  display: grid;
  gap: 15px;
}

.inspector-content h3 {
  margin: 4px 0 5px;
  font-size: 18px;
  line-height: 1.35;
}

.inspector-content p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}

.inspector-actions,
.inspector-secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.inspector-secondary-actions .ghost-btn {
  min-width: 0;
}

.inspector-list {
  margin: 0;
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.inspector-list div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 11px;
  background: #ffffff;
}

.inspector-list div + div {
  border-top: 1px solid var(--border);
}

.inspector-list dt,
.inspector-list dd {
  margin: 0;
  min-width: 0;
  font-size: 12px;
  line-height: 1.45;
}

.inspector-list dt {
  color: var(--muted);
  font-weight: 740;
}

.inspector-list dd {
  color: var(--text);
  font-weight: 650;
  word-break: break-word;
}

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

.library-modal {
  width: min(760px, 100%);
}

.library-form {
  display: grid;
  gap: 14px;
}

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

.library-form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.toolbar label {
  min-width: 180px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th,
.table td {
  border-bottom: 1px solid var(--border);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.admin-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.admin-section h3 {
  margin: 2px 0 0;
  font-size: 18px;
  line-height: 1.25;
}

.badge.ok {
  color: #067647;
  background: #ecfdf3;
  border-color: #abefc6;
}

.badge.warn {
  color: #8a4b00;
  background: #fff7e6;
  border-color: #f7d994;
}

.badge.bad {
  color: #b42318;
  background: #fff1f0;
  border-color: #fecdca;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.32);
  z-index: 50;
}

.modal {
  width: min(480px, 100%);
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 18px;
}

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

.modal h3 {
  margin: 0;
  font-size: 18px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .sidebar {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-footer {
    display: none;
  }

  .sidebar-brand {
    display: none;
  }

  .nav-list {
    display: flex;
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
  }

  .nav-item {
    flex: 0 0 auto;
    width: auto;
    min-width: 94px;
    min-height: 42px;
    flex-direction: row;
    justify-content: center;
    padding: 0 12px;
    border-radius: 12px;
  }

  .main-area {
    grid-template-rows: auto minmax(0, 1fr);
  }

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

  .home-page,
  .library-page,
  .panel-page {
    padding: 20px 16px 28px;
  }

  .home-hero {
    min-height: 360px;
    padding: 22px;
    border-radius: 20px;
  }

  .home-hero::after {
    right: 22px;
    top: 24px;
    width: 128px;
    height: 104px;
    border-radius: 24px;
  }

  .home-hero::before {
    right: 68px;
    top: 72px;
    width: 66px;
    height: 66px;
  }

  .home-search {
    grid-template-columns: 1fr;
  }

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

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

  .inspiration-wall {
    columns: 2 150px;
  }

  .library-head {
    flex-direction: column;
  }

  .library-actions {
    justify-content: flex-start;
  }

  .library-filterbar,
  .library-form-grid,
  .library-form-grid.two {
    grid-template-columns: 1fr;
  }

  .library-board {
    grid-template-columns: 1fr;
  }

  .library-grid {
    columns: 2 150px;
  }

  .inspector-sticky,
  .inspector-empty {
    position: static;
  }

  .library-card-body {
    min-height: 0;
  }
}

/* Homepage demo parity: typography and compact mutually-exclusive popovers. */
html body #app-shell .home-command-title,
html body #app-shell .home-command-title span,
html body #app-shell .home-command-title strong {
  font-size: 26px !important;
  font-weight: 600 !important;
  line-height: 26px !important;
  letter-spacing: -0.035em !important;
}

html body #app-shell .home-command-title span { color: #0f172a !important; }
html body #app-shell .home-command-title strong { color: #334155 !important; }

html body #app-shell .library-primary-tabs .library-tab {
  min-height: 36px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 20px !important;
}

html body #app-shell .library-primary-tabs .library-tab.active { font-weight: 600 !important; }

html body #app-shell .library-card-overlay h4,
html body #app-shell .library-card-overlay strong {
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 16px !important;
}

html body #app-shell .library-card-overlay p,
html body #app-shell .library-card-overlay span,
html body #app-shell .library-card-meta,
html body #app-shell .library-card-meta span {
  font-size: 11px !important;
  font-weight: 400 !important;
  line-height: 15px !important;
}

html body #app-shell .home-command-actions button {
  height: 36px !important;
  min-height: 36px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

html body #app-shell .home-menu-chevron {
  display: inline-flex !important;
  transition: transform 160ms ease !important;
  transform-origin: center !important;
}

html body #app-shell button[aria-expanded="true"] .home-menu-chevron {
  transform: rotate(180deg) !important;
}

html body #app-shell #home-skills-menu.home-prompt-menu {
  width: 176px !important;
  height: 114px !important;
  padding: 6px !important;
  border-radius: 12px !important;
}

html body #app-shell #home-skills-menu .home-skill-option {
  display: flex !important;
  width: 100% !important;
  height: 32px !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  color: #334155 !important;
  background: transparent !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 16px !important;
  cursor: pointer !important;
}

html body #app-shell #home-skills-menu .home-skill-option:hover,
html body #app-shell #home-skills-menu .home-skill-option:has(input:checked) {
  background: #f8fafc !important;
  color: #0f172a !important;
}

html body #app-shell #home-skills-menu input {
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
  accent-color: #0f172a !important;
}

html body #app-shell #home-size-menu.home-size-menu {
  display: none;
  width: 176px !important;
  height: 224px !important;
  max-height: 224px !important;
  padding: 6px !important;
  overflow-y: auto !important;
  border-radius: 12px !important;
}

html body #app-shell #home-size-menu.home-size-menu:not([hidden]) { display: block !important; }
html body #app-shell #home-size-menu > span { display: none !important; }
html body #app-shell #home-size-menu > div { display: block !important; padding: 0 !important; background: transparent !important; }

html body #app-shell #home-size-menu button,
html body #app-shell #home-model-menu button {
  display: flex !important;
  width: 100% !important;
  height: 32px !important;
  min-height: 32px !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: #475569 !important;
  background: transparent !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 16px !important;
  text-align: left !important;
}

html body #app-shell #home-size-menu button:hover,
html body #app-shell #home-model-menu button:hover,
html body #app-shell #home-size-menu button.active,
html body #app-shell #home-model-menu button.active,
html body #app-shell #home-size-menu button.is-selected,
html body #app-shell #home-model-menu button.is-selected {
  color: #0f172a !important;
  background: #f8fafc !important;
}

html body #app-shell #home-size-menu button.active,
html body #app-shell #home-model-menu button.active,
html body #app-shell #home-size-menu button.is-selected,
html body #app-shell #home-model-menu button.is-selected { font-weight: 600 !important; }

html body #app-shell #home-size-menu button > span:nth-child(2),
html body #app-shell #home-model-menu button > span:first-child { flex: 1 1 auto !important; }

html body #app-shell #home-size-menu .home-ratio-icon {
  width: 14px !important;
  height: 14px !important;
  flex: 0 0 14px !important;
  transform: none !important;
}

html body #app-shell .home-option-check {
  width: 14px !important;
  flex: 0 0 14px !important;
  color: #0f172a !important;
  text-align: right !important;
}

html body #app-shell #home-model-menu.home-model-menu {
  width: 192px !important;
  height: 114px !important;
  padding: 6px !important;
  border-radius: 12px !important;
}

html body #app-shell #library-filter-panel.filter-dropdown {
  width: min(520px, calc(100vw - 112px)) !important;
  max-height: min(470px, calc(100vh - 180px)) !important;
  padding: 20px !important;
  overflow-y: auto !important;
  border-radius: 12px !important;
}

html body #app-shell #library-filter-panel .filter-section { margin: 0 0 16px !important; }
html body #app-shell #library-filter-panel .filter-section:last-child { margin-bottom: 0 !important; }

html body #app-shell #library-filter-panel .filter-section h4 {
  margin: 0 0 8px !important;
  color: #94a3b8 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 14px !important;
  letter-spacing: 0.04em !important;
}

html body #app-shell #library-filter-panel .filter-options { gap: 6px !important; }

html body #app-shell #library-filter-panel .filter-options button {
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: #64748b !important;
  background: #f8fafc !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 14px !important;
  box-shadow: none !important;
}

html body #app-shell #library-filter-panel .filter-options button.active {
  color: #ffffff !important;
  background: #0f172a !important;
}

/* GCC Design V1 product baseline */
.library-page {
  max-width: none;
  width: 100%;
  padding: 34px clamp(24px, 4vw, 64px) 56px;
  display: grid;
  gap: 24px;
}

.library-hero {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 6px 0 0;
}

.library-hero-panel {
  width: min(980px, 100%);
  min-height: 152px;
  border: 1px solid rgba(207, 214, 228, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(116deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.72)),
    linear-gradient(90deg, rgba(219, 234, 254, 0.78), rgba(237, 233, 254, 0.55) 45%, rgba(204, 251, 241, 0.60));
  box-shadow: 0 16px 46px rgba(17, 24, 39, 0.08);
}

.library-module-row {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.library-module-row button {
  height: 54px;
  min-width: 0;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.92), rgba(15, 23, 42, 0.98)),
    #111827;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.12);
}

.library-module-row button:nth-child(2) {
  background:
    linear-gradient(90deg, rgba(30, 64, 175, 0.92), rgba(15, 23, 42, 0.98)),
    #111827;
}

.library-module-row button:nth-child(3) {
  background:
    linear-gradient(90deg, rgba(8, 145, 178, 0.88), rgba(15, 23, 42, 0.98)),
    #111827;
}

.library-module-row button:nth-child(4) {
  background:
    linear-gradient(90deg, rgba(67, 56, 202, 0.90), rgba(15, 23, 42, 0.98)),
    #111827;
}

.library-module-row span {
  opacity: 0.9;
  font-size: 22px;
  line-height: 1;
}

.library-control-strip {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: start;
  padding-top: 18px;
}

.library-kind-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
  min-height: 36px;
}

.library-kind-tabs button,
.library-tag-row button {
  border: 0;
  background: transparent;
  color: #667085;
  padding: 0;
  border-radius: 0;
  font-size: 15px;
  font-weight: 720;
}

.library-kind-tabs button.active {
  position: relative;
  color: #111827;
  font-weight: 860;
}

.library-kind-tabs button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 3px;
  border-radius: 999px;
  background: #111827;
}

.library-upload-area,
#library-favorite-filter {
  justify-self: end;
}

.library-upload-pill,
.library-search-pill,
#library-favorite-filter {
  min-height: 36px;
  border: 1px solid #d6deeb;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #344054;
  font-size: 13px;
  font-weight: 760;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.library-upload-pill {
  padding: 0 14px;
}

.library-tag-rows {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  margin-top: 2px;
}

.library-tag-row {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.library-tag-row > span {
  min-width: 40px;
  color: #111827;
  font-size: 14px;
  font-weight: 820;
}

.library-tag-row > div {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.library-tag-row button.active {
  color: #111827;
  font-weight: 860;
}

.library-search-pill {
  grid-column: 1 / span 1;
  width: min(280px, 100%);
  height: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  padding: 0 10px 0 12px;
  background: #e9eef6;
  border-color: transparent;
}

.library-search-pill input {
  width: 100%;
  min-height: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0;
  color: #111827;
  font-size: 13px;
}

.library-search-pill span {
  color: #667085;
  text-align: right;
}

.library-status {
  width: min(1540px, 100%);
  margin: 0 auto;
}

.library-stat {
  min-height: 36px;
  border-radius: 8px;
}

.library-board {
  width: min(1540px, 100%);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}

.library-grid {
  columns: 4 250px;
  column-gap: 12px;
}

.library-card {
  border-radius: 8px;
  border-color: #dce3ee;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.library-card.selected {
  border-color: #111827;
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.10), 0 14px 34px rgba(17, 24, 39, 0.10);
}

.library-thumb {
  aspect-ratio: auto;
}

.library-thumb img {
  object-fit: contain;
}

.library-card-body {
  padding: 13px 13px 14px;
}

.library-meta,
.library-tags {
  display: flex;
}

.library-fileline {
  display: block;
}

.library-card-actions .secondary-btn,
.library-card-actions .ghost-btn {
  border-radius: 8px;
}

.inspector-sticky,
.inspector-empty {
  border-radius: 8px;
}

.inspector-note {
  border: 1px solid #dce3ee;
  border-radius: 8px;
  padding: 11px 12px;
  background: #f8fafc;
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
}

.library-upload-tags {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1180px) {
  .library-module-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-control-strip,
  .library-board {
    grid-template-columns: 1fr;
  }

  .library-upload-area,
  #library-favorite-filter {
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .library-page {
    padding: 20px 14px 32px;
  }

  .library-hero-panel {
    min-height: 104px;
  }

  .library-module-row,
  .library-upload-tags {
    grid-template-columns: 1fr;
  }

  .library-kind-tabs,
  .library-tag-row > div {
    gap: 16px;
  }

  .library-tag-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

/* Unified Demo v2 exact homepage contract. Keep this final block last. */
html body #app-shell.app-shell[data-route="home"] {
  grid-template-columns: 64px minmax(0, 1fr) !important;
  padding-left: 0 !important;
}

html body #app-shell.app-shell[data-route="home"] .sidebar {
  position: fixed !important;
  inset: 0 auto 0 0 !important;
  z-index: 50 !important;
  width: 64px !important;
  background: rgba(255, 255, 255, .94) !important;
  border-right: 1px solid rgba(226, 232, 240, .75) !important;
  backdrop-filter: blur(20px) !important;
}

html body #app-shell.app-shell[data-route="home"] .main-area {
  grid-column: 2 !important;
}

html body #app-shell.app-shell[data-route="home"] .content {
  background: #f5f6f8 !important;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif !important;
}

html body #app-shell.app-shell[data-route="home"] .library-page-home {
  width: min(100%, 1240px) !important;
  max-width: 1240px !important;
  margin: 0 auto !important;
  padding: 24px 32px 64px !important;
  background: transparent !important;
}

html body #app-shell.app-shell[data-route="home"] .home-command-title {
  min-height: 26px !important;
  margin: 31px auto 36px !important;
  gap: 0 !important;
}

html body #app-shell.app-shell[data-route="home"] .home-command-title span,
html body #app-shell.app-shell[data-route="home"] .home-command-title strong {
  color: #0f172a !important;
  font-size: 26px !important;
  line-height: 1 !important;
  font-weight: 600 !important;
  letter-spacing: -.035em !important;
}

html body #app-shell.app-shell[data-route="home"] .home-command-composer {
  width: min(100%, 768px) !important;
  min-height: 190px !important;
  margin: 0 auto 36px !important;
  border: 1px solid rgba(0, 0, 0, .06) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .04), 0 1px 3px rgba(0, 0, 0, .02) !important;
}

html body #app-shell.app-shell[data-route="home"] .home-command-main {
  min-height: 132px !important;
  padding: 16px !important;
}

html body #app-shell.app-shell[data-route="home"] .home-command-upload {
  width: 56px !important;
  height: 72px !important;
  flex-basis: 56px !important;
  align-self: center !important;
  margin-right: 14px !important;
  border: 1px dashed #dbe2ea !important;
  border-radius: 8px !important;
  background: #fafbfc !important;
  color: #94a3b8 !important;
  transform: rotate(-4deg) !important;
}

html body #app-shell.app-shell[data-route="home"] .home-command-main textarea {
  min-height: 96px !important;
  padding: 4px !important;
  color: #334155 !important;
  font-size: 14px !important;
  line-height: 24px !important;
  font-weight: 400 !important;
}

html body #app-shell.app-shell[data-route="home"] .home-command-controls {
  min-height: 58px !important;
  padding: 8px 14px !important;
  gap: 6px !important;
  border-top: 1px solid rgba(241, 245, 249, .8) !important;
  border-radius: 0 0 16px 16px !important;
  background: rgba(248, 250, 252, .4) !important;
}

html body #app-shell.app-shell[data-route="home"] .home-control-button {
  min-height: 36px !important;
  height: 36px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(226, 232, 240, .8) !important;
  border-radius: 8px !important;
  color: #334155 !important;
  background: #fff !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 500 !important;
}

.home-prompt-menu-wrap {
  position: relative;
  flex: 0 0 auto;
}

.home-prompt-menu {
  position: absolute;
  z-index: 80;
  bottom: calc(100% + 8px);
  left: 0;
  width: 176px;
  padding: 6px;
  border: 1px solid rgba(226, 232, 240, .8);
  border-radius: 12px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, .06);
  backdrop-filter: blur(12px);
}

.home-prompt-menu[hidden] { display: none !important; }

.home-prompt-menu button {
  display: flex;
  width: 100%;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: #475569;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
}

.home-prompt-menu button:hover,
.home-prompt-menu button.is-selected { color: #0f172a; background: #f8fafc; }

html body #app-shell.app-shell[data-route="home"] .home-model-wrap {
  margin-left: auto;
}

html body #app-shell.app-shell[data-route="home"] .home-model-trigger {
  border-color: transparent !important;
  background: transparent !important;
}

html body #app-shell.app-shell[data-route="home"] .home-model-trigger:hover { background: #fff !important; }
html body #app-shell.app-shell[data-route="home"] .home-model-trigger strong { font-size: 12px; font-weight: 500; }
.home-model-menu { right: 0; left: auto; width: 192px; }

html body #app-shell.app-shell[data-route="home"] .home-command-submit {
  width: 36px !important;
  height: 36px !important;
  flex: 0 0 36px !important;
  margin-left: 0 !important;
  border-radius: 50% !important;
  background: #020617 !important;
}

html body #app-shell.app-shell[data-route="home"] .home-command-submit svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  transform: rotate(90deg);
}

html body #app-shell.app-shell[data-route="home"] .library-control-strip {
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  align-items: end !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 12px 0 18px !important;
  border-bottom: 1px solid rgba(226, 232, 240, .7) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-kind-tabs {
  gap: 28px !important;
}

html body #app-shell.app-shell[data-route="home"] .library-kind-tabs > button {
  min-height: 40px !important;
  padding: 0 0 10px !important;
  color: #94a3b8 !important;
  font-size: 15px !important;
  font-weight: 500 !important;
}

html body #app-shell.app-shell[data-route="home"] .library-kind-tabs > button.active {
  color: #0f172a !important;
  font-weight: 600 !important;
}

html body #app-shell.app-shell[data-route="home"] .kind-tab-indicator {
  height: 2px !important;
  border-radius: 999px !important;
}

html body #app-shell.app-shell[data-route="home"] .library-search-pill {
  width: 224px !important;
  min-height: 32px !important;
  border: 1px solid rgba(226, 232, 240, .7) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .8) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-upload-area { order: 2 !important; }
html body #app-shell.app-shell[data-route="home"] .filter-dropdown-wrap { order: 3 !important; }

html body #app-shell.app-shell[data-route="home"] .library-upload-pill,
html body #app-shell.app-shell[data-route="home"] .filter-dropdown-wrap .ghost-btn {
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 10px !important;
  border: 1px solid rgba(226, 232, 240, .7) !important;
  border-radius: 8px !important;
  color: #64748b !important;
  background: rgba(255, 255, 255, .72) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
}

html body #app-shell.app-shell[data-route="home"] .library-board {
  margin: 36px 0 0 !important;
}

html body #app-shell.app-shell[data-route="home"] .library-grid {
  display: grid !important;
  columns: auto !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card {
  margin: 0 !important;
  overflow: hidden !important;
  border: 1px solid #f1f5f9 !important;
  border-radius: 12px !important;
  background: #fff !important;
  transform: none !important;
  box-shadow: none !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card:hover {
  transform: none !important;
  box-shadow: 0 18px 36px rgba(15, 23, 42, .08) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-thumb-wrap,
html body #app-shell.app-shell[data-route="home"] .library-thumb {
  aspect-ratio: 3 / 4 !important;
  height: auto !important;
  min-height: 0 !important;
  border-radius: 11px 11px 0 0 !important;
}

html body #app-shell.app-shell[data-route="home"] .library-thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card-overlay {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  padding: 16px !important;
  color: #fff !important;
  background: linear-gradient(180deg, transparent 48%, rgba(15, 23, 42, .66) 100%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity .2s ease !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card:hover .library-card-overlay { opacity: 1 !important; }
html body #app-shell.app-shell[data-route="home"] .library-card-overlay h4 { color: #fff !important; font-size: 12px !important; }
html body #app-shell.app-shell[data-route="home"] .library-card-overlay p { color: rgba(255,255,255,.78) !important; font-size: 10px !important; }
html body #app-shell.app-shell[data-route="home"] .library-card-actions { display: none !important; }

html body #app-shell.app-shell[data-route="home"] .library-home-card-meta {
  min-height: 40px !important;
  padding: 9px 12px !important;
}

html body #app-shell.app-shell[data-route="home"] .library-home-card-meta strong { display: none !important; }
html body #app-shell.app-shell[data-route="home"] .library-home-card-meta span { margin: 0 !important; font-size: 10px !important; }

@media (max-width: 980px) {
  html body #app-shell.app-shell[data-route="home"] .library-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

@media (max-width: 760px) {
  html body #app-shell.app-shell[data-route="home"] { display: block !important; }
  html body #app-shell.app-shell[data-route="home"] .sidebar { display: none !important; }
  html body #app-shell.app-shell[data-route="home"] .library-page-home { padding: 24px 16px 52px !important; }
  html body #app-shell.app-shell[data-route="home"] .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  html body #app-shell.app-shell[data-route="home"] .home-model-trigger strong { display: none; }
}

@media (max-width: 520px) {
  html body #app-shell.app-shell[data-route="home"] .library-grid { grid-template-columns: 1fr !important; }
}

/* V1 polish: fast, image-first library wall */
.tool-frame-mount {
  min-height: 0;
  height: 100%;
}

.library-page,
.library-page-home {
  padding: 24px clamp(18px, 3vw, 44px) 52px;
  gap: 18px;
}

.library-page .library-hero {
  display: none;
}

.library-control-strip {
  width: min(1800px, 100%);
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px 18px;
  padding-top: 0;
}

.library-kind-tabs {
  gap: clamp(18px, 2vw, 32px);
}

.library-kind-tabs button,
.library-tag-row button {
  font-size: 15px;
}

.library-tag-rows {
  gap: 12px;
}

.library-search-pill {
  grid-column: 1 / span 1;
  width: min(300px, 100%);
}

.library-status {
  width: min(1800px, 100%);
}

.library-board {
  width: min(1800px, 100%);
  grid-template-columns: 1fr;
  gap: 0;
}

.library-inspector {
  display: none;
}

.library-grid {
  columns: 5 260px;
  column-gap: 8px;
}

.library-card {
  margin: 0 0 8px;
  border: 0;
  border-radius: 7px;
  background: #e9edf4;
  box-shadow: none;
}

.library-card:hover,
.library-card.selected {
  transform: none;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

.library-card.selected {
  outline: 2px solid rgba(17, 24, 39, 0.8);
  outline-offset: -2px;
}

.library-thumb-wrap {
  overflow: hidden;
}

.library-thumb {
  border-bottom: 0;
  background: #edf1f7;
}

.library-thumb img {
  object-fit: contain;
}

.library-card-overlay {
  position: absolute;
  inset: auto 0 0;
  z-index: 3;
  min-height: 92px;
  display: grid;
  align-content: end;
  gap: 9px;
  padding: 18px 14px 13px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.72) 100%);
  color: #ffffff;
}

.library-card-overlay h4 {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.28;
  font-weight: 860;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.36);
}

.library-card-overlay p {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.library-card-actions {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.library-card:hover .library-card-actions,
.library-card.selected .library-card-actions {
  opacity: 1;
  transform: translateY(0);
}

.library-card-actions button {
  min-height: 29px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 7px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 12px;
  font-weight: 760;
  backdrop-filter: blur(8px);
}

.library-card-actions button:hover {
  background: rgba(255, 255, 255, 0.28);
}

.library-card-actions button.danger {
  border-color: rgba(255, 205, 210, 0.68);
  color: #ffd8dc;
}

.file-pill,
.favorite-btn {
  z-index: 4;
}

.file-pill {
  min-height: 24px;
  border: 0;
  background: rgba(255, 255, 255, 0.88);
  color: #111827;
}

.favorite-btn {
  border: 0;
  background: rgba(255, 255, 255, 0.82);
}

.library-load-more {
  width: 100%;
  min-height: 56px;
  margin: 0 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  break-inside: avoid;
  border: 1px solid #d7dfeb;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.84);
  color: #344054;
  font-size: 14px;
  font-weight: 820;
}

.library-drop-zone {
  position: relative;
  min-height: 116px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 18px;
  border: 1px dashed #b7c2d4;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.library-drop-zone.dragging {
  border-color: #111827;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.library-drop-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.library-drop-zone span {
  color: #111827;
  font-size: 13px;
  font-weight: 860;
}

.library-drop-zone strong {
  color: #344054;
  font-size: 14px;
  line-height: 1.35;
}

.library-drop-zone small {
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
  word-break: break-all;
}

/* V1.1 interaction polish: home prototype, calmer spacing, better upload flow */
:root {
  --vf-ui-radius: 8px;
  --vf-soft-radius: 12px;
  --vf-page-max: 1680px;
  --vf-border: #d9e0ec;
  --vf-panel: #f3f4f6;
  --vf-muted-panel: #e5e7eb;
  --vf-text: #111827;
  --vf-muted-text: #667085;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.icon-btn,
.library-upload-pill,
#library-favorite-filter,
.library-search-pill,
.library-form input,
.library-form select,
.library-form textarea,
.library-card,
.library-load-more,
.library-drop-zone,
.modal,
.library-modal {
  border-radius: var(--vf-ui-radius);
}

.content {
  background: #f6f7fb;
}

.topbar {
  min-height: 64px;
  border-bottom-color: #e2e8f0;
  background: rgba(248, 250, 252, 0.88);
  backdrop-filter: blur(14px);
}

.topbar h2 {
  letter-spacing: 0;
}

.library-page,
.library-page-home {
  width: 100%;
  max-width: none;
  padding: 30px clamp(24px, 3.4vw, 56px) 64px;
  gap: 24px;
}

.library-page:not(.library-page-home) .library-hero {
  display: none;
}

.library-page-home .library-hero {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 22px 0 26px;
}

.library-page-home .library-hero-panel {
  width: min(940px, 72vw);
  min-height: clamp(150px, 17vw, 214px);
  border: 0;
  border-radius: 16px;
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.72), transparent 22%),
    radial-gradient(circle at 76% 32%, rgba(255, 255, 255, 0.52), transparent 26%),
    linear-gradient(135deg, #eceeef, #e4e6e8);
  box-shadow: none;
}

.library-page-home .library-module-row {
  width: min(940px, 72vw);
  gap: 12px;
}

.library-page-home .library-module-row button {
  height: 64px;
  border: 0;
  border-radius: var(--vf-ui-radius);
  padding: 0 18px;
  color: #111827;
  background: #d9d9d9;
  box-shadow: none;
  font-size: 14px;
  font-weight: 760;
}

.library-page-home .library-module-row button:hover {
  background: #cfcfcf;
  transform: translateY(-1px);
}

.library-control-strip,
.library-status,
.library-board {
  width: min(var(--vf-page-max), 100%);
  margin-inline: auto;
}

.library-control-strip {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px) auto;
  gap: 16px 22px;
  align-items: center;
  padding-top: 8px;
}

.library-page-home .library-control-strip {
  padding-top: 0;
}

.library-kind-tabs {
  gap: clamp(20px, 2vw, 34px);
}

.library-kind-tabs button,
.library-tag-row button {
  color: #7b8797;
  font-size: 15px;
  font-weight: 760;
  letter-spacing: 0;
}

.library-kind-tabs button.active,
.library-tag-row button.active {
  color: #111827;
}

.library-upload-area {
  grid-column: 3;
  grid-row: 1;
}

.library-upload-pill {
  min-width: 150px;
  min-height: 36px;
  border: 0;
  background: #d9d9d9;
  color: #111827;
  font-weight: 820;
}

#library-favorite-filter {
  min-height: 34px;
  border-color: var(--vf-border);
  background: rgba(255, 255, 255, 0.82);
}

.library-search-pill {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  min-height: 36px;
  border: 0;
  background: #e4e8ef;
  box-shadow: none;
}

.library-search-pill input {
  font-size: 13px;
}

.library-tag-rows {
  grid-column: 1 / -1;
  gap: 13px;
}

.library-tag-row {
  gap: 22px;
}

.library-tag-row > span {
  min-width: 44px;
  color: #111827;
}

.library-tag-row > div {
  gap: clamp(18px, 2vw, 30px);
}

.library-status {
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #98a2b3;
}

.library-grid {
  columns: 6 250px;
  column-gap: 10px;
}

.library-card {
  margin-bottom: 10px;
  overflow: hidden;
  background: #d9d9d9;
}

.library-thumb {
  background: #d9d9d9;
}

.library-card-overlay {
  min-height: 86px;
  padding: 18px 14px 12px;
}

.library-card-overlay h4 {
  font-size: 15px;
}

.library-modal {
  width: min(880px, calc(100vw - 36px));
  max-height: min(860px, calc(100vh - 40px));
  padding: 34px 34px 28px;
  overflow: visible;
  border: 1px solid #d9e0ec;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.18);
}

.library-modal .modal-head {
  margin-bottom: 22px;
  align-items: start;
}

.library-modal .modal-head h3 {
  font-size: 28px;
  line-height: 1.15;
}

.library-modal .icon-btn {
  width: 54px;
  height: 54px;
  border-color: #dbe3ef;
  color: #667085;
  font-size: 24px;
}

.library-form {
  gap: 20px;
}

.library-form label,
.library-upload-section {
  gap: 9px;
}

.library-form label > span,
.library-upload-section > span,
.upload-tag-picker > span {
  color: #667085;
  font-size: 18px;
  font-weight: 860;
}

.library-form input,
.library-form select {
  min-height: 52px;
  border-color: #cfd8e8;
  background: #ffffff;
  color: #111827;
  font-size: 17px;
  font-weight: 760;
}

.library-kind-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.library-kind-card {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d5deeb;
  border-radius: var(--vf-ui-radius);
  padding: 18px 20px;
  background: #f8fafc;
  color: #111827;
  text-align: left;
  cursor: pointer;
}

.library-kind-card strong {
  font-size: 20px;
  line-height: 1.1;
  font-weight: 880;
}

.library-kind-card small {
  color: #667085;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 720;
}

.library-kind-card.active {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
}

.library-kind-card.active small {
  color: rgba(255, 255, 255, 0.72);
}

.library-upload-tags {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  overflow: visible;
}

.upload-tag-picker {
  position: relative;
  display: grid;
  gap: 9px;
  min-width: 0;
}

.upload-tag-trigger {
  width: 100%;
  min-height: 52px;
  border: 1px solid #cfd8e8;
  border-radius: var(--vf-ui-radius);
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  color: #111827;
  cursor: default;
}

.upload-tag-trigger strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 840;
}

.upload-tag-trigger small {
  flex: 0 0 auto;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 760;
}

.upload-tag-menu {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 0px);
  max-height: 220px;
  display: grid;
  gap: 4px;
  padding: 8px;
  overflow: auto;
  border: 1px solid #d9e0ec;
  border-radius: var(--vf-ui-radius);
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 130ms ease, transform 130ms ease, visibility 0s 50ms;
}

.upload-tag-picker:hover .upload-tag-menu,
.upload-tag-picker:focus-within .upload-tag-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.upload-tag-menu button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  background: transparent;
  color: #344054;
  text-align: left;
  font-size: 14px;
  font-weight: 760;
}

.upload-tag-menu button:hover,
.upload-tag-menu button.active {
  background: #eef2f7;
  color: #111827;
}

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

.library-drop-zone {
  min-height: 132px;
  border-color: #bdc8dc;
  background: #f8fafc;
}

.library-drop-zone span {
  font-size: 17px;
}

.library-drop-zone strong {
  font-size: 16px;
}

.modal-actions {
  margin-top: 8px;
}

.modal-actions .primary-btn,
.modal-actions .ghost-btn {
  min-height: 54px;
  padding-inline: 28px;
  font-size: 20px;
  font-weight: 880;
}

@media (max-width: 980px) {
  .library-page-home .library-hero-panel,
  .library-page-home .library-module-row {
    width: 100%;
  }

  .library-control-strip {
    grid-template-columns: 1fr;
  }

  .library-search-pill,
  .library-upload-area,
  #library-favorite-filter {
    grid-column: auto;
    grid-row: auto;
    justify-self: stretch;
  }

  .library-upload-pill,
  #library-favorite-filter {
    width: 100%;
  }

  .library-upload-tags,
  .library-kind-card-grid,
  .library-form-grid.two {
    grid-template-columns: 1fr;
  }
}

/* D.Design-inspired visual system pass: cosmetic only */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f1f2f4;
  --surface-3: #e8eaed;
  --border: #e2e4e8;
  --border-strong: #d1d5db;
  --text: #101318;
  --muted: #747b86;
  --muted-2: #a6abb3;
  --primary: #101318;
  --primary-strong: #000000;
  --shadow: 0 14px 40px rgba(16, 19, 24, 0.08);
  --radius: 8px;
  --vf-ui-radius: 8px;
  --vf-soft-radius: 8px;
  --vf-border: #dcdfe5;
  --vf-panel: #eeeeef;
  --vf-muted-panel: #d9d9da;
  --vf-page-max: 1720px;
}

html,
body {
  background: #f5f6f8;
}

body {
  color: #101318;
  -webkit-font-smoothing: antialiased;
}

button {
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease, opacity 140ms ease, transform 140ms ease;
}

input,
select,
textarea {
  border-color: #d8dde6;
  background: #ffffff;
  color: #101318;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #101318;
  box-shadow: 0 0 0 3px rgba(16, 19, 24, 0.08);
}

.primary-btn {
  border-color: #101318;
  background: #101318;
  color: #ffffff;
}

.primary-btn:hover {
  background: #000000;
}

.secondary-btn {
  border-color: #d8dde6;
  background: #ffffff;
  color: #101318;
}

.secondary-btn:hover,
.ghost-btn:hover,
.icon-btn:hover {
  border-color: #c4cad4;
  background: #f3f4f6;
}

.ghost-btn {
  border-color: #d8dde6;
  background: #ffffff;
  color: #101318;
}

.icon-btn {
  border-color: #d8dde6;
  background: #ffffff;
}

.login-view {
  background: #f5f6f8;
}

.login-panel {
  border-color: #e0e3e8;
  box-shadow: 0 20px 70px rgba(16, 19, 24, 0.08);
}

.login-panel::before {
  height: 0;
}

.brand-mark {
  background: #050608;
  color: #ffffff;
}

.app-shell {
  grid-template-columns: 76px minmax(0, 1fr);
  background: #f5f6f8;
}

.sidebar {
  background: rgba(255, 255, 255, 0.84);
  border-right: 1px solid #e2e4e8;
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.sidebar-brand {
  min-height: 78px;
  padding: 22px 0 10px;
}

.brand-mark.small {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #050608;
  box-shadow: none;
}

.nav-list {
  padding: 24px 8px 10px;
  gap: 13px;
}

.nav-item {
  min-height: 62px;
  border-radius: 8px;
  color: #8b929c;
  font-size: 12px;
  font-weight: 620;
}

.nav-item:hover {
  background: #f3f4f6;
}

.nav-item.active {
  background: transparent;
  color: #050608;
}

.nav-icon {
  width: 28px;
  height: 28px;
  color: #b2b7bf;
}

.nav-item.active .nav-icon {
  color: #050608;
}

.nav-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.9;
}

.sidebar-footer .ghost-btn {
  background: transparent;
  color: #8b929c;
}

.topbar {
  min-height: 58px;
  height: 58px;
  padding: 8px 28px;
  border-bottom: 1px solid #e2e4e8;
  background: rgba(245, 246, 248, 0.9);
}

.topbar h2 {
  font-size: 18px;
  font-weight: 780;
}

.kicker {
  color: #8b929c;
  font-size: 11px;
  font-weight: 760;
}

.user-chip {
  min-height: 34px;
  border-color: #e2e4e8;
  background: #ffffff;
}

.user-avatar {
  background: #050608;
}

.content {
  background: #f5f6f8;
}

.library-page,
.library-page-home {
  padding: 34px clamp(34px, 4vw, 72px) 72px;
  gap: 28px;
}

.library-page-home .library-hero {
  padding: 54px 0 32px;
  gap: 14px;
}

.library-page-home .library-hero-panel {
  width: min(980px, 74vw);
  min-height: clamp(172px, 16vw, 220px);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 46%),
    #eeeeef;
}

.library-page-home .library-module-row {
  width: min(980px, 74vw);
  gap: 12px;
}

.library-page-home .library-module-row button {
  height: 64px;
  border-radius: 8px;
  padding: 0 18px;
  background: #d9d9da !important;
  color: #101318;
  font-size: 14px;
  font-weight: 690;
  box-shadow: none;
}

.library-page-home .library-module-row button:hover {
  background: #cfcfd1 !important;
}

.library-control-strip {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 410px) auto auto;
  gap: 14px 22px;
  align-items: center;
}

.library-kind-tabs {
  gap: clamp(22px, 2vw, 36px);
}

.library-kind-tabs button,
.library-tag-row button {
  color: #838b96;
  font-size: 15px;
  font-weight: 690;
}

.library-kind-tabs button.active,
.library-tag-row button.active {
  color: #101318;
  font-weight: 760;
}

.library-kind-tabs button.active::after {
  bottom: -9px;
  height: 3px;
  background: #101318;
}

.library-search-pill {
  min-height: 36px;
  border: 0;
  background: #e6e9ef;
}

.library-search-pill input {
  color: #101318;
  font-weight: 620;
}

.library-upload-area {
  grid-column: 3;
}

.library-upload-pill {
  min-width: 150px;
  min-height: 36px;
  border: 0;
  background: #d9d9da;
  color: #101318;
  font-weight: 760;
}

.library-upload-pill:hover {
  background: #cfcfd1;
}

#library-favorite-filter {
  grid-column: 4;
  min-height: 34px;
  border-color: #d8dde6;
  background: #ffffff;
  color: #525b66;
}

.library-tag-rows {
  gap: 12px;
}

.library-tag-row {
  gap: 24px;
}

.library-tag-row > span {
  color: #101318;
  font-weight: 740;
}

.library-tag-row > div {
  gap: clamp(18px, 1.8vw, 30px);
}

.library-status {
  min-height: 24px;
  color: #a2a8b1;
  font-size: 12px;
}

.library-board {
  margin-top: -4px;
}

.library-grid {
  columns: 6 248px;
  column-gap: 8px;
}

.library-card {
  margin-bottom: 8px;
  border-radius: 8px;
  background: #d8dadd;
  box-shadow: none;
}

.library-card:hover,
.library-card.selected {
  box-shadow: 0 18px 50px rgba(16, 19, 24, 0.14);
}

.library-card.selected {
  outline: 2px solid #101318;
}

.library-thumb {
  background: #d8dadd;
}

.file-pill,
.favorite-btn {
  border-radius: 999px;
  box-shadow: none;
}

.file-pill {
  background: rgba(255, 255, 255, 0.9);
  color: #101318;
}

.favorite-btn {
  background: rgba(255, 255, 255, 0.84);
}

.library-card-overlay {
  min-height: 86px;
  padding: 18px 14px 12px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.68) 100%);
}

.library-card-overlay h4 {
  font-size: 15px;
  font-weight: 820;
}

.library-card-actions button {
  min-height: 28px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 720;
}

.library-load-more {
  border-color: #d8dde6;
  background: #ffffff;
  color: #525b66;
}

.modal-backdrop {
  background: rgba(17, 24, 39, 0.42);
}

.library-modal {
  width: min(860px, calc(100vw - 36px));
  border-radius: 8px;
  border-color: #dce1ea;
  padding: 32px;
  box-shadow: 0 26px 90px rgba(16, 19, 24, 0.20);
}

.library-modal .modal-head {
  margin-bottom: 22px;
}

.library-modal .modal-head h3 {
  font-size: 28px;
  font-weight: 840;
}

.library-modal .icon-btn {
  width: 52px;
  height: 52px;
  border-radius: 8px;
}

.library-form {
  gap: 18px;
}

.library-form label > span,
.library-upload-section > span,
.upload-tag-picker > span {
  color: #6f7784;
  font-size: 16px;
  font-weight: 760;
}

.library-form input,
.library-form select,
.upload-tag-trigger {
  min-height: 50px;
  border-color: #d4dae5;
  border-radius: 8px;
  background: #ffffff;
  font-size: 16px;
  font-weight: 690;
}

.library-kind-card {
  min-height: 88px;
  border-color: #d4dae5;
  border-radius: 8px;
  background: #f7f8fa;
}

.library-kind-card strong {
  font-size: 19px;
  font-weight: 820;
}

.library-kind-card.active {
  border-color: #101318;
  background: #101318;
}

.upload-tag-trigger strong {
  font-size: 16px;
  font-weight: 730;
}

.upload-tag-trigger small {
  color: #9aa1aa;
}

.upload-tag-menu {
  border-color: #dce1ea;
  border-radius: 8px;
  box-shadow: 0 20px 58px rgba(16, 19, 24, 0.16);
}

.upload-tag-menu button {
  border-radius: 6px;
}

.upload-tag-menu button:hover,
.upload-tag-menu button.active {
  background: #f0f2f5;
}

.library-drop-zone {
  min-height: 124px;
  border-color: #cbd3df;
  border-radius: 8px;
  background: #f8f9fb;
}

.library-drop-zone.dragging {
  border-color: #101318;
  box-shadow: 0 0 0 3px rgba(16, 19, 24, 0.08);
}

.library-drop-zone span {
  font-size: 16px;
  font-weight: 780;
}

.library-drop-zone strong {
  color: #343b46;
  font-size: 15px;
  font-weight: 720;
}

.modal-actions .primary-btn,
.modal-actions .ghost-btn {
  min-height: 50px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 820;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .library-control-strip {
    grid-template-columns: 1fr;
  }

  .library-search-pill,
  .library-upload-area,
  #library-favorite-filter {
    grid-column: auto;
  }
}

/* GCC Design unified creative system v1ui5 */
:root {
  --bg: #f4f5f3;
  --surface: #ffffff;
  --surface-2: #efefed;
  --surface-3: #dedfdd;
  --border: #e0e1df;
  --border-strong: #c9cbc8;
  --text: #101114;
  --muted: #777c84;
  --muted-2: #a3a8af;
  --primary: #101114;
  --primary-strong: #050608;
  --accent-lime: #d8ff4f;
  --accent-mint: #b5f7dc;
  --accent-sky: #c8ddff;
  --danger: #d92d20;
  --shadow: 0 24px 70px rgba(16, 17, 20, 0.10);
  --radius: 8px;
  --vf-ui-radius: 8px;
  --vf-soft-radius: 8px;
  --vf-border: #dcddd9;
  --vf-panel: #e8e8e6;
  --vf-muted-panel: #d6d7d5;
  --vf-page-max: 1760px;
}

html,
body,
.content {
  background:
    radial-gradient(circle at 52% 0%, rgba(214, 223, 236, 0.56), transparent 34%),
    linear-gradient(180deg, #f7f8f6 0%, #f2f3f1 100%);
}

body {
  color: var(--text);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  letter-spacing: 0;
}

button {
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease, opacity 140ms ease, transform 140ms ease;
}

input,
select,
textarea {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 17, 20, 0.08);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.icon-btn,
.library-upload-pill,
.library-load-more,
#library-favorite-filter,
.library-search-pill,
.library-form input,
.library-form select,
.upload-tag-trigger,
.library-kind-card,
.library-drop-zone,
.modal,
.library-modal,
.badge,
.user-chip {
  border-radius: 8px;
}

.primary-btn {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
  box-shadow: none;
}

.primary-btn:hover {
  background: var(--primary-strong);
}

.secondary-btn,
.ghost-btn,
.icon-btn {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  box-shadow: none;
}

.secondary-btn:hover,
.ghost-btn:hover,
.icon-btn:hover {
  border-color: var(--border-strong);
  background: #f0f1ef;
}

.ghost-btn.danger,
.danger {
  color: var(--danger);
}

.app-shell {
  grid-template-columns: 76px minmax(0, 1fr);
  background:
    radial-gradient(circle at 52% 0%, rgba(214, 223, 236, 0.56), transparent 34%),
    #f4f5f3;
}

.sidebar {
  background: rgba(255, 255, 255, 0.78);
  border-right: 1px solid rgba(216, 218, 216, 0.92);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.76) inset;
  backdrop-filter: blur(20px);
}

.sidebar-brand {
  min-height: 78px;
  padding: 20px 0 8px;
}

.sidebar-brand > div:not(.brand-mark) {
  display: none;
}

.brand-mark.small {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #050608;
  color: transparent;
  box-shadow: none;
}

.brand-mark.small::before {
  width: 20px;
  height: 25px;
}

.nav-list {
  padding: 24px 6px 10px;
  gap: 14px;
}

.nav-item {
  min-height: 64px;
  border: 0;
  border-radius: 8px;
  padding: 7px 0;
  background: transparent;
  color: #8a9098;
  gap: 6px;
  font-size: 12px;
  font-weight: 660;
}

.nav-item:hover {
  background: rgba(16, 17, 20, 0.035);
}

.nav-item.active {
  background: transparent;
  color: #050608;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 30px;
  border-radius: 0 999px 999px 0;
  background: #050608;
}

.nav-icon {
  width: 29px;
  height: 29px;
  color: #a0a6ae;
  background: transparent;
}

.nav-item.active .nav-icon {
  color: #050608;
}

.nav-icon svg {
  width: 21px;
  height: 21px;
  stroke-width: 2;
}

.sidebar-footer {
  padding: 10px 8px 18px;
}

.sidebar-footer .ghost-btn {
  min-height: 30px;
  border: 0;
  background: transparent;
  color: #838993;
  font-size: 11px;
  font-weight: 720;
}

.topbar {
  min-height: 58px;
  height: 58px;
  padding: 8px 28px;
  border-bottom: 1px solid rgba(216, 218, 216, 0.92);
  background: rgba(244, 245, 243, 0.88);
  backdrop-filter: blur(18px);
}

.topbar h2 {
  font-size: 18px;
  font-weight: 820;
}

.kicker {
  color: #828891;
  font-size: 11px;
  font-weight: 820;
}

.user-chip {
  min-height: 34px;
  border-color: rgba(216, 218, 216, 0.92);
  background: rgba(255, 255, 255, 0.82);
}

.user-avatar {
  background: #050608;
}

.app-shell[data-route="home"] .main-area {
  grid-template-rows: minmax(0, 1fr);
}

.app-shell[data-route="home"] .topbar {
  display: none;
}

.library-page,
.library-page-home {
  width: 100%;
  max-width: none;
  padding: 44px clamp(28px, 3.6vw, 68px) 72px;
  gap: 26px;
}

.library-page:not(.library-page-home) {
  padding-top: 34px;
}

.library-page:not(.library-page-home) .library-hero {
  display: none;
}

.library-page-home .library-hero {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 34px 0 26px;
}

.library-page-home .library-hero-panel {
  position: relative;
  width: min(980px, 72vw);
  min-height: clamp(168px, 17vw, 226px);
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background:
    radial-gradient(circle at 22% 22%, rgba(255, 255, 255, 0.74), transparent 18%),
    radial-gradient(circle at 76% 28%, rgba(216, 255, 79, 0.22), transparent 22%),
    linear-gradient(135deg, #eceeed 0%, #e4e5e3 100%);
  box-shadow: none;
}

.library-page-home .library-hero-panel::before {
  content: "";
  position: absolute;
  left: 8%;
  top: 28%;
  width: 34%;
  height: 22%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
}

.library-page-home .library-hero-panel::after {
  content: "";
  position: absolute;
  right: 12%;
  bottom: 20%;
  width: 122px;
  height: 122px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 34% 34%, rgba(255, 255, 255, 0.68), transparent 24%),
    linear-gradient(135deg, #d8ff4f, #b5f7dc 58%, #c8ddff);
  opacity: 0.82;
  filter: blur(0.2px);
}

.library-page-home .library-module-row {
  width: min(980px, 72vw);
  gap: 12px;
}

.library-page-home .library-module-row button {
  height: 64px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: #d8d9d7 !important;
  color: var(--text);
  box-shadow: none;
  font-size: 14px;
  font-weight: 760;
}

.library-page-home .library-module-row button:hover {
  background: #cdcecc !important;
  transform: translateY(-1px);
}

.library-control-strip,
.library-status,
.library-board {
  width: min(var(--vf-page-max), 100%);
  margin-inline: auto;
}

.library-control-strip {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px) auto auto;
  gap: 16px 22px;
  align-items: center;
  padding-top: 2px;
}

.library-kind-tabs {
  gap: clamp(22px, 2.1vw, 38px);
}

.library-kind-tabs button,
.library-tag-row button {
  color: #7f858e;
  font-size: 15px;
  font-weight: 700;
}

.library-kind-tabs button.active,
.library-tag-row button.active {
  color: var(--text);
  font-weight: 840;
}

.library-kind-tabs button.active::after {
  bottom: -9px;
  height: 3px;
  background: var(--text);
}

.library-search-pill {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  min-height: 36px;
  border: 0;
  background: #e5e8ec;
  box-shadow: none;
}

.library-search-pill input {
  color: var(--text);
  font-size: 13px;
  font-weight: 680;
}

.library-upload-area {
  grid-column: 3;
  grid-row: 1;
}

.library-upload-pill {
  min-width: 154px;
  min-height: 36px;
  border: 0;
  background: #d8d9d7;
  color: var(--text);
  font-weight: 840;
}

.library-upload-pill:hover {
  background: #cccdca;
}

#library-favorite-filter {
  grid-column: 4;
  grid-row: 1;
  min-height: 34px;
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.78);
  color: #555b64;
  font-weight: 760;
}

.library-tag-rows {
  grid-column: 1 / -1;
  gap: 13px;
}

.library-tag-row {
  gap: 24px;
}

.library-tag-row > span {
  min-width: 44px;
  color: var(--text);
  font-size: 14px;
  font-weight: 840;
}

.library-tag-row > div {
  gap: clamp(18px, 2vw, 32px);
}

.library-status {
  min-height: 28px;
  color: #9ca1a8;
  font-size: 12px;
}

.library-stat {
  min-height: 34px;
  border-color: rgba(216, 218, 216, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.library-board {
  grid-template-columns: 1fr;
}

.library-inspector {
  display: none;
}

.library-grid {
  columns: 6 252px;
  column-gap: 9px;
}

.library-card {
  margin: 0 0 9px;
  border: 0;
  border-radius: 8px;
  background: #d9dad8;
  box-shadow: none;
}

.library-card:hover,
.library-card.selected {
  transform: none;
  box-shadow: 0 20px 56px rgba(16, 17, 20, 0.16);
}

.library-card.selected {
  outline: 2px solid rgba(16, 17, 20, 0.86);
  outline-offset: -2px;
}

.library-card:focus-visible {
  outline: 3px solid rgba(16, 17, 20, 0.18);
  outline-offset: 2px;
}

.library-thumb {
  border-bottom: 0;
  background: #d9dad8;
}

.library-thumb img {
  object-fit: contain;
}

.file-pill {
  min-height: 24px;
  border: 0;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font-size: 11px;
  font-weight: 860;
}

.favorite-btn {
  border: 0;
  background: rgba(255, 255, 255, 0.80);
  color: #6c727b;
}

.favorite-btn.active {
  background: rgba(216, 255, 79, 0.90);
  color: #101114;
}

.library-card-overlay {
  min-height: 90px;
  padding: 20px 14px 13px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.70) 100%);
  color: #ffffff;
}

.library-card-overlay h4 {
  color: #ffffff;
  font-size: 15px;
  font-weight: 860;
}

.library-card-overlay p {
  color: rgba(255, 255, 255, 0.78);
}

.library-card-actions {
  opacity: 0;
  transform: translateY(6px);
}

.library-card:hover .library-card-actions,
.library-card.selected .library-card-actions {
  opacity: 1;
  transform: translateY(0);
}

.library-card-actions button {
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 760;
  backdrop-filter: blur(8px);
}

.library-card-actions button:hover {
  background: rgba(255, 255, 255, 0.28);
}

.library-card-actions button.danger {
  border-color: rgba(255, 205, 210, 0.68);
  color: #ffd9dc;
}

.library-load-more {
  width: 100%;
  min-height: 56px;
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.78);
  color: #525861;
  font-weight: 840;
}

.modal-backdrop {
  background: rgba(16, 17, 20, 0.42);
}

.library-modal {
  width: min(900px, calc(100vw - 36px));
  max-height: min(880px, calc(100vh - 40px));
  overflow: visible;
  border-color: #d7d9d6;
  padding: 34px 34px 28px;
  box-shadow: 0 32px 96px rgba(16, 17, 20, 0.20);
}

.library-modal .modal-head h3 {
  color: var(--text);
  font-size: 30px;
  font-weight: 880;
}

.library-modal .icon-btn {
  width: 54px;
  height: 54px;
  border-color: #d7d9d6;
  color: #69707a;
  font-size: 24px;
}

.library-form {
  gap: 20px;
}

.library-form label > span,
.library-upload-section > span,
.upload-tag-picker > span {
  color: #6f7680;
  font-size: 17px;
  font-weight: 820;
}

.library-form input,
.library-form select,
.upload-tag-trigger {
  min-height: 52px;
  border-color: #cdd1d8;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font-size: 16px;
  font-weight: 760;
}

.library-kind-card {
  min-height: 96px;
  border-color: #d3d6dc;
  background: #f6f7f5;
  padding: 18px 20px;
}

.library-kind-card strong {
  font-size: 20px;
  font-weight: 880;
}

.library-kind-card small {
  color: #787f89;
  font-weight: 720;
}

.library-kind-card.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.library-kind-card.active small {
  color: rgba(255, 255, 255, 0.72);
}

.upload-tag-trigger strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 820;
}

.upload-tag-trigger small {
  color: #999fa7;
}

.upload-tag-menu {
  border-color: #d7d9d6;
  box-shadow: 0 20px 58px rgba(16, 17, 20, 0.16);
}

.upload-tag-menu button {
  border-radius: 6px;
  color: #4c535d;
}

.upload-tag-menu button:hover,
.upload-tag-menu button.active {
  background: #eeeeec;
  color: var(--text);
}

.library-drop-zone {
  min-height: 132px;
  border-color: #bdc4ce;
  background: #f8f9f7;
}

.library-drop-zone.dragging {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(16, 17, 20, 0.08);
}

.library-drop-zone span {
  color: var(--text);
  font-size: 17px;
  font-weight: 860;
}

.library-drop-zone strong {
  color: #38404a;
  font-size: 16px;
}

.modal-actions .primary-btn,
.modal-actions .ghost-btn {
  min-height: 54px;
  padding-inline: 28px;
  font-size: 19px;
  font-weight: 880;
}

.tool-layout {
  height: 100%;
  padding: 0;
  background:
    radial-gradient(circle at 52% 0%, rgba(214, 223, 236, 0.50), transparent 34%),
    #f4f5f3;
}

.tool-frame-mount {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.tool-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #f4f5f3;
}

@media (max-width: 1180px) {
  .library-control-strip {
    grid-template-columns: 1fr;
  }

  .library-search-pill,
  .library-upload-area,
  #library-favorite-filter {
    grid-column: auto;
    grid-row: auto;
    justify-self: stretch;
  }

  .library-upload-pill,
  #library-favorite-filter {
    width: 100%;
  }
}

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

  .library-page,
  .library-page-home {
    padding: 24px 14px 40px;
  }

  .library-page-home .library-hero-panel,
  .library-page-home .library-module-row {
    width: 100%;
  }

  .library-page-home .library-module-row,
  .library-kind-card-grid,
  .library-upload-tags,
  .library-form-grid.two {
    grid-template-columns: 1fr;
  }
}

/* GCC Design decisive creative platform skin v1ui6 */
:root {
  --gcc-ink: #0b0d12;
  --gcc-ink-2: #171a20;
  --gcc-paper: #f5f6f3;
  --gcc-soft: #ecedea;
  --gcc-soft-2: #dedfdb;
  --gcc-line: #d9dbd7;
  --gcc-muted: #7c828b;
  --gcc-lime: #d8ff4f;
  --gcc-mint: #b9f2d6;
  --gcc-ice: #dce8ff;
  --gcc-shadow: 0 28px 90px rgba(11, 13, 18, 0.12);
  --vf-page-max: 1840px;
}

html,
body,
.content {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74) 0%, rgba(245, 246, 243, 0.94) 38%, #f2f3f0 100%),
    #f5f6f3;
}

.app-shell {
  grid-template-columns: 78px minmax(0, 1fr);
  background: #f5f6f3;
}

.sidebar {
  background: rgba(255, 255, 255, 0.84);
  border-right: 1px solid #e1e2de;
}

.brand-mark.small {
  width: 37px;
  height: 37px;
  border-radius: 10px;
  background: #050608;
}

.brand-mark.small::before {
  width: 21px;
  height: 26px;
}

.nav-list {
  gap: 16px;
  padding-inline: 5px;
}

.nav-item {
  min-height: 66px;
  color: #8d949d;
  font-size: 11px;
  font-weight: 740;
}

.nav-icon {
  width: 30px;
  height: 30px;
}

.nav-item.active {
  color: var(--gcc-ink);
}

.nav-item.active::before {
  left: -5px;
  height: 34px;
  width: 4px;
  background: var(--gcc-ink);
}

.topbar {
  min-height: 54px;
  height: 54px;
  background: rgba(245, 246, 243, 0.92);
  border-bottom: 1px solid #e1e2de;
}

.app-shell[data-route="home"] .topbar,
.app-shell[data-route="library"] .topbar {
  display: none;
}

.app-shell[data-route="library"] .main-area {
  grid-template-rows: minmax(0, 1fr);
}

.library-page,
.library-page-home {
  padding: 46px clamp(30px, 3.8vw, 72px) 78px;
  gap: 27px;
}

.library-page:not(.library-page-home) {
  padding-top: 42px;
}

.library-page-home .library-hero {
  gap: 18px;
  padding: 14px 0 20px;
}

.library-page-home .library-hero-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  width: min(1050px, 72vw);
  min-height: clamp(250px, 26vw, 356px);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), transparent 34%),
    linear-gradient(150deg, #eef0ed 0%, #e3e5e1 52%, #d9dbd7 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.library-page-home .library-hero-panel::before {
  left: 7%;
  top: 16%;
  width: 30%;
  height: 18px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.72);
  transform: rotate(-8deg);
}

.library-page-home .library-hero-panel::after {
  right: 10%;
  bottom: 16%;
  width: 190px;
  height: 88px;
  border-radius: 12px;
  background:
    repeating-linear-gradient(90deg, rgba(11, 13, 18, 0.86) 0 12px, rgba(216, 255, 79, 0.92) 12px 17px, rgba(185, 242, 214, 0.82) 17px 22px),
    #101114;
  opacity: 0.18;
}

.library-hero-badge {
  position: absolute;
  top: 26px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 35px;
  padding: 0 28px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  color: #22262d;
  font-size: 13px;
  font-weight: 820;
  box-shadow: 0 12px 42px rgba(11, 13, 18, 0.05);
  backdrop-filter: blur(14px);
}

.library-hero-title {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.2vw, 18px);
  margin-top: 24px;
  color: var(--gcc-ink);
  font-size: clamp(36px, 4.1vw, 66px);
  font-weight: 900;
  line-height: 1.02;
}

.library-hero-title span {
  color: rgba(11, 13, 18, 0.64);
}

.library-hero-title i {
  width: clamp(72px, 7vw, 104px);
  height: clamp(72px, 7vw, 104px);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(216, 255, 79, 0.88), transparent 42%),
    linear-gradient(315deg, rgba(185, 242, 214, 0.84), rgba(220, 232, 255, 0.74)),
    #e6e7e4;
  box-shadow: inset 0 0 0 1px rgba(11, 13, 18, 0.08), 0 18px 44px rgba(11, 13, 18, 0.08);
}

.library-hero-command {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  align-items: center;
  width: min(860px, calc(100% - 88px));
  min-height: 92px;
  padding: 0 12px 0 26px;
  border: 1px solid #d8dce6;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 26px 70px rgba(11, 13, 18, 0.07);
  backdrop-filter: blur(16px);
}

.library-hero-command input {
  min-height: 68px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--gcc-ink);
  font-size: 15px;
  font-weight: 720;
}

.library-hero-command input:focus {
  box-shadow: none;
}

.library-hero-command button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #aab3bd;
  color: #ffffff;
  font-size: 25px;
  font-weight: 800;
}

.library-page-home .library-module-row {
  width: min(1050px, 72vw);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.library-page-home .library-module-row button {
  position: relative;
  overflow: hidden;
  height: 70px;
  border-radius: 10px;
  padding: 0 20px;
  background: #11151c !important;
  color: #ffffff;
  text-align: left;
  box-shadow: none;
}

.library-page-home .library-module-row button::after {
  content: "";
  position: absolute;
  right: -16px;
  top: 15px;
  width: 96px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(185, 242, 214, 0.82), rgba(216, 255, 79, 0.36), transparent);
  transform: skewX(-18deg);
}

.library-page-home .library-module-row button:nth-child(2)::after {
  background: linear-gradient(90deg, rgba(220, 232, 255, 0.86), rgba(185, 242, 214, 0.48), transparent);
}

.library-page-home .library-module-row button:nth-child(3)::after {
  background: repeating-linear-gradient(90deg, rgba(216, 255, 79, 0.82) 0 5px, rgba(220, 232, 255, 0.76) 5px 10px, rgba(255, 255, 255, 0.12) 10px 15px);
}

.library-page-home .library-module-row button:nth-child(4)::after {
  background: linear-gradient(90deg, rgba(216, 255, 79, 0.86), rgba(255, 255, 255, 0.18), transparent);
}

.library-page-home .library-module-row span {
  position: relative;
  z-index: 2;
  margin-left: 6px;
}

.library-control-strip {
  grid-template-columns: minmax(360px, 1fr) minmax(260px, 360px) auto auto;
  gap: 18px 24px;
}

.library-kind-tabs {
  gap: clamp(24px, 2.4vw, 46px);
}

.library-kind-tabs button,
.library-tag-row button {
  color: #7f858e;
  font-size: 16px;
  font-weight: 780;
}

.library-kind-tabs button.active,
.library-tag-row button.active {
  color: var(--gcc-ink);
  font-weight: 900;
}

.library-tag-row {
  gap: 22px;
}

.library-tag-row > span {
  min-width: 40px;
  font-size: 15px;
}

.library-search-pill {
  min-height: 40px;
  border-radius: 8px;
  background: #e4e7ec;
}

.library-upload-pill {
  min-height: 40px;
  border-radius: 999px;
  background: #d7d8d5;
  color: var(--gcc-ink);
}

#library-favorite-filter {
  min-height: 40px;
  border-radius: 8px;
}

.library-status {
  justify-content: flex-start;
  gap: 8px;
  min-height: 24px;
}

.library-stat {
  min-height: 28px;
  border: 0;
  background: transparent;
  padding: 0 4px;
}

.library-stat small {
  display: none;
}

.library-stat strong {
  color: #7f858e;
  font-size: 12px;
  font-weight: 760;
}

.library-board {
  margin-top: -4px;
}

.library-grid {
  columns: 5 304px;
  column-gap: 10px;
}

.library-card {
  margin-bottom: 10px;
  border-radius: 8px;
  background: #d6d7d4;
  box-shadow: none;
}

.library-card.selected {
  outline: 0;
}

.library-card:hover,
.library-card.selected {
  box-shadow: 0 22px 70px rgba(11, 13, 18, 0.16);
}

.library-thumb {
  background: #d6d7d4;
}

.library-thumb span {
  color: #9da3aa;
  font-weight: 840;
}

.file-pill {
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}
.favorite-btn {
  opacity: 0;
  transition: opacity 140ms ease, transform 140ms ease;
}

.library-card:hover .file-pill,
.library-card:hover .favorite-btn {
  opacity: 1;
  pointer-events: auto;
}

.library-card-overlay {
  min-height: 106px;
  padding: 28px 16px 14px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.18) 22%, rgba(0, 0, 0, 0.78) 100%);
}

.library-card-overlay h4 {
  max-width: 92%;
  font-size: 16px;
  line-height: 1.18;
}

.library-card-overlay p {
  display: none;
}

.library-card-actions {
  gap: 8px;
}

.library-card-actions button {
  min-height: 30px;
  border-radius: 8px;
  font-size: 12px;
}

.library-load-more {
  border-radius: 8px;
  background: #e5e6e3;
  color: var(--gcc-ink);
}

.library-modal {
  border-radius: 14px;
  padding: 38px 40px 30px;
}

.library-kind-card-grid {
  gap: 14px;
}

.library-kind-card {
  min-height: 116px;
  border-radius: 14px;
}

.library-kind-card.active {
  background:
    linear-gradient(135deg, rgba(216, 255, 79, 0.16), transparent 44%),
    #0b0d12;
}

.library-upload-tags {
  gap: 14px;
}

.upload-tag-picker {
  position: relative;
}

.upload-tag-trigger {
  border-radius: 12px;
}

.upload-tag-menu {
  top: calc(100% + 8px);
  border-radius: 12px;
}

.library-drop-zone {
  border-radius: 14px;
}

.modal-actions .primary-btn {
  border-radius: 14px;
  background: #0b0d12;
}

.modal-actions .ghost-btn {
  border-radius: 14px;
}

@media (max-width: 980px) {
  .library-grid {
    columns: 4 286px;
  }

  .library-control-strip {
    grid-template-columns: 1fr;
  }

  .library-search-pill,
  .library-upload-area,
  #library-favorite-filter {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 760px) {
  .library-page-home .library-hero-panel,
  .library-page-home .library-module-row {
    width: 100%;
  }

  .library-page-home .library-hero-panel {
    min-height: 340px;
    border-radius: 14px;
  }

  .library-hero-title {
    flex-wrap: wrap;
    padding-inline: 18px;
    text-align: center;
  }

  .library-hero-command {
    width: calc(100% - 28px);
    grid-template-columns: 1fr 42px;
    min-height: 76px;
  }

  .library-page-home .library-module-row {
    grid-template-columns: 1fr;
  }

  .library-grid {
    columns: 1;
  }
}

/* Upload modal ergonomics: compact, viewport-bound, scrollable content with persistent actions. */
#library-upload-modal {
  align-items: center;
  justify-items: center;
  padding: 18px;
}

#library-upload-modal .library-modal {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100dvh - 36px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
}

#library-upload-modal .modal-head {
  flex: 0 0 auto;
  min-height: 74px;
  margin: 0;
  padding: 20px 24px 14px;
  border-bottom: 1px solid #eceef2;
}

#library-upload-modal .modal-head h3 {
  font-size: 24px;
  line-height: 1.2;
}

#library-upload-modal .icon-btn {
  width: 42px;
  height: 42px;
  font-size: 20px;
}

#library-upload-form {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0;
}

.library-upload-scroll {
  min-height: 0;
  display: grid;
  flex: 1 1 auto;
  gap: 14px;
  padding: 18px 24px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.library-upload-scroll::-webkit-scrollbar {
  width: 10px;
}

.library-upload-scroll::-webkit-scrollbar-thumb {
  border: 3px solid #ffffff;
  border-radius: 999px;
  background: #b8bec8;
}

.library-upload-scroll::-webkit-scrollbar-track {
  background: transparent;
}

#library-upload-modal .library-upload-section {
  gap: 7px;
}
#library-upload-modal .library-upload-section > span {
  margin-bottom: 8px;
}
#library-upload-modal .library-form label,
#library-upload-modal .upload-tag-picker {
  gap: 7px;
}

#library-upload-modal .library-form label > span,
#library-upload-modal .library-upload-section > span,
#library-upload-modal .upload-tag-picker > span {
  font-size: 14px;
  line-height: 1.25;
}

#library-upload-modal .library-kind-card-grid,
#library-upload-modal .library-upload-tags,
#library-upload-modal .library-form-grid.two {
  gap: 12px;
}

#library-upload-modal .library-kind-card {
  min-height: 74px;
  padding: 14px 16px;
}

#library-upload-modal .library-kind-card strong {
  font-size: 17px;
}

#library-upload-modal .library-kind-card small {
  font-size: 12px;
}

#library-upload-modal .library-form input,
#library-upload-modal .library-form select,
#library-upload-modal .upload-tag-trigger {
  min-height: 44px;
  font-size: 15px;
}

#library-upload-modal .upload-tag-trigger strong {
  font-size: 15px;
}

#library-upload-modal .library-drop-zone {
  min-height: 104px;
  padding: 16px 18px;
}

#library-upload-modal .library-drop-zone span {
  font-size: 15px;
}

#library-upload-modal .library-drop-zone strong {
  font-size: 14px;
}

.library-upload-footer {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 24px 18px;
  border-top: 1px solid #eceef2;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -10px 26px rgba(16, 17, 20, 0.05);
}

#library-upload-message {
  min-height: 20px;
  margin: 0;
}

#library-upload-modal .modal-actions {
  margin: 0;
  justify-content: flex-end;
}

#library-upload-modal .modal-actions .primary-btn,
#library-upload-modal .modal-actions .ghost-btn {
  min-height: 44px;
  padding-inline: 20px;
  font-size: 15px;
  border-radius: 10px;
}

@media (max-width: 760px) {
  #library-upload-modal {
    align-items: stretch;
    padding: 10px;
  }

  #library-upload-modal .library-modal {
    width: 100%;
    max-height: calc(100dvh - 20px);
  }

  #library-upload-modal .modal-head {
    min-height: 62px;
    padding: 14px 16px 10px;
  }

  #library-upload-modal .modal-head h3 {
    font-size: 21px;
  }

  #library-upload-modal .icon-btn {
    width: 38px;
    height: 38px;
  }

  .library-upload-scroll {
    padding: 14px 16px;
  }

  #library-upload-modal .library-kind-card-grid,
  #library-upload-modal .library-upload-tags,
  #library-upload-modal .library-form-grid.two {
    grid-template-columns: 1fr;
  }

  .library-upload-footer {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 16px 14px;
  }

  #library-upload-modal .modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
}

/* Test homepage demo final overrides 20260625 */
body .home-page-demo {
  min-height: 100%;
  display: block;
  padding: 32px clamp(28px, 4vw, 68px) 72px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(239, 241, 236, 0.94)),
    radial-gradient(circle at 76% 12%, rgba(216, 255, 79, 0.18), transparent 28%),
    #eff1ec;
  color: #0b0d12;
}

body .home-demo-hero {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(560px, 1.18fr);
  gap: 34px;
  align-items: stretch;
  max-width: 1540px;
  margin: 0 auto;
}

body .home-demo-copy,
body .home-demo-board,
body .home-demo-quick button,
body .home-demo-grid {
  border: 1px solid rgba(11, 13, 18, 0.08);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 24px 80px rgba(11, 13, 18, 0.08);
  backdrop-filter: blur(18px);
}

body .home-demo-copy {
  display: grid;
  align-content: center;
  gap: 22px;
  min-height: 520px;
  padding: 48px;
  border-radius: 18px;
}

body .home-demo-kicker {
  width: fit-content;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid rgba(11, 13, 18, 0.12);
  border-radius: 999px;
  background: #f4f6f0;
  color: #687077;
  font-size: 12px;
  font-weight: 820;
}

body .home-demo-copy h3 {
  max-width: 680px;
  margin: 0;
  color: #0b0d12;
  font-size: 54px;
  line-height: 1.02;
  font-weight: 920;
  letter-spacing: 0;
}

body .home-demo-copy p {
  max-width: 600px;
  margin: 0;
  color: #646b73;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 650;
}

body .home-demo-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  max-width: 660px;
  min-height: 62px;
  padding: 8px;
  border: 1px solid #d8dcd4;
  border-radius: 14px;
  background: #ffffff;
}

body .home-demo-command input {
  min-height: 46px;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 15px;
  font-weight: 720;
}

body .home-demo-command input:focus {
  box-shadow: none;
}

body .home-demo-command button,
body .home-demo-actions button,
body .home-demo-section-head button {
  min-height: 46px;
  border: 1px solid #0b0d12;
  border-radius: 10px;
  padding: 0 20px;
  background: #0b0d12;
  color: #ffffff;
  font-weight: 860;
}

body .home-demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body .home-demo-actions button + button,
body .home-demo-section-head button {
  background: #ffffff;
  color: #0b0d12;
}

body .home-demo-board {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(216, 255, 79, 0.12), transparent 32%),
    linear-gradient(180deg, #11151c, #242923);
}

body .home-demo-board::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 14px;
}

body .home-demo-artboard {
  position: absolute;
  overflow: hidden;
  border: 7px solid #ffffff;
  border-radius: 13px;
  background: #f8fafc;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

body .home-demo-artboard img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

body .home-demo-artboard span {
  position: absolute;
  top: 8px;
  right: 10px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #111827;
  font-size: 12px;
  font-weight: 850;
}

body .home-demo-artboard-main {
  left: 7%;
  top: 18%;
  width: 46%;
  aspect-ratio: 3 / 2;
  z-index: 3;
}

body .home-demo-artboard-tall {
  right: 10%;
  top: 10%;
  width: 24%;
  aspect-ratio: 750 / 1626;
  z-index: 2;
}

body .home-demo-artboard-wide {
  right: 6%;
  bottom: 12%;
  width: 50%;
  aspect-ratio: 1396 / 424;
  z-index: 4;
}

body .home-demo-quick {
  max-width: 1540px;
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

body .home-demo-quick button {
  min-height: 116px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 6px 12px;
  align-content: center;
  padding: 20px;
  border-radius: 14px;
  text-align: left;
  color: #11151c;
}

body .home-demo-quick button:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 90px rgba(11, 13, 18, 0.12);
}

body .home-demo-quick span {
  grid-row: 1 / 3;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #0b0d12;
  color: #ffffff;
}

body .home-demo-quick svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

body .home-demo-quick strong {
  font-size: 17px;
  font-weight: 900;
}

body .home-demo-quick small {
  color: #747b83;
  font-size: 13px;
  font-weight: 700;
}

body .home-demo-grid {
  max-width: 1540px;
  margin: 18px auto 0;
  padding: 24px;
  border-radius: 18px;
}

body .home-demo-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

body .home-demo-section-head span {
  color: #717982;
  font-size: 13px;
  font-weight: 820;
}

body .home-demo-section-head h4 {
  margin: 3px 0 0;
  font-size: 24px;
  line-height: 1.2;
}

body .home-demo-inspiration {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

body .home-demo-inspiration .inspiration-card {
  min-height: 230px;
  border-radius: 12px;
}

body .home-demo-inspiration .inspiration-card.short {
  min-height: 150px;
}

body .home-demo-inspiration .inspiration-card.tall {
  min-height: 320px;
}

body .home-demo-inspiration .inspiration-card.portrait {
  min-height: 270px;
}

body .home-demo-inspiration .inspiration-overlay {
  border-radius: 12px;
}

body .home-demo-recent {
  margin: 0 0 18px;
}

@media (max-width: 1180px) {
  body .home-demo-hero {
    grid-template-columns: 1fr;
  }

  body .home-demo-board {
    min-height: 480px;
  }

  body .home-demo-quick,
  body .home-demo-inspiration {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body .home-page-demo {
    padding: 18px 14px 44px;
  }

  body .home-demo-copy {
    min-height: auto;
    padding: 26px;
  }

  body .home-demo-copy h3 {
    font-size: 34px;
  }

  body .home-demo-copy p {
    font-size: 15px;
  }

  body .home-demo-command {
    grid-template-columns: 1fr;
  }

  body .home-demo-board {
    min-height: 430px;
  }

  body .home-demo-artboard-main {
    left: 6%;
    width: 58%;
  }

  body .home-demo-artboard-tall {
    right: 7%;
    width: 30%;
  }

  body .home-demo-artboard-wide {
    left: 14%;
    right: auto;
    width: 72%;
  }

  body .home-demo-quick,
  body .home-demo-inspiration {
    grid-template-columns: 1fr;
  }

  body .home-demo-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* 2026 home direction: creative OS, test v3 */
body .home-page-demo-v3 {
  min-height: 100%;
  padding: clamp(18px, 2.8vw, 46px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 30%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 88px),
    #090b0f;
  color: #f7f9f2;
}

body .home-page-demo-v3 button {
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

body .home26-hero {
  min-height: min(760px, calc(100dvh - 96px));
  display: grid;
  grid-template-columns: minmax(420px, 0.88fr) minmax(640px, 1.12fr);
  gap: 18px;
  max-width: 1640px;
  margin: 0 auto;
}

body .home26-command,
body .home26-stage,
body .home26-lanes button,
body .home26-work {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.035)),
    rgba(17, 20, 27, 0.82);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(28px);
}

body .home26-command {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: end;
  gap: 24px;
  min-height: 620px;
  padding: clamp(32px, 4.2vw, 72px);
  border-radius: 28px;
}

body .home26-command::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 12px;
  background: linear-gradient(90deg, #d8ff4f, #22d3ee 30%, #ff0a7a 58%, #ffffff);
}

body .home26-command::after {
  content: "";
  position: absolute;
  right: -18%;
  top: 13%;
  width: 58%;
  height: 42%;
  border: 1px solid rgba(216, 255, 79, 0.32);
  border-radius: 34px;
  transform: rotate(-11deg);
  background:
    linear-gradient(115deg, rgba(216, 255, 79, 0.16), transparent 48%),
    linear-gradient(290deg, rgba(34, 211, 238, 0.16), transparent 42%);
}

body .home26-meta,
body .home26-stage-top,
body .home26-work-head span {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(247, 249, 242, 0.68);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body .home26-meta span {
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

body .home26-command h3 {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 56px 0 0;
  color: #ffffff;
  font-size: clamp(56px, 6vw, 108px);
  line-height: 0.93;
  font-weight: 950;
  letter-spacing: 0;
}

body .home26-command p {
  position: relative;
  z-index: 2;
  max-width: 620px;
  margin: 0;
  color: rgba(247, 249, 242, 0.72);
  font-size: 18px;
  line-height: 1.74;
  font-weight: 650;
}

body .home26-search {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  max-width: 720px;
  min-height: 70px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
}

body .home26-search input {
  min-height: 52px;
  border: 0;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: none;
  color: #0b0d12;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 760;
}

body .home26-search input:focus {
  box-shadow: 0 0 0 4px rgba(216, 255, 79, 0.20);
}

body .home26-search button,
body .home26-work-head button {
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  padding: 0 22px;
  background: #d8ff4f;
  color: #050608;
  font-size: 15px;
  font-weight: 930;
}

body .home26-actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body .home26-actions button {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 820;
}

body .home26-actions button:first-child {
  border-color: rgba(216, 255, 79, 0.65);
  background: rgba(216, 255, 79, 0.14);
}

body .home26-stage {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.14), transparent 28%),
    linear-gradient(315deg, rgba(255, 10, 122, 0.12), transparent 36%),
    #11151d;
}

body .home26-stage::before {
  content: "";
  position: absolute;
  inset: 28px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 22px;
}

body .home26-stage::after {
  content: "";
  position: absolute;
  left: 11%;
  right: 10%;
  bottom: 42px;
  height: 28%;
  border-radius: 28px;
  background:
    linear-gradient(90deg, transparent, rgba(216, 255, 79, 0.18), transparent),
    rgba(255, 255, 255, 0.05);
  transform: perspective(900px) rotateX(62deg);
}

body .home26-stage-top {
  position: absolute;
  left: 34px;
  right: 34px;
  top: 30px;
  justify-content: space-between;
}

body .home26-stage-top strong {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(216, 255, 79, 0.14);
  color: #d8ff4f;
}

body .home26-art {
  position: absolute;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 38px 100px rgba(0, 0, 0, 0.48);
}

body .home26-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

body .home26-art b {
  position: absolute;
  left: 12px;
  top: 12px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #0b0d12;
  font-size: 12px;
  font-weight: 900;
}

body .home26-art-head {
  left: 7%;
  top: 24%;
  width: 44%;
  aspect-ratio: 750 / 500;
  z-index: 4;
  transform: rotate(-5deg);
}

body .home26-art-splash {
  right: 15%;
  top: 15%;
  width: 27%;
  aspect-ratio: 750 / 1626;
  z-index: 3;
  transform: rotate(4deg);
}

body .home26-art-banner {
  left: 23%;
  right: 6%;
  bottom: 16%;
  aspect-ratio: 1396 / 424;
  z-index: 5;
  transform: rotate(1.4deg);
}

body .home26-floating-chip {
  position: absolute;
  z-index: 6;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
  font-size: 13px;
  font-weight: 880;
  backdrop-filter: blur(14px);
}

body .home26-chip-a {
  left: 14%;
  bottom: 28%;
}

body .home26-chip-b {
  right: 8%;
  top: 38%;
  color: #050608;
  background: #d8ff4f;
}

body .home26-lanes {
  max-width: 1640px;
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

body .home26-lanes button {
  min-height: 132px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 6px 14px;
  align-content: center;
  padding: 22px;
  border-radius: 20px;
  color: #ffffff;
  text-align: left;
}

body .home26-lanes button:hover,
body .home26-actions button:hover,
body .home26-work-head button:hover {
  transform: translateY(-3px);
}

body .home26-lanes span {
  grid-row: 1 / 3;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.12);
}

body .home26-lanes svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

body .home26-lanes strong {
  font-size: 19px;
  font-weight: 930;
}

body .home26-lanes small {
  color: rgba(247, 249, 242, 0.66);
  font-size: 13px;
  font-weight: 720;
}

body .home26-work {
  max-width: 1640px;
  margin: 18px auto 0;
  padding: 24px;
  border-radius: 28px;
}

body .home26-work-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

body .home26-work-head h4 {
  margin: 6px 0 0;
  color: #ffffff;
  font-size: 28px;
  line-height: 1.18;
}

body .home26-feed {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

body .home26-feed .inspiration-card {
  min-height: 260px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

body .home26-feed .inspiration-card.short {
  min-height: 170px;
}

body .home26-feed .inspiration-card.tall {
  min-height: 350px;
}

body .home26-feed .inspiration-card.portrait {
  min-height: 300px;
}

body .home26-feed .inspiration-overlay {
  border-radius: 18px;
}

body .home26-recent {
  margin: 0 0 18px;
}

@media (max-width: 1220px) {
  body .home26-hero {
    grid-template-columns: 1fr;
  }

  body .home26-stage {
    min-height: 560px;
  }

  body .home26-lanes,
  body .home26-feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body .home-page-demo-v3 {
    padding: 14px;
  }

  body .home26-command {
    min-height: auto;
    padding: 28px 22px;
    border-radius: 22px;
  }

  body .home26-command h3 {
    margin-top: 36px;
    font-size: 46px;
  }

  body .home26-search {
    grid-template-columns: 1fr;
  }

  body .home26-stage {
    min-height: 500px;
    border-radius: 22px;
  }

  body .home26-art-head {
    left: 5%;
    width: 58%;
  }

  body .home26-art-splash {
    right: 5%;
    width: 34%;
  }

  body .home26-art-banner {
    left: 8%;
    right: 8%;
  }

  body .home26-lanes,
  body .home26-feed {
    grid-template-columns: 1fr;
  }

  body .home26-work-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* 2026 home polish v4: keep original layout and white background. */
html body #app-shell.app-shell[data-route="home"] .main-area,
html body #app-shell.app-shell[data-route="home"] .content,
html body #app-shell.app-shell[data-route="home"] .library-page-home {
  background:
    linear-gradient(180deg, #ffffff 0%, #f8f9f6 58%, #ffffff 100%);
}

html body #app-shell.app-shell[data-route="home"] .library-page-home {
  padding-top: 42px;
}

html body #app-shell.app-shell[data-route="home"] .library-hero {
  padding: 28px 0 22px;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-panel {
  width: min(1040px, 72vw);
  min-height: clamp(186px, 18vw, 244px);
  border: 1px solid rgba(15, 18, 24, 0.08);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(245, 247, 242, 0.78)),
    radial-gradient(circle at 18% 24%, rgba(216, 255, 79, 0.42), transparent 21%),
    radial-gradient(circle at 78% 22%, rgba(34, 211, 238, 0.18), transparent 25%),
    #f4f6ef;
  box-shadow: 0 28px 80px rgba(17, 24, 39, 0.08);
}

html body #app-shell.app-shell[data-route="home"] .library-hero-panel::before {
  left: 7%;
  top: 22%;
  width: 34%;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 20px 48px rgba(17, 24, 39, 0.08);
  transform: rotate(-7deg);
}

html body #app-shell.app-shell[data-route="home"] .library-hero-panel::after {
  right: 9%;
  bottom: 17%;
  width: 158px;
  height: 96px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, #0b0d12 0 46%, #d8ff4f 46% 62%, #22d3ee 62% 100%);
  opacity: 0.16;
  filter: none;
  transform: rotate(-9deg);
}

html body #app-shell.app-shell[data-route="home"] .library-hero-badge {
  min-height: 34px;
  border-color: rgba(17, 24, 39, 0.10);
  background: rgba(255, 255, 255, 0.74);
  color: #5d6570;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.06);
}

html body #app-shell.app-shell[data-route="home"] .library-hero-title {
  color: #101218;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-title span {
  color: #6c747f;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-title i {
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(216, 255, 79, 0.96), rgba(216, 255, 79, 0.18) 42%),
    linear-gradient(315deg, rgba(34, 211, 238, 0.36), rgba(255, 255, 255, 0.8)),
    #f6f8f3;
  box-shadow: inset 0 0 0 1px rgba(11, 13, 18, 0.08), 0 18px 42px rgba(17, 24, 39, 0.08);
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command {
  border-color: rgba(17, 24, 39, 0.10);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 22px 60px rgba(17, 24, 39, 0.08);
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command input {
  color: #12151c;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command button {
  background: #11151c;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.16);
}

html body #app-shell.app-shell[data-route="home"] .library-module-row button {
  min-height: 72px;
  height: 72px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86) !important;
  color: #11151c;
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.06);
}

html body #app-shell.app-shell[data-route="home"] .library-module-row button::after {
  opacity: 0.75;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row button:hover {
  background: #ffffff !important;
  border-color: rgba(17, 24, 39, 0.14);
  transform: translateY(-2px);
  box-shadow: 0 24px 64px rgba(17, 24, 39, 0.10);
}

html body #app-shell.app-shell[data-route="home"] .library-control-strip {
  border: 1px solid rgba(17, 24, 39, 0.07);
  border-radius: 24px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 60px rgba(17, 24, 39, 0.06);
}

html body #app-shell.app-shell[data-route="home"] .library-kind-tabs button,
html body #app-shell.app-shell[data-route="home"] .library-tag-row button {
  border-radius: 999px;
}

html body #app-shell.app-shell[data-route="home"] .library-kind-tabs button.active {
  color: #11151c;
}

html body #app-shell.app-shell[data-route="home"] .library-kind-tabs button.active::after {
  border-radius: 999px;
  background: #11151c;
}

html body #app-shell.app-shell[data-route="home"] .library-search-pill,
html body #app-shell.app-shell[data-route="home"] .library-upload-pill,
html body #app-shell.app-shell[data-route="home"] #library-favorite-filter {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.045);
}

html body #app-shell.app-shell[data-route="home"] .library-upload-pill {
  background: #11151c;
  color: #ffffff;
}

html body #app-shell.app-shell[data-route="home"] .library-card {
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(17, 24, 39, 0.08);
}

html body #app-shell.app-shell[data-route="home"] .library-thumb,
html body #app-shell.app-shell[data-route="home"] .library-thumb img {
  border-radius: 18px;
}

html body #app-shell.app-shell[data-route="home"] .library-card:hover,
html body #app-shell.app-shell[data-route="home"] .library-card.selected {
  box-shadow: 0 28px 76px rgba(17, 24, 39, 0.14);
}

html body #app-shell.app-shell[data-route="home"] .library-card-actions button,
html body #app-shell.app-shell[data-route="home"] .library-load-more {
  border-radius: 12px;
}

@media (max-width: 760px) {
  html body #app-shell.app-shell[data-route="home"] .library-hero-panel,
  html body #app-shell.app-shell[data-route="home"] .library-module-row {
    width: 100%;
  }

  html body #app-shell.app-shell[data-route="home"] .library-control-strip {
    border-radius: 18px;
    padding: 14px;
  }
}

/* 2026 home polish v5: consistent typography, icons, spacing, and controls. */
html body #app-shell.app-shell[data-route="home"] {
  --home-ink: #101318;
  --home-muted: #69717c;
  --home-soft: #f6f7f3;
  --home-line: rgba(16, 19, 24, 0.09);
  --home-shadow-sm: 0 12px 34px rgba(16, 19, 24, 0.055);
  --home-shadow-md: 0 24px 70px rgba(16, 19, 24, 0.085);
  --home-accent: #d8ff4f;
}

html body #app-shell.app-shell[data-route="home"] .library-page-home {
  padding-top: 34px;
}

html body #app-shell.app-shell[data-route="home"] .library-hero {
  gap: 18px;
  padding: 12px 0 28px;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-panel {
  width: min(1060px, 72vw);
  min-height: 236px;
  border: 1px solid var(--home-line);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(246, 247, 243, 0.92)),
    radial-gradient(circle at 25% 18%, rgba(216, 255, 79, 0.34), transparent 20%),
    radial-gradient(circle at 78% 22%, rgba(181, 247, 220, 0.44), transparent 24%);
  box-shadow: var(--home-shadow-md);
}

html body #app-shell.app-shell[data-route="home"] .library-hero-badge {
  top: 24px;
  min-height: 30px;
  padding-inline: 18px;
  border: 1px solid rgba(16, 19, 24, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.80);
  color: var(--home-muted);
  font-size: 12px;
  font-weight: 760;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-title {
  gap: 18px;
  margin-top: 22px;
  color: var(--home-ink);
  font-size: clamp(44px, 4.4vw, 72px);
  font-weight: 900;
  line-height: 1;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-title span {
  color: #717985;
  font-weight: 850;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-title strong {
  font-weight: 930;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-title i {
  width: clamp(68px, 5.8vw, 98px);
  height: clamp(68px, 5.8vw, 98px);
  border-radius: 24px;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command {
  width: min(820px, calc(100% - 120px));
  min-height: 82px;
  grid-template-columns: minmax(0, 1fr) 50px;
  border: 1px solid var(--home-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.90);
  box-shadow: var(--home-shadow-sm);
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command input {
  min-height: 62px;
  color: var(--home-ink);
  font-size: 14px;
  font-weight: 680;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command button {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--home-ink);
  color: #ffffff;
  font-size: 24px;
  box-shadow: 0 12px 30px rgba(16, 19, 24, 0.18);
}

html body #app-shell.app-shell[data-route="home"] .library-module-row {
  width: min(1060px, 72vw);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row button {
  position: relative;
  min-height: 92px;
  height: auto;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  grid-template-rows: auto auto;
  gap: 4px 12px;
  align-content: center;
  overflow: hidden;
  padding: 18px 18px;
  border: 1px solid var(--home-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.90) !important;
  color: var(--home-ink);
  text-align: left;
  box-shadow: var(--home-shadow-sm);
}

html body #app-shell.app-shell[data-route="home"] .library-module-row button::after {
  content: "";
  position: absolute;
  right: -20px;
  top: 18px;
  width: 88px;
  height: 42px;
  border-radius: 16px;
  background: linear-gradient(100deg, rgba(216, 255, 79, 0.62), rgba(181, 247, 220, 0.48), transparent);
  transform: rotate(-10deg);
}

html body #app-shell.app-shell[data-route="home"] .library-module-row button:nth-child(2)::after {
  background: linear-gradient(100deg, rgba(220, 232, 255, 0.74), rgba(181, 247, 220, 0.40), transparent);
}

html body #app-shell.app-shell[data-route="home"] .library-module-row button:nth-child(3)::after {
  background: repeating-linear-gradient(100deg, rgba(216, 255, 79, 0.66) 0 7px, rgba(220, 232, 255, 0.72) 7px 14px, transparent 14px 21px);
}

html body #app-shell.app-shell[data-route="home"] .library-module-row button:nth-child(4)::after {
  background: linear-gradient(100deg, rgba(216, 255, 79, 0.78), rgba(255, 255, 255, 0.12), transparent);
}

html body #app-shell.app-shell[data-route="home"] .library-module-row i {
  grid-row: 1 / 3;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #f0f2ed;
  color: var(--home-ink);
}

html body #app-shell.app-shell[data-route="home"] .library-module-row svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row strong {
  position: relative;
  z-index: 2;
  overflow: hidden;
  color: var(--home-ink);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row small {
  position: relative;
  z-index: 2;
  color: var(--home-muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 650;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row span {
  position: relative;
  z-index: 2;
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  justify-self: end;
  margin: 0;
  color: var(--home-ink);
  font-size: 24px;
  font-weight: 850;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row button:hover {
  background: #ffffff !important;
  border-color: rgba(16, 19, 24, 0.14);
  box-shadow: var(--home-shadow-md);
  transform: translateY(-2px);
}

html body #app-shell.app-shell[data-route="home"] .library-control-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px) auto auto;
  gap: 14px 18px;
  align-items: center;
  border: 1px solid var(--home-line);
  border-radius: 24px;
  padding: 18px 20px 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--home-shadow-md);
}

html body #app-shell.app-shell[data-route="home"] .library-kind-tabs {
  gap: 10px;
}

html body #app-shell.app-shell[data-route="home"] .library-kind-tabs button,
html body #app-shell.app-shell[data-route="home"] .library-tag-row button {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--home-muted);
  font-size: 14px;
  font-weight: 720;
}

html body #app-shell.app-shell[data-route="home"] .library-kind-tabs button.active,
html body #app-shell.app-shell[data-route="home"] .library-tag-row button.active {
  background: var(--home-ink);
  color: #ffffff;
}

html body #app-shell.app-shell[data-route="home"] .library-kind-tabs button.active::after {
  display: none;
}

html body #app-shell.app-shell[data-route="home"] .library-tag-rows {
  gap: 8px;
  grid-column: 1 / -1;
}

html body #app-shell.app-shell[data-route="home"] .library-tag-row {
  gap: 8px;
  min-height: 38px;
}

html body #app-shell.app-shell[data-route="home"] .library-tag-row > span {
  min-width: 58px;
  color: var(--home-ink);
  font-size: 14px;
  font-weight: 780;
}

html body #app-shell.app-shell[data-route="home"] .library-search-pill {
  min-height: 44px;
  border-radius: 14px;
  background: #f7f8f5;
}

/* Supplied GCC Unified Demo v2 — homepage pixel-match pass. */
html body #app-shell.app-shell[data-route="home"] .content {
  background: #f5f6f8 !important;
}

html body #app-shell.app-shell[data-route="home"] .sidebar-brand .brand-mark {
  position: relative;
  color: transparent !important;
  background: #020617 !important;
  border-radius: 9px !important;
}

html body #app-shell.app-shell[data-route="home"] .sidebar-brand .brand-mark::after {
  content: "ϟ";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
}

html body #app-shell.app-shell[data-route="home"] .library-page-home {
  width: min(100%, 1240px) !important;
  padding: 24px 32px 64px !important;
  background: transparent !important;
}

html body #app-shell.app-shell[data-route="home"] .library-hero {
  gap: 0 !important;
  padding: 0 !important;
}

html body #app-shell.app-shell[data-route="home"] .home-command-title {
  min-height: auto !important;
  gap: 0 !important;
  margin: 30px auto 36px !important;
}

html body #app-shell.app-shell[data-route="home"] .home-command-title span,
html body #app-shell.app-shell[data-route="home"] .home-command-title strong {
  font-size: 26px !important;
  line-height: 1 !important;
  font-weight: 600 !important;
  letter-spacing: -.035em !important;
}

html body #app-shell.app-shell[data-route="home"] .home-command-title span {
  color: #111827 !important;
}

html body #app-shell.app-shell[data-route="home"] .home-command-title strong {
  color: #0f172a !important;
}

html body #app-shell.app-shell[data-route="home"] .home-command-composer {
  width: min(100%, 768px) !important;
  min-height: 190px !important;
  margin: 0 auto 36px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, .05) !important;
}

html body #app-shell.app-shell[data-route="home"] .home-command-main {
  min-height: 136px !important;
  padding: 16px !important;
}

html body #app-shell.app-shell[data-route="home"] .home-command-upload {
  width: 56px !important;
  height: 72px !important;
  flex-basis: 56px !important;
  margin-right: 14px !important;
  border-color: #dbe2ea !important;
  border-radius: 8px !important;
  background: #fafbfc !important;
  transform: rotate(-4deg) !important;
}

html body #app-shell.app-shell[data-route="home"] .home-command-main textarea {
  min-height: 96px !important;
  padding-top: 3px !important;
  color: #334155 !important;
  font-size: 14px !important;
  line-height: 1.7 !important;
  font-weight: 400 !important;
}

html body #app-shell.app-shell[data-route="home"] .home-command-controls {
  min-height: 54px !important;
  padding: 8px 14px !important;
  border-top: 1px solid #f1f5f9 !important;
  border-radius: 0 0 16px 16px !important;
  background: rgba(248, 250, 252, .42) !important;
}

html body #app-shell.app-shell[data-route="home"] .home-control-button {
  min-height: 36px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
}

html body #app-shell.app-shell[data-route="home"] .home-control-primary {
  color: #475569 !important;
}

html body #app-shell.app-shell[data-route="home"] .home-command-submit {
  width: 36px !important;
  height: 36px !important;
  background: #020617 !important;
}

html body #app-shell.app-shell[data-route="home"] .library-control-strip {
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  margin-top: 0 !important;
  padding: 0 0 36px !important;
  border-bottom: 1px solid rgba(226, 232, 240, .8) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-kind-tabs {
  gap: 28px !important;
}

html body #app-shell.app-shell[data-route="home"] .library-kind-tabs > button {
  min-height: 40px !important;
  padding-bottom: 10px !important;
  font-size: 15px !important;
}

html body #app-shell.app-shell[data-route="home"] .library-search-pill {
  width: 224px !important;
  min-height: 32px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .8) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-upload-area { order: 2; }
html body #app-shell.app-shell[data-route="home"] .filter-dropdown-wrap { order: 3; }

html body #app-shell.app-shell[data-route="home"] .library-upload-pill {
  min-height: 32px !important;
  padding: 0 11px !important;
  color: #64748b !important;
  background: rgba(255, 255, 255, .78) !important;
  border-color: #e2e8f0 !important;
  border-radius: 8px !important;
  font-size: 11px !important;
}

html body #app-shell.app-shell[data-route="home"] .filter-dropdown-wrap .ghost-btn {
  min-height: 32px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
}

html body #app-shell.app-shell[data-route="home"] .library-board {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

html body #app-shell.app-shell[data-route="home"] .library-grid {
  display: grid !important;
  columns: auto !important;
  column-gap: 16px !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 18px 16px !important;
}

.library-home-card-meta {
  display: none;
}

html body #app-shell.app-shell[data-route="home"] .library-card {
  overflow: hidden !important;
  border: 1px solid #eef0f3 !important;
  border-radius: 12px !important;
  background: #fff !important;
  transform: none !important;
  box-shadow: none !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card:hover {
  transform: translateY(-2px) !important;
  border-color: #dde2e8 !important;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .08) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card-icons .card-download-btn {
  display: none !important;
}

html body #app-shell.app-shell[data-route="home"] .library-thumb-wrap {
  border-radius: 11px 11px 0 0 !important;
}

html body #app-shell.app-shell[data-route="home"] .library-home-card-meta {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid #f1f3f5;
}

html body #app-shell.app-shell[data-route="home"] .library-home-card-meta > div {
  min-width: 0;
}

html body #app-shell.app-shell[data-route="home"] .library-home-card-meta strong,
html body #app-shell.app-shell[data-route="home"] .library-home-card-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body #app-shell.app-shell[data-route="home"] .library-home-card-meta strong {
  color: #334155;
  font-size: 12px;
  font-weight: 600;
}

html body #app-shell.app-shell[data-route="home"] .library-home-card-meta span {
  margin-top: 5px;
  color: #94a3b8;
  font-size: 10px;
}

html body #app-shell.app-shell[data-route="home"] .library-home-card-meta button {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 0;
  border-radius: 7px;
  color: #64748b;
  background: transparent;
}

html body #app-shell.app-shell[data-route="home"] .library-home-card-meta button:hover {
  color: #0f172a;
  background: #f1f5f9;
}

@media (max-width: 980px) {
  html body #app-shell.app-shell[data-route="home"] .library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  html body #app-shell.app-shell[data-route="home"] .library-page-home { padding: 22px 16px 48px !important; }
  html body #app-shell.app-shell[data-route="home"] .home-command-title { margin: 18px auto 26px !important; }
  html body #app-shell.app-shell[data-route="home"] .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 520px) {
  html body #app-shell.app-shell[data-route="home"] .library-grid { grid-template-columns: 1fr !important; }
  html body #app-shell.app-shell[data-route="home"] .library-kind-tabs { gap: 14px !important; }
}

html body #app-shell.app-shell[data-route="home"] .library-search-pill input {
  color: var(--home-ink);
  font-size: 13px;
  font-weight: 680;
}

html body #app-shell.app-shell[data-route="home"] .library-upload-pill,
html body #app-shell.app-shell[data-route="home"] #library-favorite-filter {
  min-height: 44px;
  border-radius: 14px;
  padding-inline: 16px;
  font-size: 13px;
  font-weight: 780;
}

html body #app-shell.app-shell[data-route="home"] .library-status {
  padding-inline: 4px;
}

html body #app-shell.app-shell[data-route="home"] .library-stat strong {
  color: #7a828d;
  font-size: 12px;
  font-weight: 720;
}

@media (max-width: 980px) {
  html body #app-shell.app-shell[data-route="home"] .library-module-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html body #app-shell.app-shell[data-route="home"] .library-control-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  html body #app-shell.app-shell[data-route="home"] .library-module-row {
    grid-template-columns: 1fr;
  }

  html body #app-shell.app-shell[data-route="home"] .library-hero-title {
    font-size: 36px;
  }
}

/* 2026 home polish v6: remove decorative artwork, keep clean white layout. */
html body #app-shell.app-shell[data-route="home"] .library-hero-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 214px;
  background: #ffffff;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-panel::before,
html body #app-shell.app-shell[data-route="home"] .library-hero-panel::after,
html body #app-shell.app-shell[data-route="home"] .library-hero-badge,
html body #app-shell.app-shell[data-route="home"] .library-hero-title span,
html body #app-shell.app-shell[data-route="home"] .library-hero-title i,
html body #app-shell.app-shell[data-route="home"] .library-module-row button::after {
  display: none;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-title {
  margin-top: 0;
  text-align: center;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-title strong {
  display: block;
  max-width: 760px;
  color: var(--home-ink);
  font-size: clamp(44px, 4.2vw, 68px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: 0;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command {
  margin-top: 18px;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row button {
  overflow: visible;
  background: #ffffff !important;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row i {
  background: #f3f4f1;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f3f4f1;
  color: var(--home-ink);
  font-size: 18px;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row button:hover span {
  background: var(--home-ink);
  color: #ffffff;
}

/* 2026 home polish v7: mature hero typography and command spacing. */
html body #app-shell.app-shell[data-route="home"] .library-page-home {
  padding-top: 28px;
}

html body #app-shell.app-shell[data-route="home"] .library-hero {
  gap: 16px;
  padding: 10px 0 28px;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-panel {
  width: min(1000px, 68vw);
  min-height: 188px;
  padding: 32px 42px;
  border-radius: 24px;
  align-content: center;
  box-shadow: 0 18px 54px rgba(16, 19, 24, 0.07);
}

html body #app-shell.app-shell[data-route="home"] .library-hero-title {
  display: block;
  margin: 0;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-title strong {
  max-width: 720px;
  font-size: clamp(36px, 3vw, 48px);
  line-height: 1.08;
  font-weight: 860;
  letter-spacing: 0;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command {
  width: min(720px, 100%);
  min-height: 58px;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  margin-top: 18px;
  padding: 7px 7px 7px 18px;
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(16, 19, 24, 0.06);
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command input {
  min-height: 42px;
  padding: 0;
  color: #59616c;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 650;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command button {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 22px;
  box-shadow: none;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row {
  width: min(1000px, 68vw);
}

@media (max-width: 980px) {
  html body #app-shell.app-shell[data-route="home"] .library-hero-panel,
  html body #app-shell.app-shell[data-route="home"] .library-module-row {
    width: 100%;
  }
}

@media (max-width: 640px) {
  html body #app-shell.app-shell[data-route="home"] .library-hero-panel {
    padding: 26px 20px;
  }

  html body #app-shell.app-shell[data-route="home"] .library-hero-title strong {
    font-size: 32px;
  }
}

/* 2026 global design system rollout v1: mature white creative workspace. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f7f3;
  --surface-3: #eef1ea;
  --border: rgba(16, 19, 24, 0.09);
  --border-strong: rgba(16, 19, 24, 0.15);
  --text: #101318;
  --muted: #69717c;
  --muted-2: #9aa1aa;
  --primary: #101318;
  --primary-strong: #050608;
  --mint: #d8ff4f;
  --sun: #d8ff4f;
  --rose: #f54d7d;
  --success: #0f9f6e;
  --danger: #d92d20;
  --radius: 14px;
  --shadow: 0 18px 54px rgba(16, 19, 24, 0.07);
  --shadow-soft: 0 10px 30px rgba(16, 19, 24, 0.05);
}

html,
body,
.app-shell,
.content {
  background: #ffffff;
  color: var(--text);
  letter-spacing: 0;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button,
input,
select,
textarea {
  letter-spacing: 0;
}

.login-view {
  background:
    radial-gradient(circle at 50% -12%, rgba(216, 255, 79, 0.13), transparent 26%),
    #ffffff;
}

.login-panel,
.admin-section,
.panel,
.request-hero,
.library-inspector,
.modal,
.library-modal {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.login-panel {
  width: min(460px, 100%);
  padding: 38px;
}

.login-panel::before {
  display: none;
}

.login-panel h1,
.request-hero h3,
.admin-section h3,
.topbar h2 {
  color: var(--text);
  letter-spacing: 0;
}

.login-panel h1 {
  font-size: 36px;
  line-height: 1.08;
  font-weight: 860;
}

.login-panel p,
.request-hero p,
.message,
label,
.library-stat strong,
.library-card-meta,
.library-inspector p {
  color: var(--muted);
}

.brand-mark,
.brand-mark.small {
  background: var(--primary);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(16, 19, 24, 0.12);
}

input,
select,
textarea,
.library-form input,
.library-form select,
.upload-tag-trigger,
.library-drop-zone {
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus,
.upload-tag-trigger:focus {
  border-color: rgba(16, 19, 24, 0.42);
  box-shadow: 0 0 0 4px rgba(16, 19, 24, 0.06);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.library-upload-pill,
#library-favorite-filter {
  min-height: 42px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 780;
}

.primary-btn,
.library-upload-pill {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
  box-shadow: none;
}

.primary-btn:hover,
.library-upload-pill:hover {
  background: var(--primary-strong);
}

.secondary-btn,
.ghost-btn,
#library-favorite-filter {
  color: var(--text);
  background: #ffffff;
  border-color: var(--border);
}

.secondary-btn:hover,
.ghost-btn:hover,
#library-favorite-filter:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--muted);
  background: #ffffff;
  border-color: var(--border);
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}

.app-shell {
  grid-template-columns: 84px minmax(0, 1fr);
}

.sidebar {
  background: rgba(255, 255, 255, 0.88);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.nav-list {
  gap: 8px;
}

.nav-item {
  min-height: 60px;
  border-radius: 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.9;
}

.nav-item.active,
.nav-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.sidebar-footer .ghost-btn {
  border-radius: 14px;
  background: var(--surface-2);
}

.topbar {
  min-height: 72px;
  padding: 0 30px;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.topbar h2 {
  font-size: 20px;
  font-weight: 840;
}

.kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0;
}

.library-page,
.library-page-home,
.panel-page,
.request-page {
  background: #ffffff;
}

.library-page:not(.library-page-home) {
  padding: 28px;
}

.library-page:not(.library-page-home) .library-hero {
  display: none;
}

html body #app-shell.app-shell[data-route="home"] .library-page-home {
  padding: 30px 32px 26px;
}

html body #app-shell.app-shell[data-route="home"] .library-hero {
  gap: 18px;
  padding: 0 0 30px;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-panel {
  width: min(960px, 68vw);
  min-height: 180px;
  padding: 34px 44px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

html body #app-shell.app-shell[data-route="home"] .library-hero-title strong {
  max-width: 700px;
  color: var(--text);
  font-size: clamp(36px, 2.75vw, 46px);
  line-height: 1.08;
  font-weight: 860;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command {
  width: min(700px, 100%);
  min-height: 58px;
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command input {
  color: #5f6772;
  font-size: 13px;
  font-weight: 650;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command button {
  background: var(--primary);
  color: #ffffff;
  border-radius: 12px;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row {
  width: min(960px, 68vw);
  gap: 14px;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row button,
.library-card,
.request-steps article {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

html body #app-shell.app-shell[data-route="home"] .library-module-row button {
  min-height: 88px;
  padding: 18px;
  grid-template-columns: 42px minmax(0, 1fr) 30px;
  gap: 14px;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row i {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--surface-2);
}

html body #app-shell.app-shell[data-route="home"] .library-module-row strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 820;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row span {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
}

html body #app-shell.app-shell[data-route="home"] .library-control-strip,
.library-control-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 390px) auto;
  gap: 14px 18px;
  align-items: center;
  padding: 18px 20px 20px;
}

.library-kind-tabs {
  gap: 8px;
}

.library-kind-tabs button,
.library-tag-row button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
}

.library-kind-tabs button.active,
.library-tag-row button.active {
  background: var(--primary);
  color: #ffffff;
}

.library-kind-tabs button.active::after {
  display: none;
}

.library-tag-row > span {
  color: var(--text);
  font-weight: 800;
}

.library-search-pill {
  background: var(--surface-2);
}

.library-search-pill input {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.library-board {
  gap: 22px;
}

.library-card {
  overflow: hidden;
}

.library-card-title {
  color: var(--text);
  font-weight: 820;
}

.library-card-actions button {
  border-radius: 12px;
}

.library-inspector {
  padding: 20px;
}

.library-inspector h3 {
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 840;
}

#library-upload-modal .library-modal {
  border-radius: 24px;
}

#library-upload-modal .modal-head h3,
.modal h3 {
  color: var(--text);
  font-size: 24px;
  line-height: 1.18;
  font-weight: 860;
}

#library-upload-modal .library-kind-card,
.library-drop-zone,
.upload-tag-trigger,
.upload-tag-menu {
  border-radius: 16px;
}

#library-upload-modal .library-kind-card.active {
  background: var(--primary);
  color: #ffffff;
}

#library-upload-modal .library-drop-zone {
  border-color: rgba(16, 19, 24, 0.16);
  background: #ffffff;
}

.upload-tag-menu button {
  border-radius: 10px;
}

.request-page,
.panel-page {
  padding: 28px;
}

.request-hero {
  overflow: hidden;
  min-height: 190px;
  padding: 28px;
}

.request-visual {
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(216, 255, 79, 0.42), transparent 44%),
    var(--surface-2);
}

.request-steps {
  gap: 16px;
}

.request-steps article {
  padding: 20px;
}

.request-steps span {
  color: var(--muted);
  font-weight: 840;
}

.request-steps strong {
  color: var(--text);
}

.admin-section {
  padding: 24px;
}

.toolbar {
  gap: 14px;
}

.table {
  border-radius: 18px;
  overflow: hidden;
}

.table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

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

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  html body #app-shell.app-shell[data-route="home"] .library-hero-panel,
  html body #app-shell.app-shell[data-route="home"] .library-module-row {
    width: 100%;
  }

  html body #app-shell.app-shell[data-route="home"] .library-control-strip,
  .library-control-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .login-view,
  .library-page:not(.library-page-home),
  html body #app-shell.app-shell[data-route="home"] .library-page-home,
  .request-page,
  .panel-page {
    padding: 18px;
  }

  html body #app-shell.app-shell[data-route="home"] .library-hero-panel {
    padding: 26px 22px;
  }

  html body #app-shell.app-shell[data-route="home"] .library-hero-title strong {
    font-size: 32px;
  }
}

/* 2026 home clean layout v1: remove helper copy and rebalance the first screen. */
html body #app-shell.app-shell[data-route="home"] .library-hero {
  gap: 16px;
  padding-bottom: 28px;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-panel {
  width: min(920px, 66vw);
  min-height: 166px;
  padding: 30px 40px 34px;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-title strong {
  max-width: 680px;
  font-size: clamp(38px, 3vw, 50px);
  line-height: 1.04;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command {
  width: min(640px, 100%);
  min-height: 56px;
  margin-top: 22px;
  grid-template-columns: minmax(0, 1fr) 42px;
  padding: 7px 7px 7px 16px;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command input {
  min-height: 40px;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command input::placeholder {
  color: transparent;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row {
  width: min(920px, 66vw);
  gap: 14px;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row button {
  min-height: 78px;
  grid-template-columns: 42px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 14px;
  padding: 16px 16px 16px 18px;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row strong {
  min-width: 0;
  overflow: visible;
  color: var(--text);
  font-size: 16px;
  line-height: 1.12;
  font-weight: 840;
  white-space: nowrap;
  text-overflow: clip;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row small {
  display: none;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row i {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row span {
  justify-self: end;
}

@media (max-width: 980px) {
  html body #app-shell.app-shell[data-route="home"] .library-hero-panel,
  html body #app-shell.app-shell[data-route="home"] .library-module-row {
    width: 100%;
  }
}

@media (max-width: 640px) {
  html body #app-shell.app-shell[data-route="home"] .library-hero-panel {
    min-height: 154px;
    padding: 26px 20px 28px;
  }

  html body #app-shell.app-shell[data-route="home"] .library-hero-command {
    margin-top: 18px;
  }

  html body #app-shell.app-shell[data-route="home"] .library-module-row {
    grid-template-columns: 1fr;
  }
}

/* 2026 home kiki workstation v1: reference-inspired GCC home, not a copied page. */
html body #app-shell.app-shell[data-route="home"] .content {
  background: #f7f8fb;
}

html body #app-shell.app-shell[data-route="home"] .library-page-home {
  min-height: 100%;
  padding: 28px clamp(28px, 4vw, 64px) 34px;
  background: #f7f8fb;
}

html body #app-shell.app-shell[data-route="home"] .library-hero {
  gap: 24px;
  padding: 0 0 34px;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-panel {
  width: min(1500px, 100%);
  min-height: auto;
  display: grid;
  justify-items: center;
  align-content: start;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin: 0 0 20px;
  padding: 0 20px;
  border: 1px solid rgba(124, 150, 190, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #30353d;
  font-size: 16px;
  line-height: 1;
  font-weight: 760;
  box-shadow: 0 10px 30px rgba(58, 77, 110, 0.06);
  backdrop-filter: blur(14px);
}

html body #app-shell.app-shell[data-route="home"] .library-hero-title {
  position: relative;
  display: flex;
  width: min(980px, 100%);
  min-height: 114px;
  align-items: center;
  justify-content: center;
  gap: 26px;
  margin: 0;
  text-align: center;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-title span {
  display: inline-block;
  color: #676e78;
  font-size: clamp(46px, 4.8vw, 74px);
  line-height: 0.95;
  font-weight: 820;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-kiki {
  display: block;
  width: clamp(84px, 8.2vw, 132px);
  height: clamp(84px, 8.2vw, 132px);
  object-fit: contain;
  align-self: end;
  margin: 0 -4px -10px;
  filter: drop-shadow(0 18px 26px rgba(109, 74, 8, 0.16));
}

html body #app-shell.app-shell[data-route="home"] .library-hero-title strong {
  display: inline-block;
  max-width: none;
  color: #101318;
  font-size: clamp(44px, 4.6vw, 72px);
  line-height: 0.98;
  font-weight: 880;
  white-space: nowrap;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command {
  width: min(1500px, 100%);
  min-height: 238px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  align-items: start;
  gap: 18px;
  margin-top: 8px;
  padding: 34px 30px 28px 34px;
  border: 1px solid rgba(143, 158, 190, 0.24);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 24px 70px rgba(61, 76, 107, 0.08);
  backdrop-filter: blur(16px);
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command input {
  width: 100%;
  min-height: 48px;
  align-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: #101318;
  font-size: clamp(18px, 1.4vw, 24px);
  line-height: 1.3;
  font-weight: 650;
  box-shadow: none;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command input::placeholder {
  color: #9aa3ae;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command button {
  align-self: end;
  justify-self: end;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #cfd6de;
  color: #ffffff;
  font-size: 34px;
  font-weight: 760;
  box-shadow: none;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command:focus-within {
  border-color: rgba(16, 19, 24, 0.18);
  box-shadow: 0 28px 80px rgba(61, 76, 107, 0.11);
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command:focus-within button {
  background: #101318;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row {
  width: min(1500px, 100%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row button {
  position: relative;
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  padding: 0 24px 0 28px;
  border: 0;
  border-radius: 18px;
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.5), transparent 20%),
    linear-gradient(115deg, #d8ff4f 0%, #b9ff2e 52%, #101318 100%);
  box-shadow: 0 16px 40px rgba(63, 86, 20, 0.12);
}

html body #app-shell.app-shell[data-route="home"] .library-module-row button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 19, 24, 0.08), transparent 48%, rgba(16, 19, 24, 0.36));
  pointer-events: none;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(63, 86, 20, 0.16);
}

html body #app-shell.app-shell[data-route="home"] .library-module-row strong,
html body #app-shell.app-shell[data-route="home"] .library-module-row span {
  position: relative;
  z-index: 1;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row strong {
  color: #101318;
  font-size: clamp(18px, 1.45vw, 26px);
  line-height: 1;
  font-weight: 780;
  white-space: nowrap;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row span {
  width: auto;
  height: auto;
  justify-self: end;
  background: transparent;
  color: #101318;
  font-size: 30px;
  line-height: 1;
  font-weight: 600;
}

html body #app-shell.app-shell[data-route="home"] .library-control-strip {
  width: min(1500px, 100%);
  margin: 0 auto;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.78);
}

@media (max-width: 1180px) {
  html body #app-shell.app-shell[data-route="home"] .library-hero-title {
    flex-wrap: wrap;
    gap: 16px;
  }

  html body #app-shell.app-shell[data-route="home"] .library-hero-title strong {
    white-space: normal;
  }

  html body #app-shell.app-shell[data-route="home"] .library-module-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  html body #app-shell.app-shell[data-route="home"] .library-page-home {
    padding: 18px;
  }

  html body #app-shell.app-shell[data-route="home"] .library-hero-badge {
    font-size: 13px;
  }

  html body #app-shell.app-shell[data-route="home"] .library-hero-title {
    min-height: auto;
  }

  html body #app-shell.app-shell[data-route="home"] .library-hero-title span,
  html body #app-shell.app-shell[data-route="home"] .library-hero-title strong {
    font-size: 34px;
  }

  html body #app-shell.app-shell[data-route="home"] .library-hero-kiki {
    width: 76px;
    height: 76px;
  }

  html body #app-shell.app-shell[data-route="home"] .library-hero-command {
    min-height: 160px;
    border-radius: 24px;
    padding: 24px 20px 20px;
  }

  html body #app-shell.app-shell[data-route="home"] .library-module-row {
    grid-template-columns: 1fr;
  }
}

/* 2026 home kiki refinement v2: cleaner title and black neon module cards. */
html body #app-shell.app-shell[data-route="home"] .library-hero-badge {
  display: none;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-title {
  min-height: 96px;
  gap: 22px;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-title span {
  font-size: clamp(40px, 4vw, 62px);
}

html body #app-shell.app-shell[data-route="home"] .library-hero-kiki {
  width: clamp(76px, 7vw, 112px);
  height: clamp(76px, 7vw, 112px);
  margin-bottom: -8px;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-title strong {
  font-size: clamp(38px, 3.8vw, 60px);
  line-height: 1.02;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command {
  margin-top: 14px;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row button {
  background:
    radial-gradient(circle at 84% 22%, rgba(216, 255, 79, 0.18), transparent 24%),
    linear-gradient(112deg, #101318 0%, #101318 60%, #050608 100%);
  box-shadow: 0 18px 42px rgba(16, 19, 24, 0.18);
}

html body #app-shell.app-shell[data-route="home"] .library-module-row button::before {
  background: linear-gradient(90deg, rgba(216, 255, 79, 0.08), transparent 50%, rgba(216, 255, 79, 0.14));
}

html body #app-shell.app-shell[data-route="home"] .library-module-row button:hover {
  box-shadow: 0 22px 52px rgba(16, 19, 24, 0.24);
}

html body #app-shell.app-shell[data-route="home"] .library-module-row strong,
html body #app-shell.app-shell[data-route="home"] .library-module-row span {
  color: #d8ff4f;
}

@media (max-width: 640px) {
  html body #app-shell.app-shell[data-route="home"] .library-hero-title span,
  html body #app-shell.app-shell[data-route="home"] .library-hero-title strong {
    font-size: 32px;
  }

  html body #app-shell.app-shell[data-route="home"] .library-hero-kiki {
    width: 70px;
    height: 70px;
  }
}

/* 2026 home kiki refinement v3: centered, lighter, true black cards. */
html body #app-shell.app-shell[data-route="home"] .library-page-home {
  padding-top: 34px;
  background: #f7f8fb;
}

html body #app-shell.app-shell[data-route="home"] .library-hero {
  gap: 18px;
  padding-bottom: 34px;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-panel {
  width: min(1080px, 100%);
  margin: 0 auto;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-badge {
  display: none !important;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-title {
  width: min(720px, 100%);
  min-height: 76px;
  gap: 18px;
  margin: 0 auto 10px;
  align-items: center;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-title span {
  color: #6d7480;
  font-size: clamp(34px, 3vw, 46px);
  line-height: 1;
  font-weight: 760;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-kiki {
  width: clamp(58px, 5.4vw, 78px);
  height: clamp(58px, 5.4vw, 78px);
  margin: 0 -2px -5px;
  filter: drop-shadow(0 12px 18px rgba(109, 74, 8, 0.14));
}

html body #app-shell.app-shell[data-route="home"] .library-hero-title strong {
  color: #101318;
  font-size: clamp(34px, 3.25vw, 50px);
  line-height: 1.02;
  font-weight: 780;
  white-space: nowrap;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command {
  width: min(1080px, 100%);
  min-height: 174px;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 14px;
  padding: 24px 24px 22px;
  border: 1px solid rgba(136, 151, 184, 0.22);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 54px rgba(61, 76, 107, 0.07);
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command input {
  min-height: 36px;
  color: #1f252d;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 560;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command input::placeholder {
  color: #a7b0bb;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command button {
  width: 46px;
  height: 46px;
  align-self: end;
  border-radius: 50%;
  background: #c9d0d8;
  color: #ffffff;
  font-size: 28px;
  font-weight: 700;
}

html body #app-shell.app-shell[data-route="home"] .library-hero-command:focus-within button {
  background: #101318;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row {
  width: min(1080px, 100%);
  margin: 0 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row button {
  min-height: 58px;
  padding: 0 16px 0 18px;
  grid-template-columns: minmax(0, 1fr) 18px;
  border: 1px solid rgba(216, 255, 79, 0.16);
  border-radius: 14px;
  background: #050608 !important;
  box-shadow: 0 14px 34px rgba(16, 19, 24, 0.14);
}

html body #app-shell.app-shell[data-route="home"] .library-module-row button::before {
  background:
    linear-gradient(90deg, rgba(216, 255, 79, 0.08), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent);
}

html body #app-shell.app-shell[data-route="home"] .library-module-row button:hover {
  background: #080a0d !important;
  border-color: rgba(216, 255, 79, 0.26);
  box-shadow: 0 18px 42px rgba(16, 19, 24, 0.2);
}

html body #app-shell.app-shell[data-route="home"] .library-module-row strong {
  color: #d8ff4f;
  font-size: clamp(15px, 1.05vw, 18px);
  line-height: 1;
  font-weight: 660;
}

html body #app-shell.app-shell[data-route="home"] .library-module-row span {
  color: #d8ff4f;
  font-size: 22px;
  font-weight: 540;
}

html body #app-shell.app-shell[data-route="home"] .library-control-strip {
  width: min(1080px, 100%);
  margin-top: 0;
}

@media (max-width: 1180px) {
  html body #app-shell.app-shell[data-route="home"] .library-hero-title {
    width: 100%;
  }

  html body #app-shell.app-shell[data-route="home"] .library-hero-title strong {
    white-space: normal;
  }
}

@media (max-width: 760px) {
  html body #app-shell.app-shell[data-route="home"] .library-module-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  html body #app-shell.app-shell[data-route="home"] .library-hero-title {
    gap: 10px;
  }

  html body #app-shell.app-shell[data-route="home"] .library-hero-title span,
  html body #app-shell.app-shell[data-route="home"] .library-hero-title strong {
    font-size: 30px;
  }

  html body #app-shell.app-shell[data-route="home"] .library-hero-kiki {
    width: 58px;
    height: 58px;
  }

  html body #app-shell.app-shell[data-route="home"] .library-hero-command {
    min-height: 150px;
    border-radius: 22px;
  }

  html body #app-shell.app-shell[data-route="home"] .library-module-row {
    grid-template-columns: 1fr;
  }
}

/* --- Library page layout override --- */
body .app-shell[data-route="library"] .library-control-strip {
  margin-left: 0 !important;
  margin-inline: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body .app-shell[data-route="library"] .library-tag-rows {
  margin-left: 0;
}

body .app-shell[data-route="library"] .library-control-strip,
body .app-shell:not([data-route="home"]) .library-control-strip,
.library-page:not(.library-page-home) .library-control-strip {
  margin-left: 0 !important;
  margin-inline: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  width: 100% !important;
}

/* Override for home page library section too */
body .app-shell[data-route="home"] .library-control-strip {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 18px 0 !important;
}

body .app-shell[data-route="library"] .library-control-strip {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Left-align board with control strip on library page */
body .app-shell[data-route="library"] .library-board {
  margin-left: 0 !important;
  margin-inline: 0 !important;
  width: 100% !important;
}

/* Template cards keep their artwork unobstructed until hover, then reveal its canvas metadata. */
.library-template-size-hover {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  padding: 13px 14px 12px;
  color: #fff;
  background: rgba(18, 20, 24, .76);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(100%);
  pointer-events: none;
  transition: opacity .18s ease, transform .2s cubic-bezier(.2,.8,.2,1);
}

.library-card.template-preview-card:hover .library-template-size-hover,
.library-card.template-preview-card:focus-within .library-template-size-hover {
  opacity: 1;
  transform: translateY(0);
}

.library-template-size-ratio {
  font-size: 15px;
  line-height: 1.15;
  font-weight: 820;
  letter-spacing: .01em;
}

.library-template-size-pixels {
  color: rgba(255,255,255,.74);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 680;
}

/* Font-card overflow control stays quiet until the user points at it. */
.library-font-card button[data-action="font-menu"] {
  background: #fff !important;
}

.library-font-card button[data-action="font-menu"]:hover,
.library-font-card button[data-action="font-menu"]:focus-visible {
  background: #f0f1f3 !important;
}

/* Unified product shell: quiet, content-led visual language for the real app. */
:root {
  --vf-ink: #17181b;
  --vf-muted: #7a828d;
  --vf-line: #e7e9ed;
  --vf-canvas: #f6f7f8;
  --vf-panel: #ffffff;
  --vf-accent: #14a7c8;
}

body {
  background: var(--vf-canvas);
  color: var(--vf-ink);
}

.app-shell {
  padding-left: 72px;
  background: var(--vf-canvas);
}

.sidebar {
  width: 72px;
  background: #fff;
  border-right: 1px solid var(--vf-line);
  backdrop-filter: none;
}

.sidebar-brand {
  min-height: 72px;
  padding: 15px 10px;
}

.brand-mark.small {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #141519;
  box-shadow: none;
}

.nav-list {
  padding: 8px;
  gap: 6px;
}

.nav-item {
  min-height: 56px;
  border-radius: 9px;
  color: #8a929c;
  font-size: 10px;
  font-weight: 650;
}

.nav-item:hover {
  color: var(--vf-ink);
  background: #f5f6f7;
}

.nav-item.active {
  color: var(--vf-ink);
  background: #f1f2f3;
  border-color: transparent;
  box-shadow: none;
}

.nav-item.active .nav-icon,
.nav-icon {
  color: currentColor;
}

.main-area {
  grid-template-rows: 64px minmax(0, 1fr);
}

.topbar {
  padding: 10px 24px;
  background: rgba(255, 255, 255, .94);
  border-bottom-color: var(--vf-line);
  backdrop-filter: blur(12px);
}

.topbar h2 {
  color: var(--vf-ink);
  font-size: 18px;
  font-weight: 680;
}

.kicker,
.user-role {
  color: var(--vf-muted);
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  min-height: 34px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 650;
}

.primary-btn {
  background: var(--vf-ink);
  color: #fff;
}

.primary-btn:hover {
  background: #303237;
}

.secondary-btn,
.ghost-btn {
  color: #4e5661;
  background: #fff;
  border-color: var(--vf-line);
}

.user-chip {
  min-height: 34px;
  border-radius: 8px;
  border-color: var(--vf-line);
  background: #fff;
}

.user-avatar {
  background: var(--vf-ink);
}

.content {
  background: var(--vf-canvas);
}

/* Home stays a real command surface: existing search, upload and routing remain untouched. */
.library-page-home {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 72px) 28px 52px;
}

.library-page-home .library-hero,
.library-page-home .library-hero-panel {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.library-page-home .library-hero {
  padding: 0;
}

.library-page-home .library-hero-panel {
  min-height: 0;
  padding: 0;
}

.library-page-home .library-hero-panel::before,
.library-page-home .library-hero-panel::after,
.library-page-home .library-module-row button::before,
.library-page-home .library-module-row button::after {
  display: none !important;
}

.library-hero-badge {
  color: var(--vf-accent) !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  font-size: 11px !important;
  font-weight: 760 !important;
  letter-spacing: .08em !important;
}

.library-hero-title {
  max-width: 820px;
  margin: 14px auto 30px !important;
  justify-content: center;
  color: var(--vf-ink);
}

.library-hero-title span,
.library-hero-title strong {
  color: var(--vf-ink) !important;
  font-size: clamp(34px, 4vw, 58px) !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
}

.library-hero-title span {
  color: #7e8793 !important;
}

.library-hero-kiki {
  width: 70px !important;
  height: 70px !important;
  filter: none !important;
}

.library-hero-command {
  min-height: 176px !important;
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 30px !important;
  border: 1px solid var(--vf-line) !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 12px 38px rgba(22, 28, 38, .06) !important;
}

.library-hero-command input {
  color: var(--vf-ink) !important;
  font-size: 17px !important;
  font-weight: 460 !important;
}

.library-hero-command input::placeholder {
  color: #a5adb7 !important;
}

.library-hero-command button {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  background: var(--vf-ink) !important;
  box-shadow: none !important;
}

.library-page-home .library-module-row {
  max-width: 1120px;
  margin: 18px auto 0 !important;
  gap: 8px !important;
}

.library-page-home .library-module-row button {
  min-height: 52px !important;
  padding: 0 16px !important;
  border: 1px solid var(--vf-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: none !important;
}

.library-page-home .library-module-row button:hover {
  border-color: #cbd1d8 !important;
  background: #f9fafb !important;
  box-shadow: none !important;
}

.library-page-home .library-module-row strong,
.library-page-home .library-module-row span {
  color: var(--vf-ink) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

/* Cloud library uses the same quiet chips and image-first board language. */
.library-page:not(.library-page-home) {
  padding: 26px 28px 42px;
}

.library-control-strip {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.library-control-strip button,
.library-tag-rows button {
  min-height: 32px;
  border-radius: 7px !important;
  border-color: var(--vf-line) !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

.library-control-strip button.active,
.library-tag-rows button.active {
  background: var(--vf-ink) !important;
  border-color: var(--vf-ink) !important;
  color: #fff !important;
}

.library-board {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.library-card {
  border-radius: 10px !important;
  border-color: var(--vf-line) !important;
  box-shadow: none !important;
}

.library-card:hover {
  border-color: #cfd4da !important;
  box-shadow: 0 10px 26px rgba(25, 30, 38, .08) !important;
}

@media (max-width: 760px) {
  .app-shell { padding-left: 0; }
  .sidebar { display: none; }
  .topbar { padding-inline: 16px; }
  .library-page-home,
  .library-page:not(.library-page-home) { padding-inline: 16px; }
  .library-hero-command { min-height: 144px !important; padding: 20px !important; }
}

/* Keep the home entry cards readable against legacy page selectors. */
body .app-shell[data-route="home"] .library-page-home .library-module-row button {
  background: #fff !important;
  color: var(--vf-ink) !important;
}

body .app-shell[data-route="home"] .library-page-home .library-module-row button strong,
body .app-shell[data-route="home"] .library-page-home .library-module-row button span {
  color: var(--vf-ink) !important;
}

/* Home — directly mapped to the supplied unified demo's command console. */
body .app-shell[data-route="home"] .topbar {
  display: none;
}

body .app-shell[data-route="home"] .content {
  min-height: 100vh;
  background: #f5f6f8;
}

/* The prototype keeps navigation as a quiet 64px icon rail on the home route only. */
body .app-shell[data-route="home"] {
  grid-template-columns: 64px minmax(0, 1fr);
}

body .app-shell[data-route="home"] .sidebar {
  width: 64px;
  background: #fff;
  border-right-color: #eef0f3;
}

body .app-shell[data-route="home"] .sidebar-brand {
  min-height: 72px;
  padding: 18px 0 8px;
}

body .app-shell[data-route="home"] .nav-list {
  gap: 8px;
  padding: 14px 7px 8px;
}

body .app-shell[data-route="home"] .nav-item {
  min-height: 46px;
  padding: 7px 2px;
  border-radius: 10px;
}

body .app-shell[data-route="home"] .nav-item .nav-label {
  display: none;
}

body .app-shell[data-route="home"] .nav-item.active {
  background: #f3f5f7;
}

body .app-shell[data-route="home"] .sidebar-footer {
  padding: 10px 7px 12px;
}

body .app-shell[data-route="home"] .sidebar-footer .ghost-btn {
  font-size: 0;
}

body .app-shell[data-route="home"] .sidebar-footer .ghost-btn:first-child::after {
  content: "EN";
  font-size: 10px;
}

body .app-shell[data-route="home"] .sidebar-footer .ghost-btn:last-child::after {
  content: "↗";
  font-size: 15px;
}

.library-page-home {
  width: min(100%, 1240px) !important;
  min-height: 100vh !important;
  margin: 0 auto !important;
  padding: 52px 32px 76px !important;
  gap: 0 !important;
}

.library-page-home .home-command-stage {
  display: block;
}

.home-command-kicker {
  display: none;
}

.library-page-home .home-command-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 28px auto 30px !important;
  color: #0f172a;
}

.library-page-home .home-command-title span,
.library-page-home .home-command-title strong {
  color: #0f172a !important;
  font-size: 26px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: -.035em !important;
}

.library-page-home .home-command-title span {
  color: #7b8490 !important;
}

.library-page-home .home-command-title .library-hero-kiki {
  width: 44px !important;
  height: 44px !important;
  margin: 0 2px !important;
}

.home-command-composer {
  position: relative;
  width: min(100%, 768px);
  min-height: 180px;
  margin: 0 auto 44px;
  padding: 0;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .04), 0 1px 3px rgba(0, 0, 0, .02);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.home-command-composer:focus-within {
  border-color: rgba(15, 23, 42, .15);
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .02);
}

.home-command-main {
  position: relative;
  display: flex;
  min-height: 132px;
  padding: 16px;
}

.home-command-upload {
  display: grid;
  width: 56px;
  height: 72px;
  flex: 0 0 56px;
  place-items: center;
  align-self: center;
  margin-right: 14px;
  overflow: hidden;
  border: 1px dashed #d7dde4;
  border-radius: 8px;
  background: #fafbfc;
  color: #8b97a5;
  cursor: pointer;
  transform: rotate(-6deg);
  transition: border-color .16s ease, background-color .16s ease, color .16s ease, transform .16s ease;
}

.home-command-upload:hover {
  border-color: #a9b6c4;
  background: #f5f7f9;
  color: #475569;
  transform: rotate(-3deg);
}

.home-command-upload input { display: none; }
.home-command-upload span { font-size: 26px; font-weight: 350; line-height: 1; }

.home-command-main textarea {
  width: 100%;
  min-height: 94px;
  padding: 3px 0;
  resize: none;
  border: 0;
  outline: none;
  box-shadow: none;
  color: #334155;
  background: transparent;
  font: 400 14px/1.72 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.home-command-main textarea:focus { box-shadow: none; }
.home-command-main textarea::placeholder { color: #94a3b8; }

.home-command-references {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  gap: 7px;
  max-width: calc(100% - 32px);
  min-height: 0;
  overflow: hidden;
}

.home-command-references.has-references + .home-command-upload {
  visibility: hidden;
}

.home-command-reference,
.home-command-add-reference {
  display: block;
  width: 40px;
  height: 52px;
  flex: 0 0 40px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
  box-shadow: 0 2px 7px rgba(15, 23, 42, .08);
}

.home-command-reference img { width: 100%; height: 100%; object-fit: cover; }

.home-command-add-reference {
  display: grid;
  place-items: center;
  padding: 0;
  border-style: dashed;
  color: #94a3b8;
  font-size: 21px;
  line-height: 1;
}

.home-command-controls {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid rgba(241, 245, 249, .9);
  border-radius: 0 0 16px 16px;
  background: rgba(248, 250, 252, .38);
}

.home-control-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 8px;
  color: #475569;
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.home-control-button:hover { border-color: #cbd5e1; color: #0f172a; background: #f8fafc; }
.home-control-primary { color: #0f9fbe; }
.home-control-primary:hover { color: #0284a3; }
.home-library-shortcut { border-color: transparent; background: transparent; }
.home-command-divider { width: 1px; height: 20px; margin: 0 2px; background: #e8edf2; }

.home-ratio-icon {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 1.35px solid currentColor;
  border-radius: 3px;
}

.home-size-wrap { position: relative; }
.home-size-trigger strong { font-size: inherit; font-weight: 600; }

.home-size-menu {
  position: absolute;
  z-index: 70;
  bottom: calc(100% + 10px);
  left: -6px;
  width: 454px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, .94);
  border-radius: 12px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, .08);
}

.home-size-menu > span {
  display: block;
  margin: 0 0 10px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
}

.home-size-menu > div {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  padding: 5px;
  border-radius: 10px;
  background: #f8fafc;
}

.home-size-menu button {
  display: grid;
  min-height: 54px;
  place-items: center;
  gap: 5px;
  padding: 5px 2px;
  border: 0;
  border-radius: 8px;
  color: #64748b;
  background: transparent;
  font-size: 11px;
  font-weight: 500;
}

.home-size-menu button:hover,
.home-size-menu button[data-home-size="1:1"],
.home-size-menu button.is-selected { color: #0f172a; background: #fff; }
.home-size-menu .home-ratio-icon { transform: scaleY(.76); }

.home-command-submit {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #0f172a;
  font-size: 22px;
  font-weight: 350;
  line-height: 1;
  transition: background-color .15s ease, transform .15s ease;
}

.home-command-submit:hover { background: #1e293b; transform: translateY(-1px); }

@media (max-width: 760px) {
  body .app-shell[data-route="home"] .topbar { display: flex; }
  .library-page-home { padding: 28px 16px 52px !important; }
  .library-page-home .home-command-title { margin-top: 12px !important; margin-bottom: 22px !important; }
  .library-page-home .home-command-title span,
  .library-page-home .home-command-title strong { font-size: 21px !important; }
  .library-page-home .home-command-title .library-hero-kiki { width: 36px !important; height: 36px !important; }
  .home-command-composer { margin-bottom: 28px; }
  .home-command-main { min-height: 146px; }
  .home-command-controls { gap: 4px; padding: 8px; }
  .home-library-shortcut, .home-command-divider { display: none; }
  .home-size-menu { right: -8px; left: auto; width: min(430px, calc(100vw - 32px)); }
}

/* Gemini designer pass: compact home chrome and quiet library navigation. */
body .app-shell[data-route="home"] .sidebar-brand {
  min-height: 64px;
  padding: 12px 0 6px;
}

body .app-shell[data-route="home"] .sidebar-brand .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

body .app-shell[data-route="home"] .nav-list {
  gap: 12px;
  padding: 10px 14px 8px;
}

body .app-shell[data-route="home"] .nav-item {
  width: 36px;
  min-height: 36px;
  height: 36px;
  margin: 0 auto;
  padding: 0;
  border-radius: 11px;
}

body .app-shell[data-route="home"] .nav-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

body .app-shell[data-route="home"] .nav-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.9;
}

body .app-shell[data-route="home"] .sidebar-footer {
  padding: 10px 14px 12px;
}

body .app-shell[data-route="home"] .sidebar-footer .ghost-btn {
  width: 36px;
  min-height: 32px;
  padding: 0;
  border-radius: 10px;
}

.library-page-home .home-command-composer {
  border-radius: 18px;
}

.library-page-home .home-command-main {
  min-height: 122px;
  padding: 15px 16px;
}

.library-page-home .home-command-upload {
  width: 52px;
  height: 68px;
  flex-basis: 52px;
  margin-right: 13px;
  border-radius: 9px;
}

.library-page-home .home-command-main textarea {
  min-height: 84px;
  font-size: 14px;
  line-height: 1.65;
}

.library-page-home .home-command-references {
  top: 15px;
  left: 16px;
}

.library-page-home .home-command-reference,
.library-page-home .home-command-add-reference {
  width: 44px;
  height: 56px;
  flex-basis: 44px;
}

.library-page-home .home-command-controls {
  min-height: 48px;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 0 0 18px 18px;
}

.library-page-home .home-control-button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 550;
}

.library-page-home .home-command-submit {
  width: 32px;
  height: 32px;
  font-size: 20px;
}

/* Home has one level of navigation: type tabs. Detailed tags stay available in Library. */
body .app-shell[data-route="home"] .library-control-strip {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  align-items: center;
  gap: 10px !important;
  padding: 12px 0 18px !important;
}

body .app-shell[data-route="home"] .library-kind-tabs {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

body .app-shell[data-route="home"] .library-kind-tabs > button {
  position: relative;
  min-height: 30px;
  padding: 0 0 8px;
  border: 0 !important;
  border-radius: 0 !important;
  color: #98a1ae !important;
  background: transparent !important;
  font-size: 13px !important;
  font-weight: 550 !important;
}

body .app-shell[data-route="home"] .library-kind-tabs > button.active {
  color: #101828 !important;
}

body .app-shell[data-route="home"] .library-kind-tabs > button.active::after {
  display: block;
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: #101828;
  content: "";
}

body .app-shell[data-route="home"] .library-kind-tabs small {
  font-size: inherit;
  font-weight: inherit;
}

body .app-shell[data-route="home"] .library-tag-rows {
  display: none !important;
}

body .app-shell[data-route="home"] .library-search-pill {
  width: min(184px, 18vw);
  min-height: 28px;
  border-radius: 7px;
  background: #e8edf5;
}

body .app-shell[data-route="home"] .library-search-pill input {
  font-size: 12px;
}

body .app-shell[data-route="home"] .filter-dropdown-wrap { order: 2; }
body .app-shell[data-route="home"] .library-upload-area { order: 3; }

body .app-shell[data-route="home"] .filter-dropdown-wrap .ghost-btn,
body .app-shell[data-route="home"] .library-upload-pill {
  min-height: 32px;
  border-radius: 9px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

body .app-shell[data-route="home"] .library-upload-pill {
  padding: 0 14px;
  color: #fff !important;
  background: #101828 !important;
  border-color: #101828 !important;
}

@media (max-width: 760px) {
  body .app-shell[data-route="home"] .library-control-strip {
    grid-template-columns: minmax(0, 1fr) auto auto !important;
  }

  body .app-shell[data-route="home"] .library-kind-tabs {
    gap: 12px;
  }

  body .app-shell[data-route="home"] .library-kind-tabs > button {
    font-size: 12px !important;
  }

  body .app-shell[data-route="home"] .library-search-pill {
    display: none;
  }
}

/* Gemini Designer · Unified Demo v2 visual-system pass
   Presentation only: preserve the existing homepage structure and interaction hooks. */
:root {
  --vf-ui-bg: #f5f6f8;
  --vf-ui-surface: #ffffff;
  --vf-ui-subtle: #f8fafc;
  --vf-ui-text: #0f172a;
  --vf-ui-muted: #64748b;
  --vf-ui-border: rgba(15, 23, 42, 0.08);
  --vf-ui-border-strong: rgba(15, 23, 42, 0.16);
  --vf-ui-radius-sm: 8px;
  --vf-ui-radius-md: 12px;
  --vf-ui-radius-lg: 16px;
  --vf-ui-shadow-pop: 0 12px 32px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --vf-ui-shadow-hover: 0 18px 38px -12px rgba(15, 23, 42, 0.22), 0 6px 14px -6px rgba(15, 23, 42, 0.12);
  --bg: var(--vf-ui-bg);
  --surface: var(--vf-ui-surface);
  --surface-2: var(--vf-ui-subtle);
  --border: var(--vf-ui-border);
  --border-strong: var(--vf-ui-border-strong);
  --text: var(--vf-ui-text);
  --muted: var(--vf-ui-muted);
  --primary: var(--vf-ui-text);
  --primary-strong: #1e293b;
}

body,
.content,
.library-page {
  background-color: var(--vf-ui-bg);
}

/* One compact toolbar language for tabs, search, filter, and upload. */
.library-kind-tabs > button {
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.library-search-pill,
.filter-dropdown-wrap > .ghost-btn,
.library-upload-pill {
  height: 32px;
  min-height: 32px;
  border: 1px solid var(--vf-ui-border) !important;
  border-radius: var(--vf-ui-radius-sm) !important;
  box-shadow: none !important;
}

.library-search-pill {
  background: rgba(255, 255, 255, 0.72) !important;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.library-search-pill:focus-within {
  border-color: var(--vf-ui-border-strong) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.04) !important;
}

.filter-dropdown-wrap > .ghost-btn {
  padding: 0 12px;
  color: var(--vf-ui-text);
  background: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 600;
}

.library-upload-pill {
  padding: 0 14px;
  color: #ffffff !important;
  background: var(--vf-ui-text) !important;
  font-size: 12px;
  font-weight: 600;
}

.filter-dropdown-wrap > .ghost-btn:hover,
.library-upload-pill:hover {
  transform: translateY(-1px);
}

/* Asset cards: restrained surface, consistent radius, clear hover affordance. */
.library-card {
  border: 1px solid var(--vf-ui-border) !important;
  border-radius: var(--vf-ui-radius-md) !important;
  background: var(--vf-ui-surface) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.025) !important;
  transform: translateY(0);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease !important;
}

.library-card:hover,
.library-card:focus-within {
  border-color: var(--vf-ui-border-strong) !important;
  box-shadow: var(--vf-ui-shadow-hover) !important;
  transform: translateY(-2px) !important;
}

.library-card.multi-selected,
.library-card.selected {
  border-color: var(--vf-ui-text) !important;
  outline: 2px solid var(--vf-ui-text) !important;
  outline-offset: -2px;
}

.library-card-icons button,
.library-card-actions button,
.file-pill,
.favorite-btn {
  border-color: rgba(255, 255, 255, 0.18) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.library-card-icons button,
.file-pill,
.favorite-btn {
  border-radius: var(--vf-ui-radius-sm) !important;
  background: rgba(15, 23, 42, 0.68) !important;
  color: #ffffff !important;
}

/* Floating surfaces share the same material and elevation. */
.filter-dropdown,
.search-history-dropdown,
#context-menu,
.upload-tag-menu,
.home-prompt-menu,
.home-size-menu {
  border: 1px solid var(--vf-ui-border) !important;
  border-radius: var(--vf-ui-radius-md) !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: var(--vf-ui-shadow-pop) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

.filter-dropdown {
  padding: 16px !important;
}

.filter-section h4,
.search-history-label {
  color: var(--vf-ui-muted) !important;
  font-size: 11px !important;
  font-weight: 650 !important;
  letter-spacing: 0.04em;
}

.filter-capsule,
.search-history-item {
  border-color: var(--vf-ui-border) !important;
  background: var(--vf-ui-subtle) !important;
  color: var(--vf-ui-muted) !important;
}

.filter-capsule:hover,
.search-history-item:hover {
  border-color: var(--vf-ui-border-strong) !important;
  color: var(--vf-ui-text) !important;
}

.filter-capsule.active {
  border-color: var(--vf-ui-text) !important;
  background: var(--vf-ui-text) !important;
  color: #ffffff !important;
}

#context-menu button {
  border-radius: var(--vf-ui-radius-sm) !important;
  color: var(--vf-ui-text) !important;
}

#context-menu button:hover {
  background: var(--vf-ui-subtle) !important;
}

/* Upload modal follows the same surface system without touching form behavior. */
#library-upload-modal .library-modal {
  border: 1px solid var(--vf-ui-border) !important;
  border-radius: var(--vf-ui-radius-lg) !important;
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 28px 80px -20px rgba(15, 23, 42, 0.3) !important;
}

#library-upload-modal .modal-head,
.library-upload-footer {
  border-color: var(--vf-ui-border) !important;
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#library-upload-modal .modal-head h3 {
  color: var(--vf-ui-text) !important;
  font-size: 22px !important;
  font-weight: 750 !important;
}

#library-upload-modal .library-kind-card,
#library-upload-modal .library-drop-zone,
#library-upload-modal .library-form input,
#library-upload-modal .library-form select,
#library-upload-modal .upload-tag-trigger {
  border-color: var(--vf-ui-border) !important;
  border-radius: var(--vf-ui-radius-md) !important;
  box-shadow: none !important;
}

#library-upload-modal .library-kind-card.active {
  border-color: var(--vf-ui-text) !important;
  background: var(--vf-ui-text) !important;
  color: #ffffff !important;
}

#library-upload-modal .modal-actions .primary-btn,
#library-upload-modal .modal-actions .ghost-btn {
  height: 42px;
  min-height: 42px;
  border-radius: 10px !important;
}

#multi-select-bar {
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: var(--vf-ui-radius-md) !important;
  background: var(--vf-ui-text) !important;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.28) !important;
}

.library-card.multi-selected .multi-check {
  border-color: var(--vf-ui-text) !important;
  background: var(--vf-ui-text) !important;
}

@media (prefers-reduced-motion: reduce) {
  .library-card,
  .library-kind-tabs > button,
  .library-search-pill,
  .filter-dropdown-wrap > .ghost-btn,
  .library-upload-pill {
    transition: none !important;
  }
}

/* Gemini Designer · homepage pixel convergence against Unified Demo v2. */
html body #app-shell.app-shell[data-route="home"] .home-command-title strong {
  color: #64748b !important;
  background: linear-gradient(90deg, #64748b 0%, #0f172a 72%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

html body #app-shell.app-shell[data-route="home"] .library-control-strip {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 24px !important;
  min-height: 76px !important;
  margin: 0 !important;
  padding: 16px 0 18px !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.82) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-kind-tabs {
  gap: 28px !important;
}

html body #app-shell.app-shell[data-route="home"] .library-kind-tabs > button {
  min-height: 40px !important;
  padding: 0 0 10px !important;
  color: #94a3b8 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

html body #app-shell.app-shell[data-route="home"] .library-kind-tabs > button.active {
  color: #0f172a !important;
  font-weight: 650 !important;
}

html body #app-shell.app-shell[data-route="home"] .library-kind-tabs > button.active::after,
html body #app-shell.app-shell[data-route="home"] .kind-tab-indicator {
  height: 2px !important;
}

html body #app-shell.app-shell[data-route="home"] .library-control-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
}

html body #app-shell.app-shell[data-route="home"] .library-control-actions .search-wrap,
html body #app-shell.app-shell[data-route="home"] .library-control-actions .library-upload-area,
html body #app-shell.app-shell[data-route="home"] .library-control-actions .filter-dropdown-wrap {
  order: initial !important;
  flex: 0 0 auto !important;
}

html body #app-shell.app-shell[data-route="home"] .library-search-pill {
  width: 224px !important;
  height: 32px !important;
  min-height: 32px !important;
  margin: 0 !important;
  border-color: rgba(226, 232, 240, 0.92) !important;
  background: rgba(255, 255, 255, 0.88) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-upload-pill,
html body #app-shell.app-shell[data-route="home"] .filter-dropdown-wrap > .ghost-btn {
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 12px !important;
  border-color: rgba(226, 232, 240, 0.92) !important;
  border-radius: 8px !important;
  color: #64748b !important;
  background: rgba(255, 255, 255, 0.88) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  transform: none !important;
}

/* Homepage icon refinement: optical centering and font-independent model glyph. */
html body #app-shell.app-shell[data-route="home"] .sidebar-brand .brand-mark .brand-bolt-icon {
  width: 17px !important;
  height: 17px !important;
  overflow: visible !important;
  fill: #ffffff !important;
  stroke: none !important;
  transform: translate(0.5px, -0.5px) !important;
  transform-origin: center !important;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html body #app-shell.app-shell[data-route="home"] .sidebar-brand .brand-mark:hover .brand-bolt-icon {
  transform: translate(0.5px, -0.5px) scale(1.07) !important;
}

html body #app-shell.app-shell[data-route="home"] .home-model-spark {
  display: block !important;
  width: 14px !important;
  height: 14px !important;
  flex: 0 0 14px !important;
  overflow: visible !important;
  fill: #64748b !important;
  stroke: none !important;
  transform: translateY(-0.25px) !important;
  transition: fill 150ms ease, transform 180ms ease !important;
}

html body #app-shell.app-shell[data-route="home"] .home-model-trigger:hover .home-model-spark,
html body #app-shell.app-shell[data-route="home"] .home-model-trigger[aria-expanded="true"] .home-model-spark {
  fill: #0f172a !important;
  transform: translateY(-0.25px) scale(1.04) !important;
}

/* Demo v2 thin navigation — shared by every workspace route. */
html body #app-shell.app-shell {
  padding-left: 64px !important;
}

html body #app-shell.app-shell .sidebar {
  width: 64px !important;
  overflow: visible !important;
  border-right: 1px solid rgba(226, 232, 240, 0.75) !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: none !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

html body #app-shell.app-shell .sidebar-brand {
  display: grid !important;
  min-height: 64px !important;
  padding: 18px 0 8px !important;
  place-items: center !important;
}

html body #app-shell.app-shell .sidebar-brand > div:last-child { display: none !important; }

html body #app-shell.app-shell .sidebar-brand .brand-mark {
  display: grid !important;
  width: 36px !important;
  height: 36px !important;
  place-items: center !important;
  margin: 0 !important;
  border: 1px solid rgba(30, 41, 59, 0.88) !important;
  border-radius: 10px !important;
  background: #020617 !important;
  box-shadow: 0 4px 12px -3px rgba(15, 23, 42, 0.34), inset 0 1px 0 rgba(255,255,255,.07) !important;
}

html body #app-shell.app-shell .sidebar-brand .brand-mark::after { display: none !important; }

html body #app-shell.app-shell .sidebar-brand .brand-mark .brand-bolt-icon {
  width: 17px !important;
  height: 17px !important;
  fill: #fff !important;
  stroke: none !important;
  transform: translate(.5px, -.5px) !important;
}

html body #app-shell.app-shell .nav-list {
  display: flex !important;
  overflow: visible !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 20px 12px 8px !important;
}

html body #app-shell.app-shell .nav-item {
  position: relative !important;
  display: flex !important;
  width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  flex: 0 0 40px !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: #94a3b8 !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: color 150ms ease, background-color 150ms ease !important;
}

html body #app-shell.app-shell .nav-item .nav-label { display: none !important; }
html body #app-shell.app-shell .nav-item .nav-icon { color: inherit !important; }
html body #app-shell.app-shell .nav-item .nav-icon svg {
  width: 18px !important;
  height: 18px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
}

html body #app-shell.app-shell .nav-item:hover { color: #0f172a !important; background: #f8fafc !important; }
html body #app-shell.app-shell .nav-item.active { color: #0f172a !important; background: #f1f5f9 !important; }
html body #app-shell.app-shell .nav-item::before { display: none !important; }

html body #app-shell.app-shell .nav-item::after {
  position: absolute !important;
  z-index: 300 !important;
  top: 50% !important;
  left: calc(100% + 10px) !important;
  display: block !important;
  padding: 5px 8px !important;
  border-radius: 6px !important;
  color: #fff !important;
  background: rgba(15, 23, 42, .96) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  content: attr(aria-label) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translate(-4px, -50%) !important;
  transition: opacity 150ms ease, transform 150ms ease !important;
}

html body #app-shell.app-shell .nav-item:hover::after,
html body #app-shell.app-shell .nav-item:focus-visible::after {
  opacity: 1 !important;
  transform: translate(0, -50%) !important;
}

html body #app-shell.app-shell .sidebar-footer {
  display: flex !important;
  margin-top: auto !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding: 10px 12px 18px !important;
}

html body #app-shell.app-shell .sidebar-footer::before {
  width: 24px !important;
  height: 1px !important;
  margin: 0 auto !important;
  background: rgba(226, 232, 240, .8) !important;
  content: "" !important;
  order: 2 !important;
}

html body #app-shell.app-shell .sidebar-footer .ghost-btn {
  width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: #94a3b8 !important;
  background: transparent !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

html body #app-shell.app-shell #lang-toggle { order: 1 !important; }
html body #app-shell.app-shell #sign-out-btn { order: 3 !important; font-size: 0 !important; }
html body #app-shell.app-shell #sign-out-btn::after { color: currentColor; font-size: 16px; content: "↗"; }
html body #app-shell.app-shell #sign-out-btn:hover { color: #dc2626 !important; background: #fef2f2 !important; }

@media (max-width: 760px) {
  html body #app-shell.app-shell { padding-left: 0 !important; }
}

html body #app-shell.app-shell[data-route="home"] .library-grid {
  display: grid !important;
  columns: auto !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card {
  display: flex !important;
  overflow: hidden !important;
  flex-direction: column !important;
  margin: 0 !important;
  border: 1px solid #f1f5f9 !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

html body #app-shell.app-shell[data-route="home"] .library-thumb-wrap,
html body #app-shell.app-shell[data-route="home"] .library-thumb {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 3 / 4 !important;
  border-radius: 11px 11px 0 0 !important;
}

html body #app-shell.app-shell[data-route="home"] .library-thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card-overlay {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  justify-content: flex-end !important;
  padding: 14px 12px 12px !important;
  color: #ffffff !important;
  background: linear-gradient(180deg, transparent 44%, rgba(0, 0, 0, 0.72) 100%) !important;
  opacity: 1 !important;
  pointer-events: none !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card-overlay h4 {
  color: #ffffff !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  font-weight: 560 !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card-overlay p {
  display: block !important;
  margin-top: 5px !important;
  color: rgba(255, 255, 255, 0.82) !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card-actions,
html body #app-shell.app-shell[data-route="home"] .library-card-icons .card-download-btn {
  display: none !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card-icons {
  top: 8px !important;
  right: 8px !important;
  opacity: 1 !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card-icons .favorite-btn {
  display: grid !important;
  width: 28px !important;
  height: 28px !important;
  place-items: center !important;
  border: 1px solid rgba(255, 255, 255, 0.64) !important;
  border-radius: 50% !important;
  color: #334155 !important;
  background: rgba(255, 255, 255, 0.88) !important;
  opacity: 1 !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-home-card-meta {
  display: flex !important;
  min-height: 40px !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 9px 12px !important;
  border-top: 1px solid #f8fafc !important;
  background: #ffffff !important;
}

html body #app-shell.app-shell[data-route="home"] .library-home-card-meta strong {
  display: none !important;
}

html body #app-shell.app-shell[data-route="home"] .library-home-card-meta span {
  margin: 0 !important;
  color: #94a3b8 !important;
  font-size: 10px !important;
}

html body #app-shell.app-shell[data-route="home"] .library-home-card-meta button {
  color: #475569 !important;
}

@media (max-width: 980px) {
  html body #app-shell.app-shell[data-route="home"] .library-control-strip {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  html body #app-shell.app-shell[data-route="home"] .library-control-actions {
    justify-content: flex-start !important;
  }

  html body #app-shell.app-shell[data-route="home"] .library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  html body #app-shell.app-shell[data-route="home"] .library-control-actions {
    width: 100% !important;
  }

  html body #app-shell.app-shell[data-route="home"] .library-control-actions .search-wrap {
    display: none !important;
  }

  html body #app-shell.app-shell[data-route="home"] .library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}

@media (max-width: 520px) {
  html body #app-shell.app-shell[data-route="home"] .library-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Authoritative home contract: gccdesign-unified-demo-v2.html#home. */
html body #app-shell.app-shell[data-route="home"] { padding-left: 64px !important; }

html body #app-shell.app-shell[data-route="home"] .sidebar {
  width: 64px !important;
  overflow: visible !important;
  border-right: 1px solid rgba(226, 232, 240, 0.75) !important;
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

html body #app-shell.app-shell[data-route="home"] .sidebar-brand {
  min-height: 64px !important;
  padding: 20px 0 7px !important;
}

html body #app-shell.app-shell[data-route="home"] .sidebar-brand .brand-mark {
  display: grid !important;
  width: 36px !important;
  height: 36px !important;
  place-items: center !important;
  margin: 0 !important;
  border-radius: 10px !important;
  background: #020617 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08) !important;
}

html body #app-shell.app-shell[data-route="home"] .sidebar-brand .brand-mark::after { display: none !important; }

html body #app-shell.app-shell[data-route="home"] .sidebar-brand .brand-mark svg {
  width: 18px !important;
  height: 18px !important;
  fill: none !important;
  stroke: #ffffff !important;
  stroke-width: 2.5 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html body #app-shell.app-shell[data-route="home"] .nav-list {
  display: flex !important;
  overflow: visible !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 21px 12px 8px !important;
}

html body #app-shell.app-shell[data-route="home"] .nav-item {
  position: relative !important;
  display: flex !important;
  width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  flex: 0 0 40px !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: #94a3b8 !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: color 150ms ease, background-color 150ms ease !important;
}

html body #app-shell.app-shell[data-route="home"] .nav-item:hover {
  color: #0f172a !important;
  background: #f8fafc !important;
}

html body #app-shell.app-shell[data-route="home"] .nav-item.active {
  color: #0f172a !important;
  background: #f1f5f9 !important;
}

html body #app-shell.app-shell[data-route="home"] .nav-item::before { display: none !important; }

html body #app-shell.app-shell[data-route="home"] .nav-item::after {
  position: absolute !important;
  z-index: 170 !important;
  top: 50% !important;
  left: calc(100% + 10px) !important;
  display: block !important;
  padding: 5px 8px !important;
  border-radius: 6px !important;
  color: #ffffff !important;
  background: rgba(15, 23, 42, 0.96) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  content: attr(aria-label) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translate(-4px, -50%) !important;
  transition: opacity 150ms ease, transform 150ms ease !important;
}

html body #app-shell.app-shell[data-route="home"] .nav-item:hover::after,
html body #app-shell.app-shell[data-route="home"] .nav-item:focus-visible::after {
  opacity: 1 !important;
  transform: translate(0, -50%) !important;
}

html body #app-shell.app-shell[data-route="home"] .nav-icon {
  display: grid !important;
  width: 18px !important;
  height: 18px !important;
  place-items: center !important;
  border-radius: 0 !important;
  color: inherit !important;
  background: transparent !important;
}

html body #app-shell.app-shell[data-route="home"] .nav-icon svg {
  width: 18px !important;
  height: 18px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html body #app-shell.app-shell[data-route="home"] .sidebar-footer {
  gap: 8px !important;
  padding: 10px 12px 20px !important;
}

html body #app-shell.app-shell[data-route="home"] .sidebar-footer::before {
  width: 24px;
  height: 1px;
  margin: 0 auto;
  background: rgba(226, 232, 240, 0.8);
  content: "";
  order: 2;
}

html body #app-shell.app-shell[data-route="home"] .sidebar-footer .ghost-btn {
  width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: #94a3b8 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body #app-shell.app-shell[data-route="home"] #lang-toggle { order: 1; }
html body #app-shell.app-shell[data-route="home"] #sign-out-btn { order: 3; }

/* Restore the demo's second-level taxonomy beneath the primary tabs. */
html body #app-shell.app-shell[data-route="home"] .library-tag-rows {
  display: flex !important;
  grid-column: 1 / -1 !important;
  min-width: 0 !important;
  flex-direction: column !important;
  gap: 6px !important;
  padding: 1px 0 0 !important;
  overflow: visible !important;
}

html body #app-shell.app-shell[data-route="home"] .library-tag-row,
html body #app-shell.app-shell[data-route="home"] .library-tag-row > div {
  display: flex !important;
  min-width: 0 !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
}

html body #app-shell.app-shell[data-route="home"] .library-tag-row button {
  display: inline-flex !important;
  height: 28px !important;
  min-height: 28px !important;
  align-items: center !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: #64748b !important;
  background: rgba(241, 245, 249, 0.8) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  transition: color 150ms ease, background-color 150ms ease !important;
}

html body #app-shell.app-shell[data-route="home"] .library-tag-row button:hover {
  color: #1e293b !important;
  background: #f1f5f9 !important;
}

html body #app-shell.app-shell[data-route="home"] .library-tag-row button.active {
  color: #ffffff !important;
  background: #0f172a !important;
}

html body #app-shell.app-shell[data-route="home"] .library-tag-row button small {
  margin-left: 6px !important;
  color: inherit !important;
  font-size: 11px !important;
  font-weight: inherit !important;
  opacity: 0.7 !important;
}

/* Demo primary indicator: short 20px pill, not a full-width underline. */
html body #app-shell.app-shell[data-route="home"] .library-kind-tabs > button.active::after { display: none !important; }

html body #app-shell.app-shell[data-route="home"] .kind-tab-indicator {
  display: block !important;
  width: 20px !important;
  height: 2px !important;
  border-radius: 999px !important;
  transition: left 200ms cubic-bezier(.22, .8, .24, 1) !important;
}

@media (max-width: 760px) {
  html body #app-shell.app-shell[data-route="home"] { padding-left: 0 !important; }
}

/* Demo fidelity pass: natural-ratio masonry, compact taxonomy, upload surface. */
html body #app-shell.app-shell[data-route="home"] .library-control-strip {
  min-height: 0 !important;
  row-gap: 8px !important;
  padding: 8px 0 10px !important;
}

html body #app-shell.app-shell[data-route="home"] .library-kind-tabs,
html body #app-shell.app-shell[data-route="home"] .library-kind-tabs > button {
  height: 36px !important;
  min-height: 36px !important;
}

html body #app-shell.app-shell[data-route="home"] .library-kind-tabs > button {
  padding-bottom: 7px !important;
  font-size: 15px !important;
}

html body #app-shell.app-shell[data-route="home"] .library-tag-rows {
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
}

html body #app-shell.app-shell[data-route="home"] .library-tag-row,
html body #app-shell.app-shell[data-route="home"] .library-tag-row > div {
  min-height: 28px !important;
  gap: 6px !important;
}

html body #app-shell.app-shell[data-route="home"] .library-tag-row button {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 10px !important;
  font-size: 11px !important;
}

html body #app-shell.app-shell[data-route="home"] .library-board {
  margin-top: 16px !important;
}

html body #app-shell.app-shell[data-route="home"] .library-grid {
  display: block !important;
  columns: 4 !important;
  column-gap: 16px !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card {
  display: inline-flex !important;
  width: 100% !important;
  margin: 0 0 16px !important;
  break-inside: avoid !important;
  page-break-inside: avoid !important;
  vertical-align: top !important;
}

html body #app-shell.app-shell[data-route="home"] .library-thumb-wrap {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
}

html body #app-shell.app-shell[data-route="home"] .library-thumb {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: var(--preview-ratio, 3 / 4) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-thumb img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

@media (max-width: 980px) {
  html body #app-shell.app-shell[data-route="home"] .library-grid { columns: 3 !important; }
}

@media (max-width: 760px) {
  html body #app-shell.app-shell[data-route="home"] .library-grid { columns: 2 !important; column-gap: 12px !important; }
  html body #app-shell.app-shell[data-route="home"] .library-card { margin-bottom: 12px !important; }
}

@media (max-width: 520px) {
  html body #app-shell.app-shell[data-route="home"] .library-grid { columns: 1 !important; }
}

#library-upload-modal {
  z-index: 200 !important;
  display: grid;
  align-items: center !important;
  justify-items: center !important;
  padding: 16px !important;
  background: rgba(15, 23, 42, 0.25) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

#library-upload-modal[hidden] { display: none !important; }

#library-upload-modal .library-modal {
  display: flex !important;
  width: min(620px, calc(100vw - 32px)) !important;
  max-height: calc(100dvh - 32px) !important;
  flex-direction: column !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 20px 48px -16px rgba(15, 23, 42, 0.28) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

#library-upload-modal .modal-head {
  display: flex !important;
  min-height: 52px !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin: 0 !important;
  padding: 14px 18px 10px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  background: transparent !important;
}

#library-upload-modal .modal-head h3 {
  margin: 0 !important;
  color: #0f172a !important;
  font-size: 14px !important;
  font-weight: 650 !important;
}

#library-upload-modal .modal-head .icon-btn {
  display: grid !important;
  width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  place-items: center !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: #94a3b8 !important;
  background: transparent !important;
}

#library-upload-modal .modal-head .icon-btn:hover { color: #334155 !important; background: #f1f5f9 !important; }
#library-upload-modal .modal-head .icon-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }

#library-upload-modal .library-upload-scroll {
  gap: 12px !important;
  padding: 14px 18px !important;
}

#library-upload-modal .library-upload-section,
#library-upload-modal .library-form label,
#library-upload-modal .upload-tag-picker {
  gap: 5px !important;
}

#library-upload-modal .library-upload-section > span,
#library-upload-modal .library-form label > span,
#library-upload-modal .upload-tag-picker > span {
  margin: 0 !important;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 550 !important;
  line-height: 1.25 !important;
}

#library-upload-modal .library-kind-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

#library-upload-modal .library-kind-card {
  min-height: 42px !important;
  height: 42px !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: 10px !important;
  color: #64748b !important;
  background: rgba(241, 245, 249, 0.8) !important;
  box-shadow: none !important;
}

#library-upload-modal .library-kind-card:hover { background: #f1f5f9 !important; }

#library-upload-modal .library-kind-card.active {
  color: #ffffff !important;
  background: #0f172a !important;
}

#library-upload-modal .library-kind-card strong { font-size: 12px !important; font-weight: 650 !important; }

#library-upload-modal .library-upload-tags,
#library-upload-modal .library-form-grid.two {
  gap: 12px !important;
}

#library-upload-modal .library-form input,
#library-upload-modal .library-form select,
#library-upload-modal .upload-tag-trigger {
  min-height: 36px !important;
  height: 36px !important;
  padding: 0 11px !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  border-radius: 8px !important;
  color: #334155 !important;
  background: #ffffff !important;
  font-size: 12px !important;
  box-shadow: none !important;
}

#library-upload-modal .upload-tag-trigger strong { font-size: 12px !important; font-weight: 550 !important; }

#library-upload-modal .upload-tag-menu {
  z-index: 220 !important;
  padding: 6px !important;
  border-radius: 12px !important;
}

#library-upload-modal .library-drop-zone {
  min-height: 108px !important;
  padding: 14px !important;
  border: 1px dashed #cbd5e1 !important;
  border-radius: 12px !important;
  background: rgba(248, 250, 252, 0.65) !important;
  box-shadow: none !important;
}

#library-upload-modal .library-drop-zone:hover { border-color: #94a3b8 !important; background: #f8fafc !important; }
#library-upload-modal .library-drop-zone span { color: #334155 !important; font-size: 12px !important; font-weight: 600 !important; }
#library-upload-modal .library-drop-zone strong { color: #94a3b8 !important; font-size: 11px !important; font-weight: 500 !important; }
#library-upload-modal .library-drop-zone small { color: #cbd5e1 !important; font-size: 10px !important; }

#library-upload-modal .library-upload-footer {
  display: flex !important;
  min-height: 60px !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 11px 18px 14px !important;
  border-top: 1px solid #f1f5f9 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: none !important;
}

#library-upload-modal .modal-actions { display: flex !important; width: auto !important; gap: 8px !important; }

#library-upload-modal .modal-actions .primary-btn,
#library-upload-modal .modal-actions .ghost-btn {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 16px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

#library-upload-modal .modal-actions .primary-btn { border-color: #0f172a !important; background: #0f172a !important; color: #ffffff !important; }
#library-upload-modal .modal-actions .ghost-btn { border-color: #e2e8f0 !important; background: #ffffff !important; color: #475569 !important; }

@media (max-width: 640px) {
  #library-upload-modal .library-modal { width: 100% !important; }
  #library-upload-modal .library-kind-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  #library-upload-modal .library-upload-tags,
  #library-upload-modal .library-form-grid.two { grid-template-columns: 1fr !important; }
}

/* Homepage polish: refined brand mark, optically centered chevrons and image-only cards. */
html body #app-shell.app-shell[data-route="home"] .sidebar-brand .brand-mark {
  width: 38px !important;
  height: 38px !important;
  border: 1px solid rgba(30, 41, 59, 0.9) !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, #111827 0%, #020617 100%) !important;
  box-shadow: 0 5px 14px -3px rgba(15, 23, 42, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  transition: transform 180ms ease, box-shadow 180ms ease !important;
}

html body #app-shell.app-shell[data-route="home"] .sidebar-brand .brand-mark:hover {
  transform: translateY(-1px) scale(1.025) !important;
  box-shadow: 0 7px 18px -4px rgba(15, 23, 42, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

html body #app-shell.app-shell[data-route="home"] .sidebar-brand .brand-mark svg {
  width: 20px !important;
  height: 20px !important;
  overflow: visible !important;
  fill: #ffffff !important;
  stroke: none !important;
  transform: rotate(-2deg) translateY(-0.25px) !important;
  transition: transform 180ms ease !important;
}

html body #app-shell.app-shell[data-route="home"] .sidebar-brand .brand-mark:hover svg {
  transform: rotate(0deg) translateY(-0.5px) !important;
}

html body #app-shell .home-menu-chevron {
  display: block !important;
  width: 14px !important;
  height: 14px !important;
  flex: 0 0 14px !important;
  margin: 0 -2px 0 0 !important;
  overflow: visible !important;
  stroke: #94a3b8 !important;
  stroke-width: 1.75 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  transform-origin: 7px 7px !important;
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html body #app-shell .home-control-button {
  align-items: center !important;
}

html body #app-shell button[aria-expanded="true"] .home-menu-chevron {
  transform: rotate(180deg) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card:not(.library-font-card) {
  position: relative !important;
  display: inline-block !important;
  overflow: hidden !important;
  border: 1px solid rgba(203, 213, 225, 0.84) !important;
  border-radius: 16px !important;
  background: #f1f5f9 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  transform: none !important;
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card:not(.library-font-card):hover,
html body #app-shell.app-shell[data-route="home"] .library-card:not(.library-font-card):focus-within {
  z-index: 2 !important;
  border-color: rgba(148, 163, 184, 0.8) !important;
  box-shadow: 0 14px 30px -16px rgba(15, 23, 42, 0.42) !important;
  transform: translateY(-2px) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card:not(.library-font-card) .library-thumb-wrap,
html body #app-shell.app-shell[data-route="home"] .library-card:not(.library-font-card) .library-thumb {
  overflow: hidden !important;
  border-radius: 15px !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card:not(.library-font-card) .library-thumb img {
  transform: scale(1.001) !important;
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card:not(.library-font-card):hover .library-thumb img,
html body #app-shell.app-shell[data-route="home"] .library-card:not(.library-font-card):focus-within .library-thumb img {
  transform: scale(1.012) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-home-card-meta,
html body #app-shell.app-shell[data-route="home"] .library-template-size-hover {
  display: none !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card:not(.library-font-card) .library-card-overlay {
  position: absolute !important;
  inset: auto 0 0 !important;
  z-index: 3 !important;
  display: flex !important;
  min-height: 82px !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 14px 16px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  background: rgba(15, 23, 42, 0.86) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(8px) !important;
  backdrop-filter: blur(14px) saturate(120%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(120%) !important;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card:not(.library-font-card):hover .library-card-overlay,
html body #app-shell.app-shell[data-route="home"] .library-card:not(.library-font-card):focus-within .library-card-overlay {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-hover-dimensions {
  display: flex !important;
  min-width: 0 !important;
  flex-direction: column !important;
  gap: 4px !important;
  color: #ffffff !important;
}

html body #app-shell.app-shell[data-route="home"] .library-hover-dimensions .library-template-size-ratio {
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 17px !important;
  letter-spacing: -0.02em !important;
}

html body #app-shell.app-shell[data-route="home"] .library-hover-dimensions .library-template-size-pixels {
  overflow: hidden !important;
  color: rgba(226, 232, 240, 0.9) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 14px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card:not(.library-font-card) .library-card-actions {
  display: none !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card:not(.library-font-card) .library-card-icons {
  position: absolute !important;
  top: auto !important;
  right: 14px !important;
  bottom: 17px !important;
  z-index: 5 !important;
  display: flex !important;
  gap: 8px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(8px) !important;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card:not(.library-font-card):hover .library-card-icons,
html body #app-shell.app-shell[data-route="home"] .library-card:not(.library-font-card):focus-within .library-card-icons {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card-icons .favorite-btn,
html body #app-shell.app-shell[data-route="home"] .library-card-icons .card-download-btn {
  display: grid !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  place-items: center !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 50% !important;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.09) !important;
  opacity: 1 !important;
  box-shadow: none !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card-icons button:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  transform: scale(1.04) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card-icons svg {
  width: 17px !important;
  height: 17px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card-icons .favorite-btn.active {
  color: #fbbf24 !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card-icons .favorite-btn.active svg {
  fill: currentColor !important;
}

/* Restore the original compact card-hover footer. */
html body #app-shell.app-shell[data-route="home"] .library-card:not(.library-font-card) .library-card-overlay {
  min-height: 58px !important;
  height: 58px !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 8px 78px 8px 14px !important;
  background: rgba(13, 35, 31, 0.9) !important;
  transform: translateY(4px) !important;
  backdrop-filter: blur(10px) saturate(105%) !important;
  -webkit-backdrop-filter: blur(10px) saturate(105%) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card:not(.library-font-card):hover .library-card-overlay,
html body #app-shell.app-shell[data-route="home"] .library-card:not(.library-font-card):focus-within .library-card-overlay {
  transform: translateY(0) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-hover-dimensions {
  width: 100% !important;
  align-items: flex-start !important;
  gap: 2px !important;
  text-align: left !important;
}

html body #app-shell.app-shell[data-route="home"] .library-hover-dimensions .library-template-size-ratio {
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 16px !important;
  letter-spacing: 0 !important;
  text-align: left !important;
}

html body #app-shell.app-shell[data-route="home"] .library-hover-dimensions .library-template-size-pixels {
  color: rgba(226, 232, 240, 0.84) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 14px !important;
  text-align: left !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card:not(.library-font-card) .library-card-icons {
  right: 12px !important;
  bottom: 14px !important;
  gap: 6px !important;
  transform: translateY(4px) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card:not(.library-font-card):hover .library-card-icons,
html body #app-shell.app-shell[data-route="home"] .library-card:not(.library-font-card):focus-within .library-card-icons {
  transform: translateY(0) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card-icons .favorite-btn,
html body #app-shell.app-shell[data-route="home"] .library-card-icons .card-download-btn {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  border-color: rgba(255, 255, 255, 0.38) !important;
  background: rgba(0, 0, 0, 0.16) !important;
}

html body #app-shell.app-shell[data-route="home"] .library-card-icons svg {
  width: 15px !important;
  height: 15px !important;
}

/* Homepage typography hierarchy: restrained five-level system. */
html body #app-shell.app-shell[data-route="home"] {
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: geometricPrecision !important;
}

html body #app-shell.app-shell[data-route="home"] .home-command-title,
html body #app-shell.app-shell[data-route="home"] .home-command-title span,
html body #app-shell.app-shell[data-route="home"] .home-command-title strong {
  font-size: 22px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.025em !important;
}

html body #app-shell.app-shell[data-route="home"] .home-command-title span {
  color: #0f172a !important;
}

html body #app-shell.app-shell[data-route="home"] .home-command-title strong {
  color: #334155 !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: currentColor !important;
}

html body #app-shell.app-shell[data-route="home"] .home-command-main textarea {
  color: #334155 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.6 !important;
  letter-spacing: -0.005em !important;
}

html body #app-shell.app-shell[data-route="home"] .home-command-main textarea::placeholder {
  color: #94a3b8 !important;
  font-weight: 400 !important;
  opacity: 1 !important;
}

html body #app-shell.app-shell[data-route="home"] .home-control-button,
html body #app-shell.app-shell[data-route="home"] .home-model-trigger strong,
html body #app-shell.app-shell[data-route="home"] .home-size-trigger strong {
  color: #334155 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 16px !important;
  letter-spacing: 0 !important;
}

html body #app-shell.app-shell[data-route="home"] .library-kind-tabs > button {
  color: #64748b !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 18px !important;
  letter-spacing: -0.01em !important;
}

html body #app-shell.app-shell[data-route="home"] .library-kind-tabs > button.active {
  color: #0f172a !important;
  font-weight: 600 !important;
}

html body #app-shell.app-shell[data-route="home"] .library-kind-tabs > button small {
  margin-left: 3px !important;
  color: #94a3b8 !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  font-variant-numeric: tabular-nums !important;
  letter-spacing: 0 !important;
}

html body #app-shell.app-shell[data-route="home"] .library-kind-tabs > button.active small {
  color: #64748b !important;
}

html body #app-shell.app-shell[data-route="home"] .library-tag-row button {
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 16px !important;
  letter-spacing: 0 !important;
}

html body #app-shell.app-shell[data-route="home"] .library-tag-row button.active {
  color: #ffffff !important;
  font-weight: 500 !important;
}

html body #app-shell.app-shell[data-route="home"] .library-tag-row button small {
  margin-left: 4px !important;
  font-size: 10px !important;
  font-weight: 400 !important;
  font-variant-numeric: tabular-nums !important;
  opacity: 0.62 !important;
}

html body #app-shell.app-shell[data-route="home"] #library-filter-panel .filter-section {
  margin-bottom: 14px !important;
}

html body #app-shell.app-shell[data-route="home"] #library-filter-panel .filter-section h4 {
  margin-bottom: 7px !important;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 15px !important;
  letter-spacing: 0.015em !important;
}

html body #app-shell.app-shell[data-route="home"] #library-filter-panel .filter-capsules {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}

html body #app-shell.app-shell[data-route="home"] #library-filter-panel .filter-capsule {
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 10px !important;
  border-color: transparent !important;
  border-radius: 7px !important;
  color: #475569 !important;
  background: rgba(241, 245, 249, 0.72) !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  line-height: 14px !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
}

html body #app-shell.app-shell[data-route="home"] #library-filter-panel .filter-capsule:hover {
  color: #1e293b !important;
  background: #e9eef4 !important;
}

html body #app-shell.app-shell[data-route="home"] #library-filter-panel .filter-capsule.active {
  border-color: #0f172a !important;
  color: #ffffff !important;
  background: #0f172a !important;
  font-weight: 500 !important;
}

html body #app-shell.app-shell[data-route="home"] .library-upload-pill,
html body #app-shell.app-shell[data-route="home"] .filter-dropdown-wrap > .ghost-btn {
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}
