/* ==========================================================================
   EverythingMinecraft — Entry pages
   Bright, cartoony, kid-friendly Minecraft style.
   ========================================================================== */

:root {
  --sky-top: #5ecfff;
  --sky-bottom: #8ee4ff;
  --grass-far: #5cb85c;
  --grass-near: #3d9e3d;
  --card: #fffef8;
  --card-inner: #ffffff;
  --ink: #243044;
  --ink-soft: #4a5568;
  --ink-muted: #64748b;
  --lime: #6ecf58;
  --lime-dark: #3d9142;
  --lime-shadow: #2d6b2a;
  --shadow-drop: #d2d8df;
  --sun: #ffcc33;
  --sun-dark: #e6a800;
  --sky-panel: #4ab8e8;
  --sky-panel-dark: #2a8fc4;
  --dirt: #a07840;
  --dirt-dark: #7a5a28;
  --slot-mid: #9e9e9e;
  --slot-inner: #eeeeee;
  --slot-edge: #5a5a5a;
  --font-ui: Consolas, "Liberation Mono", Menlo, monospace;
  --font-body: var(--font-ui);
  --font-display: var(--font-ui);
  --entry-font-sm: 13px;
  --entry-font-md: 14px;
  --entry-font-lg: 16px;
  --entry-font-xl: 20px;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --cartoon-shadow: 0 6px 0 var(--shadow-drop);
  --cartoon-shadow-lg: 0 8px 0 var(--shadow-drop);
  --slot-bevel: inset 2px 2px 0 #fff, inset -2px -2px 0 #6a6a6a;
  --property-label-width: 58ch;
  --property-value-width: 20ch;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  min-height: 100%;
  background-color: #2a3238;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--entry-font-md);
  font-weight: 400;
  color: var(--ink);
  background-color: #2a3238;
  background-image: url('/images/site/main_site.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  line-height: 1.65;
  overflow-x: hidden;
}

body.has-site-background {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

[hidden] {
  display: none !important;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--sky-panel-dark);
  font-weight: 700;
}

a:hover {
  color: #1a6fa0;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.wrap {
  min-height: 100vh;
  padding: 24px 16px 48px;
  display: grid;
  place-items: start center;
}

.page {
  position: relative;
  width: min(760px, 100%);
  border: 4px solid var(--lime-dark);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--cartoon-shadow-lg), 0 16px 40px rgba(0, 0, 0, 0.2);
  display: grid;
  align-content: start;
  overflow: hidden;
}

.entry-scroll-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 6px;
  width: 0;
  background: var(--sun);
  z-index: 5;
  transition: width 80ms linear;
  pointer-events: none;
  border-radius: 0 4px 4px 0;
}

.content {
  padding: 0;
}

.entry-page {
  display: grid;
  gap: 0;
}

.entry-flow {
  display: grid;
  gap: 28px;
  padding: 24px;
  background: #f4f6f8;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  background: #4a5f7a;
  border-bottom: 4px solid #35485c;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
  text-shadow: none;
}

.brand:hover {
  color: #fff;
  filter: brightness(1.05);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 3px solid #35485c;
  background: #6ecf58;
  box-shadow: var(--slot-bevel);
  flex-shrink: 0;
}

.brand-text {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 3px solid #35485c;
  border-radius: var(--radius-pill);
  background: #fff;
  color: #35485c;
  text-decoration: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 0 #2a3a4a;
  transition: transform 100ms ease, box-shadow 100ms ease;
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #2a3a4a;
  color: #35485c;
}

.nav-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #2a3a4a;
}

.nav-btn:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
}

.nav-btn--primary {
  background: var(--sun);
  border-color: var(--sun-dark);
  color: #5a3e00;
  box-shadow: 0 4px 0 #b8860b;
}

.nav-btn--primary:hover {
  color: #5a3e00;
  box-shadow: 0 6px 0 #b8860b;
}

.nav-btn--logout:hover {
  background: #ffe8e8;
  border-color: #d07070;
  color: #a04040;
}

/* --------------------------------------------------------------------------
   Hero / empty
   -------------------------------------------------------------------------- */

