@import url('https://fonts.googleapis.com/css2?family=Bangers&display=swap');

@font-face {
  font-family: 'Bangers Cyrillic';
  src: url('../fonts/bangerscyrillic.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Anime Ace';
  src: url('../fonts/Anime Ace.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  size-adjust: 70%;
}

:root {
  --lt-yellow: #f4f1de;
  --lt-red: #e63946;
  --lt-blue: #1d3557;
  --lt-cyan: #00b4d8;
  --lt-white: #ffffff;
  --lt-black: #000000;
  --lt-shadow-text: #000000;
  --lt-heading-color: #ffd700;
  --lt-heading-stroke: #000000;
  --lt-heading-outline:
    -2px -2px 0 var(--lt-heading-stroke),
    0 -2px 0 var(--lt-heading-stroke),
    2px -2px 0 var(--lt-heading-stroke),
    -2px 0 0 var(--lt-heading-stroke),
    2px 0 0 var(--lt-heading-stroke),
    -2px 2px 0 var(--lt-heading-stroke),
    0 2px 0 var(--lt-heading-stroke),
    2px 2px 0 var(--lt-heading-stroke);
  --lt-heading-outline-sm:
    -1px -1px 0 var(--lt-heading-stroke),
    0 -1px 0 var(--lt-heading-stroke),
    1px -1px 0 var(--lt-heading-stroke),
    -1px 0 0 var(--lt-heading-stroke),
    1px 0 0 var(--lt-heading-stroke),
    -1px 1px 0 var(--lt-heading-stroke),
    0 1px 0 var(--lt-heading-stroke),
    1px 1px 0 var(--lt-heading-stroke);
  --lt-gray: #f0f0f0;
  --lt-muted: #6b5e53;
  --lt-shadow: 6px 6px 0 var(--lt-black);
  --lt-border: 4px solid var(--lt-black);
  --lt-radius: 0px;
  --font-display: 'Bangers Cyrillic', 'Bangers', cursive;
  --font-body: 'Anime Ace', 'Bangers Cyrillic', 'Bangers', cursive;
}

/* Глобальный альтернативный шрифт основного текста сайта */
body.site-font-neucha {
  --font-body: 'Neucha', 'Anime Ace', 'Bangers Cyrillic', 'Bangers', cursive;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  min-height: 100%;
  background-color: var(--lt-yellow);
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  background-color: var(--lt-yellow);
  color: var(--lt-black);
  line-height: 1.5;
  background-image:
    radial-gradient(circle, var(--lt-red) 1.5px, transparent 1.5px);
  background-size: 16px 16px;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 1rem 0;
}

a {
  color: var(--lt-blue);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  font-weight: 700;
}

a:hover {
  color: var(--lt-red);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border: var(--lt-border);
  box-shadow: var(--lt-shadow);
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1rem;
}

/* Header */
.main-header,
.site-header {
  background: transparent;
  border-bottom: var(--lt-border);
  box-shadow: var(--lt-shadow);
  margin-bottom: 2rem;
  position: relative;
}

.main-header::after,
.site-header::after {
  content: "POP!";
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--lt-red);
  color: var(--lt-white);
  font-family: var(--font-display);
  font-size: 1.2rem;
  padding: 0.25rem 0.75rem;
  border: var(--lt-border);
  transform: rotate(12deg);
  box-shadow: 3px 3px 0 var(--lt-black);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr auto auto;
  grid-template-rows: auto auto;
  gap: 1rem;
}

.logo {
  grid-column: 1;
  grid-row: 1;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--lt-red);
  text-shadow: 3px 3px 0 var(--lt-black);
  text-decoration: none;
  letter-spacing: 2px;
}

.logo:hover {
  color: var(--lt-heading-color);
  text-shadow: var(--lt-heading-outline-sm);
}

.header-actions {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.main-nav {
  grid-column: 1 / 4;
  grid-row: 2;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
}

.main-nav a,
.nav-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--lt-cyan);
  color: var(--lt-black);
  border: var(--lt-border);
  box-shadow: 4px 4px 0 var(--lt-black);
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.2rem;
  transition: transform 0.1s, box-shadow 0.1s;
}

.main-nav a:hover,
.nav-link:hover {
  background: var(--lt-red);
  color: var(--lt-white);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--lt-black);
}

.header-search {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  width: 320px;
  max-width: 100%;
  gap: 0.5rem;
  margin: 0;
}

.header-search .search-input {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.9rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: var(--lt-border);
  background: var(--lt-gray);
  box-shadow: 3px 3px 0 var(--lt-black);
  outline: none;
}

.header-search .search-input:focus {
  background: var(--lt-white);
}

.header-search .search-btn {
  padding: 0.6rem 0.9rem;
  background: var(--lt-red);
  color: var(--lt-white);
  border: var(--lt-border);
  box-shadow: 3px 3px 0 var(--lt-black);
  font-size: 1.1rem;
  cursor: pointer;
}

.header-search .search-btn:hover {
  background: var(--lt-blue);
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: 0.25rem 0 0 0;
  padding: 0;
  list-style: none;
  background: var(--lt-white);
  border: var(--lt-border);
  box-shadow: var(--lt-shadow);
  z-index: 100;
  max-height: 240px;
  overflow-y: auto;
}

.search-suggestions[hidden] {
  display: none;
}

.search-suggestions li {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-weight: 700;
  border-bottom: 2px solid var(--lt-gray);
}

.search-suggestions li:last-child {
  border-bottom: none;
}

.search-suggestions li:hover,
.search-suggestions li.active {
  background: var(--lt-yellow);
}

.main-nav .nav-link-admin,
.nav-link.nav-link-admin {
  background: var(--lt-red);
  color: var(--lt-white);
}

.main-nav .nav-link-editor,
.nav-link.nav-link-editor {
  background: #2ecc71;
  color: #000000;
}

.main-nav .nav-link-editor:hover,
.nav-link.nav-link-editor:hover {
  background: #27ae60;
  color: #000000;
}

.main-nav .nav-link-combo,
.nav-link.nav-link-combo,
.main-nav .nav-link-roulette,
.nav-link.nav-link-roulette,
.main-nav .nav-link-news,
.nav-link.nav-link-news,
.main-nav .nav-link-ingredients,
.nav-link.nav-link-ingredients {
  background: var(--lt-heading-color);
  color: var(--lt-black);
}

