/*
 * CYORI UI SYSTEM • July black/gold edition.
 * This is the LAST stylesheet loaded by each page.
 * Isolated body scopes prevent payment, bot dashboard and marketing styles
 * from affecting each other. Keep components semantic and geometry-only here;
 * do not revive the abandoned Figma color theme.
 */

/* ---------- Shared content rails, rhythm & legibility ---------- */
body.cy-site {
  --cy-page-max: var(--cy-content-max);
  color: var(--cy-text);
  background-color: var(--cy-canvas);
  font-family: var(--cy-font-ui);
  font-size: var(--cy-text-md);
  line-height: 1.6;
  font-synthesis: none;
}
body.cy-site :is(main, article, section, aside, nav, .container, .glass-panel,
  .glass-card, .feature-card, .pricing-card, .p-card, .server-card) { min-width: 0; }
body.cy-site :is(h1, h2, h3, h4, p, li, a, button, label) { overflow-wrap: break-word; }
body.cy-site :is(h1, h2, h3, h4) { text-wrap: balance; }
body.cy-site :is(p, li) { text-wrap: pretty; }
body.cy-site :is(h1, h2, h3, h4, p) { max-inline-size: 100%; }
body.cy-site :is(input, textarea, select) { max-width: 100%; min-width: 0; color-scheme: dark; }
body.cy-site :is(input, textarea, select, button) { font: inherit; }
body.cy-site :is(input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea) {
  border-radius: var(--cy-radius-sm);
  font-size: max(.875rem, 14px);
}
body.cy-site :is(.btn, .btn-action, .ctrl-tag, .pill, .legacy-gold-btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--cy-control-height);
  max-width: 100%;
  line-height: 1.3;
  text-align: center;
  transition: background-color .2s var(--cy-ease-standard),border-color .2s var(--cy-ease-standard), color .2s var(--cy-ease-standard), box-shadow .2s var(--cy-ease-standard);
}
body.cy-site :is(a, button, [role=button], summary, input, select, textarea):focus-visible {
  outline: 2px solid var(--cy-gold-bright);
  outline-offset: 3px;
}
body.cy-site :is(button, [role=button]):disabled { cursor: not-allowed; opacity: .55; }
body.cy-site a:not([class]):hover { color: var(--cy-gold-bright); }
body.cy-site :is(pre, code) { overflow-wrap: anywhere; }
body.cy-site pre { max-width: 100%; overflow-x: auto; }
body.cy-site img { height: auto; }
body.cy-site :is(.glass-panel, .glass-card, .feature-card, .pricing-card, .p-card, .server-card) {
  border-radius: var(--cy-panel-radius);
}
body.cy-site :is(.grid-2, .grid-3, .p-grid, .server-grid-modern, .cmd-grid) { gap: var(--cy-stack-gap); }
body.cy-site :is(.section-header, .page-header) { max-width: 100%; }
body.cy-site .section-title { font-size: var(--cy-h2); line-height: 1.2; }
body.cy-site :is(.section-subtitle, .hero-desc) { line-height: 1.7; }
body.cy-site :is(.stat-number, .stat-value, .pricing-value, .price) { font-variant-numeric: tabular-nums; }

/* Keyboard skip link: out of sight until actually focused. */
body.cy-site .cy-skip-link {
  position: fixed;
  left: var(--cy-gutter);
  top: -100px;
  z-index: 2001;
  background: var(--cy-gold);
  color: #13100b;
  padding: 12px 18px;
  border-radius: var(--cy-radius-sm);
  text-decoration: none;
  font-weight: 700;
  box-shadow: var(--cy-shadow-panel);
}
body.cy-site .cy-skip-link:focus { top: 12px; }
body.cy-site #main-content { scroll-margin-top: var(--cy-header-clearance); }

