:root {
  --fc-pages-v2-surface: var(--fc-surface-dim);
  --fc-pages-v2-sand: var(--fc-cream);
  --fc-pages-v2-grid-min: 350px;
  --fc-pages-v2-border-subtle: rgba(104, 60, 6, 0.12);
  --fc-pages-v2-border-soft: rgba(104, 60, 6, 0.22);
  --fc-pages-v2-border: rgba(104, 60, 6, 0.24);
  --fc-pages-v2-border-strong: rgba(104, 60, 6, 0.28);
  --fc-pages-v2-brown-shadow-soft: rgba(104, 60, 6, 0.12);
  --fc-pages-v2-brown-shadow: rgba(104, 60, 6, 0.28);
  --fc-pages-v2-brown-shadow-strong: rgba(104, 60, 6, 0.42);
  --fc-pages-v2-chip-border: var(--fc-tan);
  --fc-pages-v2-chip-bg: var(--fc-warning-light);
  --fc-pages-v2-tech-chip-border: #bbdefb;
  --fc-pages-v2-tech-chip-bg: var(--fc-info-light);
  --fc-pages-v2-tech-chip-text: var(--fc-blue-light);
  --fc-pages-v2-popover-shadow: rgba(1, 23, 48, 0.22);
}

body.pages-v2-body {
  margin: 0;
  min-height: 100vh;
  background: var(--fc-pages-v2-sand);
  color: var(--fc-navy);
  font-family: var(--fc-font-body);
  letter-spacing: 0;
}

body.pages-v2-body button,
body.pages-v2-body input {
  font: inherit;
  letter-spacing: 0;
}

.pages-v2-shell {
  min-height: 100vh;
  background: var(--fc-pages-v2-sand);
}

.pages-v2-header {
  height: 118px;
  display: grid;
  grid-template-columns: minmax(500px, 560px) minmax(420px, 1fr) auto auto;
  align-items: center;
  gap: 28px;
  padding: 0 44px;
  background-color: var(--fc-orange-workshop);
  background-image: var(--fc-texture-orange-soda), var(--fc-texture-dots);
  background-size: 220px 220px, 4px 4px;
  overflow: visible;
}

.pages-v2-header.without-brand {
  height: auto;
  min-height: 0;
  grid-template-columns: minmax(280px, 1fr);
  padding: 16px;
}

.pages-v2-brand {
  position: relative;
  min-width: 0;
  height: 118px;
  align-self: stretch;
}

.pages-v2-brand-art {
  position: absolute;
  left: 2px;
  bottom: -38px;
  width: min(360px, 24vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 3px 0 var(--fc-pages-v2-brown-shadow));
  z-index: 1;
}

.pages-v2-brand-pages {
  position: absolute;
  left: 384px;
  bottom: 36px;
  color: var(--fc-cream-light);
  font-family: var(--fc-font-brand);
  font-size: var(--fc-text-4xl);
  font-weight: 800;
  text-shadow: 2px 2px 0 var(--fc-brown), 3px 3px 0 var(--fc-navy);
  -webkit-text-stroke: 1px var(--fc-brown);
  white-space: nowrap;
}

.pages-v2-search {
  position: relative;
  min-width: 280px;
}

.pages-v2-search input {
  width: 100%;
  height: 58px;
  border: 3px solid var(--fc-navy);
  border-radius: var(--fc-radius-brand);
  padding: 0 66px 0 58px;
  background: var(--fc-white-a90);
  box-shadow: var(--fc-shadow-md), inset 0 -2px 0 var(--fc-pages-v2-brown-shadow-soft);
  color: var(--fc-gray-700);
  font-size: var(--fc-text-lg);
  outline: none;
}

.pages-v2-search-icon {
  position: absolute;
  left: 23px;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  color: var(--fc-navy);
}

.pages-v2-search-key {
  position: absolute;
  right: 18px;
  top: 50%;
  min-width: 34px;
  height: 34px;
  transform: translateY(-50%);
  border: 2px solid var(--fc-gray-300);
  border-radius: var(--fc-radius-md);
  display: grid;
  place-items: center;
  color: var(--fc-gray-500);
  background: var(--fc-white-a70);
  font-weight: 700;
}