.main-nav .nav-link-combo:hover,
.nav-link.nav-link-combo:hover,
.main-nav .nav-link-roulette:hover,
.nav-link.nav-link-roulette:hover,
.main-nav .nav-link-news:hover,
.nav-link.nav-link-news:hover,
.main-nav .nav-link-ingredients:hover,
.nav-link.nav-link-ingredients:hover {
  background: var(--lt-red);
  color: var(--lt-white);
}

.theme-toggle {
  background: var(--lt-yellow);
  border: var(--lt-border);
  box-shadow: 4px 4px 0 var(--lt-black);
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
}

.theme-toggle:hover {
  background: var(--lt-blue);
  color: var(--lt-white);
}

.menu-toggle {
  display: none;
}

/* Page header / Hero */
.page-header,
.hero {
  margin-bottom: 2rem;
  padding: 2rem;
  background: var(--lt-white);
  border: var(--lt-border);
  box-shadow: var(--lt-shadow);
  position: relative;
  text-align: center;
}

.page-header h1,
.hero-title {
  font-size: 3rem;
  color: var(--lt-heading-color);
  text-shadow: var(--lt-heading-outline-sm);
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

.page-header p,
.hero-subtitle {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
}

.section-page-hero {
  margin-bottom: 2rem;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.section-hero-inner {
  background: var(--lt-white);
  border: var(--lt-border);
  box-shadow: var(--lt-shadow);
  padding: 0;
  text-align: center;
}

.section-hero-inner .hero-title {
  padding: 1rem 1rem 0.5rem;
  margin-bottom: 0;
}

.section-hero-inner .hero-subtitle {
  padding: 0 1rem 1rem;
}

.section-hero-inner .recipe-meta-bar {
  justify-content: center;
  padding: 0 1rem 1rem;
}

/* Search */
.search-box {
  display: flex;
  gap: 0.5rem;
  max-width: 600px;
  margin: 1.5rem auto 0;
}

.search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1.1rem;
  border: var(--lt-border);
  background: var(--lt-gray);
  box-shadow: 3px 3px 0 var(--lt-black);
  outline: none;
}

.search-input:focus {
  background: var(--lt-white);
}

.search-btn {
  padding: 0.75rem 1rem;
  background: var(--lt-red);
  color: var(--lt-white);
  border: var(--lt-border);
  box-shadow: 3px 3px 0 var(--lt-black);
  font-size: 1.2rem;
  cursor: pointer;
}

.search-btn:hover {
  background: var(--lt-blue);
}

/* Categories bar */
.categories-bar {
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--lt-white);
  border: var(--lt-border);
  box-shadow: var(--lt-shadow);
}

.categories-list {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.category-pill {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--lt-cyan);
  color: var(--lt-black);
  border: var(--lt-border);
  box-shadow: 3px 3px 0 var(--lt-black);
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
}

.category-pill:hover,
.category-pill.active {
  background: var(--lt-red);
  color: var(--lt-white);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--lt-black);
}

/* Section titles */
.section-title {
  font-size: 1.8rem;
  color: var(--lt-heading-color);
  text-shadow: var(--lt-heading-outline-sm);
  letter-spacing: 2px;
  margin-bottom: 1rem;
  border-bottom: 4px solid var(--lt-black);
  padding-bottom: 0.5rem;
}

.news-date-group {
  margin-bottom: 2.5rem;
}

.news-date-title {
  font-size: 1.6rem;
  color: var(--lt-red);
  text-shadow: var(--lt-heading-outline-sm);
  letter-spacing: 1px;
  margin-bottom: 1rem;
  padding: 0.4rem 0.8rem;
  background: var(--lt-white);
  border: 3px solid var(--lt-black);
  box-shadow: 3px 3px 0 var(--lt-black);
  display: inline-block;
}

/* Cards */
.card {
  background: var(--lt-white);
  border: var(--lt-border);
  box-shadow: var(--lt-shadow);
  padding: 1rem;
  margin-bottom: 1.25rem;
  transition: transform 0.1s;
}

.card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--lt-black);
}

.card h2 {
  color: var(--lt-red);
  font-size: 1.6rem;
  border-bottom: 4px solid var(--lt-black);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.card h3 {
  color: var(--lt-blue);
  font-size: 1.2rem;
  margin-top: 1rem;
}

/* Buttons */
.btn,
.admin-btn,
.back-link,
.print-btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: var(--lt-red);
  color: var(--lt-white);
  border: var(--lt-border);
  box-shadow: 4px 4px 0 var(--lt-black);
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: transform 0.1s, box-shadow 0.1s;
}

.btn:hover,
.admin-btn:hover,
.back-link:hover,
.print-btn:hover {
  background: var(--lt-blue);
  color: var(--lt-white);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--lt-black);
}

.btn-secondary {
  background: var(--lt-cyan);
  color: var(--lt-black);
}

.btn-secondary:hover {
  background: var(--lt-yellow);
  color: var(--lt-black);
}

.btn-primary {
  background: var(--lt-red);
  color: var(--lt-white);
}

.btn-danger {
  background: var(--lt-red);
  color: var(--lt-white);
}

.btn-danger:hover {
  background: #ff4d5a;
  color: var(--lt-white);
}

.print-btn {
  background: var(--lt-blue);
}

.recipe-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.edit-btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: var(--lt-cyan);
  color: var(--lt-black);
  border: var(--lt-border);
  box-shadow: 4px 4px 0 var(--lt-black);
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: transform 0.1s, box-shadow 0.1s;
}

.edit-btn:hover {
  background: var(--lt-yellow);
  color: var(--lt-black);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--lt-black);
}

/* Recipe grid */
.recipe-grid,
.recipes-grid,
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.recipes-section {
  margin-bottom: 2rem;
}

.recipe-card {
  background: var(--lt-white);
  border: var(--lt-border);
  box-shadow: var(--lt-shadow);
  overflow: hidden;
  transition: transform 0.1s;
}

.recipe-card:hover {
  transform: translate(-3px, -3px) rotate(-1deg);
  box-shadow: 8px 8px 0 var(--lt-black);
}

.recipe-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.recipe-card-link:hover {
  color: inherit;
}

.recipe-card-image,
.recipe-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border: none;
  border-bottom: var(--lt-border);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lt-cyan);
}

.recipe-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.recipe-image-large {
  height: 100%;
  max-width: 100%;
  border-bottom: none;
}

.recipe-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lt-cyan);
  border: var(--lt-border);
  box-shadow: var(--lt-shadow);
}

.recipe-image-text {
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--lt-white);
  text-shadow: 4px 4px 0 var(--lt-black);
}