/* ---------- Global navigation / footer ---------- */
body.cy-site header#header.cy-public-header .container {
  width: 100%;
  max-width: calc(var(--cy-content-max) + 2 * var(--cy-gutter));
}
body.cy-site header#header.cy-public-header .nav-links { min-width: 0; }
body.cy-site header#header.cy-public-header .brand-name { letter-spacing: -.025em; }
body.cy-site header#header.cy-public-header .nav-more-link { min-height: var(--cy-control-height); display: flex; align-items: center; }
body.cy-site .cy-site-footer { margin-top: clamp(60px, 8vw, 112px); }
body.cy-site .cy-site-footer .container { max-width: calc(var(--cy-content-max) + 2 * var(--cy-gutter)); }
body.cy-site .cy-site-footer .footer-content {
  grid-template-columns: minmax(220px, 1.7fr) repeat(3, minmax(130px, 1fr));
  gap: clamp(24px, 3.5vw, 52px);
  margin-bottom: clamp(30px, 4vw, 52px);
}
body.cy-site .cy-site-footer .footer-col h4 { font-size: var(--cy-text-md); margin-bottom: 16px; }
body.cy-site .cy-site-footer .footer-col a { display: inline-flex; align-items: center; min-height: 30px; font-size: .9rem; line-height: 1.5; }
body.cy-site .cy-site-footer .footer-col li { margin-bottom: 6px; }
body.cy-site .cy-site-footer .footer-brand p { max-width: 38ch; line-height: 1.65; }
body.cy-site .cy-site-footer .copyright { font-size: var(--cy-text-sm); padding-top: 26px; }
body.cy-site .cy-workspace-footer {
  width: min(100%, calc(var(--cy-workspace-max) + 2 * var(--cy-gutter)));
  padding: 24px var(--cy-gutter) 40px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  flex-wrap: wrap;
  border-top: 1px solid var(--cy-line);
  color: var(--cy-muted-soft);
  font-size: var(--cy-text-sm);
}
body.cy-site .cy-workspace-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
body.cy-site .cy-workspace-footer a { color: var(--cy-muted); text-decoration: none; }
body.cy-site .cy-workspace-footer a:hover { color: var(--cy-gold); }

/* ---------- Marketing / features / pricing ---------- */
body.cy-home .section { padding-block: clamp(56px, 6vw, 96px); }
body.cy-home .feature-card { padding: var(--cy-card-padding); }
body.cy-home .hero-cta { gap: 12px; }
body.cy-home .stats-container { gap: clamp(16px, 2.2vw, 30px); }
body.cy-premium main { max-width: 100%; }
body.cy-premium #hero { padding-block: clamp(55px, 6vw, 88px) !important; }
body.cy-premium .pricing-card { height: 100%; }
body.cy-premium .pricing-card .btn { width: 100%; }
body.cy-premium .features-list { padding-inline-start: 0; }
body.cy-premium .features-list li { line-height: 1.6; }

/* ---------- Commands: navigation & dense information cards ---------- */
body.cy-commands .page-header { padding-top: var(--cy-header-clearance); padding-bottom: clamp(32px, 5vw, 64px); }
body.cy-commands .commands-container { width: 100%; max-width: calc(var(--cy-content-max) + 2 * var(--cy-gutter)); padding-inline: var(--cy-gutter); margin-inline: auto; }
body.cy-commands .commands-search-wrapper { margin-bottom: clamp(22px, 3vw, 36px); }
body.cy-commands #command-search { min-height: 48px; }
body.cy-commands .filter-pills { margin-bottom: clamp(30px, 4vw, 48px); gap: 8px; }
body.cy-commands .pill { font-size: .79rem; padding: 9px 16px; min-height: var(--cy-control-height); letter-spacing: .04em; }
body.cy-commands .cmd-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
body.cy-commands .cmd-card { border-radius: var(--cy-panel-radius); }
body.cy-commands .cmd-card :is(.cmd-name, .cmd-description) { overflow-wrap: anywhere; }
body.cy-commands .category-section { margin-bottom: clamp(40px, 5vw, 64px); }