.fc-base .pages-v2-create {
  height: 62px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 3px solid var(--fc-navy);
  border-radius: var(--fc-radius-lg);
  background: var(--fc-yellow);
  color: var(--fc-navy);
  padding: 0 28px;
  font-family: var(--fc-font-brand);
  font-size: var(--fc-text-xl);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--fc-pages-v2-brown-shadow-strong);
}

.fc-base .pages-v2-create:hover,
.fc-base .pages-v2-create:focus-visible {
  background: var(--fc-navy);
  color: var(--fc-yellow);
  text-decoration: none;
}

.pages-v2-identity-spacer {
  min-width: 266px;
}

.pages-v2-frame {
  margin: -4px 16px 0;
  padding: 18px 30px 36px;
  background: var(--fc-pages-v2-surface);
  border: 4px solid var(--fc-navy);
  border-radius: 30px 30px 0 0;
}

.pages-v2-shell.is-view-filtered .pages-v2-frame {
  margin: 0;
  border-radius: 0;
}

.pages-v2-shell.without-header .pages-v2-frame {
  border-top-width: 0;
}

.pages-v2-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.pages-v2-tabs {
  display: inline-flex;
  align-items: stretch;
  border: 2px solid var(--fc-pages-v2-border);
  border-radius: var(--fc-radius-md);
  background: var(--fc-white-a70);
  overflow: hidden;
  box-shadow: var(--fc-shadow-sm);
}

.pages-v2-tab {
  min-height: 52px;
  min-width: 136px;
  border: 0;
  border-right: 1px solid var(--fc-pages-v2-border-subtle);
  background: transparent;
  color: var(--fc-navy);
  font-family: var(--fc-font-brand);
  font-size: var(--fc-text-lg);
  font-weight: 800;
  padding: 0 22px;
  cursor: pointer;
}

.pages-v2-tab:last-child {
  border-right: 0;
}

.pages-v2-tab.is-active {
  background: var(--fc-orange);
  color: var(--fc-white);
  box-shadow: inset 0 -3px 0 var(--fc-pages-v2-brown-shadow);
}

.pages-v2-right-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.pages-v2-view-toggle,
.pages-v2-pill,
.pages-v2-sort-group,
.pages-v2-sort {
  min-height: 52px;
  border: 2px solid var(--fc-pages-v2-border);
  border-radius: var(--fc-radius-md);
  background: var(--fc-white-a70);
  color: var(--fc-navy);
  box-shadow: var(--fc-shadow-sm);
  font-weight: 800;
}

.pages-v2-view-toggle {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
}

.pages-v2-view-toggle button {
  width: 64px;
  height: 52px;
  border: 0;
  background: transparent;
  color: var(--fc-navy);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.pages-v2-view-toggle button.is-active {
  background: var(--fc-orange);
  color: var(--fc-white);
}

.pages-v2-pill,
.pages-v2-sort,
.pages-v2-sort-direction {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 22px;
  font-size: var(--fc-text-base);
}

.pages-v2-sort {
  cursor: pointer;
  min-height: 48px;
  border: 0;
  border-right: 1px solid var(--fc-pages-v2-border-subtle);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pages-v2-sort-group {
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  padding: 0;
}

.pages-v2-sort-direction {
  width: 52px;
  min-height: 48px;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--fc-navy);
  box-shadow: none;
  cursor: pointer;
}

.pages-v2-sort.is-active {
  background: var(--fc-orange);
  color: var(--fc-white);
}

.pages-v2-filters {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 15px;
  padding: 16px;
  border: 2px solid var(--fc-pages-v2-border-subtle);
  border-radius: var(--fc-radius-md);
  background: var(--fc-white-a50);
}

.pages-v2-filter {
  min-height: 48px;
  min-width: 192px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 2px solid var(--fc-pages-v2-border-soft);
  border-radius: var(--fc-radius-md);
  background: var(--fc-white-a70);
  color: var(--fc-navy);
  padding: 0 16px;
  font-weight: 700;
  box-shadow: var(--fc-shadow-sm);
}

.pages-v2-filter.is-future {
  opacity: 0.58;
}

.pages-v2-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--fc-pages-v2-grid-min)), 1fr));
  gap: 24px;
  margin-top: 16px;
}

.pages-v2-card {
  position: relative;
  min-width: 0;
  background: var(--fc-white);
  border: 2px solid var(--fc-pages-v2-border-strong);
  border-radius: var(--fc-radius-md);
  overflow: visible;
  box-shadow: var(--fc-shadow-lg);
}