.recipe-image-upload {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.recipe-image-input {
  font-family: inherit;
}

.recipe-image-preview-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.recipe-image-preview {
  max-width: 300px;
  max-height: 200px;
  border: var(--lt-border);
  box-shadow: var(--lt-shadow);
  object-fit: cover;
}

.recipe-card-body {
  padding: 1rem;
}

.recipe-card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--lt-blue);
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
}

.recipe-category {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: var(--lt-yellow);
  border: 3px solid var(--lt-black);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.recipe-card-meta,
.recipe-meta {
  font-size: 0.9rem;
  color: var(--lt-black);
  font-weight: 700;
}

.recipe-children {
  padding: 1rem;
  border-top: 3px dashed var(--lt-black);
  background: var(--lt-yellow);
}

.recipe-children-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--lt-red);
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
}

.recipe-children-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.recipe-children-item a {
  display: block;
  padding: 0.5rem 0.75rem;
  background: var(--lt-white);
  border: 3px solid var(--lt-black);
  box-shadow: 3px 3px 0 var(--lt-black);
  color: var(--lt-blue);
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.1s;
}

.recipe-children-item a:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--lt-black);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  background: var(--lt-yellow);
  border: 3px solid var(--lt-black);
  font-weight: 700;
  font-size: 0.85rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.badge-red { background: var(--lt-red); color: var(--lt-white); }
.badge-blue { background: var(--lt-blue); color: var(--lt-white); }
.badge-cyan { background: var(--lt-cyan); color: var(--lt-black); }

.stub-badge {
  background: var(--lt-red);
  color: var(--lt-white);
  transform: rotate(-3deg);
}

/* Contents */
.contents-section {
  margin-bottom: 2rem;
}

.contents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.contents-card {
  background: var(--lt-white);
  border: var(--lt-border);
  box-shadow: var(--lt-shadow);
  padding: 1.25rem;
}

.contents-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--lt-black);
}

.contents-card-wide {
  max-width: 100%;
}

.contents-list-horizontal {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

.back-link-wrap {
  margin-top: 1.5rem;
}

.contents-section-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--lt-red);
  border-bottom: 4px solid var(--lt-black);
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}

.contents-subsection-block {
  margin-bottom: 1.25rem;
}

.contents-subsection-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--lt-red);
  margin: 0.75rem 0 0.5rem 0;
  text-transform: uppercase;
}

.contents-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contents-list li,
.contents-item {
  margin-bottom: 0.5rem;
}

.contents-list a,
.contents-link {
  display: block;
  padding: 0.6rem 1rem;
  background: var(--lt-white);
  border: 3px solid var(--lt-black);
  box-shadow: 3px 3px 0 var(--lt-black);
  color: var(--lt-blue);
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.1s;
}

.contents-list a:hover,
.contents-link:hover {
  background: var(--lt-yellow);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--lt-black);
}

.contents-item-with-children {
  flex-wrap: wrap;
}

.contents-children-list {
  list-style: none;
  padding: 0;
  margin: 0.35rem 0 0 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-left: 0.75rem;
}

.contents-children-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
}

.contents-child-link {
  flex: 1;
  display: block;
  padding: 0.4rem 0.75rem;
  background: var(--lt-yellow);
  border: 2px solid var(--lt-black);
  box-shadow: 2px 2px 0 var(--lt-black);
  color: var(--lt-blue);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.1s;
}

.contents-child-link:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--lt-black);
}

.contents-missing,
.contents-list a.stub-link {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--lt-red);
  border: 3px dashed var(--lt-black);
  background: var(--lt-gray);
  font-weight: 700;
}

.contents-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.combo-checkbox-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.combo-recipe-check {
  width: 20px;
  height: 20px;
  accent-color: var(--lt-red);
  cursor: pointer;
}

.contents-link {
  flex: 1;
}

/* Combo builder */
.combo-builder {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--lt-white);
  border-top: 4px solid var(--lt-black);
  box-shadow: 0 -4px 0 var(--lt-black);
  z-index: 100;
  padding: 1rem;
}

.combo-builder-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.combo-builder-count {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--lt-red);
  flex-shrink: 0;
}

.combo-builder-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex: 1;
}

.combo-builder-item {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--lt-yellow);
  border: 2px solid var(--lt-black);
  font-weight: 700;
  font-size: 0.95rem;
}

.combo-page .recipe-hero-inner {
  display: block;
  text-align: center;
  background: var(--lt-white);
  border: var(--lt-border);
  box-shadow: var(--lt-shadow);
  padding: 0;
}

.combo-page .recipe-hero-content {
  align-items: center;
  padding: 1rem;
}

.combo-page .recipe-meta-bar {
  justify-content: center;
}

.combo-page .combo-recipe {
  background: var(--lt-white);
  border: 4px solid var(--lt-black);
  box-shadow: 5px 5px 0 var(--lt-black);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.combo-recipe-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 4px solid var(--lt-black);
}

.combo-recipe-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--lt-red);
  margin: 0;
  flex: 1;
}

.combo-remove-recipe {
  flex-shrink: 0;
}

.combo-recipe-description {
  margin-bottom: 1rem;
  font-weight: 700;
}

.combo-recipe-blocks .recipe-blocks-header {
  margin-top: 0;
}

/* ===== Комбо: сумма покупок ===== */
.combo-shopping-summary {
  background: var(--lt-white);
  border: var(--lt-border);
  box-shadow: var(--lt-shadow);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.combo-shopping-summary .section-title {
  margin: 0 0 1rem 0;
}

.shopping-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.shopping-list-item {
  font-size: 1rem;
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  background: var(--lt-white);
  border: var(--lt-border);
  padding: 0.5rem 0.75rem;
}

.shopping-list-item.checked {
  text-decoration: line-through;
  opacity: 0.6;
  background: transparent;
  border-color: transparent;
}

.shopping-list-name {
  font-weight: 700;
  line-height: 1.3;
}

.shopping-list-qty {
  color: var(--lt-blue);
  font-weight: 700;
  white-space: nowrap;
}

/* Recipe page */
.recipe-page {
  margin-bottom: 2rem;
}

.recipe-hero {
  margin-bottom: 2rem;
}

.recipe-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 320px) 1fr;
  gap: 2rem;
  align-items: stretch;
  background: var(--lt-white);
  border: var(--lt-border);
  box-shadow: var(--lt-shadow);
  padding: 0;
}

.recipe-hero-image {
  padding: 1rem;
  max-width: 100%;
  overflow: hidden;
}

.recipe-hero-content {
  padding: 1rem;
}