/* ---------- Documentation and legal reading hierarchy ---------- */
body.cy-docs .docs-container {
  display: flex;
  width: 100%;
  margin-inline: auto;
  max-width: calc(var(--cy-content-max) + 2 * var(--cy-gutter));
  padding-top: var(--cy-header-clearance);
  padding-bottom: 36px;
  gap: clamp(24px, 3vw, 44px);
  align-items: flex-start;
}
body.cy-docs .docs-sidebar {
  flex: 0 0 248px;
  top: var(--cy-header-clearance);
  height: min(70vh, 740px);
  padding: 18px;
}
body.cy-docs .docs-sidebar :is(h3,a) { overflow-wrap: anywhere; }
body.cy-docs .docs-sidebar a { font-size: .89rem; min-height: 40px; }
body.cy-docs .docs-content { flex: 1 1 0; max-width: none; min-width: 0; padding: 0; }
body.cy-docs .docs-content > section { max-width: var(--cy-reading-max); margin-inline: auto; scroll-margin-top: var(--cy-header-clearance); }
body.cy-docs .docs-content :is(h1,h2,h3) { line-height: 1.3; }
body.cy-docs .docs-content h1 { font-size: var(--cy-title-lg); }
body.cy-docs .docs-content h2 { font-size: clamp(1.35rem, 2.1vw, 1.8rem); margin-top: 38px; }
body.cy-docs .docs-content h3 { font-size: clamp(1.08rem, 1.7vw, 1.25rem); }
body.cy-docs .docs-content :is(p, li) { font-size: .97rem; line-height: 1.75; }
body.cy-docs .docs-content .cmd-table { display: block; width: 100%; overflow-x: auto; }
body.cy-docs .docs-content .cmd-table :is(th, td) { min-width: 95px; }
body.cy-docs .docs-content pre { white-space: pre; }
body.cy-terms .content-page,
body.cy-privacy .content-page {
  max-width: calc(var(--cy-reading-max) + 2 * var(--cy-gutter));
  margin: 0 auto;
  padding: var(--cy-header-clearance) var(--cy-gutter) 0;
}
body.cy-terms .content-page h1,
body.cy-privacy .content-page h1 { font-size: var(--cy-title-lg); line-height: 1.2; }
body.cy-terms .content-page .last-updated,
body.cy-privacy .content-page .last-updated { margin-bottom: clamp(28px, 3vw, 42px); }
body.cy-terms .content-page .feature-card,
body.cy-privacy .content-page .feature-card { padding: clamp(22px, 3vw, 36px); margin-bottom: 16px; }
body.cy-terms .content-page .feature-card h2,
body.cy-privacy .content-page .feature-card h2 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
body.cy-terms .content-page .feature-card :is(p,li),
body.cy-privacy .content-page .feature-card :is(p,li) { line-height: 1.8; font-size: .97rem; }
body.cy-terms .content-page .feature-card:hover,
body.cy-privacy .content-page .feature-card:hover { transform: none; }