.pages-v2-thumb {
  position: relative;
  height: clamp(170px, 10vw, 210px);
  overflow: hidden;
  border-radius: var(--fc-radius-md) var(--fc-radius-md) 0 0;
  background: var(--fc-gray-100);
  border-bottom: 1px solid var(--fc-pages-v2-border-subtle);
}

.pages-v2-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pages-v2-tiny-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px;
  background: var(--fc-navy-a60);
  color: var(--fc-white);
  font-size: var(--fc-text-xs);
  font-weight: 800;
  z-index: 2;
}

.pages-v2-tiny-creator,
.pages-v2-tiny-date {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.pages-v2-tiny-creator span:last-child,
.pages-v2-tiny-date span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pages-v2-tiny-creator .pages-v2-avatar,
.pages-v2-tiny-creator fuzzy-avatar[classname="pages-v2-avatar"] {
  width: 28px;
  height: 28px;
  transform: scale(0.56);
}

.fc-base .pages-v2-play-float {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid var(--fc-white-a90);
  background: var(--fc-navy-a60);
  color: var(--fc-white);
  display: grid;
  place-items: center;
  box-shadow: var(--fc-shadow-md);
  text-decoration: none;
}

.fc-base .pages-v2-play-float:hover,
.fc-base .pages-v2-play-float:focus-visible {
  color: var(--fc-white);
  text-decoration: none;
}

.pages-v2-card-body {
  padding: 14px 16px 16px;
}

.pages-v2-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.pages-v2-title-row h3 {
  margin: 0;
  min-width: 0;
  color: var(--fc-navy);
  font-family: var(--fc-font-brand);
  font-size: var(--fc-text-xl);
  line-height: 1.08;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.pages-v2-title-row h3:focus-visible {
  outline: 2px solid var(--fc-orange);
  outline-offset: 2px;
  border-radius: var(--fc-radius-sm);
}

.pages-v2-title-row h3.is-expanded {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.pages-v2-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fc-brown);
  font-size: var(--fc-text-sm);
  font-weight: 800;
  white-space: nowrap;
}

.pages-v2-link-status {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  font-size: var(--fc-text-xs);
}

.pages-v2-link-status svg,
.pages-v2-link-status i {
  width: 14px;
  height: 14px;
}

.pages-v2-link-status.is-working {
  color: var(--fc-success);
}

.pages-v2-link-status.is-broken {
  color: var(--fc-yellow);
}

.pages-v2-creator-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--fc-gray-700);
  font-size: var(--fc-text-sm);
}

.pages-v2-creator {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.pages-v2-avatar,
fuzzy-avatar[classname="pages-v2-avatar"] {
  width: 34px;
  height: 34px;
  transform: scale(0.68);
  transform-origin: center;
  flex: 0 0 auto;
  overflow: visible;
}

.pages-v2-creator strong {
  color: var(--fc-info);
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pages-v2-date {
  white-space: nowrap;
  color: var(--fc-gray-500);
  font-weight: 600;
}

.pages-v2-desc {
  min-height: 44px;
  margin: 10px 0 12px;
  color: var(--fc-gray-700);
  font-size: var(--fc-text-sm);
  line-height: 1.45;
}

.pages-v2-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.pages-v2-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--fc-pages-v2-chip-border);
  border-radius: var(--fc-radius-pill);
  background: var(--fc-pages-v2-chip-bg);
  color: var(--fc-brown);
  padding: 0 11px;
  font-size: var(--fc-text-xs);
  font-weight: 700;
}

.pages-v2-chip.is-tech {
  border-color: var(--fc-pages-v2-tech-chip-border);
  background: var(--fc-pages-v2-tech-chip-bg);
  color: var(--fc-pages-v2-tech-chip-text);
}

.pages-v2-admin-row {
  display: flex;
  align-items: center;
  gap: var(--fc-space-2);
  flex-wrap: wrap;
  margin-top: var(--fc-space-3);
  padding: var(--fc-space-2);
  border: 1px solid var(--fc-pages-v2-border-subtle);
  border-radius: var(--fc-radius-md);
  background: var(--fc-gray-50);
}

.pages-v2-admin-score {
  height: var(--fc-control-h);
  display: inline-flex;
  align-items: center;
  gap: var(--fc-space-1);
  color: var(--fc-brown);
  font-size: var(--fc-text-sm);
  font-weight: 800;
}

