/* UI-09: site output uses the original landing and the login entry flow.
   Preview controls still mount for compatibility; they are not server permissions. */
.site-entry [data-demo-controls],
.site-entry [data-trade-controls],
.site-entry [data-admin-tools],
.site-entry [data-account-tools],
.site-entry .auth-demo-entry,
.site-entry .account-actions a[href*="demo="],
.site-entry .page-foot a[href*="preview.html"],
.site-entry .sidebar-bottom > a,
.site-entry .mobile-menu-dialog > a:last-child,
.site-entry #session-gate a[href*="demo="],
.site-entry #session-gate a[href*="preview.html"] {
  display: none;
}
/* UI-09: retain the home link beside the compact account menu on mobile. */
.site-entry .review-links {
  width: auto;
  margin-left: auto;
}
.site-entry .review-bar > a {
  flex-shrink: 0;
  white-space: nowrap;
}
.review-bar {
  height: 44px;
  padding: 0 32px;
  background: #143b3b;
  color: #d4e9e3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.8125rem;
}
.review-bar a,
.review-session {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
}
.review-bar a:hover,
.review-bar a[aria-current="page"] {
  color: white;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.review-brand {
  font-weight: 600;
  color: white;
  letter-spacing: 0.01em;
}
.review-links {
  display: flex;
  gap: 12px;
  align-items: center;
}
.review-stage {
  opacity: 0.7;
}
.site-header {
  height: 86px;
  background: white;
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1312px;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin: auto;
}
.brand img {
  display: block;
  width: 142px;
  height: auto;
}
.desktop-nav {
  height: 100%;
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-link {
  height: 100%;
  display: inline-flex;
  align-items: center;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--muted);
  padding: 0 2px;
}
.nav-link.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
.nav-link:hover {
  color: var(--brand);
}
.account-button {
  background: none;
  border: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 0.875rem;
}
.account-button .label {
  text-align: left;
}
.account-button strong {
  display: block;
  font-size: 0.9375rem;
}
.account-button small {
  color: var(--muted);
}
.page {
  max-width: 1312px;
  margin: auto;
  padding: 32px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.page-heading p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9375rem;
}
.page-heading .badge {
  font-size: 0.875rem;
}
.page-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding: 16px 0;
  color: var(--muted);
  font-size: 0.8125rem;
}
.page-foot a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.bottom-nav {
  display: none;
}
.admin-frame {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: calc(100dvh - 44px);
}
.sidebar {
  background: white;
  border-right: 1px solid var(--line);
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.sidebar-brand {
  padding: 0 14px;
}
.workspace-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 12px 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.nav-group-label {
  font-size: 0.8125rem;
  color: var(--subtle);
  padding: 0 16px;
  margin: 0 0 10px;
}
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.side-nav a,
.side-nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--muted);
  font-size: 0.9375rem;
  text-align: left;
}
.side-nav .active {
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 600;
}
.side-nav a:hover,
.side-nav button:hover {
  background: #eff6f4;
  color: var(--brand);
}
.side-nav .count {
  margin-left: auto;
  font-size: 0.8125rem;
  min-width: 22px;
  text-align: center;
  color: var(--brand);
}
.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 20px 12px 0;
}
.sidebar-bottom p {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 8px;
}
.admin-main {
  min-width: 0;
}
.admin-header {
  height: 82px;
  background: #ffffffbd;
  border-bottom: 1px solid var(--line);
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.breadcrumb {
  font-size: 0.875rem;
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
}
.breadcrumb strong {
  font-weight: 500;
  color: var(--ink);
}
.admin-content {
  padding: 32px 36px;
  max-width: 1500px;
  margin: auto;
}
.mobile-menu-button {
  display: none;
}
.mobile-menu-dialog {
  border: 0;
  border-radius: 0;
  margin: 0;
  width: 280px;
  height: 100dvh;
  max-height: 100dvh;
  max-width: calc(100vw - 40px);
  padding: 24px 18px;
  background: white;
  color: var(--ink);
}
.mobile-menu-dialog::backdrop {
  background: #112f3d66;
}
.mobile-menu-dialog .side-nav {
  margin-top: 24px;
}
.mobile-menu-dialog .spread {
  margin-bottom: 20px;
}
.mobile-menu-dialog .brand img {
  width: 128px;
}
.catalog-page {
  max-width: 1200px;
  margin: auto;
  padding: 44px 32px;
}
.catalog-intro {
  margin: 36px 0;
}
.catalog-intro h1 {
  font-size: 2.5rem;
  margin-top: 8px;
}
.catalog-intro p {
  color: var(--muted);
  margin-top: 14px;
  max-width: 620px;
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.preview-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
  overflow: hidden;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.preview-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.preview-card-content {
  padding: 24px;
}
.preview-card-content h2 {
  font-size: 1.375rem;
}
.preview-card-content p {
  color: var(--muted);
  margin-top: 8px;
  font-size: 0.9375rem;
}
.preview-art {
  padding: 30px;
  background: #e4f3ec;
  height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mini-wallet {
  background: var(--teal);
  color: #bcecd9;
  padding: 24px;
  border-radius: 16px;
  width: 310px;
  box-shadow: 0 16px 30px #174b4320;
}
.mini-wallet strong {
  display: block;
  font-size: 2rem;
  margin-top: 5px;
}
.mini-wallet span {
  font-size: 0.8125rem;
}
.mini-admin {
  background: white;
  border-radius: 12px;
  width: 360px;
  padding: 18px;
  border: 1px solid var(--line);
}
.mini-admin .row {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
}
.catalog-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.catalog-links a {
  display: block;
  background: white;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.catalog-links small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}
.scope-note {
  margin-top: 32px;
  padding: 24px;
  border-top: 1px solid var(--line);
}
.scope-note p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9375rem;
}
.scope-note ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
@media (max-width: 1100px) {
  .desktop-nav {
    gap: 20px;
  }
  .admin-frame {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .admin-header {
    padding: 0 24px;
  }
  .admin-content {
    padding: 28px 24px;
  }
  .sidebar {
    padding-inline: 12px;
  }
}
@media (max-width: 820px) {
  .review-bar {
    padding: 0 16px;
  }
  .review-stage {
    display: none;
  }
  .review-links {
    gap: 5px;
  }
  .site-header {
    height: 72px;
  }
  .header-inner {
    padding: 0 20px;
    gap: 16px;
  }
  .brand img {
    width: 126px;
  }
  .desktop-nav {
    display: none;
  }
  .page {
    padding: 24px 20px 90px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading p {
    font-size: 0.875rem;
  }
  .account-button .label {
    display: none;
  }
  .account-button > .icon {
    display: none;
  }
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    z-index: 25;
    background: #fffffff2;
    border-top: 1px solid var(--line);
    backdrop-filter: blur(14px);
    padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a,
  .bottom-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: 0;
    min-height: 54px;
    padding: 5px;
    font-size: 0.875rem;
    color: var(--muted);
  }
  .bottom-nav .active {
    color: var(--brand);
    font-weight: 600;
  }
  .bottom-nav .active .icon {
    background: var(--brand-soft);
    box-sizing: content-box;
    padding: 4px 14px;
    border-radius: 20px;
    margin-top: -4px;
    margin-bottom: -4px;
  }
  .page-foot {
    flex-direction: column;
    gap: 6px;
  }
  .admin-frame {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .admin-header {
    height: 70px;
    padding: 0 18px;
  }
  .mobile-menu-button {
    display: inline-flex;
  }
  .admin-header > .row {
    gap: 6px;
  }
  .breadcrumb {
    font-size: 0.875rem;
  }
  .breadcrumb .parent,
  .breadcrumb .separator {
    display: none;
  }
  .admin-content {
    padding: 24px 20px;
  }
  .catalog-grid {
    grid-template-columns: 1fr;
  }
  .catalog-links {
    grid-template-columns: 1fr;
  }
  .catalog-page {
    padding: 24px 20px;
  }
  .catalog-intro h1 {
    font-size: 2rem;
  }
}
@media (max-width: 360px) {
  .review-bar {
    padding: 0 10px;
    gap: 4px;
  }
  .review-links {
    gap: 0;
  }
  .review-bar a {
    padding: 0 5px;
  }
  .header-inner {
    padding: 0 16px;
  }
  .page,
  .admin-content {
    padding-left: 16px;
    padding-right: 16px;
  }
  .page-heading {
    gap: 8px;
  }
  .page-heading .badge {
    font-size: 0.75rem;
  }
  .catalog-page {
    padding: 24px 16px;
  }
  .preview-art {
    padding: 20px;
  }
}

.account-button .label {
  min-width: 0;
  max-width: 130px;
}
.account-button .label strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Shared UI-07 access states leave the preview navigation available. */
.session-gate {
  max-width: 680px;
  margin: 48px auto;
  padding: 40px;
  text-align: center;
}
.session-gate-symbol {
  display: inline-flex;
  width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 24px;
}
.session-gate-symbol .icon {
  width: 28px;
  height: 28px;
}
.session-gate h1 {
  font-size: 1.8rem;
  margin: 12px 0 20px;
}
.session-gate > p {
  line-height: 1.7;
}
.session-gate-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 28px 0;
}
@media (max-width: 720px) {
  .session-gate {
    margin: 24px 16px;
    padding: 28px 20px;
  }
  .session-gate h1 {
    font-size: 1.5rem;
  }
  .session-gate-actions {
    flex-direction: column;
  }
}
@media (max-width: 600px) {
  .review-bar .review-brand {
    display: none;
  }
  .review-links {
    width: 100%;
    justify-content: space-between;
  }
  .review-bar {
    height: auto;
    min-height: 44px;
    gap: 4px;
  }
  .review-bar a {
    min-height: 44px;
    font-size: 0.875rem;
  }
}

.review-session {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.review-session:hover {
  color: white;
  text-decoration: underline;
  text-underline-offset: 4px;
}
@media (max-width: 600px) {
  .review-session {
    font-size: 0.875rem;
  }
}

/* FE-01 / BACKEND: independent top row, never a floating bottom overlay. */
.language-switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  padding: 4px clamp(12px, 3vw, 32px);
  border-bottom: 1px solid var(--line);
  background: white;
  font-size: 0.8125rem;
}

.language-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 8px;
  color: #475569;
  text-decoration: none;
}

.language-switcher a:hover {
  background: #eff6f4;
}

.language-switcher a:focus-visible {
  outline: 2px solid #0f766e;
  outline-offset: 2px;
}

.language-switcher a[aria-current="page"] {
  background: #0f766e;
  color: #fff;
}

/* LK-09: three user destinations after retiring Buy UBT. */
@media(max-width:900px){.bottom-nav{grid-template-columns:repeat(3,minmax(0,1fr));}}