/* ---------- Account, settings and personal collections ---------- */
body.cy-settings .dashboard-container { width: 100%; max-width: calc(var(--cy-content-max) + 2 * var(--cy-gutter)); margin-inline: auto; padding-inline: var(--cy-gutter); }
body.cy-settings .server-grid-modern { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--cy-stack-gap); }
body.cy-settings .server-card { border-radius: var(--cy-panel-radius); }
body.cy-settings .server-card-inner { padding: var(--cy-card-padding); gap: 16px; }
body.cy-settings .server-card:hover { transform: translateY(-3px); }
body.cy-settings .server-icon-wrapper { width: clamp(72px, 7vw, 94px); height: clamp(72px, 7vw, 94px); }
body.cy-settings .search-premium-wrapper { width: min(100%, 400px); }
body.cy-settings :is(.server-settings-main, .settings-content, #settings-container) { min-width: 0; }
body.cy-profile .profile-wrapper { width: 100%; max-width: calc(var(--cy-form-max) + 2 * var(--cy-gutter)); margin: 0 auto; padding: var(--cy-header-clearance) var(--cy-gutter) 36px; }
/* The legacy guest wall had no layout styling and was forced to display:flex
   by script.js, creating a broken horizontal row on mobile. */
body.cy-profile #login-wall.wall-wrapper {
  width: 100%;
  max-width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: clamp(340px, 51vh, 470px);
  padding: clamp(24px, 5vw, 48px);
  text-align: center;
  border: 1px solid var(--cy-line);
  border-radius: var(--cy-panel-radius);
  background: var(--cy-surface);
}
body.cy-profile #login-wall .wall-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(212, 175, 55, .10);
  color: var(--cy-gold);
  font-size: 1.65rem;
  margin-bottom: 3px;
}
body.cy-profile #login-wall h1 { font-size: clamp(1.65rem, 3vw, 2.25rem); margin: 0; }
body.cy-profile #login-wall p { width: min(100%, 38ch); margin: 0 !important; line-height: 1.7; }
body.cy-profile #login-wall .btn-discord-login {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 24px;
  margin-top: 6px;
  border: 1px solid var(--cy-border-strong);
  border-radius: var(--cy-radius-sm);
  background: linear-gradient(120deg, #c39c32, #f0d272);
  color: #171208;
  font-weight: 700;
  cursor: pointer;
}
body.cy-profile #login-wall .btn-discord-login:hover { filter: brightness(1.08); }
body.cy-profile .profile-container { border-radius: var(--cy-panel-radius); }
body.cy-profile .profile-content-inner { padding-inline: clamp(18px, 3vw, 40px); }
body.cy-profile .info-grid { min-width: 0; }
body.cy-playlist .legacy-page { max-width: calc(var(--cy-content-max) + 2 * var(--cy-gutter)); width: 100%; margin-block: var(--cy-header-clearance) 58px; }
body.cy-playlist .legacy-panel { border-radius: var(--cy-panel-radius); padding: var(--cy-card-padding); }
body.cy-playlist .legacy-heading { align-items: flex-end; }
body.cy-success .success-container { padding-inline: var(--cy-gutter); }

/* ---------- Authenticated music workspace ---------- */
body.cy-dashboard { --cy-page-max: var(--cy-workspace-max); }
body.cy-dashboard header#header.cy-public-header .container { max-width: calc(var(--cy-workspace-max) + 2 * var(--cy-gutter)); }
body.cy-dashboard #dash-app.dash-layout {
  --cy-dashboard-width: var(--cy-workspace-max);
  gap: var(--cy-stack-gap);
  padding-inline: var(--cy-gutter);
}
body.cy-dashboard #dash-app .dash-sidebar { flex-basis: clamp(235px, 20vw, 260px); }
body.cy-dashboard #dash-app .dash-sidebar > .glass-panel { padding: clamp(14px, 1.4vw, 18px); }
body.cy-dashboard #dash-app .dash-main { gap: var(--cy-stack-gap); }
body.cy-dashboard #dash-app .dash-tabs {
  display: flex; align-items: center; gap: 5px;
  width: fit-content; max-width: 100%; min-height: 48px; padding: 5px;
  border-radius: var(--cy-radius-sm);
}
body.cy-dashboard #dash-app .dash-tab { min-height: 38px; padding-inline: 15px; font-size: var(--cy-text-sm); }
body.cy-dashboard #dash-app .glass-panel { box-shadow: var(--cy-shadow-panel); }
body.cy-dashboard #dash-app .player-card { gap: clamp(16px, 2vw, 28px); }
body.cy-dashboard #dash-app .player-art { width: clamp(190px, 19vw, 250px); }
body.cy-dashboard #dash-app .player-info .track-title { font-size: clamp(1.17rem, 1.7vw, 1.6rem); line-height: 1.3; }
body.cy-dashboard #dash-app .player-info .track-artist { font-size: .93rem; }
body.cy-dashboard #dash-app .controls-row { gap: clamp(7px, 1vw, 12px); }
body.cy-dashboard #dash-app .ctrl-btn { width: 44px; height: 44px; }
body.cy-dashboard #dash-app .ctrl-btn.play-btn { width: 52px; height: 52px; }
body.cy-dashboard #dash-app .ctrl-tag { min-height: 36px; padding-inline: 13px; font-size: .85rem; }
body.cy-dashboard #dash-app .queue-item { min-width: 0; }
body.cy-dashboard #dash-app .qi-title { font-size: .89rem; }
body.cy-dashboard #dash-app .qi-artist { font-size: .8rem; }
body.cy-dashboard #dash-app .guild-option { min-height: 42px; padding: 6px 8px; }
body.cy-dashboard #dash-app #guild-select { max-height: min(36vh, 335px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(212,175,55,.48) rgba(255,255,255,.04); }
body.cy-dashboard #dash-app #guild-select::-webkit-scrollbar { width: 7px; }
body.cy-dashboard #dash-app #guild-select::-webkit-scrollbar-track { background: rgba(255,255,255,.04); border-radius: 8px; }
body.cy-dashboard #dash-app #guild-select::-webkit-scrollbar-thumb { background: rgba(212,175,55,.48); border-radius: 8px; }
body.cy-dashboard #dash-app :is(.queue-panel, .rec-grid) { min-width: 0; }
body.cy-dashboard #dash-app .rec-grid { max-height: 345px; }
body.cy-dashboard #notification-container { max-width: min(390px, calc(100vw - 32px)); }