@media (max-width: 768px) {
  .recipe-hero-inner {
    grid-template-columns: 1fr;
  }

  .recipe-hero-image {
    padding: 0.5rem;
    max-width: 100%;
    overflow: hidden;
  }

  .recipe-image-large {
    height: auto;
    max-height: 220px;
    max-width: 100%;
  }

  .recipe-title {
    font-size: 2rem;
  }

  .breadcrumbs {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .recipe-title {
    font-size: 1.6rem;
  }
}

.recipe-hero-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.breadcrumbs {
  font-weight: 700;
  font-size: 0.95rem;
}

.breadcrumbs a {
  color: var(--lt-red);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs span {
  margin: 0 0.25rem;
}

.recipe-title {
  font-size: 2.8rem;
  color: var(--lt-heading-color);
  text-shadow: var(--lt-heading-outline-sm);
  letter-spacing: 2px;
  margin: 0;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.recipe-meta-bar {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.recipe-meta-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: var(--lt-yellow);
  border: 3px solid var(--lt-black);
  font-weight: 700;
  font-size: 0.95rem;
}

.recipe-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Servings card */
.servings-card {
  background: var(--lt-white);
  border: var(--lt-border);
  box-shadow: var(--lt-shadow);
  padding: 1rem 1.25rem;
  display: inline-block;
  align-self: flex-start;
}

.servings-sticky {
  position: sticky;
  top: 1rem;
  z-index: 10;
}

.servings-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.servings-label {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--lt-blue);
}

.servings-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.servings-btn {
  width: 40px;
  height: 40px;
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--lt-cyan);
  color: var(--lt-white);
  border: var(--lt-border);
  box-shadow: 3px 3px 0 var(--lt-black);
  cursor: pointer;
}

.servings-btn:hover {
  background: var(--lt-red);
}

.servings-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  min-width: 2ch;
  text-align: center;
}

.servings-hint {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.servings-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.servings-label-inline {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--lt-black);
}

.servings-meta .servings-btn {
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
}

.servings-meta .servings-value {
  font-size: 1.2rem;
}

.add-to-combo-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: var(--lt-cyan);
  border: 3px solid var(--lt-black);
  box-shadow: 3px 3px 0 var(--lt-black);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--lt-black);
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}

.add-to-combo-btn:hover {
  background: var(--lt-red);
}

.add-to-combo-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--lt-black);
}

.add-to-combo-btn.added,
.add-to-combo-btn.in-combo {
  background: #2ecc71;
}

.last-eaten-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: var(--lt-cyan);
  border: 3px solid var(--lt-black);
  box-shadow: 3px 3px 0 var(--lt-black);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--lt-black);
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}

.last-eaten-btn:hover {
  background: var(--lt-red);
}

.last-eaten-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--lt-black);
}

.last-eaten-btn.added {
  background: #2ecc71;
}

.last-eaten-count {
  font-size: 0.8em;
  opacity: 0.85;
}

.wake-lock-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: var(--lt-cyan);
  border: 3px solid var(--lt-black);
  box-shadow: 3px 3px 0 var(--lt-black);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--lt-black);
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}

.wake-lock-btn:hover {
  background: var(--lt-red);
}

.wake-lock-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--lt-black);
}

.wake-lock-btn.active {
  background: #2ecc71;
}

/* ===== Раздел «Ингредиенты» ===== */
.ingredients-page .ingredient-category {
  margin-bottom: 2rem;
}

.ingredient-category-title {
  margin-bottom: 1rem;
}

.ingredients-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.ingredient-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  background: var(--lt-white);
  border: 3px solid var(--lt-black);
  box-shadow: 3px 3px 0 var(--lt-black);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--lt-black);
  text-decoration: none;
  transition: background 0.15s, transform 0.05s;
}

.ingredient-chip:hover {
  background: var(--lt-cyan);
  color: var(--lt-black);
}

.ingredient-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.3rem;
  background: var(--lt-yellow);
  border: 2px solid var(--lt-black);
  font-size: 0.75rem;
}

/* ===== Список покупок с группировкой по категориям ===== */
.shopping-category {
  margin-bottom: 1.5rem;
}

.shopping-category-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--lt-red);
  margin: 0 0 0.75rem 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.shopping-category-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.meat-types-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem;
}

.meat-type-item {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.meat-icon {
  width: 1.2rem;
  height: 1.2rem;
  display: inline-block;
  vertical-align: middle;
  transform: translateY(-0.12em);
  border: none;
  box-shadow: none;
}

.meat-type-sep {
  margin: 0 0.1rem;
}

/* Description */
.recipe-description {
  background: var(--lt-white);
  border: var(--lt-border);
  box-shadow: var(--lt-shadow);
  padding: 1.25rem;
  font-size: 1.1rem;
}

/* Recipe blocks in single container */
.recipe-blocks-container,
.recipe-notes {
  background: var(--lt-white);
  padding: 1.25rem;
}

.recipe-notes .recipe-notes-title {
  color: var(--lt-heading-color);
  margin-bottom: 1rem;
}

.recipe-notes-content {
  font-size: 1.1rem;
  font-weight: 700;
}

.recipe-note-item {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.recipe-note-number {
  font-family: var(--font-display);
  color: var(--lt-red);
  font-size: 1.2rem;
  line-height: 1.4;
  flex-shrink: 0;
}

.recipe-note-text {
  line-height: 1.4;
}

.recipe-blocks-header {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0;
  border-bottom: none;
}

.recipe-blocks-header .ingredients-title,
.recipe-blocks-header .section-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--lt-heading-color);
  text-shadow: var(--lt-heading-outline-sm);
  text-transform: uppercase;
  letter-spacing: 2px;
  border-bottom: 4px solid var(--lt-black);
  padding-bottom: 0.5rem;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .recipe-blocks-header {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

.recipe-blocks {
  display: flex;
  flex-direction: column;
}

.recipe-block {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 2px dashed var(--lt-black);
}

.recipe-block:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.recipe-block:first-child {
  padding-top: 0;
}

@media (max-width: 768px) {
  .recipe-block {
    grid-template-columns: 1fr;
    border-bottom: none;
    border-top: 2px dashed var(--lt-black);
  }
  .recipe-block:first-child {
    border-top: none;
  }
}

.recipe-block-ingredients,
.recipe-block-instructions {
  min-width: 0;
}

.ingredients-title,
.recipe-block-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--lt-blue);
  margin: 0;
}

.ingredients-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ingredient-item {
  padding: 0.5rem 0;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
}

.ingredient-checkbox {
  width: 22px;
  height: 22px;
  accent-color: var(--lt-red);
  cursor: pointer;
  flex-shrink: 0;
}

.ingredient-text {
  display: inline;
}

