.client-app {
  width: min(1540px, 100%);
  margin: 0 auto;
  padding: 0 24px 120px;
}

.client-header {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  background: linear-gradient(var(--bg) 72%, transparent);
}

.client-head-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.header-action,
.notification-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
  font-weight: 800;
}

.header-action {
  padding: 0 16px;
}

.notification-button {
  position: relative;
  width: 42px;
}

.notification-button i {
  position: absolute;
  top: -4px;
  right: -4px;
  display: none;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--red);
  font-size: 10px;
  font-style: normal;
}

.activity-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 52px;
  margin-top: 14px;
  padding: 10px 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.activity-label {
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}

.activity-items {
  display: flex;
  gap: 22px;
  overflow: hidden;
  white-space: nowrap;
}

.activity-items span {
  color: var(--muted);
  font-size: 13px;
}

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

.client-brand strong,
.client-brand small {
  display: block;
}

.client-brand strong {
  font-size: 17px;
}

.client-brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.avatar {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
  font-weight: 800;
}

.page {
  display: none;
}

.page.active {
  display: block;
  animation: page-in 260ms ease both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
}

.hero-copy {
  padding: 56px 0 36px;
}

.hero-copy h1,
.subpage-head h1 {
  margin: 0;
  font-size: clamp(46px, 8.6vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.075em;
}

.hero-copy > p:last-child,
.subpage-head > p:last-child {
  max-width: 580px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.search-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 40px rgba(44, 42, 34, 0.05);
}

.search-wrap > span {
  font-size: 27px;
  transform: rotate(-15deg);
}

.search-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
}

.search-wrap button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  font-size: 22px;
}

.category-strip {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 18px 0 6px;
  scrollbar-width: none;
}

.category-strip::-webkit-scrollbar {
  display: none;
}

.category-strip .chip {
  min-height: 38px;
  padding: 0 15px;
  border: 0;
  background: rgba(255, 255, 255, 0.68);
}

.category-strip .chip.active {
  background: var(--ink);
}

.category-strip .category-add-chip {
  border-style: dashed;
  color: var(--jade);
  background: #eef8f4;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 46px 0 18px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: -0.055em;
}

.count-label {
  color: var(--muted);
  font-size: 13px;
}

.sample-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 34px 18px;
}

.sample-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: transparent;
  transition: transform 180ms ease;
}

.sample-card:hover {
  transform: translateY(-3px);
}

.sample-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: #18201f;
  box-shadow: 0 12px 32px rgba(35, 33, 27, 0.1);
}

.sample-cover-open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.sample-cover-open::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 55%, rgba(9, 15, 14, 0.48));
  transition: background 180ms ease;
}

.sample-cover-open:hover::after,
.sample-cover-open:focus-visible::after {
  background: linear-gradient(180deg, rgba(9, 15, 14, 0.08), rgba(9, 15, 14, 0.62));
}

.cover-image,
.generated-cover {
  width: 100%;
  height: 100%;
}

.cover-image {
  display: block;
  object-fit: cover;
}

.generated-cover {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: clamp(22px, 4vw, 40px);
  color: white;
  isolation: isolate;
}

.generated-cover::before,
.generated-cover::after {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  content: "";
}

.generated-cover::before {
  width: 62%;
  aspect-ratio: 1;
  top: -22%;
  right: -10%;
  border: 1px solid rgba(255, 255, 255, 0.36);
  box-shadow: 0 0 0 28px rgba(255, 255, 255, 0.06), 0 0 0 70px rgba(255, 255, 255, 0.04);
}

.generated-cover::after {
  width: 42%;
  aspect-ratio: 1;
  left: -10%;
  bottom: -24%;
  background: rgba(255, 255, 255, 0.11);
  filter: blur(1px);
}