/* ---------- Responsive across the entire site ---------- */
@media (max-width: 1200px) {
  body.cy-site .cy-site-footer .footer-content { grid-template-columns: 1.5fr 1fr 1fr; }
  body.cy-site .cy-site-footer .footer-brand { grid-column: 1/-1; }
}
@media (max-width: 1024px) {
  body.cy-site header#header.cy-public-header .nav-links { width: min(340px, 90vw); }
  body.cy-docs .docs-container { gap: 18px; }
  body.cy-docs .docs-sidebar { flex-basis: 210px; width: 210px; }
  body.cy-dashboard #dash-app .player-art { width: min(100%, 240px); }
  body.cy-dashboard #dash-app .dash-tabs { width: 100%; }
}
@media (max-width: 900px) {
  body.cy-docs .docs-container { display: block; }
  body.cy-docs .docs-sidebar { width: 100%; height: auto; max-height: 255px; position: static; margin-bottom: 28px; }
  body.cy-docs .docs-content { width: 100%; }
}
@media (max-width: 768px) {
  body.cy-site .cy-site-footer .footer-content { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 26px; }
  body.cy-site .cy-site-footer .footer-brand { grid-column: 1/-1; }
  body.cy-dashboard #dash-app.dash-layout { flex-direction: column; }
  body.cy-dashboard #dash-app .dash-sidebar { width: 100%; flex: none; }
  body.cy-dashboard #dash-app .player-art { width: min(100%, 260px); }
  body.cy-dashboard #dash-app #guild-select { max-height: 260px; }
  body.cy-profile .profile-content-inner { padding-inline: 20px; }
  body.cy-playlist .legacy-heading { align-items: flex-start; }
}
@media (max-width: 540px) {
  body.cy-site .cy-site-footer .footer-content { grid-template-columns: 1fr 1fr; gap: 28px 18px; }
  body.cy-site .cy-site-footer .footer-brand { grid-column: 1/-1; }
  body.cy-site .cy-site-footer .footer-col a { min-height: 34px; }
  body.cy-site .cy-workspace-footer { flex-direction: column; align-items: flex-start; }
  body.cy-dashboard #dash-app .dash-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.cy-dashboard #dash-app .dash-tab { width: 100%; }
  body.cy-dashboard #dash-app .controls-row { justify-content: center; }
  body.cy-dashboard #dash-app .player-card { padding: 14px; }
  body.cy-dashboard #dash-app .player-art { width: min(100%, 220px); }
  body.cy-dashboard #dash-app .ctrl-tag { padding-inline: 10px; }
  body.cy-commands .filter-pills { justify-content: flex-start; }
  body.cy-commands .pill { min-height: var(--cy-control-height); }
  body.cy-settings .server-grid-modern { grid-template-columns: 1fr; }
  body.cy-playlist .legacy-heading { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  body.cy-site :is(.btn, .btn-action, .pill, .glass-panel, .glass-card,
    .server-card, .feature-card) { transition: none; }
}

/* Checkout has an independently scoped layout / navbar by design. */
body.cy-checkout { font-family: var(--cy-font-ui); font-size: var(--cy-text-md); }
body.cy-checkout .app-main { max-width: calc(var(--cy-content-max) + 2 * var(--cy-gutter)); }
body.cy-checkout .app-topbar { min-width: 0; gap: var(--cy-s3); }
body.cy-checkout .dashboard-grid { gap: var(--cy-stack-gap); }
body.cy-checkout :is(.card,.panel) { border-radius: var(--cy-panel-radius); }
body.cy-checkout :is(button,.btn,a.side-link) { min-height: var(--cy-control-height); }
body.cy-checkout :is(a, button, input):focus-visible { outline: 2px solid var(--cy-gold-bright); outline-offset: 3px; }
body.cy-checkout .activity-row { min-width: 0; }
body.cy-checkout .activity-row :is(span,strong) { overflow-wrap: anywhere; }
body.cy-checkout .searchbox { max-width: min(100%, 400px); }
@media (max-width: 620px) { body.cy-checkout .app-main { width: 100%; } }

/* Checkout also supports keyboard jump-to-content without changing Stripe. */
body.cy-checkout .cy-skip-link { position:fixed; left:16px; top:-100px; z-index:2001; background:var(--cy-gold); color:#14110a; padding:12px 18px; border-radius:10px; text-decoration:none; font-weight:700; }
body.cy-checkout .cy-skip-link:focus { top:12px; }

/* Old featured card scale(1.05) caused a 6px horizontal overflow at 768px. */
@media (max-width: 900px) {
  body.cy-home .p-card.featured { transform: none; }
}

/* Payment result is a full-page public route, not a flex-row widget.
   The legacy `.success-body` used display:flex with row direction, putting
   its 500px result card and full-size footer side by side on narrow screens. */
body.cy-success.success-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 100dvh;
  width: 100%;
  padding: 0;
}
body.cy-success .success-container {
  width: min(calc(100% - 2 * var(--cy-gutter)), 500px);
  min-width: 0;
  margin: calc(var(--cy-header-height) + clamp(44px, 7vh, 100px)) auto clamp(38px, 6vh, 72px);
  padding: clamp(24px, 4vw, 54px);
  border-radius: var(--cy-panel-radius);
  flex-shrink: 0;
}
body.cy-success .success-container .success-title {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  line-height: 1.18;
  overflow-wrap: normal;
  word-break: normal;
}
body.cy-success .success-container .success-desc { font-size: clamp(.94rem, 2vw, 1.05rem); }
body.cy-success .success-container .btn { max-width: 100%; white-space: normal; }
body.cy-success .cy-site-footer { width: 100%; margin-top: auto; }
@media (max-width: 480px) {
  body.cy-success .success-container .success-title { font-size: clamp(1.7rem, 8vw, 2.05rem); }
}

/* ---------- Restored, data-driven Profile workspace ----------
   Keep the original Discord banner/card; account, library, membership and
   servers are separate functional panels rather than replacing the card. */
body.cy-profile .profile-wrapper {
  width: 100%;
  max-width: calc(var(--cy-content-max) + 2 * var(--cy-gutter));
  padding-block: calc(var(--cy-header-height) + clamp(26px, 4vw, 54px)) 48px;
}
body.cy-profile #login-wall.wall-wrapper {
  max-width: 640px;
  margin-inline: auto;
}
body.cy-profile #profile-content.profile-workspace {
  width: 100%;
  min-width: 0;
}
body.cy-profile .profile-workspace-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px 24px;
  margin-bottom: clamp(24px, 3vw, 32px);
}
body.cy-profile .profile-workspace-heading h1 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -.025em;
  margin: 6px 0;
}
body.cy-profile .profile-workspace-heading p {
  color: var(--cy-muted);
  margin: 0;
  font-size: .95rem;
}
body.cy-profile .profile-eyebrow {
  display: block;
  font-size: .7rem;
  letter-spacing: .14em;
  font-weight: 700;
  color: var(--cy-gold);
}
body.cy-profile .profile-workspace-grid {
  display: grid;
  grid-template-columns: minmax(320px, .98fr) minmax(0, 1.8fr);
  gap: var(--cy-stack-gap);
  align-items: start;
}
body.cy-profile .profile-workspace-grid > * { min-width: 0; }
body.cy-profile .profile-workspace-grid .profile-container {
  max-width: none;
  width: 100%;
  margin: 0;
  border-radius: var(--cy-panel-radius);
}
body.cy-profile .profile-workspace-grid .profile-content-inner { padding: 0 clamp(16px, 2vw, 28px) 26px; }
body.cy-profile .profile-workspace-grid .profile-banner { height: clamp(145px, 15vw, 190px); }
body.cy-profile .profile-workspace-grid .avatar-container { width: 106px; height: 106px; }
body.cy-profile .profile-workspace-grid .profile-identity h2 { font-size: clamp(1.45rem, 2vw, 1.9rem); overflow-wrap: anywhere; margin: 0; }
body.cy-profile .profile-workspace-grid .info-grid {
  display: grid;
  width: 100%;
  gap: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
body.cy-profile .profile-workspace-grid .info-item { padding: 15px 7px; min-width: 0; }
body.cy-profile .profile-workspace-grid .info-item :is(.info-label,.info-value) { overflow-wrap: anywhere; }
body.cy-profile .profile-workspace-grid .btn-action { flex: 1; min-width: 0; padding-inline: 12px; min-height: var(--cy-control-height); }
body.cy-profile .profile-workspace-grid .badge-list { max-width: 100%; flex-wrap: wrap; }
body.cy-profile .profile-workspace-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--cy-stack-gap);
}
body.cy-profile .profile-feature-panel {
  min-width: 0;
  border: 1px solid var(--cy-line);
  border-radius: var(--cy-panel-radius);
  background: var(--cy-surface);
  padding: var(--cy-card-padding);
  box-shadow: var(--cy-shadow-panel);
}
body.cy-profile .profile-feature-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}
body.cy-profile .profile-feature-heading h2 {
  margin: 5px 0 0;
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  line-height: 1.4;
}
body.cy-profile .profile-state-tag {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(149, 204, 142, .17);
  background: rgba(149, 204, 142, .08);
  color: #a9dca9;
  font-size: .74rem;
  border-radius: 999px;
  padding: 5px 9px;
}
body.cy-profile .profile-state-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
body.cy-profile .profile-panel-link, body.cy-profile .profile-secondary-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: .8rem;
  color: var(--cy-gold-bright);
  min-height: 36px;
}
body.cy-profile .profile-panel-link { flex-shrink: 0; white-space: nowrap; }
body.cy-profile :is(.profile-panel-link,.profile-secondary-link):hover { color: #fff; }
body.cy-profile .profile-detail-list { margin: 0; display: grid; gap: 0; }
body.cy-profile .profile-detail-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  border-top: 1px solid var(--cy-line);
}
body.cy-profile .profile-detail-list dt, body.cy-profile .profile-detail-list dd { margin: 0; min-width: 0; }
body.cy-profile .profile-detail-list dt { color: var(--cy-muted); font-size: .83rem; }
body.cy-profile .profile-detail-list dd { color: var(--cy-text); font-size: .87rem; text-align: right; overflow-wrap: anywhere; }
body.cy-profile .profile-detail-list .profile-id-field { display: flex; align-items: center; gap: 7px; }
body.cy-profile #profile-discord-id { color: var(--cy-text); font: inherit; font-variant-numeric: tabular-nums; font-size: .8rem; overflow-wrap: anywhere; }
body.cy-profile .profile-icon-button, body.cy-profile .profile-subtle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--cy-line);
  background: rgba(255,255,255,.035);
  color: var(--cy-text);
  border-radius: var(--cy-radius-sm);
  cursor: pointer;
}
body.cy-profile .profile-icon-button { width: 36px; height: 36px; flex: 0 0 36px; }
body.cy-profile .profile-subtle-button { padding: 10px 16px; min-height: 44px; font-size: .85rem; }
body.cy-profile :is(.profile-icon-button,.profile-subtle-button):hover { background: rgba(212,175,55,.09); border-color: var(--cy-border-strong); }
body.cy-profile .profile-quiet { color: var(--cy-muted); font-size: .81rem; line-height: 1.65; margin: 10px 0 0; }
body.cy-profile #profile-copy-feedback:empty { display: none; }
body.cy-profile .profile-membership-metrics, body.cy-profile .profile-summary-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
body.cy-profile .profile-membership-metrics > div,
body.cy-profile .profile-summary-metrics > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px;
  min-width: 0;
  border: 1px solid var(--cy-line);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
}
body.cy-profile .profile-membership-metrics span, body.cy-profile .profile-summary-metrics span,
body.cy-profile .profile-server-metric span { color: var(--cy-muted); font-size: .78rem; }
body.cy-profile .profile-membership-metrics strong { font-size: .94rem; overflow-wrap: anywhere; }
body.cy-profile .profile-summary-metrics strong, body.cy-profile .profile-server-metric strong {
  color: var(--cy-gold-bright);
  font-size: 1.55rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
body.cy-profile .profile-server-metric { display: flex; align-items: baseline; gap: 11px; margin-bottom: 10px; }
body.cy-profile .profile-data-list { display: grid; gap: 7px; min-width: 0; margin-top: 14px; }
body.cy-profile .profile-data-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid var(--cy-line);
  border-radius: 11px;
  background: rgba(255,255,255,.02);
}
body.cy-profile .profile-data-row .profile-data-icon {
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  border-radius: 9px;
  background: rgba(212,175,55,.08);
  color: var(--cy-gold);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-weight: 700;
}
body.cy-profile .profile-data-row .profile-data-icon img { width: 100%; height: 100%; object-fit: cover; }
body.cy-profile .profile-data-copy { flex: 1 1 0; min-width: 0; }
body.cy-profile .profile-data-copy strong,
body.cy-profile .profile-data-copy small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.cy-profile .profile-data-copy strong { font-size: .87rem; font-weight: 600; }
body.cy-profile .profile-data-copy small { font-size: .75rem; color: var(--cy-muted); }
body.cy-profile .profile-data-row .profile-row-link { font-size: .76rem; flex-shrink: 0; text-decoration: none; color: var(--cy-gold); min-height: 32px; display: flex; align-items: center; }
body.cy-profile .profile-feature-panel .profile-secondary-link { margin-top: 16px; }
body.cy-profile .profile-workspace-status { min-height: 20px; margin-top: 20px; color: var(--cy-muted); font-size: .81rem; }
@media (max-width: 1100px) {
  body.cy-profile .profile-workspace-grid { grid-template-columns: 1fr; }
  body.cy-profile .profile-workspace-grid .profile-container { max-width: 680px; margin-inline: auto; }
}
@media (max-width: 700px) {
  body.cy-profile .profile-workspace-details { grid-template-columns: 1fr; }
  body.cy-profile .profile-workspace-grid .profile-container { max-width: none; }
}
@media (max-width: 420px) {
  body.cy-profile .profile-workspace-heading { align-items: stretch; }
  body.cy-profile #profile-refresh { width: 100%; }
  body.cy-profile .profile-feature-panel { padding: 16px; }
  body.cy-profile .profile-feature-heading { flex-wrap: wrap; }
  body.cy-profile .profile-detail-list > div { flex-wrap: wrap; padding-block: 9px; }
  body.cy-profile .profile-detail-list dd { text-align: left; }
}

/* Small 320px phones: restored authenticated data rows and the user's long
   Discord handle must never determine viewport width. */
body.cy-profile .profile-data-list { grid-template-columns: minmax(0, 1fr); }
body.cy-profile .profile-data-row { min-width: 0; max-width: 100%; }
body.cy-profile .profile-data-copy { width: 0; }
@media (max-width: 360px) {
  body.cy-site .cy-public-header .header-actions .login-btn.logged-in {
    max-width: 50px;
    padding-inline: 10px;
  }
  body.cy-site .cy-public-header .header-actions .login-btn.logged-in .user-name-header { display: none; }
}