.ingredient-quantity {
  color: var(--lt-red);
  font-weight: 700;
  margin-right: 0.25rem;
}

.ingredient-name {
  color: var(--lt-black);
}

.ingredient-item.checked .ingredient-text {
  text-decoration: line-through;
  opacity: 0.45;
}

.ingredient-item.checked .ingredient-quantity {
  color: var(--lt-black);
}

.instructions-list {
  padding-left: 1.5rem;
  margin: 0;
}

.instruction-step {
  margin-bottom: 0.75rem;
  padding: 0.5rem 0 0.5rem 0.5rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.15s;
}

.instruction-step:hover {
  opacity: 0.8;
}

.instruction-step.done .step-content {
  text-decoration: line-through;
  opacity: 0.5;
}

.instructions-list li::marker,
.step-number {
  font-family: var(--font-display);
  color: var(--lt-red);
  font-size: 1.2rem;
  line-height: 1.5;
  flex-shrink: 0;
}

.step-content {
  font-weight: 700;
}

/* Stub */
.stub-message {
  background: var(--lt-yellow);
  border: var(--lt-border);
  box-shadow: var(--lt-shadow);
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.stub-message::before {
  content: "?";
  position: absolute;
  top: -20px;
  right: -10px;
  font-family: var(--font-display);
  font-size: 8rem;
  color: var(--lt-red);
  opacity: 0.2;
  line-height: 1;
}

.stub-title {
  color: var(--lt-red);
  font-size: 2rem;
}

.stub-text {
  font-weight: 700;
  font-size: 1.1rem;
}

/* Category page */
.category-header {
  background: var(--lt-white);
  border: var(--lt-border);
  box-shadow: var(--lt-shadow);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.category-title {
  font-size: 2.2rem;
  color: var(--lt-red);
  text-shadow: 3px 3px 0 var(--lt-black);
  margin-bottom: 0.5rem;
}

.category-count {
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0;
}

/* Related */
.related-section,
.related-recipes-section {
  margin-top: 2rem;
}

/* Subrecipes */
.subrecipes-section {
  margin-top: 2rem;
}

.subrecipes-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.subrecipe-item {
  background: var(--lt-white);
  border: var(--lt-border);
  box-shadow: var(--lt-shadow);
  overflow: hidden;
}

.subrecipe-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--lt-cyan);
  border: none;
  border-bottom: var(--lt-border);
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--lt-black);
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}

.subrecipe-header:hover {
  background: var(--lt-red);
  color: var(--lt-white);
}

.subrecipe-header[aria-expanded="true"] {
  background: var(--lt-red);
  color: var(--lt-white);
}

.subrecipe-toggle {
  font-family: var(--font-body);
  font-weight: 700;
  flex-shrink: 0;
}

.subrecipe-content {
  padding: 1.25rem;
}

.subrecipe-content .recipe-blocks-header {
  margin-top: 0;
}

.subrecipe-description {
  margin-bottom: 1rem;
  font-weight: 700;
}

.subrecipe-blocks .recipe-block {
  border-bottom: 2px dashed var(--lt-black);
}

.subrecipe-blocks .recipe-block:last-child {
  border-bottom: none;
}

/* Footer */
.main-footer,
.site-footer {
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--lt-blue);
  color: var(--lt-white);
  border-top: var(--lt-border);
  text-align: center;
  font-weight: 700;
}

/* Admin link */
.admin-link {
  color: var(--lt-cyan);
}

/* Flash / empty */
.empty-state {
  text-align: center;
  padding: 2rem;
  background: var(--lt-white);
  border: var(--lt-border);
  box-shadow: var(--lt-shadow);
  font-weight: 700;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.pagination a, .pagination span {
  padding: 0.5rem 1rem;
  background: var(--lt-white);
  border: var(--lt-border);
  box-shadow: 3px 3px 0 var(--lt-black);
  text-decoration: none;
  font-weight: 700;
}

.pagination a:hover {
  background: var(--lt-red);
  color: var(--lt-white);
}

.pagination .current {
  background: var(--lt-blue);
  color: var(--lt-white);
}

/* 404 */
.error-page {
  text-align: center;
  padding: 3rem;
  background: var(--lt-white);
  border: var(--lt-border);
  box-shadow: var(--lt-shadow);
}

.error-page h1,
.error-code {
  font-size: 4rem;
  color: var(--lt-red);
  text-shadow: 4px 4px 0 var(--lt-black);
}

.error-text {
  font-weight: 700;
  font-size: 1.2rem;
}

/* Dark theme override for public pages (pop-art noir) */
[data-theme="dark"] {
  --lt-yellow: #1a1a2e;
  --lt-white: #1e293b;
  --lt-red: #ff6b6b;
  --lt-blue: #4cc9f0;
  --lt-cyan: #90e0ef;
  --lt-black: #f8f9fa;
  --lt-gray: #252a3a;
}

[data-theme="dark"] body {
  color: var(--lt-black);
  background-image: radial-gradient(circle, var(--lt-red) 1.5px, transparent 1.5px);
}

[data-theme="dark"] .section-title,
[data-theme="dark"] .ingredients-title,
[data-theme="dark"] .servings-label {
  color: var(--lt-heading-color);
  text-shadow: var(--lt-heading-outline-sm);
  letter-spacing: 2px;
}

/* Print */
@media print {
  @page {
    margin: 2cm;
  }

  body {
    background: white !important;
    background-image: none !important;
    color: black;
    padding: 2cm !important;
  }

  .main-header, .site-header, .main-footer, .site-footer,
  .theme-toggle, .menu-toggle, .btn, .admin-link,
  .servings-sticky, .print-btn, .header-search, .main-nav,
  .related-section, .related-recipes-section, .subrecipes-section, .combo-recipe-description,
  .edit-btn, .recipe-actions {
    display: none !important;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .recipe-hero-inner {
    background: white;
    box-shadow: none;
    border: 2px solid black;
    padding: 0;
    display: block;
  }

  .recipe-hero-image {
    display: none;
  }

  .recipe-hero-content {
    padding: 1rem;
  }

  .recipe-title {
    color: black;
    text-shadow: none;
  }

  .recipe-meta-bar {
    gap: 0.5rem;
  }

  .meta-item {
    background: white;
    border: 2px solid black;
    box-shadow: none;
  }

  .recipe-blocks-container,
  .recipe-notes,
  .recipe-description,
  .combo-recipe-blocks {
    background: white;
    box-shadow: none;
    border: 2px solid black;
  }

  .recipe-block {
    border-top: 1px dashed black;
    box-shadow: none;
  }

  a {
    text-decoration: none;
    color: black;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8rem;
    color: #333;
  }
}

/* Mobile nav */
@media (max-width: 768px) {
  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
  }

  .main-nav.open {
    display: flex;
  }

  .menu-toggle {
    display: inline-block;
    background: var(--lt-yellow);
    border: var(--lt-border);
    box-shadow: 3px 3px 0 var(--lt-black);
    padding: 0.5rem 1rem;
    font-size: 1.2rem;
    cursor: pointer;
  }

  .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
  }

  .logo,
  .header-search,
  .header-actions,
  .main-nav {
    grid-column: auto;
    grid-row: auto;
    order: 0;
  }

  .main-nav {
    width: auto;
  }

  .header-search {
    width: auto;
    flex: 1 1 100%;
    margin-left: 0;
  }
}

