/* Player-facing tools share the workshop's navigation and a light reading surface. */
@font-face {
  font-family: "Blockwork Display";
  src: url("./blockwork-display.woff") format("woff");
  font-display: swap;
}

:root {
  --studio-bg: #f5f6f0;
  --studio-ink: #212821;
  --studio-muted: #535f53;
  --studio-line: #d8dfd3;
  --studio-accent: #346528;
  --studio-accent-hover: #244c1b;
  --studio-tint: #e7f2d9;
  --player-header: #171b18;
  --player-lime: #b0ed64;
  --player-edge: #41483e;
  --pixel-font: "Blockwork Display", var(--heading-font);
}

body :is(.site-header, .credits-header, .video-header, .toy-header) {
  width: 100%;
  margin: 0;
  padding: 12px max(clamp(16px, 3.5vw, 48px), calc((100% - 1320px) / 2));
  min-height: 72px;
  background: var(--player-header);
  color: #f6f7ef;
  border-bottom: 1px solid var(--player-edge);
  box-shadow: none;
}

body :is(.brand-mark, .credits-brand-mark, .video-brand-mark, .toy-brand-mark) {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  background: url("./item-grass-block.png") center / contain no-repeat;
  image-rendering: pixelated;
}

header :is(.video-brand-mark, .toy-brand-mark)::before,
header :is(.video-brand-mark, .toy-brand-mark)::after { content: none; }
body header :is(.brand-name, .credits-brand-name, .video-brand-name, .toy-brand-name) {
  font-family: var(--pixel-font);
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0;
  color: #f5f7ef;
}

body header :is(.brand-tagline, .credits-brand-tagline, .video-brand-tagline, .toy-brand-tagline) {
  color: #bdc6b9;
  font-size: .75rem;
}
body header :is(.site-nav, .credits-nav) a,
body header .header-account-link {
  color: #e4e8df;
  font-size: .875rem;
  font-weight: 600;
  background: transparent;
}
body header :is(.site-nav, .credits-nav) a:hover,
body header .header-account-link:hover { background: transparent; color: var(--player-lime); }
body header :is(.header-cta, .credits-return, .video-home-link, .toy-home-link, .dashboard-header-add-credits) {
  background: var(--player-lime);
  color: #182315;
  border: 1px solid #94c854;
  border-bottom: 3px solid #719e40;
  border-radius: 4px;
  font-weight: 700;
}
body header :is(.header-cta, .credits-return, .video-home-link, .toy-home-link, .dashboard-header-add-credits):hover {
  background: #c6ff86;
  color: #11200e;
}
.credits-return-icon { stroke: currentColor; }
body .mobile-nav summary {
  color: #f5f7ef;
  background: #262d26;
  border-color: var(--player-edge);
  border-radius: 4px;
}
.mobile-nav-icon, .mobile-nav-icon::before, .mobile-nav-icon::after { background-color: currentColor; }
body .mobile-nav nav { border-radius: 5px; }
body .mobile-nav nav a:hover { background: var(--studio-tint); }

:focus-visible { outline: 3px solid #34721f !important; }
header :focus-visible { outline-color: var(--player-lime) !important; }
header .mobile-nav nav :focus-visible { outline-color: var(--studio-accent) !important; outline-offset: -3px; }
::selection { background: #c3eaa5; color: #172614; }

body .button, .shared-auth-primary, .shared-auth-secondary, .credits-signin-button,
.credits-pack .credits-pack-action, .toy-submit, .video-submit { border-radius: 4px; }
body .section-kicker, .credits-kicker, .shared-auth-kicker {
  color: var(--studio-accent);
  font-size: .75rem;
  letter-spacing: .09em;
}
body :is(.featured-panel, .process-card, .schematic-guide, .empty-state, .password-recovery-card,
         .viewer-panel, .viewer-materials, .build-detail-copy, .build-detail-materials) {
  border-radius: 8px;
}
body :is(.pill-accent, .pill-warm), body code {
  color: var(--studio-accent-hover);
  background: var(--studio-tint);
  border-color: #b9cfae;
}

body :is(.info-hero-copy, .credits-hero-copy, .dashboard-intro) h1 {
  font-family: var(--pixel-font);
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.16;
  overflow-wrap: anywhere;
}
.info-hero-copy h1::before, .credits-hero-copy h1::before {
  content: "";
  display: block;
  width: 3rem;
  height: 3rem;
  margin-bottom: .8rem;
  background: url("./item-map.png") left center / contain no-repeat;
  image-rendering: pixelated;
}
.credits-hero-copy h1::before { background-image: url("./item-ingot.png"); }
body .info-hero-layout .info-hero-panel {
  background: #e8efdf;
  border-color: #c7d6bd;
}
body .info-hero-layout .info-hero-panel p,
body .credits-hero-copy > p { font-size: 1rem; }

.viewer-meta .fact, body .viewer-meta span {
  color: #41503c;
  background: #eaf0e4;
  border-color: #cbd7c1;
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
}
body .viewer-view-button.is-active {
  background: var(--studio-tint) !important;
  color: var(--studio-accent-hover) !important;
  border-color: #8baa77 !important;
}
body .viewer-material-list > div { color: var(--studio-ink); border-color: var(--studio-line); }
body .viewer-world .viewer-toolbar .button { font-size: .875rem; }
.account-switcher { background: #eef1e9; }
.account-switcher button { color: #525c50; }
body input:focus, body textarea:focus, body select:focus {
  border-color: #689553;
  box-shadow: 0 0 0 3px #6b9c4520;
}

.credits-balance-card, .credits-cost-guide, .credits-trust-row span, .video-cost-card {
  background: #e8efdf;
  border-color: #c7d6bd;
}
.credits-balance-card, .credits-cost-guide, .credits-pack { border-radius: 8px; }
.credits-trust-row span, .credits-balance-card .credits-kicker, .credits-balance-card p,
.credits-balance-card .credits-account-chip { color: #3d5837; }
.credits-balance-card .credits-account-chip, .credits-balance-icon circle { background: #d6e6c9; fill: #d6e6c9; }
.credits-pack:nth-child(2) { border-color: #85ad66; background: #f5faef; }
.credits-pack .credits-pack-title { color: var(--studio-muted) !important; font-size: .875rem !important; }
.credits-pack .credits-pack-action { font-size: .875rem; }
.credits-pack .credits-pack-copy, .credits-section-head p, .credits-cost-guide p, .credits-pack .credits-pack-unit {
  font-size: .875rem;
  color: var(--studio-muted);
}
.cost-table th, .cost-table td { border-color: #cbd7c1; }
.cost-table th { color: #41583a; }
.cost-table { font-size: .875rem; }

.toy-shell, .video-shell { padding: 0; }
.toy-main, .video-main { width: min(1200px, calc(100% - 32px)); }
body header :is(.video-account, .toy-account) {
  background: #283026;
  color: #e8ede5;
  border: 1px solid var(--player-edge);
  border-radius: 4px;
}
body header :is(.video-signin-link, .toy-signin-link, .video-credit-pill, .toy-credit-pill) {
  background: #deebd6;
  color: #294527;
}

@media (max-width: 640px) {
  body :is(.site-header, .credits-header, .toy-header, .video-header) { min-height: 62px; gap: 10px; }
  body :is(.brand-mark, .credits-brand-mark, .toy-brand-mark, .video-brand-mark) {
    width: 32px; height: 32px; flex-basis: 32px;
  }
  body header :is(.brand-name, .credits-brand-name, .video-brand-name, .toy-brand-name) { font-size: 1rem; }
  .cost-table { font-size: .75rem; }
}