.pages-v2-admin-score input {
  width: 64px;
  height: var(--fc-control-h);
  border: 1.5px solid var(--fc-gray-300);
  border-radius: var(--fc-radius-sm);
  padding: 0 var(--fc-space-2);
  color: var(--fc-gray-800);
  background: var(--fc-white);
  font-weight: 700;
}

.pages-v2-admin-row button {
  height: var(--fc-control-h);
  border: 2px solid var(--fc-navy);
  border-radius: var(--fc-radius-sm);
  padding: 0 var(--fc-space-3);
  background: var(--fc-navy);
  color: var(--fc-white);
  font-family: var(--fc-font-brand);
  font-size: var(--fc-text-sm);
  font-weight: 800;
  cursor: pointer;
}

.pages-v2-admin-row button:hover,
.pages-v2-admin-row button:focus-visible {
  background: var(--fc-navy-hover);
  border-color: var(--fc-navy-hover);
}

.pages-v2-admin-row button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pages-v2-admin-status {
  color: var(--fc-gray-600);
  font-size: var(--fc-text-xs);
  font-weight: 700;
}

.pages-v2-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px 48px;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}

.pages-v2-editor-btn {
  min-width: 0;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px solid var(--fc-orange);
  border-radius: var(--fc-radius-md);
  background: var(--fc-orange);
  color: var(--fc-white);
  font-family: var(--fc-font-brand);
  font-size: var(--fc-text-sm);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 3px 0 var(--fc-pages-v2-brown-shadow);
  cursor: pointer;
}

.pages-v2-editor-btn:hover,
.pages-v2-editor-btn:focus-visible {
  border-color: var(--fc-orange-hover);
  background: var(--fc-orange-hover);
}

.pages-v2-editor-btn.is-disabled {
  border-color: var(--fc-gray-400);
  background: var(--fc-gray-500);
  color: var(--fc-white);
}

.fc-base .pages-v2-icon-btn {
  height: 44px;
  border: 2px solid var(--fc-pages-v2-border);
  border-radius: var(--fc-radius-md);
  background: var(--fc-white-a90);
  color: var(--fc-navy);
  display: grid;
  place-items: center;
  box-shadow: var(--fc-shadow-sm);
  text-decoration: none;
  cursor: pointer;
}

.fc-base .pages-v2-icon-btn:hover,
.fc-base .pages-v2-icon-btn:focus-visible {
  color: var(--fc-navy);
  text-decoration: none;
  background: var(--fc-white);
  border-color: var(--fc-pages-v2-border-strong);
}

.pages-v2-menu {
  position: absolute;
  right: 18px;
  bottom: 74px;
  width: 174px;
  padding: 8px;
  border: 2px solid var(--fc-pages-v2-border);
  border-radius: var(--fc-radius-md);
  background: var(--fc-white);
  box-shadow: 0 12px 28px var(--fc-pages-v2-popover-shadow);
  z-index: var(--fc-z-dropdown);
}

.pages-v2-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: var(--fc-radius-md);
  padding: 0 10px;
  background: transparent;
  color: var(--fc-navy);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.pages-v2-menu-item:hover {
  background: var(--fc-cream-light);
  color: var(--fc-navy);
  text-decoration: none;
}

.fc-base .pages-v2-menu-item,
.fc-base .pages-v2-menu-item:visited,
.fc-base .pages-v2-menu-item:hover,
.fc-base .pages-v2-menu-item:focus-visible {
  color: var(--fc-navy);
  text-decoration: none;
}

.pages-v2-state {
  margin: 32px 0 10px;
  text-align: center;
  color: var(--fc-gray-700);
  font-weight: 700;
}

.pages-v2-loader {
  grid-column: 1 / -1;
  min-height: 80px;
}

.pages-v2-skeleton {
  min-height: 360px;
  background: var(--fc-gray-100);
  animation: pages-v2-loading 1.5s ease-in-out infinite;
}

@keyframes pages-v2-loading {
  0%, 100% { opacity: 0.58; }
  50% { opacity: 1; }
}

.pages-v2-shell svg {
  width: 20px;
  height: 20px;
  display: block;
}

.pages-v2-shell .small-icon {
  width: 17px;
  height: 17px;
}