/* ===== Section page: child recipe ribbon ===== */
.contents-item.is-child {
  position: relative;
}

.contents-item.is-child::before {
  content: attr(data-parent);
  position: absolute;
  top: 0;
  right: 0;
  max-width: 90%;
  background: var(--lt-red);
  color: var(--lt-white);
  font-family: var(--font-body);
  font-size: 0.55rem;
  font-weight: 700;
  padding: 0.15rem 0.35rem;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 1;
}


/* ===== Рулетка меню ===== */
.roulette-page {
  padding: 2rem 0;
}

.roulette-hero {
  background: var(--lt-white);
  border: var(--lt-border);
  box-shadow: var(--lt-shadow);
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.roulette-days {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.roulette-day {
  background: var(--lt-white);
  border: var(--lt-border);
  box-shadow: var(--lt-shadow);
  padding: 1rem;
}

.roulette-day-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--lt-red);
  margin: 0 0 1rem 0;
}

.roulette-filters {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.roulette-select {
  width: 100%;
  padding: 0.5rem;
  background: var(--lt-yellow);
  border: var(--lt-border);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--lt-black);
  cursor: pointer;
}

.roulette-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.btn-roulette {
  min-width: 160px;
}

.roulette-results {
  background: var(--lt-white);
  border: var(--lt-border);
  box-shadow: var(--lt-shadow);
  padding: 1.5rem;
}

.roulette-results-title {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--lt-red);
  margin: 0 0 1rem 0;
}

.roulette-result {
  padding: 0.75rem 0;
  border-bottom: 2px solid var(--lt-black);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.roulette-result:last-child {
  border-bottom: none;
}

.roulette-result.empty {
  color: #6b5e53;
}

.roulette-result-link {
  font-weight: 700;
  color: var(--lt-blue);
  text-decoration: underline;
}

.roulette-result-link:hover {
  color: var(--lt-red);
}

.roulette-result-meta {
  color: #6b5e53;
  font-size: 0.95rem;
}


/* ===== Рулетка: результаты и реролл ===== */
.roulette-result-slot {
  margin-top: 1rem;
  min-height: 2.5rem;
}

.roulette-day-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--lt-yellow);
  border: var(--lt-border);
}

.roulette-day-result.empty {
  color: #6b5e53;
  background: transparent;
  border: none;
  padding: 0.5rem 0;
}

.btn-reroll {
  margin-left: auto;
  background: var(--lt-cyan);
  border: var(--lt-border);
  box-shadow: 2px 2px 0 var(--lt-black);
  font-family: var(--font-body);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.5rem 0.7rem;
  line-height: 1;
  color: var(--lt-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-reroll svg {
  display: block;
}

.btn-reroll:hover {
  background: var(--lt-red);
  color: var(--lt-white);
}

.roulette-results-actions {
  margin-bottom: 1.5rem;
}


/* ===== Рулетка: список результатов ===== */
.roulette-results-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}


/* ===== Комбо: кнопки навигации ===== */
.combo-back-wrap {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===== Admin styles (from admin.css) ===== */

/* ===== Pixel-Art Admin Theme ===== */

.admin-site-header {
    background: var(--lt-yellow);
    border-bottom: 4px solid var(--lt-black);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-site-header .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    gap: 16px;
    flex-wrap: wrap;
    padding: 8px 16px;
    max-width: 1440px;
    margin: 0 auto;
}

.admin-main-nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-main-nav .nav-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--lt-cyan);
    color: var(--lt-black);
    border: var(--lt-border);
    box-shadow: 4px 4px 0 var(--lt-black);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.95rem;
    transition: transform 0.1s, box-shadow 0.1s;
}

.admin-main-nav .nav-link:hover {
    background: var(--lt-red);
    color: var(--lt-white);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--lt-black);
}

.admin-main-nav .nav-link-admin {
    color: var(--lt-red);
}

.admin-main-nav .nav-link-editor {
    background: var(--lt-red);
    color: var(--lt-white);
}

.admin-main-nav .nav-link-editor:hover {
    background: var(--lt-blue);
    color: var(--lt-white);
}

.theme-label {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--lt-black);
}

.theme-select {
    background: var(--lt-white);
    border: 4px solid var(--lt-black);
    box-shadow: 3px 3px 0 var(--lt-black);
    padding: 6px 10px;
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--lt-black);
    cursor: pointer;
}

.theme-select:hover {
    background: var(--lt-red);
    color: var(--lt-yellow);
}

.admin-sections-preview {
    background: var(--lt-white);
    border: 4px solid var(--lt-black);
    box-shadow: 5px 5px 0 var(--lt-black);
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.admin-sections-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--lt-red);
    margin: 0 0 1rem 0;
}

.admin-sections-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

a.admin-section-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--lt-yellow);
    border: 4px solid var(--lt-black);
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
}

a.admin-section-chip:hover {
    background: var(--lt-cyan);
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 var(--lt-black);
}

.admin-section-subs {
    color: #6b5e53;
    font-size: 0.95rem;
}

.admin-groups {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.admin-group {
    background: var(--lt-white);
    border: 4px solid var(--lt-black);
    box-shadow: 5px 5px 0 var(--lt-black);
    padding: 1.25rem;
}

.admin-group-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--lt-red);
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 4px solid var(--lt-black);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.btn-toggle-section {
    background: var(--lt-cyan);
    color: var(--lt-black);
    border: var(--lt-border);
    box-shadow: 2px 2px 0 var(--lt-black);
    font-family: var(--font-body);
    font-weight: 700;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
}

.btn-toggle-section:hover {
    background: var(--lt-red);
    color: var(--lt-white);
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--lt-black);
}

.admin-group-content {
    overflow: hidden;
}