.accent-ink { background: linear-gradient(135deg, #121b1a, #36514c); }
.accent-ember { background: linear-gradient(135deg, #411c16, #d25935 66%, #e6a14c); }
.accent-jade { background: linear-gradient(135deg, #063b34, #0d967c 70%, #70b88e); }
.accent-violet { background: linear-gradient(135deg, #251d43, #7253a3 70%, #bc7f9e); }

.cover-kicker {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.generated-cover strong {
  max-width: 85%;
  font-size: clamp(25px, 4vw, 42px);
  line-height: 1.03;
  letter-spacing: -0.06em;
}

.cover-line {
  width: 44px;
  height: 3px;
  margin: 18px 0 8px;
  border-radius: 3px;
  background: var(--red);
}

.generated-cover small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.sample-play {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 50%;
  color: white;
  background: rgba(16, 28, 25, 0.52);
  backdrop-filter: blur(10px);
  font-size: 14px;
  transform: translate(-50%, -50%);
  transition: transform 180ms ease, background 180ms ease;
}

.sample-cover-open:hover .sample-play,
.sample-cover-open:focus-visible .sample-play {
  background: var(--red);
  transform: translate(-50%, -50%) scale(1.08);
}

.sample-cover-hint {
  position: absolute;
  z-index: 1;
  right: 14px;
  bottom: 12px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.sample-cover-open:hover .sample-cover-hint,
.sample-cover-open:focus-visible .sample-cover-hint {
  opacity: 1;
  transform: translateY(0);
}

.sample-category {
  position: absolute;
  z-index: 2;
  left: 12px;
  top: 12px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  color: white;
  background: rgba(10, 18, 16, 0.42);
  backdrop-filter: blur(8px);
  font-size: 10px;
  font-weight: 800;
}

.sample-likes {
  position: absolute;
  z-index: 2;
  left: 13px;
  bottom: 11px;
  color: white;
  font-size: 12px;
  font-weight: 900;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

.favorite-btn {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  color: white;
  background: rgba(15, 24, 22, 0.36);
  backdrop-filter: blur(8px);
  font-size: 18px;
}

.favorite-btn.saved {
  color: white;
  background: var(--red);
}

.sample-card-body {
  padding: 13px 2px 0;
}

.sample-title {
  display: -webkit-box;
  width: 100%;
  min-height: 47px;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
  text-align: left;
  letter-spacing: -0.025em;
  cursor: pointer;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sample-title:hover {
  color: var(--red);
}

.sample-meta {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.sample-card-tags {
  display: flex;
  gap: 6px;
  overflow: hidden;
  min-height: 18px;
  margin-top: 9px;
  color: color-mix(in srgb, var(--muted) 80%, var(--ink));
  font-size: 11px;
  white-space: nowrap;
}

.sample-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.sample-actions .btn {
  min-height: 38px;
  padding: 0 14px;
  font-size: 12px;
}

.sample-official-link {
  padding: 6px 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.sample-official-link:hover {
  color: var(--ink);
}

@media (max-width: 1280px) {
  .sample-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .sample-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.bottom-nav {
  position: fixed;
  z-index: 200;
  bottom: 16px;
  left: 50%;
  display: grid;
  width: min(480px, calc(100% - 28px));
  grid-template-columns: repeat(5, 1fr);
  padding: 8px 10px calc(8px + var(--safe-bottom));
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 24px;
  background: rgba(22, 32, 31, 0.92);
  box-shadow: 0 20px 55px rgba(14, 24, 22, 0.28);
  backdrop-filter: blur(20px);
  transform: translateX(-50%);
}

.rights-card {
  margin-bottom: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .72);
}

.compact-head {
  margin: 0 0 18px;
}

.compact-head h2 {
  font-size: 26px;
}

.rights-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.right-token {
  display: inline-grid;
  min-width: 74px;
  min-height: 58px;
  place-items: center;
  gap: 2px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  background: #f2f0e9;
}

.right-token strong {
  font-size: 17px;
}

.right-token small {
  color: var(--muted);
  font-size: 10px;
}

.right-token.active {
  color: white;
  border-color: var(--ink);
  background: var(--ink);
}

.right-token.active small {
  color: rgba(255,255,255,.62);
}

.right-token.pending {
  border-color: #d8af70;
  background: #fff5df;
}

.rights-history {
  display: grid;
}

.rights-history-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  min-height: 52px;
  border-top: 1px solid var(--line);
}

.rights-history-row:first-child {
  border-top: 0;
}

.rights-history-row small {
  color: var(--muted);
}

.compact-empty {
  min-height: 80px;
}

.notification-modal {
  width: min(620px, calc(100% - 28px));
}

.notification-list {
  display: grid;
  max-height: min(62vh, 620px);
  overflow-y: auto;
}

.notification-item {
  padding: 16px 2px;
  border-top: 1px solid var(--line);
}

.notification-item:first-child {
  border-top: 0;
}

.notification-item > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.notification-item small,
.notification-item p {
  color: var(--muted);
}

.notification-item p {
  margin: 7px 0 0;
}

.notification-item.unread strong::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--red);
  content: "";
}

.field > small {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 680px) {
  .header-action {
    width: 42px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }

  .header-action::before {
    content: "＋";
    font-size: 20px;
  }

  .activity-items span:not(:first-child) {
    display: none;
  }

  .rights-history-row {
    grid-template-columns: 1fr auto;
  }

  .rights-history-row small {
    grid-column: 1 / -1;
    margin-top: -9px;
  }
}

.bottom-nav button {
  position: relative;
  display: grid;
  min-height: 50px;
  place-items: center;
  gap: 2px;
  border: 0;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.48);
  background: transparent;
}

.bottom-nav button.active {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.bottom-nav span {
  font-size: 20px;
  line-height: 1;
}

.bottom-nav small {
  font-size: 10px;
  font-weight: 700;
}

.bottom-nav i {
  position: absolute;
  top: 7px;
  right: calc(50% - 18px);
  display: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
}

.subpage-head {
  padding: 72px 0 38px;
}

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

.client-request-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: -18px 0 18px;
}

.client-history-toggle {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  padding: 0 15px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--ink);
  font-weight: 800;
}

.client-history-toggle span {
  display: inline-grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  font-size: 11px;
}

.client-history-toggle.active {
  background: var(--jade);
}

.client-request-card {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.client-request-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #d9ddd8;
}

.client-request-cover .cover-image,
.client-request-cover .generated-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.client-request-content { padding: 18px; }

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

.client-request-card h3 {
  margin: 18px 0 5px;
  font-size: 20px;
}

.client-request-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.customer-update {
  padding: 13px 15px;
  border-radius: 13px;
  color: #2f4b46;
  background: #eaf5f1;
  line-height: 1.55;
}

.account-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 80px 0 30px;
}

.account-avatar {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 24px;
  color: white;
  background: var(--ink);
  font-size: 30px;
  font-weight: 900;
}

.account-card strong {
  font-size: 26px;
}

.account-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.account-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.account-panel > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 19px 20px;
  border-bottom: 1px solid var(--line);
}

.account-panel > div:last-child {
  border-bottom: 0;
}

.account-panel span {
  color: var(--muted);
}

.account-switch {
  width: 100%;
  margin-top: 16px;
}

.native-app .account-switch {
  display: none;
}

.detail-shell {
  position: fixed;
  z-index: 600;
  inset: 0;
  display: none;
  overflow: auto;
  padding: 24px;
  background: rgba(9, 18, 16, 0.5);
  backdrop-filter: blur(12px);
}

.detail-shell.open {
  display: block;
}

.detail-panel {
  position: relative;
  width: min(920px, 100%);
  min-height: 600px;
  margin: 3vh auto;
  overflow: hidden;
  border-radius: 32px;
  background: var(--surface-solid);
  box-shadow: 0 35px 100px rgba(7, 16, 14, 0.34);
}

.detail-close {
  position: absolute;
  z-index: 4;
  top: 18px;
  right: 18px;
  border-color: rgba(255, 255, 255, 0.4);
  color: white;
  background: rgba(14, 25, 22, 0.45);
}

.detail-cover {
  aspect-ratio: 16 / 8.6;
  background: var(--ink);
}

.detail-cover .generated-cover {
  padding: clamp(30px, 6vw, 68px);
}

.detail-body {
  padding: 30px;
}

.detail-body h2 {
  margin: 8px 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.06em;
}

.detail-description {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.detail-stats {
  display: flex;
  gap: 26px;
  margin: 28px 0;
}

.detail-stats div {
  display: grid;
  gap: 3px;
}

.detail-stats strong {
  font-size: 22px;
}

.detail-stats span {
  color: var(--muted);
  font-size: 12px;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 12px;
}

.selected-sample {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding: 12px;
  border-radius: 16px;
  background: #f0eee7;
}

.selected-sample .mini-cover {
  width: 70px;
  height: 54px;
  overflow: hidden;
  border-radius: 11px;
}

.selected-sample .generated-cover {
  padding: 10px;
}

.selected-sample .generated-cover strong {
  font-size: 12px;
}

.selected-sample strong,
.selected-sample small {
  display: block;
}

.selected-sample small {
  margin-top: 4px;
  color: var(--muted);
}

.success-card {
  display: grid;
  min-height: 460px;
  place-content: center;
  justify-items: center;
  padding: 44px;
  text-align: center;
}

.success-icon {
  display: grid;
  width: 72px;
  height: 72px;
  margin-bottom: 25px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--jade);
  font-size: 30px;
}

.success-card h2 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.05em;
}

.success-card p:not(.eyebrow) {
  max-width: 430px;
  margin: 15px auto 28px;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 720px) {
  .request-list { grid-template-columns: 1fr; }
  .client-app {
    padding: 0 16px 116px;
  }

  .hero-copy {
    padding-top: 40px;
  }

  .sample-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .sample-cover {
    aspect-ratio: 16 / 10.5;
  }

  .detail-shell {
    padding: 0;
  }

  .detail-panel {
    min-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .detail-cover {
    aspect-ratio: 4 / 3;
  }

  .detail-body {
    padding: 24px 18px calc(30px + var(--safe-bottom));
  }
}

@media (max-width: 420px) {
  .sample-actions,
  .detail-actions {
    grid-template-columns: 1fr;
  }

  .sample-actions .btn:first-child {
    order: 2;
  }
}