.hero {
  padding: 28px 20px;
  text-align: center;
  background: #e8f8fc;
  border-bottom: 3px dashed #b2dfdb;
}

.hero--compact {
  padding: 32px 20px;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--entry-font-xl);
  font-weight: 700;
  color: var(--sky-panel-dark);
  line-height: 1.15;
}

.empty {
  margin: 20px;
  padding: 28px 22px;
  border: 3px dashed #a5d6a7;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink-soft);
  font-size: var(--entry-font-md);
  text-align: center;
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   Entry header
   -------------------------------------------------------------------------- */

.entry-header {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 28px 20px 24px;
  text-align: center;
  background: #fff;
  border-bottom: 4px solid #d8dee6;
}

.slot {
  width: 120px;
  height: 120px;
  padding: 4px;
  border-radius: 14px;
  border: 4px solid var(--slot-edge);
  background: var(--slot-mid);
  box-shadow: var(--slot-bevel), 0 8px 0 rgba(0, 0, 0, 0.12);
}

.slot-inner {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: var(--slot-inner);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.block-thumb {
  display: block;
  width: 88px;
  height: 88px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.block-fallback {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  color: #aaa;
}

.entry-header-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(18px, 4vw, var(--entry-font-xl));
  font-weight: 700;
  line-height: 1.25;
  color: #35485c;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: none;
}

.entry-header-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.entry-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  border: 3px solid;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
  transition: transform 100ms ease, box-shadow 100ms ease;
}

.entry-social-btn:hover {
  transform: translateY(-2px);
}

.entry-social-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}

.entry-social-btn--like {
  background: #ff7eb3;
  border-color: #d84a7f;
  color: #fff;
  box-shadow: 0 4px 0 #b83a68;
}

.entry-social-btn--like:hover {
  box-shadow: 0 6px 0 #b83a68;
}

.entry-social-btn--share {
  background: #5eb8f0;
  border-color: #2a8fc4;
  color: #fff;
  box-shadow: 0 4px 0 #1a6a94;
}

.entry-social-btn--share:hover {
  box-shadow: 0 6px 0 #1a6a94;
}

.entry-social-icon {
  font-size: 16px;
  line-height: 1;
}

.entry-header-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 3px solid #a5d6a7;
  background: #fff;
  box-shadow: var(--cartoon-shadow);
}