.admin-subgroup {
    margin-bottom: 1.5rem;
}

.admin-subgroup:last-child {
    margin-bottom: 0;
}

.admin-subgroup-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--lt-blue);
    margin: 0 0 0.75rem 0;
}

[data-theme="dark"] {
    --lt-yellow: #1a1a2e;
    --lt-white: #1e293b;
    --lt-red: #ff6b6b;
    --lt-blue: #4cc9f0;
    --lt-cyan: #90e0ef;
    --lt-black: #f8f9fa;
    --lt-gray: #252a3a;
    --lt-muted: #a99c8f;
}


.admin-header {
    background: var(--lt-yellow);
    border-bottom: 4px solid var(--lt-black);
    padding: 40px 0 32px;
}

.admin-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin: 0 0 12px;
    line-height: 1.2;
    color: var(--lt-heading-color);
    text-shadow: var(--lt-heading-outline-sm);
    letter-spacing: 2px;
}

.admin-subtitle {
    margin: 0;
    color: #6b5e53;
    font-size: 1.2rem;
}

.admin-subtitle a {
    color: var(--lt-red);
    text-decoration: underline;
}

.admin-content {
    padding: 40px 0 80px;
    min-height: 60vh;
}

.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.admin-search {
    flex: 1;
    max-width: 400px;
}

.admin-search .search-input {
    width: 100%;
    padding: 10px 14px;
    border: 4px solid var(--lt-black);
    background: var(--lt-white);
    color: var(--lt-black);
    font-family: var(--font-body);
    font-size: 1.1rem;
    outline: none;
}

.admin-search .search-input:focus {
    border-color: var(--lt-red);
}

/* ===== Buttons ===== */
.admin-btn,
.admin-table .btn,
.details-actions .btn,
.admin-toolbar .btn,
.form-actions .btn,
.modal-actions .btn,
.block-column-header .btn,
.block-header .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    border: var(--lt-border);
    box-shadow: 4px 4px 0 var(--lt-black);
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    text-decoration: none;
    line-height: 1.3;
}

.admin-btn:hover,
.admin-table .btn:hover,
.details-actions .btn:hover,
.admin-toolbar .btn:hover,
.form-actions .btn:hover,
.modal-actions .btn:hover,
.block-column-header .btn:hover,
.block-header .btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--lt-black);
}

.btn-primary {
    background: var(--lt-red);
    color: var(--lt-white);
}

.btn-primary:hover {
    background: var(--lt-blue);
    color: var(--lt-white);
}

.btn-secondary {
    background: var(--lt-cyan);
    color: var(--lt-black);
}

.btn-secondary:hover {
    background: var(--lt-yellow);
    color: var(--lt-black);
}

.btn-danger {
    background: #c0392b;
    color: #fff;
}

.btn-danger:hover {
    background: #a93226;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 0.9rem 1.5rem;
    font-size: 1.1rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 1.3rem;
    background: var(--lt-white);
    color: var(--lt-red);
}

.btn-icon:hover {
    background: var(--lt-yellow);
}

.btn-icon,
.btn-danger,
.btn-remove-block,
.block-header .btn-remove-block,
.remove-recipe,
.remove-subsection,
.remove-section {
    font-family: Arial, Helvetica, sans-serif !important;
}

/* ===== Table ===== */
.admin-table-wrap {
    background: var(--lt-white);
    border: 4px solid var(--lt-black);
    box-shadow: 5px 5px 0 var(--lt-black);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}

.admin-table th,
.admin-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 2px solid var(--lt-black);
}

.admin-table th {
    background: var(--lt-yellow);
    font-family: var(--font-display);
    font-size: 1rem;
    line-height: 1.2;
    color: var(--lt-blue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-table tbody tr:hover {
    background: var(--lt-yellow);
}

.admin-table a {
    color: var(--lt-black);
    font-weight: 700;
}

.admin-table a:hover {
    color: var(--lt-red);
}

.admin-actions {
    display: flex;
    gap: 8px;
}

/* ===== Form ===== */
.recipe-form {
    background: var(--lt-white);
    border: 4px solid var(--lt-black);
    box-shadow: 6px 6px 0 var(--lt-black);
    padding: 28px;
}

.form-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-grid-4 {
    grid-template-columns: repeat(3, 1fr);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-family: var(--font-display);
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 8px;
    color: var(--lt-blue);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 4px solid var(--lt-black);
    background: var(--lt-yellow);
    color: var(--lt-black);
    font-family: var(--font-body);
    font-size: 1.1rem;
    outline: none;
    resize: none;
    overflow: hidden;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--lt-red);
}

.form-section {
    margin: 32px 0;
    padding-top: 24px;
    border-top: 4px dashed var(--lt-black);
}

.form-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.form-section-header h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin: 0;
    line-height: 1.3;
    color: var(--lt-red);
}

.form-hint {
    color: #6b5e53;
    font-size: 1rem;
    margin: -8px 0 20px;
}

.dynamic-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dynamic-item {
    display: flex;
    gap: 10px;
    align-items: center;
    background: var(--lt-yellow);
    border: 2px solid var(--lt-black);
    padding: 10px;
}

.move-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--lt-cyan);
    border: 2px solid var(--lt-black);
    box-shadow: 2px 2px 0 var(--lt-black);
    font-family: var(--font-body);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
}

.move-handle:hover {
    background: var(--lt-red);
    color: var(--lt-white);
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--lt-black);
}

.block-header .move-handle {
    width: 32px;
    height: 32px;
    font-size: 1.4rem;
}

.dynamic-item input,
.dynamic-item textarea {
    padding: 8px 10px;
    border: 2px solid var(--lt-black);
    background: var(--lt-white);
    color: var(--lt-black);
    font-family: var(--font-body);
    font-size: 1.05rem;
    outline: none;
    resize: none;
    overflow: hidden;
}

.dynamic-item input:focus,
.dynamic-item textarea:focus {
    border-color: var(--lt-red);
}

.ingredient-item .ing-name {
    flex: 2;
}

.ingredient-item .ing-qty {
    flex: 1;
    min-width: 70px;
}

.ingredient-item .ing-unit {
    flex: 1;
    min-width: 70px;
}

.related-recipe-item select {
    flex: 1;
}

.autocomplete-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
}

.autocomplete-wrap input {
    width: 100%;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0.25rem 0 0 0;
    padding: 0;
    list-style: none;
    background: var(--lt-white);
    border: 4px solid var(--lt-black);
    box-shadow: 3px 3px 0 var(--lt-black);
    z-index: 100;
    max-height: 240px;
    overflow-y: auto;
}