.pages-v2-shell.is-tiny .pages-v2-frame {
  padding: 10px;
}

.pages-v2-shell.is-selector .pages-v2-header.without-brand {
  padding: 8px;
}

.pages-v2-shell.is-selector .pages-v2-search {
  min-width: 0;
}

.pages-v2-shell.is-selector .pages-v2-search input {
  height: 42px;
  border-width: 2px;
  border-radius: var(--fc-radius-lg);
  padding: 0 48px 0 38px;
  font-size: var(--fc-text-sm);
}

.pages-v2-shell.is-selector .pages-v2-search-icon {
  left: 14px;
  width: 16px;
  height: 16px;
}

.pages-v2-shell.is-selector .pages-v2-search-key {
  right: 10px;
  min-width: 24px;
  height: 24px;
  border-width: 1px;
  font-size: var(--fc-text-xs);
}

.pages-v2-shell.is-selector .pages-v2-frame {
  padding: 6px;
}

.pages-v2-shell.is-selector .pages-v2-grid {
  --fc-pages-v2-grid-min: 220px;
  gap: 6px;
  margin-top: 6px;
}

.pages-v2-shell.is-selector .pages-v2-thumb {
  height: 112px;
}

.pages-v2-shell.is-selector .pages-v2-card-body {
  padding: 8px;
}

.pages-v2-shell.is-selector .pages-v2-title-row {
  gap: 6px;
}

.pages-v2-shell.is-selector .pages-v2-title-row h3 {
  font-size: var(--fc-text-base);
  line-height: 1.05;
}

.pages-v2-shell.is-selector .pages-v2-score {
  font-size: var(--fc-text-xs);
}

.pages-v2-shell.is-selector .pages-v2-actions {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 6px;
}

.pages-v2-shell.is-selector .pages-v2-editor-btn {
  height: 32px;
  font-size: var(--fc-text-xs);
  box-shadow: none;
}

.pages-v2-shell.is-tiny .pages-v2-grid {
  --fc-pages-v2-grid-min: 250px;
  gap: 8px;
  margin-top: 8px;
}

.pages-v2-card.is-tiny {
  box-shadow: var(--fc-shadow-sm);
}

.pages-v2-card.is-tiny .pages-v2-thumb {
  height: 150px;
}

.pages-v2-card.is-tiny .pages-v2-card-body {
  padding: 10px;
}

.pages-v2-card.is-tiny .pages-v2-title-row {
  gap: 8px;
}

.pages-v2-card.is-tiny .pages-v2-title-row h3 {
  font-size: var(--fc-text-lg);
}

.pages-v2-card.is-tiny .pages-v2-actions {
  grid-template-columns: minmax(0, 1fr) 40px 40px;
  margin-top: 10px;
}

.pages-v2-card.is-tiny .pages-v2-editor-btn,
.pages-v2-card.is-tiny .pages-v2-icon-btn {
  height: 38px;
}

.pages-v2-card.is-tiny .pages-v2-editor-btn {
  font-size: var(--fc-text-xs);
}

.pages-v2-card.is-tiny .pages-v2-play-float {
  width: 40px;
  height: 40px;
  top: 50px;
}

@media (max-width: 1180px) {
  .pages-v2-header {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 118px;
    gap: 14px;
    padding: 14px;
  }

  .pages-v2-brand { height: 86px; }
  .pages-v2-brand-art { width: 290px; left: -8px; bottom: -32px; }
  .pages-v2-brand-pages { left: 306px; bottom: 19px; font-size: var(--fc-text-3xl); }
  .pages-v2-identity-spacer { display: none; }
  .pages-v2-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
}

@media (max-width: 760px) {
  .pages-v2-header { padding: 14px; }
  .pages-v2-brand { height: 72px; }
  .pages-v2-brand-art { width: 230px; left: -10px; bottom: -27px; }
  .pages-v2-brand-pages { left: 245px; bottom: 15px; font-size: var(--fc-text-xl); }
  .pages-v2-frame { margin: -4px 10px 0; padding: 14px; border-radius: 24px 24px 0 0; }
  .pages-v2-grid { grid-template-columns: 1fr; }
  .pages-v2-thumb { height: 170px; }
  .pages-v2-tab { min-width: auto; padding: 0 14px; }
  .pages-v2-filter { min-width: 100%; }
  .pages-v2-search input { font-size: 16px; }
}