.entry-header-tags .category-view {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.entry-header-tags .category-tags {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.category-kind-badge,
.category-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  border: 2px solid #6a7c90;
  background: #8a9cb0;
  color: #fff;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: none;
  box-shadow: 0 3px 0 var(--shadow-drop);
}

.category-chip--building-blocks { background: #5b9fd4; border-color: #3d7eb5; }
.category-chip--decorative-blocks { background: #b07ad4; border-color: #8f58b5; }
.category-chip--natural-blocks { background: #62c46a; border-color: #3fa348; }
.category-chip--wood-blocks { background: #c49050; border-color: #a07030; }
.category-chip--stone-blocks { background: #9a9aad; border-color: #7a7a8d; }
.category-chip--nether-blocks { background: #d06060; border-color: #b04040; }
.category-chip--end-blocks { background: #8a7ad8; border-color: #6a5ab8; }
.category-chip--redstone-blocks { background: #e05858; border-color: #c03838; }
.category-chip--functional-blocks { background: #50b8b8; border-color: #309898; }
.category-chip--storage-blocks { background: #d4a850; border-color: #b48830; }
.category-chip--utility-blocks { background: #58a8d8; border-color: #3888b8; }
.category-chip--light-sources { background: #e8c040; border-color: #c8a020; color: #4a3a10; }
.category-chip--tools { background: #a8b050; border-color: #889030; }
.category-chip--weapons { background: #e06868; border-color: #c04848; }
.category-chip--armor { background: #6888d8; border-color: #4868b8; }
.category-chip--food { background: #78d058; border-color: #58b038; }
.category-chip--materials-ingredients { background: #c8b858; border-color: #a89838; color: #4a4010; }
.category-chip--spawn-eggs { background: #d878c8; border-color: #b858a8; }
.category-chip--potions { background: #6868e8; border-color: #4848c8; }
.category-chip--music-discs { background: #9878c8; border-color: #7858a8; }

.category-kind-badge {
  background: var(--sky-panel);
  border-color: var(--sky-panel-dark);
  box-shadow: 0 3px 0 var(--shadow-drop);
}

.category-kind-badge.is-empty {
  background: #e0e0e0;
  border-color: #aaa;
  color: var(--ink-soft);
  box-shadow: none;
  text-shadow: none;
}

.category-empty {
  margin: 0;
  font-size: var(--entry-font-sm);
  color: var(--ink-muted);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Zones
   -------------------------------------------------------------------------- */

.entry-block,
.entry-zone {
  display: grid;
  gap: 28px;
}

.entry-zone-stack,
#block-properties-panel,
#item-properties-panel {
  display: grid;
  gap: 28px;
}

.entry-zone-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 0;
}

.entry-zone-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--dirt-dark);
}

.entry-zone--categories:not(:has(.category-edit:not([hidden]))) .category-shell {
  display: none;
}

.entry-zone--categories .category-shell {
  padding: 18px;
  border-radius: var(--radius);
  border: 3px solid var(--dirt);
  background: #fff8ee;
  box-shadow: 0 6px 0 var(--shadow-drop);
}

/* --------------------------------------------------------------------------
   Guide & property cards
   -------------------------------------------------------------------------- */

.guide-shell,
.property-shell {
  border-radius: var(--radius);
  border: 3px solid var(--lime-dark);
  background: var(--card-inner);
  overflow: hidden;
  box-shadow: var(--cartoon-shadow-lg);
}

.craft-shell,
.info-shell {
  border-radius: var(--radius);
  border: 3px solid var(--dirt);
  background: #fff8ee;
  overflow: hidden;
  box-shadow: 0 6px 0 var(--shadow-drop);
}

.guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(180deg, var(--lime) 0%, #55b84f 100%);
  border-bottom: 3px solid var(--lime-dark);
}

.property-shell .guide-head {
  background: linear-gradient(180deg, var(--sky-panel) 0%, var(--sky-panel-dark) 100%);
  border-bottom-color: var(--sky-panel-dark);
}

.guide-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--entry-font-lg);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.35;
  color: #fff;
  text-shadow: none;
}

.guide-view {
  padding: 18px 20px;
  background: var(--card-inner);
}

.guide-body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--entry-font-md);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.7;
  letter-spacing: 0;
  text-transform: none;
}

.guide-body.is-empty {
  color: var(--ink-muted);
  font-style: italic;
}

.guide-body p {
  margin: 0 0 14px;
}

.guide-body p:last-child {
  margin-bottom: 0;
}

.guide-body ul,
.guide-body ol {
  margin: 0 0 14px;
  padding-left: 1.4em;
}

.guide-body li {
  margin-bottom: 8px;
}

.guide-body strong {
  color: var(--ink);
  font-weight: 600;
}

.guide-edit {
  padding: 18px;
  background: #f0fff0;
  border-top: 3px dashed #c8e6c9;
}

.guide-edit-outline {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 2px dashed #a5d6a7;
  background: #fff;
}

.guide-edit-outline-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--lime-dark);
}

.guide-edit-outline-list {
  margin: 0;
  padding-left: 1.3em;
  font-size: var(--entry-font-sm);
  color: var(--ink-soft);
  line-height: 1.55;
}

.guide-input {
  width: 100%;
  min-height: 140px;
  padding: 14px 16px;
  border: 3px solid #a5d6a7;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--entry-font-md);
  font-weight: 600;
  line-height: 1.65;
  resize: vertical;
}

.guide-input:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 4px rgba(110, 207, 88, 0.35);
}

.guide-edit-actions,
.category-edit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.guide-status,
.category-status {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-muted);
}

.guide-status.is-success,
.category-status.is-success {
  color: var(--lime-dark);
}

.guide-status.is-error,
.category-status.is-error {
  color: #c05050;
}

/* --------------------------------------------------------------------------
   Property tables
   -------------------------------------------------------------------------- */

.property-view {
  background: var(--card-inner);
}

.property-grid {
  margin: 0;
}

.property-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-bottom: 2px solid #e8f5e9;
}

.property-row:last-child {
  border-bottom: 0;
}

.property-row:nth-child(even) {
  background: #fafffa;
}

.property-row:nth-child(even) dd {
  background: transparent;
}

.property-row dt {
  flex: 0 0 var(--property-label-width);
  width: var(--property-label-width);
  min-width: var(--property-label-width);
  margin: 0;
  padding: 12px 12px 12px 14px;
  background: #e8f5e9;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--entry-font-sm);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-right: 2px solid #c8e6c9;
  line-height: 1.45;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.property-row dt .property-desc {
  display: block;
  margin-top: 5px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-muted);
  line-height: 1.5;
}

.property-row dd {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  margin: 0;
  padding: 12px 14px;
  min-height: 100%;
  font-family: var(--font-body);
  font-size: var(--entry-font-md);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.5;
  text-align: center;
  word-break: break-word;
  background: transparent;
}

.property-row dd.is-empty {
  color: var(--ink-muted);
  font-weight: 600;
  font-style: italic;
}

.property-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 28px;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1;
  border: 2px solid;
  box-shadow: 0 3px 0 var(--shadow-drop);
  text-align: center;
  font-style: normal;
}

.property-value--yes {
  background: #55b84f;
  border-color: var(--lime-dark);
  color: #fff;
  text-shadow: none;
}

.property-value--no {
  background: #d85050;
  border-color: #a03030;
  color: #fff;
  text-shadow: none;
}

.property-row--wide {
  flex-direction: column;
}

.property-row--wide dt {
  flex: none;
  width: 100%;
  border-right: 0;
  border-bottom: 2px solid #c8e6c9;
}

.property-row--wide dd {
  margin: 0;
  padding: 12px 14px;
  max-width: none;
  text-align: center;
  justify-content: center;
  width: 100%;
}

.property-edit {
  padding: 18px;
  background: #f0fff0;
  border-top: 3px dashed #c8e6c9;
}

.property-form-grid {
  display: grid;
  gap: 14px;
}

.property-field {
  display: grid;
  gap: 6px;
}

.property-field--wide {
  grid-column: 1 / -1;
}

.property-label {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--lime-dark);
}

.property-desc {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-muted);
  line-height: 1.45;
}

.property-field-control {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.property-field-control .property-input,
.property-field-control .property-select,
.property-field-control .property-number,
.property-field-control .property-input-multiline {
  flex: 1;
  min-width: 0;
}

.property-na-btn {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 3px solid #a5d6a7;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--shadow-drop);
  transition: transform 100ms ease, box-shadow 100ms ease, background 100ms ease, border-color 100ms ease;
}

.property-na-btn:hover {
  transform: translateY(-1px);
  border-color: var(--ink-muted);
}

.property-na-btn.is-active {
  background: #e8f0f4;
  border-color: var(--sky-panel-dark);
  color: var(--sky-panel-dark);
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.06);
}

.property-na-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.property-input:disabled,
.property-select:disabled,
.property-number:disabled,
.property-input-multiline:disabled {
  background: #f0f0f0;
  color: var(--ink-muted);
  cursor: not-allowed;
}

.property-edit-field[hidden] {
  display: none !important;
}

.property-input,
.property-select,
.property-number {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 3px solid #a5d6a7;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--entry-font-md);
  font-weight: 600;
}

.property-input-multiline {
  min-height: 96px;
  resize: vertical;
  line-height: 1.55;
}

.property-input:focus,
.property-select:focus,
.property-number:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 4px rgba(110, 207, 88, 0.35);
}

/* --------------------------------------------------------------------------
   Category editor
   -------------------------------------------------------------------------- */

.category-edit-hint {
  margin: 12px 0 0;
  font-size: var(--entry-font-sm);
  color: var(--ink-soft);
  line-height: 1.55;
  text-align: center;
}

.category-group-hint {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 2px dashed #e0c9a0;
  background: #fff;
  font-size: var(--entry-font-sm);
  color: var(--ink-soft);
  line-height: 1.5;
}

.category-type-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.category-type-btn {
  min-height: 80px;
  padding: 16px;
  font-size: 18px;
}

.category-type-btn.is-selected {
  border-color: var(--lime-dark);
  background: #e8f8e8;
  color: var(--lime-dark);
  box-shadow: 0 0 0 4px rgba(110, 207, 88, 0.35);
}

.category-sub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.category-sub-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--entry-font-lg);
  font-weight: 700;
  color: var(--dirt-dark);
}

.category-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}

.category-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 3px solid #e0c9a0;
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: var(--entry-font-sm);
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  line-height: 1.4;
  box-shadow: var(--cartoon-shadow);
}

.category-option:hover {
  border-color: var(--dirt);
}

.category-option:has(input:checked) {
  border-color: var(--lime-dark);
  background: #e8f8e8;
}

.category-option input {
  margin: 3px 0 0;
  width: 18px;
  height: 18px;
  accent-color: var(--lime);
  flex-shrink: 0;
}

.category-has-tooltip {
  position: relative;
}

.category-has-tooltip[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: max-content;
  max-width: min(280px, 80vw);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 3px solid #35485c;
  background: #35485c;
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 140ms ease, visibility 140ms ease;
  z-index: 20;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.category-has-tooltip[data-tooltip]:hover::after,
.category-has-tooltip[data-tooltip]:focus-within::after {
  opacity: 1;
  visibility: visible;
}

.category-type-btn.category-has-tooltip[data-tooltip]::after {
  bottom: calc(100% + 8px);
}

.category-sub-title.category-has-tooltip[data-tooltip]::after {
  left: auto;
  right: 0;
  transform: none;
  bottom: calc(100% + 8px);
}

/* --------------------------------------------------------------------------
   Buttons — chunky cartoon style
   -------------------------------------------------------------------------- */

.category-edit-btn,
.guide-edit-btn,
.guide-save-btn,
.guide-cancel-btn,
.category-save-btn,
.category-cancel-btn,
.category-change-type-btn,
.category-type-btn,
.expert-save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border: 3px solid var(--lime-dark);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--lime-dark);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--shadow-drop);
  transition: transform 100ms ease, box-shadow 100ms ease;
}