.autocomplete-list[hidden] {
    display: none;
}

.autocomplete-list li {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-weight: 700;
    border-bottom: 2px solid var(--lt-gray);
}

.autocomplete-list li:last-child {
    border-bottom: none;
}

.autocomplete-list li:hover,
.autocomplete-list li.active {
    background: var(--lt-yellow);
}

.instruction-item .inst-text {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 4px dashed var(--lt-black);
}

.form-message {
    margin-top: 20px;
    padding: 14px;
    border: 4px solid var(--lt-black);
    box-shadow: 3px 3px 0 var(--lt-black);
    display: none;
}

.form-message.success {
    display: block;
    background: #d4edda;
    color: #155724;
}

.form-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
}

/* ===== Meat Types ===== */
.meat-types-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    background: var(--lt-yellow);
    border: 2px solid var(--lt-black);
    padding: 8px 12px;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--lt-red);
}

/* ===== Block Editor ===== */
.recipe-block-editor {
    background: var(--lt-yellow);
    border: 4px solid var(--lt-black);
    box-shadow: 5px 5px 0 var(--lt-black);
    padding: 20px;
    margin-bottom: 24px;
}

.block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.block-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin: 0;
    line-height: 1.2;
    color: var(--lt-blue);
}

.btn-remove-block {
    background: var(--lt-yellow);
    color: var(--lt-black);
    border: 4px solid var(--lt-black);
}

.btn-remove-block:hover {
    background: #c0392b;
    color: #fff;
}

.btn-icon.btn-remove {
    background: var(--lt-yellow);
    color: var(--lt-black);
}

.btn-icon.btn-remove:hover {
    background: #c0392b;
    color: #fff;
}

.block-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.block-column {
    background: var(--lt-white);
    border: 2px solid var(--lt-black);
    padding: 16px;
}

.block-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.block-column-header h4 {
    margin: 0;
    font-size: 1rem;
}

/* ===== Stub rows ===== */
.is-stub {
    background: #fff8e0;
}

[data-theme="dark"] .is-stub {
    background: #2a2030;
}

.stub-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: var(--lt-red);
    color: var(--lt-white);
    font-size: 0.9rem;
    font-family: var(--font-display);
    line-height: 1.4;
    transform: rotate(-3deg);
}

.subrecipe-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: var(--lt-blue);
    color: var(--lt-white);
    font-size: 0.9rem;
    font-family: var(--font-display);
    line-height: 1.4;
    transform: rotate(2deg);
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-content {
    background: var(--lt-white);
    border: 4px solid var(--lt-black);
    box-shadow: 6px 6px 0 var(--lt-black);
    padding: 24px;
    max-width: 420px;
    width: 90%;
}

.modal-content h3 {
    margin: 0 0 12px;
    font-family: var(--font-display);
    font-size: 1.4rem;
    line-height: 1.3;
    color: var(--lt-red);
}

.modal-content p {
    margin: 0 0 20px;
    color: #6b5e53;
    font-size: 1.1rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.details-row td {
    padding: 0;
    border-bottom: 4px solid var(--lt-black);
    background: var(--lt-yellow);
}

.details-panel {
    padding: 16px;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.details-field-wide {
    grid-column: 1 / -1;
}

.details-field label {
    display: block;
    font-family: var(--font-display);
    font-size: 1rem;
    line-height: 1.2;
    margin-bottom: 8px;
    color: var(--lt-blue);
    text-transform: uppercase;
}

.details-field select,
.details-field input[type="number"] {
    width: 100%;
    padding: 8px 10px;
    border: 4px solid var(--lt-black);
    background: var(--lt-white);
    color: var(--lt-black);
    font-family: var(--font-body);
    font-size: 1.1rem;
    outline: none;
}

.details-field select:focus,
.details-field input[type="number"]:focus {
    border-color: var(--lt-red);
}

.details-meat-types {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.details-actions {
    display: flex;
    gap: 12px;
}

.details-message {
    margin-top: 12px;
    padding: 10px 12px;
    font-size: 1.1rem;
    display: none;
}

.details-message.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 4px solid #155724;
}

.details-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 4px solid #721c24;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .block-columns {
        grid-template-columns: 1fr;
    }

    .form-grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .dynamic-item {
        flex-direction: column;
        align-items: stretch;
    }

    .ingredient-item .ing-name,
    .ingredient-item .ing-qty,
    .ingredient-item .ing-unit,
    .instruction-item .inst-text {
        width: 100%;
    }

    .admin-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-search {
        max-width: none;
    }

    .admin-actions {
        flex-direction: column;
    }
}

/* History */
.history-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.history-item {
  padding: 0.75rem;
  background: var(--lt-white);
  border: var(--lt-border);
  box-shadow: var(--lt-shadow);
}
/* ===== Вкладки редактора рецепта ===== */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 1.5rem;
    border-bottom: 4px solid var(--lt-black);
    padding-bottom: 4px;
}

.tab-btn {
    padding: 0.6rem 1.2rem;
    background: var(--lt-cyan);
    border: 4px solid var(--lt-black);
    box-shadow: 3px 3px 0 var(--lt-black);
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--lt-black);
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s, background 0.1s;
}

.tab-btn:hover {
    background: var(--lt-red);
    color: var(--lt-white);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--lt-black);
}

.tab-btn.active {
    background: var(--lt-red);
    color: var(--lt-white);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* ===== Выбор шрифта в редакторе ===== */
.font-select {
    background: var(--lt-white);
    border: 4px solid var(--lt-black);
    box-shadow: 3px 3px 0 var(--lt-black);
    padding: 8px 12px;
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--lt-black);
    cursor: pointer;
}

.font-preview {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--lt-white);
    border: 4px solid var(--lt-black);
    box-shadow: 5px 5px 0 var(--lt-black);
}

.font-preview-ace {
    font-family: 'Anime Ace', 'Bangers Cyrillic', 'Bangers', cursive;
    font-size: 1.2rem;
    margin: 0 0 0.75rem 0;
}

.font-preview-neucha {
    font-family: 'Neucha', 'Anime Ace', 'Bangers Cyrillic', 'Bangers', cursive;
    font-size: 1.2rem;
    margin: 0;
}


/* ===== Раздел дизайна сайта ===== */
.design-section {
    background: var(--lt-white);
    border: 4px solid var(--lt-black);
    box-shadow: 6px 6px 0 var(--lt-black);
    padding: 1.5rem;
}

.design-section h2 {
    font-family: var(--font-display);
    color: var(--lt-red);
    margin: 0 0 1.5rem 0;
}