.category-edit-btn:hover,
.guide-edit-btn:hover,
.guide-cancel-btn:hover,
.category-cancel-btn:hover,
.category-change-type-btn:hover,
.category-type-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--shadow-drop);
}

.category-edit-btn:active,
.guide-edit-btn:active,
.guide-save-btn:active,
.guide-cancel-btn:active,
.category-save-btn:active,
.category-cancel-btn:active,
.category-type-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--shadow-drop);
}

.guide-save-btn,
.category-save-btn,
.expert-save-btn {
  background: linear-gradient(180deg, var(--lime) 0%, #55b84f 100%);
  border-color: var(--lime-dark);
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

.guide-edit-btn,
.category-edit-btn {
  background: #fff;
}

/* --------------------------------------------------------------------------
   Crafting
   -------------------------------------------------------------------------- */

.craft-shell > h2,
.info-shell > h2 {
  margin: 0;
  padding: 14px 18px;
  background: var(--dirt);
  border-bottom: 3px solid var(--dirt-dark);
  font-family: var(--font-display);
  font-size: var(--entry-font-lg);
  font-weight: 700;
  color: #fff;
  text-shadow: none;
  text-transform: capitalize;
}

.craft-list {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.craft-recipe {
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 3px solid #e0c9a0;
  background: #fff;
  box-shadow: var(--cartoon-shadow);
}

.craft-table {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 18px;
}

.craft-input,
.craft-output {
  display: flex;
  align-items: center;
  justify-content: center;
}

.craft-output,
.craft-station-wrap {
  position: relative;
}

.craft-output::before,
.craft-station-wrap::before {
  content: "➜";
  position: absolute;
  right: calc(100% + 4px);
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  line-height: 1;
  color: var(--lime-dark);
  filter: drop-shadow(1px 1px 0 #fff);
}

.craft-station-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.craft-grid {
  display: grid;
  grid-template-columns: repeat(3, 52px);
  gap: 4px;
  padding: 6px;
  border-radius: 12px;
  border: 4px solid var(--slot-edge);
  background: var(--slot-mid);
  box-shadow: var(--slot-bevel), 0 6px 0 rgba(0, 0, 0, 0.1);
}

.craft-slot,
.craft-station {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
}

.craft-slot-box {
  width: 52px;
  height: 52px;
  padding: 3px;
  border: none;
  background: transparent;
  box-shadow: none;
}

.craft-input > .craft-slot > .craft-slot-box,
.craft-output > .craft-slot > .craft-slot-box {
  border-radius: 10px;
  border: 3px solid var(--slot-edge);
  background: var(--slot-mid);
  box-shadow: var(--slot-bevel);
}

.craft-grid .craft-slot-box {
  width: 46px;
  height: 46px;
}

.craft-station .craft-slot-box {
  width: 58px;
  height: 58px;
  padding: 3px;
  border-radius: 10px;
  border: 3px solid var(--slot-edge);
  background: var(--slot-mid);
  box-shadow: var(--slot-bevel);
}

.craft-slot-inner {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--slot-inner);
  position: relative;
  overflow: hidden;
}

.craft-thumb {
  width: 38px;
  height: 38px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.craft-station .craft-thumb {
  width: 42px;
  height: 42px;
}

.craft-fallback {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #aaa;
}

.craft-count {
  position: absolute;
  right: 2px;
  bottom: 1px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-shadow: 1px 1px 0 #000, -1px 0 0 #000, 0 -1px 0 #000;
  line-height: 1;
  pointer-events: none;
}

.craft-cycle-inner {
  position: relative;
}

.craft-cycle-item {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 38px;
  height: 38px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  opacity: 0;
  transition: opacity 300ms ease;
}

.craft-cycle-item.is-active {
  opacity: 1;
}

.craft-slot-link {
  cursor: pointer;
}

.craft-slot-link:hover .craft-slot-inner {
  filter: brightness(1.06) saturate(1.1);
  transform: scale(1.04);
}

.craft-slot-link:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
  border-radius: 8px;
}

.craft-slot-link::after,
.craft-slot-static[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  min-width: max-content;
  max-width: 220px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  border: 3px solid var(--lime-dark);
  background: var(--lime);
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 140ms ease, visibility 140ms ease;
  z-index: 10;
  box-shadow: 0 4px 0 var(--shadow-drop);
}

.craft-slot-link:hover::after,
.craft-slot-link:focus-visible::after,
.craft-slot-static[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
}

.recipe-cook-time {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--sun-dark);
}

.recipe-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px;
}

.recipe-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--dirt);
  background: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--dirt-dark);
  line-height: 1.3;
}

/* --------------------------------------------------------------------------
   Typography utilities
   -------------------------------------------------------------------------- */

.entry-text-sm {
  font-size: var(--entry-font-sm);
}

.entry-text-md {
  font-size: var(--entry-font-md);
}

.entry-text-lg {
  font-size: var(--entry-font-lg);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .wrap {
    padding: 12px 10px 32px;
  }

  .page {
    border-radius: 16px;
    border-width: 3px;
  }

  .nav {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-group {
    width: 100%;
  }

  .nav-group .nav-btn {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 44px;
  }

  .entry-header {
    padding: 22px 16px 20px;
  }

  .slot {
    width: 100px;
    height: 100px;
  }

  .block-thumb,
  .block-fallback {
    width: 72px;
    height: 72px;
  }

  .entry-flow {
    padding: 14px;
    gap: 16px;
  }

  .property-row {
    flex-direction: column;
    gap: 0;
  }

  .property-row dt {
    flex: none;
    width: 100%;
    border-right: 0;
    border-bottom: 2px solid #c8e6c9;
  }

  .property-row dd {
    margin: 0;
    padding: 12px 14px;
    max-width: none;
    text-align: center;
    justify-content: center;
    width: 100%;
  }

  .category-type-picker,
  .category-picker-grid {
    grid-template-columns: 1fr;
  }

  .craft-table {
    flex-direction: column;
    gap: 20px;
  }

  .craft-station-wrap::before,
  .craft-output::before {
    display: none;
  }

  .craft-station-wrap::after {
    content: "⬇";
    font-size: 24px;
    color: var(--lime-dark);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
