:root {
  --ink: #26342d;
  --muted: #68736d;
  --green: #3f6d5c;
  --green-dark: #2f5547;
  --page: #f8f7f2;
  --paper: #fffefb;
  --soft-green: #f1f5f0;
  --line: rgba(49, 78, 66, 0.13);
  --shadow: 0 18px 50px rgba(47, 69, 59, 0.09);
}

/* Portable Beget/PHP package additions */

.setup-page {
  display: grid;
  min-height: calc(100vh - 150px);
  place-items: center;
  padding: 55px 20px;
}

.setup-card {
  width: min(560px, 100%);
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.setup-card h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 6vw, 54px);
  font-weight: 400;
  letter-spacing: -0.04em;
}

.setup-card > p:not(.eyebrow) {
  margin: 18px 0 26px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.setup-card > small {
  display: block;
  margin-top: 17px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.setup-form,
.field-stack {
  display: grid;
  gap: 17px;
}

.setup-form label,
.field-stack label,
.field-row label {
  display: grid;
  gap: 8px;
  color: #53615a;
  font-size: 12px;
  font-weight: 750;
}

.setup-form input,
.field-stack input,
.field-stack textarea,
.field-row select {
  width: 100%;
  border: 1px solid #d4ddd7;
  border-radius: 12px;
  padding: 13px 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.field-stack textarea {
  min-height: 116px;
  resize: vertical;
}

.cabinet-form {
  display: grid;
  gap: 20px;
}

.form-section {
  padding: 27px;
  border: 1px solid #dfe6e0;
  border-radius: 20px;
  background: #fffefc;
  box-shadow: 0 8px 28px rgba(46, 67, 57, 0.035);
}

.form-section-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

.form-section-title > span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 50%;
  background: #e4eee8;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 800;
}

.form-section-title h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 400;
}

.form-section-title p,
.form-note {
  margin: 5px 0 0;
  color: #7a847e;
  font-size: 11px;
  line-height: 1.5;
}

.material-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.type-choice {
  display: grid;
  min-height: 136px;
  padding: 17px;
  grid-template-rows: auto 1fr auto;
  border: 1px solid #dce3de;
  border-radius: 15px;
  background: #fff;
  cursor: pointer;
}

.type-choice.selected {
  border-color: #6f9483;
  background: #f0f5f1;
  box-shadow: inset 0 0 0 1px #6f9483;
}

.type-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.type-choice > span {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 12px;
  background: #e7efea;
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 850;
}

.type-choice strong {
  align-self: end;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 400;
}

.type-choice small {
  margin-top: 5px;
  color: #7a847e;
  font-size: 9px;
}

.field-row,
.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.upload-box {
  position: relative;
  display: grid;
  min-height: 165px;
  place-items: center;
  align-content: center;
  padding: 22px;
  border: 1px dashed #aebeb4;
  border-radius: 16px;
  background: #f8faf8;
  cursor: pointer;
  text-align: center;
}

.upload-box[hidden] {
  display: none;
}

.cover-file-preview {
  display: block;
  width: 100%;
  height: 142px;
  margin-bottom: 12px;
  border-radius: 11px;
  object-fit: cover;
}

.cover-file-preview[hidden] {
  display: none;
}

.cover-upload-box.has-preview {
  align-content: start;
  padding: 12px;
}

.cover-upload-box.has-preview > span {
  display: none;
}

.cover-upload-box.has-preview > strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-box > span {
  color: var(--green);
  font-size: 27px;
}

.upload-box strong {
  margin-top: 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 400;
}

.upload-box small {
  margin-top: 6px;
  color: #77817b;
  font-size: 9px;
}

.upload-box input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}

.cabinet-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.cabinet-heading p {
  margin: 0 0 9px;
  color: #6f8f81;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .17em;
}

.cabinet-heading h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 5vw, 53px);
  font-weight: 400;
  letter-spacing: -.04em;
}

.cabinet-heading div > span {
  display: block;
  margin-top: 8px;
  color: #76817a;
  font-size: 12px;
}

.cabinet-heading > a:not(.new-material-button) {
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 750;
}

.cabinet-actions {
  display: flex;
  justify-content: flex-end;
  gap: 11px;
}

.cabinet-actions button {
  min-height: 45px;
  padding: 11px 20px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}

.save-draft {
  border: 1px solid #cbd6cf;
  background: #fff;
  color: var(--green-dark);
}

.publish-material {
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
}

.admin-material-actions form {
  display: contents;
}

.game-choice-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding-top: 54px;
}

.presentation-note {
  margin: 0 0 25px;
  padding: 17px 19px;
  border: 1px solid #e5d8c4;
  border-radius: 14px;
  background: #fff8ec;
  color: #665f54;
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .material-type-grid,
  .field-row,
  .upload-grid {
    grid-template-columns: 1fr;
  }

  .type-choice {
    min-height: 105px;
  }

  .cabinet-topbar > div {
    gap: 7px;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 76px;
  padding: 10px clamp(24px, 5vw, 76px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 254, 250, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  display: grid;
  width: 41px;
  height: 41px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  letter-spacing: -0.05em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  color: #5f6a65;
  font-size: 13px;
}

.main-nav a {
  position: relative;
  padding: 12px 0;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: 6px;
  left: 0;
  height: 1px;
  background: var(--green);
  content: "";
  opacity: 0;
  transform: scaleX(0.6);
  transition: 180ms ease;
}

.main-nav a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-button {
  justify-self: end;
  padding: 11px 18px;
  border: 1px solid rgba(54, 95, 80, 0.25);
  border-radius: 999px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
  transition: background 180ms ease, color 180ms ease;
}

.header-button:hover {
  background: var(--green);
  color: white;
}

.hero {
  position: relative;
  display: grid;
  width: min(1240px, calc(100% - 48px));
  min-height: 620px;
  align-items: center;
  margin: 0 auto;
  padding: 74px 0 82px;
  grid-template-columns: minmax(0, 0.94fr) minmax(440px, 0.86fr);
  gap: clamp(36px, 6vw, 86px);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 17px;
  color: #6f8f81;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.hero h1,
.section-heading h2,
.latest h2,
.author h2,
.inner-page h1,
.minor-heading h2,
.category-hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.hero h1 {
  max-width: 650px;
  font-size: clamp(48px, 5.5vw, 76px);
}

.hero-text {
  max-width: 600px;
  margin: 25px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.hero-actions,
.author-actions,
.material-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px;
}

.hero-actions {
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 12px;
  font-weight: 750;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease,
    box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--green);
  box-shadow: 0 9px 22px rgba(57, 99, 83, 0.18);
  color: white;
}

.button.primary:hover {
  background: var(--green-dark);
}

.button.outline {
  border-color: rgba(56, 91, 77, 0.22);
  background: rgba(255, 255, 255, 0.72);
  color: var(--green-dark);
}

.button.outline:hover {
  background: white;
  box-shadow: 0 8px 22px rgba(46, 69, 59, 0.08);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 5px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
}

.text-link span {
  font-size: 18px;
  font-weight: 400;
}

.material-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 19px;
  margin-top: 31px;
  color: #747d78;
  font-size: 10px;
}

.material-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.material-legend span::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #87a89a;
  content: "";
}

.material-legend .legend-pdf::before { background: #dda984; }
.material-legend .legend-ppt::before { background: #a99ab0; }

.hero-visual {
  position: relative;
  min-height: 470px;
}

.hero-shape {
  position: absolute;
  z-index: 0;
  top: -44px;
  right: -20px;
  width: 340px;
  height: 460px;
  border-radius: 48% 48% 16% 64%;
  background: #f2e8d9;
  transform: rotate(7deg);
}

.hero-photo-frame {
  position: absolute;
  z-index: 1;
  inset: 48px 16px 18px 0;
  overflow: hidden;
  border: 10px solid rgba(255, 255, 255, 0.94);
  border-radius: 34px;
  background: #eee8dc;
  box-shadow: 0 22px 48px rgba(53, 67, 60, 0.14);
  transform: rotate(-1deg);
}

.hero-photo-frame::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent 55%);
  content: "";
  pointer-events: none;
}

.hero-photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 61% center;
}

.catalog {
  padding: clamp(76px, 8vw, 110px) max(24px, calc((100vw - 1240px) / 2)) 110px;
  background: var(--soft-green);
  scroll-margin-top: 70px;
}

.section-heading {
  margin-bottom: clamp(42px, 5vw, 64px);
}

.split-heading {
  display: grid;
  align-items: end;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px;
}

.section-heading h2,
.latest h2 {
  font-size: clamp(38px, 4.2vw, 58px);
}

.split-heading > p {
  max-width: 490px;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.category-card {
  --accent: #dce7e0;
  display: flex;
  min-height: 220px;
  min-width: 0;
  flex-direction: row;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(54, 80, 69, 0.1);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 10px 35px rgba(56, 73, 65, 0.06);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 45px rgba(56, 73, 65, 0.12);
}

.category-card.peach { --accent: #f2dfd3; }
.category-card.blue { --accent: #dce8ed; }
.category-card.sand { --accent: #eee5d5; }
.category-card.lilac { --accent: #e9e0eb; }
.category-card.rose { --accent: #f0dfe1; }
.category-card.mint { --accent: #d9e9e2; }
.category-card.sky { --accent: #d9e7ec; }
.category-card.cream { --accent: #eee7d9; }

.card-image-wrap {
  position: relative;
  display: block;
  flex: 0 0 188px;
  min-height: 154px;
  margin: 22px 0 22px 22px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--accent);
}

.card-image-wrap::after {
  position: absolute;
  inset: 0;
  border: 5px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px;
  content: "";
  pointer-events: none;
}

.card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.category-card:hover .card-image {
  transform: scale(1.025);
}

.card-content {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  padding: 27px 27px 24px 24px;
}

.card-content h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(22px, 1.8vw, 26px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.card-content p {
  margin: 13px 0 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.card-content > a {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 750;
}

.card-content > a span {
  font-size: 18px;
  font-weight: 400;
  transition: transform 180ms ease;
}

.card-content > a:hover span {
  transform: translateX(4px);
}

.latest {
  display: grid;
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
  padding: 105px 0 86px;
  grid-template-columns: minmax(0, 0.78fr) minmax(430px, 1.05fr);
  gap: 80px;
  scroll-margin-top: 76px;
}

.latest-copy > p:last-child {
  max-width: 430px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.latest-list {
  display: grid;
  gap: 12px;
}

.latest-row {
  display: grid;
  min-height: 82px;
  align-items: center;
  padding: 13px 18px 13px 14px;
  grid-template-columns: 47px 1fr auto;
  gap: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 8px 25px rgba(53, 72, 63, 0.04);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.latest-row:hover {
  transform: translateX(4px);
  box-shadow: 0 11px 28px rgba(53, 72, 63, 0.09);
}

.latest-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: #e4eee8;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 800;
}

.latest-number.pdf { background: #f5e8df; color: #966848; }
.latest-number.ppt { background: #ebe5ee; color: #76617c; }

.latest-row strong,
.latest-row small {
  display: block;
}

.latest-row strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 400;
}

.latest-row small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.latest-row > b {
  color: #789184;
  font-size: 20px;
  font-weight: 400;
}

.author {
  display: grid;
  width: min(1100px, calc(100% - 48px));
  align-items: center;
  margin: 0 auto 105px;
  padding: 30px;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 42px;
  border-radius: 28px;
  background: #f5ecdf;
  scroll-margin-top: 98px;
}

.author-photo {
  height: 250px;
  overflow: hidden;
  border: 7px solid rgba(255, 255, 255, 0.9);
  border-radius: 19px;
  box-shadow: 0 12px 28px rgba(77, 68, 55, 0.12);
}

.author-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 37%;
}

.author h2 {
  max-width: 720px;
  font-size: clamp(34px, 4vw, 48px);
}

.author-copy > p:not(.eyebrow) {
  max-width: 770px;
  margin: 11px 0 0;
  color: #626a65;
  font-size: 13px;
  line-height: 1.6;
}

.author-copy .author-lead {
  color: var(--ink);
  font-weight: 750;
}

.author-actions {
  margin-top: 21px;
}

.site-footer {
  display: grid;
  align-items: center;
  padding: 29px clamp(24px, 5vw, 76px);
  grid-template-columns: 1fr auto 1fr;
  gap: 28px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: 10px;
}

.footer-brand .brand-mark {
  width: 34px;
  height: 34px;
  font-size: 10px;
}

.footer-brand strong {
  font-size: 16px;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  justify-self: end;
  gap: 18px;
}

.site-footer nav a:hover {
  color: var(--green-dark);
}

.inner-page {
  width: min(1180px, calc(100% - 48px));
  min-height: 65vh;
  margin: 0 auto;
  padding: 36px 0 100px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 29px;
  color: #7b857f;
  font-size: 11px;
}

.breadcrumbs a:hover {
  color: var(--green-dark);
}

.category-hero {
  --accent: #e4eee8;
  display: grid;
  min-height: 350px;
  align-items: center;
  overflow: hidden;
  padding: clamp(35px, 5vw, 60px);
  grid-template-columns: 1fr minmax(300px, 0.7fr);
  gap: 60px;
  border-radius: 29px;
  background: var(--accent);
}

.category-hero.peach { --accent: #f4e7dc; }
.category-hero.blue { --accent: #e5eef1; }
.category-hero.sand { --accent: #f0eadf; }
.category-hero.lilac { --accent: #eee8f0; }
.category-hero.rose { --accent: #f2e8e9; }
.category-hero.mint { --accent: #e4eee9; }
.category-hero.sky { --accent: #e3edf0; }
.category-hero.cream { --accent: #f1ede4; }

.category-hero h1 {
  font-size: clamp(42px, 5vw, 64px);
}

.category-hero p:last-child {
  max-width: 590px;
  margin: 20px 0 0;
  color: #617069;
  font-size: 15px;
  line-height: 1.7;
}

.category-hero img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 8px solid rgba(255, 255, 255, 0.7);
  border-radius: 23px;
  box-shadow: var(--shadow);
}

.subcategory-section,
.category-materials,
.document-preview,
.slides-preview {
  padding-top: 82px;
}

.minor-heading {
  margin-bottom: 30px;
}

.minor-heading h2 {
  font-size: clamp(32px, 3.8vw, 47px);
}

.subcategory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.subcategory-grid a {
  display: grid;
  min-height: 86px;
  align-items: center;
  padding: 17px 20px;
  grid-template-columns: 44px 1fr auto;
  gap: 15px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--paper);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.subcategory-grid a:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(52, 73, 63, 0.08);
}

.subcategory-grid span {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: #e6eee9;
  color: #658074;
  font-size: 10px;
  font-weight: 800;
}

.subcategory-grid strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 400;
}

.subcategory-grid b {
  color: #789084;
  font-size: 19px;
  font-weight: 400;
}

.material-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.material-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 10px 30px rgba(54, 72, 63, 0.06);
}

.material-card > div:last-child {
  padding: 23px 24px 25px;
}

.material-card h3 {
  margin: 13px 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.12;
}

.material-card p {
  min-height: 60px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.material-image {
  display: grid;
  height: 250px;
  place-items: center;
  overflow: hidden;
  background: #f1eee7;
}

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

.material-image.portrait img {
  width: auto;
  height: 90%;
  object-fit: contain;
  box-shadow: 0 7px 20px rgba(53, 59, 56, 0.12);
}

.type-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.type-label::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #81a391;
  content: "";
}

.type-label.pdf { color: #93684c; }
.type-label.pdf::before { background: #dda984; }
.type-label.ppt { color: #77647d; }
.type-label.ppt::before { background: #aa9ab0; }

.game-cover {
  display: grid;
  height: 250px;
  padding: 18px;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 6px;
  background: #1da9a5;
}

.game-cover > span {
  position: relative;
  display: grid;
  min-width: 0;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: white;
}

.game-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.game-letter {
  color: #ef675f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 36px;
  font-weight: 700;
}

.game-letter.pale { color: #88bbae; }

.mini-x,
.mini-o {
  position: absolute;
  inset: 20%;
}

.mini-o {
  border: 8px solid #ef675f;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
}

.mini-x::before,
.mini-x::after {
  position: absolute;
  top: 43%;
  left: 5%;
  width: 90%;
  height: 13%;
  border-radius: 999px;
  background: #16a3a0;
  content: "";
}

.mini-x::before { transform: rotate(45deg); }
.mini-x::after { transform: rotate(-45deg); }

.empty-materials {
  padding: 56px 30px;
  border: 1px dashed rgba(58, 91, 77, 0.25);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.52);
  text-align: center;
}

.empty-materials > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin: 0 auto 17px;
  border-radius: 50%;
  background: #e2ece6;
  color: #638071;
  font-size: 27px;
}

.empty-materials h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 400;
}

.empty-materials p {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.material-intro {
  display: grid;
  align-items: center;
  padding: clamp(32px, 5vw, 54px);
  grid-template-columns: 290px 1fr;
  gap: 60px;
  border-radius: 28px;
  background: #f3eee5;
}

.material-cover {
  display: grid;
  place-items: center;
}

.portrait-cover img {
  width: 255px;
  max-height: 360px;
  object-fit: contain;
  border: 7px solid white;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.material-copy h1,
.presentation-intro h1,
.game-intro h1 {
  margin-top: 14px;
  font-size: clamp(39px, 5vw, 60px);
}

.material-copy > p,
.presentation-intro > div:first-child > p:last-child,
.game-intro > div:last-child > p {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.material-meta {
  display: flex;
  gap: 38px;
  margin: 27px 0 25px;
}

.material-meta div {
  display: grid;
  gap: 5px;
}

.material-meta dt {
  color: #7f8983;
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.material-meta dd {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.document-preview iframe {
  display: block;
  width: 100%;
  height: min(900px, 80vh);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #e8e8e4;
}

.presentation-intro {
  display: grid;
  align-items: end;
  padding: clamp(36px, 5vw, 60px);
  grid-template-columns: minmax(0, 1.15fr) minmax(310px, 0.7fr);
  gap: 70px;
  border-radius: 28px;
  background: #e9eef0;
}

.presentation-download {
  padding: 22px;
  border: 1px solid rgba(55, 75, 68, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.67);
}

.presentation-download p {
  margin: 0 0 18px;
  color: #5e6964;
  font-size: 13px;
  line-height: 1.6;
}

.slides-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 25px;
}

.slides-grid figure {
  margin: 0;
}

.slides-grid img {
  display: block;
  width: 100%;
  border: 7px solid white;
  border-radius: 16px;
  box-shadow: 0 13px 35px rgba(49, 69, 60, 0.1);
}

.slides-grid figcaption {
  margin-top: 9px;
  color: #7a847e;
  font-size: 10px;
  text-align: center;
}

.game-intro {
  display: grid;
  align-items: center;
  padding: clamp(36px, 5vw, 58px);
  grid-template-columns: minmax(340px, 0.8fr) 1fr;
  gap: 65px;
  border-radius: 28px;
  background: #e3f0eb;
}

.large-game-preview {
  overflow: hidden;
  border: 8px solid white;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.large-game-preview .game-cover {
  height: 350px;
}

.game-intro .play-note {
  color: var(--green-dark) !important;
  font-weight: 700;
}

.game-variants {
  display: grid;
  padding-top: 55px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.game-variants article {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
}

.game-variants article > span {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: #e4eee8;
  color: #648073;
  font-size: 10px;
  font-weight: 800;
}

.game-variants h2 {
  min-height: 58px;
  margin: 18px 0 9px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.15;
}

.game-variants p {
  min-height: 39px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.cabinet-page {
  max-width: 760px;
  padding-top: 110px;
  text-align: center;
}

.cabinet-page h1 {
  font-size: clamp(45px, 6vw, 68px);
}

.cabinet-page > p:not(.eyebrow) {
  max-width: 620px;
  margin: 22px auto 28px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.button:focus-visible,
.header-button:focus-visible,
.main-nav a:focus-visible,
.brand:focus-visible,
.latest-row:focus-visible,
.card-image-wrap:focus-visible,
.subcategory-grid a:focus-visible {
  border-radius: 8px;
  outline: 3px solid rgba(54, 95, 80, 0.25);
  outline-offset: 4px;
}

@media (max-width: 1020px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    display: none;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr 0.85fr;
  }

  .hero h1 {
    font-size: 53px;
  }

  .hero-visual {
    min-height: 420px;
  }

  .card-grid,
  .material-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .latest {
    gap: 45px;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer > p {
    display: none;
  }

  .category-hero {
    gap: 35px;
  }
}

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

@media (max-width: 760px) {
  .site-header {
    min-height: 68px;
    padding: 9px 18px;
  }

  .brand-mark {
    width: 37px;
    height: 37px;
  }

  .brand small,
  .header-button {
    display: none;
  }

  .hero {
    width: min(100% - 28px, 600px);
    padding: 52px 0 65px;
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero h1 {
    font-size: 46px;
  }

  .hero-text {
    font-size: 15px;
  }

  .hero-visual {
    min-height: 390px;
  }

  .hero-photo-frame {
    inset: 30px 4px 8px 4px;
  }

  .hero-shape {
    right: -30px;
    width: 280px;
    height: 370px;
  }

  .catalog {
    padding: 68px 14px;
  }

  .split-heading {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .section-heading h2,
  .latest h2 {
    font-size: 42px;
  }

  .card-grid,
  .material-grid,
  .subcategory-grid,
  .slides-grid,
  .game-variants {
    grid-template-columns: 1fr;
  }

  .category-card {
    flex-direction: column;
    border-radius: 21px;
  }

  .card-image-wrap {
    width: 100%;
    min-height: 190px;
    margin: 0;
    flex-basis: auto;
    aspect-ratio: 16 / 9;
    border-radius: 21px 21px 0 0;
  }

  .card-image-wrap::after {
    border-radius: 21px 21px 0 0;
  }

  .card-content {
    min-height: 195px;
    padding: 24px;
  }

  .card-content h3 {
    font-size: 28px;
  }

  .latest {
    width: min(100% - 28px, 600px);
    padding: 76px 0;
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .latest-row strong {
    font-size: 16px;
  }

  .author {
    width: min(100% - 28px, 600px);
    margin-bottom: 76px;
    padding: 22px;
    grid-template-columns: 105px minmax(0, 1fr);
    align-items: start;
    gap: 22px;
  }

  .author-photo {
    height: 135px;
    border-width: 4px;
    border-radius: 14px;
  }

  .author h2 {
    font-size: 31px;
  }

  .author-copy > p:not(.eyebrow),
  .author-actions {
    grid-column: 1 / -1;
  }

  .author-copy {
    display: contents;
  }

  .author-copy .eyebrow,
  .author-copy h2 {
    grid-column: 2;
  }

  .author-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding: 25px 18px;
    grid-template-columns: 1fr;
  }

  .site-footer nav {
    justify-self: start;
    flex-wrap: wrap;
  }

  .inner-page {
    width: min(100% - 28px, 650px);
    padding-bottom: 72px;
  }

  .category-hero,
  .material-intro,
  .presentation-intro,
  .game-intro {
    padding: 27px;
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .category-hero img {
    width: min(100%, 420px);
  }

  .category-hero h1,
  .material-copy h1,
  .presentation-intro h1,
  .game-intro h1 {
    font-size: 43px;
  }

  .subcategory-section,
  .category-materials,
  .document-preview,
  .slides-preview {
    padding-top: 61px;
  }

  .material-grid {
    max-width: 510px;
  }

  .material-card p {
    min-height: auto;
  }

  .material-intro {
    text-align: center;
  }

  .material-meta,
  .material-actions {
    justify-content: center;
  }

  .material-actions {
    display: grid;
  }

  .document-preview iframe {
    height: 610px;
  }

  .game-variants h2,
  .game-variants p {
    min-height: auto;
  }
}

@media (max-width: 430px) {
  .hero h1,
  .section-heading h2,
  .latest h2,
  .category-hero h1,
  .material-copy h1,
  .presentation-intro h1,
  .game-intro h1 {
    font-size: 38px;
  }

  .hero-visual {
    min-height: 330px;
  }

  .material-legend {
    display: grid;
    gap: 10px;
  }

  .latest-row {
    grid-template-columns: 42px 1fr;
  }

  .latest-row > b {
    display: none;
  }

  .author {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .author-photo {
    height: 115px;
  }

  .author h2 {
    font-size: 27px;
  }

  .game-cover {
    height: 220px;
  }

  .large-game-preview .game-cover {
    height: 270px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* Author cabinet */

.cabinet-prototype {
  min-height: 100vh;
  background: #f3f5f1;
  color: #26342d;
}

.cabinet-topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  padding: 10px clamp(24px, 4vw, 64px);
  border-bottom: 1px solid #dfe5df;
  background: rgba(255, 255, 252, 0.96);
  backdrop-filter: blur(12px);
}

.cabinet-logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
}

.cabinet-logo > span {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 12px;
}

.cabinet-logo strong {
  font-weight: 500;
}

.cabinet-topbar > div {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #6b756f;
  font-size: 13px;
}

.cabinet-topbar > div > span {
  color: var(--ink);
  font-weight: 700;
}

.cabinet-topbar > div > a {
  padding: 10px 15px;
  border: 1px solid #ced8d1;
  border-radius: 999px;
  background: #fff;
  color: var(--green-dark);
  font-weight: 700;
}

.cabinet-layout {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}

.cabinet-sidebar {
  position: sticky;
  top: 72px;
  align-self: start;
  min-height: calc(100vh - 72px);
  padding: 34px 20px;
  border-right: 1px solid #dfe5df;
  background: #fffefb;
}

.cabinet-sidebar > p {
  margin: 0 12px 13px;
  color: #8b958f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.cabinet-sidebar nav {
  display: grid;
  gap: 7px;
}

.cabinet-sidebar nav a {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  min-height: 50px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 12px;
  color: #59645e;
  font-size: 13px;
  font-weight: 700;
}

.cabinet-sidebar nav button {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  min-height: 50px;
  align-items: center;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #59645e;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.cabinet-sidebar nav a > span {
  font-size: 19px;
  font-weight: 400;
}

.cabinet-sidebar nav button > span {
  font-size: 19px;
  font-weight: 400;
}

.cabinet-sidebar nav a > b {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #edf1ed;
  font-size: 11px;
}

.cabinet-sidebar nav button > b {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #edf1ed;
  font-size: 11px;
}

.cabinet-sidebar nav a:hover,
.cabinet-sidebar nav a.active,
.cabinet-sidebar nav button:hover,
.cabinet-sidebar nav button.active {
  background: #eaf1ec;
  color: var(--green-dark);
}

.cabinet-help {
  margin-top: 34px;
  padding: 18px;
  border: 1px solid #e4e2d8;
  border-radius: 15px;
  background: #faf8f0;
}

.cabinet-help strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 500;
}

.cabinet-help p {
  margin: 8px 0 0;
  color: #747b76;
  font-size: 11px;
  line-height: 1.55;
}

.cabinet-workspace {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 34px clamp(24px, 4vw, 58px) 70px;
}

.prototype-notice {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 30px;
  padding: 14px 18px;
  border: 1px solid #e9dfc7;
  border-radius: 14px;
  background: #fffaf0;
  color: #665f50;
}

.prototype-notice > span {
  display: grid;
  flex: 0 0 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: #e9dcc0;
  font-family: Georgia, serif;
  font-weight: 700;
}

.prototype-notice p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.cabinet-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}

.cabinet-heading p,
.visitor-preview > p {
  margin: 0 0 8px;
  color: #789084;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.cabinet-heading h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 4vw, 54px);
  font-weight: 400;
  letter-spacing: -0.035em;
}

.cabinet-heading div > span {
  display: block;
  margin-top: 8px;
  color: #738079;
  font-size: 13px;
}

.cabinet-heading > a {
  padding-bottom: 4px;
  border-bottom: 1px solid #9aa8a1;
  color: #68736d;
  font-size: 12px;
}

.cancel-edit {
  padding: 0 0 4px;
  border: 0;
  border-bottom: 1px solid #9aa8a1;
  background: transparent;
  color: #68736d;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.cabinet-form,
.form-column {
  display: grid;
  gap: 20px;
}

.form-section {
  padding: 27px;
  border: 1px solid #e0e6e1;
  border-radius: 20px;
  background: #fffefc;
  box-shadow: 0 8px 28px rgba(46, 67, 57, 0.04);
}

.form-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 23px;
}

.form-step > span {
  display: grid;
  flex: 0 0 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #e4eee8;
  color: var(--green-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
}

.form-step h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
}

.form-step p {
  margin: 4px 0 0;
  color: #7b8580;
  font-size: 12px;
}

.material-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.material-type-grid button {
  position: relative;
  display: grid;
  min-height: 128px;
  justify-items: start;
  padding: 18px;
  border: 1px solid #dfe5e0;
  border-radius: 15px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: 160ms ease;
}

.material-type-grid button:hover {
  border-color: #a9bdb2;
  transform: translateY(-1px);
}

.material-type-grid button.selected {
  border-color: #59806e;
  background: #f1f6f2;
  box-shadow: inset 0 0 0 1px #59806e;
}

.material-type-grid button:disabled {
  cursor: default;
}

.material-type-grid button > span {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 10px;
  background: #e6efe9;
  color: #436756;
  font-size: 11px;
  font-weight: 800;
}

.material-type-grid button > span.pdf {
  background: #f7e9e5;
  color: #925e52;
}

.material-type-grid button > span.ppt {
  background: #eee8f4;
  color: #736181;
}

.material-type-grid button > strong {
  font-size: 14px;
}

.material-type-grid button > small {
  margin-top: 4px;
  color: #7d8782;
  font-size: 10px;
  line-height: 1.35;
}

.material-type-grid button > b {
  position: absolute;
  top: 14px;
  right: 14px;
  display: none;
  color: var(--green);
  font-size: 17px;
}

.material-type-grid button.selected > b {
  display: block;
}

.form-preview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: 20px;
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 17px;
}

.field > span {
  font-size: 12px;
  font-weight: 700;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid #d8e0da;
  border-radius: 11px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.field input,
.field select {
  height: 49px;
  padding: 0 14px;
}

.field textarea {
  min-height: 110px;
  padding: 13px 14px;
  resize: vertical;
  line-height: 1.5;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: #648574;
  box-shadow: 0 0 0 3px rgba(63, 109, 92, 0.1);
}

.field select:disabled {
  background: #f2f3f1;
  color: #929993;
}

.field > small {
  justify-self: end;
  color: #939b96;
  font-size: 10px;
}

.field-row,
.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.upload-box {
  position: relative;
  display: grid;
  min-height: 158px;
  align-content: center;
  justify-items: center;
  padding: 20px;
  border: 1px dashed #aebdb5;
  border-radius: 14px;
  background: #f9fbf8;
  cursor: pointer;
  text-align: center;
}

.upload-box:hover {
  border-color: var(--green);
  background: #f2f7f3;
}

.upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-box > span {
  display: grid;
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
  place-items: center;
  border-radius: 50%;
  background: #e5eee8;
  color: var(--green-dark);
  font-size: 20px;
}

.upload-box strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.upload-box small {
  max-width: 270px;
  margin-top: 5px;
  color: #808983;
  font-size: 10px;
  line-height: 1.4;
}

.visitor-preview {
  position: sticky;
  top: 96px;
  padding: 21px;
  border: 1px solid #dde4de;
  border-radius: 18px;
  background: #eef3ef;
}

.preview-card {
  overflow: hidden;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(46, 67, 57, 0.1);
}

.preview-cover {
  display: grid;
  min-height: 165px;
  place-items: center;
  padding: 18px;
  background: linear-gradient(135deg, #e6eee8, #f3eadd);
  color: #7b8881;
  font-size: 11px;
  text-align: center;
}

.preview-cover img {
  width: 100%;
  height: 165px;
  object-fit: cover;
}

.preview-card > div:last-child {
  padding: 18px;
}

.preview-type {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  background: #e5efe8;
  color: #3f6d5c;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-type.pdf {
  background: #f7e9e5;
  color: #925e52;
}

.preview-type.ppt {
  background: #eee8f4;
  color: #736181;
}

.preview-card h3 {
  margin: 12px 0 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.15;
}

.preview-card p {
  min-height: 45px;
  margin: 0 0 15px;
  color: #707b75;
  font-size: 11px;
  line-height: 1.5;
}

.preview-card button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--green);
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
}

.preview-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.preview-buttons button:first-child {
  background: #fff;
  color: var(--green-dark);
}

.preview-card em {
  display: block;
  margin-top: 11px;
  color: #7d7167;
  font-size: 9px;
  font-style: normal;
  line-height: 1.45;
}

.cabinet-actions {
  position: sticky;
  z-index: 20;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 11px;
  padding: 16px 0;
  border-top: 1px solid #dfe5df;
  background: rgba(243, 245, 241, 0.94);
  backdrop-filter: blur(10px);
}

.cabinet-actions button {
  min-height: 48px;
  padding: 11px 20px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.save-draft {
  border: 1px solid #b9c6bf;
  background: #fff;
  color: var(--green-dark);
}

.publish-material {
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
}

.cabinet-actions button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.cabinet-message {
  display: grid;
  grid-template-columns: 29px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px 16px;
  border: 1px solid #cbded1;
  border-radius: 14px;
  background: #f0f8f2;
  color: #385f4d;
}

.cabinet-message.error {
  border-color: #ead2ca;
  background: #fff4f1;
  color: #875349;
}

.cabinet-message > span {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  background: rgba(63, 109, 92, 0.12);
  font-weight: 800;
}

.cabinet-message p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.cabinet-message button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 21px;
}

.existing-files-note {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid #d9e5dc;
  border-radius: 14px;
  background: #f4f8f5;
}

.existing-files-note > span {
  display: grid;
  flex: 0 0 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: #dcebe1;
  color: var(--green-dark);
  font-weight: 800;
}

.existing-files-note strong {
  font-size: 13px;
}

.existing-files-note p {
  margin: 4px 0 0;
  color: #748079;
  font-size: 11px;
}

.materials-heading {
  align-items: center;
}

.new-material-button {
  min-height: 46px;
  padding: 10px 19px;
  border: 1px solid var(--green);
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.cabinet-materials-panel {
  overflow: hidden;
  border: 1px solid #e0e6e1;
  border-radius: 20px;
  background: #fffefc;
  box-shadow: 0 8px 28px rgba(46, 67, 57, 0.04);
}

.materials-loading {
  padding: 44px;
  color: #758079;
  text-align: center;
}

.cabinet-empty {
  padding: 72px 28px;
  text-align: center;
}

.cabinet-empty > span {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 50%;
  background: #e8f0ea;
  color: var(--green-dark);
  font-size: 27px;
}

.cabinet-empty h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 400;
}

.cabinet-empty p {
  margin: 8px 0 0;
  color: #7b8580;
  font-size: 12px;
}

.admin-material-list {
  display: grid;
}

.admin-material-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) minmax(190px, auto);
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid #e7ebe7;
}

.admin-material-row:last-child {
  border-bottom: 0;
}

.admin-material-row > img {
  width: 104px;
  height: 78px;
  border-radius: 11px;
  object-fit: cover;
}

.admin-material-copy > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-material-copy small {
  color: #7e8882;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-status {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1ebe3;
  color: #826f5e;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-status.published {
  background: #e4f0e8;
  color: #456b58;
}

.admin-material-copy h2 {
  margin: 8px 0 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 400;
}

.admin-material-copy p {
  margin: 0;
  color: #7a847f;
  font-size: 10px;
}

.admin-material-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.admin-material-actions a,
.admin-material-actions button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #cbd6cf;
  border-radius: 999px;
  background: #fff;
  color: var(--green-dark);
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
}

.admin-material-actions .delete {
  border-color: #ead4ce;
  color: #965d52;
}

.uploaded-material-page {
  padding-bottom: 100px;
}

.uploaded-material-intro {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(36px, 6vw, 82px);
  padding: clamp(30px, 5vw, 64px);
  border-radius: 28px;
  background: #f1f5f0;
}

.uploaded-material-cover {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 7px solid #fff;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.uploaded-material-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.uploaded-material-intro .material-actions {
  margin-top: 26px;
}

.material-launch-panel {
  margin-top: 78px;
  padding: clamp(30px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #f7f8f5;
  box-shadow: 0 18px 45px rgba(44, 70, 58, 0.07);
}

.material-launch-panel .minor-heading {
  margin-bottom: 18px;
}

.launch-note {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.material-launch-panel .material-actions,
.game-launch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 25px;
}

.game-launch-grid .button {
  min-width: min(100%, 250px);
}

.uploaded-game,
.presentation-cover-preview {
  padding-top: 78px;
}

.uploaded-game iframe {
  width: 100%;
  height: min(760px, 76vh);
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.presentation-cover-preview > div:last-child {
  display: grid;
  margin-top: 24px;
  padding: 28px;
  place-items: center;
  border-radius: 22px;
  background: #edf3ef;
}

.presentation-cover-preview img {
  max-height: 650px;
  border: 7px solid #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.cabinet-topbar a:focus-visible,
.cabinet-sidebar a:focus-visible,
.cabinet-sidebar button:focus-visible,
.cabinet-heading a:focus-visible,
.material-type-grid button:focus-visible,
.upload-box:focus-within,
.cabinet-actions button:focus-visible {
  outline: 3px solid rgba(54, 95, 80, 0.2);
  outline-offset: 3px;
}

@media (max-width: 1050px) {
  .cabinet-layout {
    grid-template-columns: 1fr;
  }

  .cabinet-sidebar {
    position: static;
    min-height: auto;
    padding: 13px 24px;
    border-right: 0;
    border-bottom: 1px solid #dfe5df;
  }

  .cabinet-sidebar > p,
  .cabinet-help {
    display: none;
  }

  .cabinet-sidebar nav {
    display: flex;
    overflow-x: auto;
  }

  .cabinet-sidebar nav a {
    flex: 0 0 auto;
  }

  .cabinet-sidebar nav button {
    flex: 0 0 auto;
  }
}

@media (max-width: 760px) {
  .cabinet-topbar {
    min-height: 64px;
    padding: 9px 16px;
  }

  .cabinet-logo strong,
  .cabinet-topbar > div > span {
    display: none;
  }

  .cabinet-topbar > div > a {
    padding: 9px 12px;
  }

  .cabinet-sidebar {
    padding: 10px 14px;
  }

  .cabinet-sidebar nav a {
    grid-template-columns: 25px 1fr auto;
    min-height: 44px;
    padding: 7px 10px;
    font-size: 11px;
  }

  .cabinet-sidebar nav button {
    grid-template-columns: 25px 1fr auto;
    min-height: 44px;
    padding: 7px 10px;
    font-size: 11px;
  }

  .cabinet-workspace {
    padding: 22px 14px 48px;
  }

  .prototype-notice {
    align-items: flex-start;
    margin-bottom: 23px;
  }

  .cabinet-heading {
    align-items: flex-start;
  }

  .cabinet-heading h1 {
    font-size: 39px;
  }

  .cabinet-heading > a {
    display: none;
  }

  .cancel-edit {
    display: none;
  }

  .form-section {
    padding: 20px;
    border-radius: 16px;
  }

  .material-type-grid,
  .field-row,
  .upload-grid,
  .form-preview-layout {
    grid-template-columns: 1fr;
  }

  .material-type-grid button {
    grid-template-columns: 44px 1fr;
    min-height: 82px;
    align-items: center;
  }

  .material-type-grid button > span {
    grid-row: 1 / 3;
    margin: 0;
  }

  .material-type-grid button > small {
    margin: 0;
  }

  .visitor-preview {
    position: static;
  }

  .cabinet-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cabinet-actions button {
    width: 100%;
  }

  .materials-heading {
    display: grid;
  }

  .new-material-button {
    width: 100%;
  }

  .admin-material-row {
    grid-template-columns: 78px 1fr;
    gap: 14px;
    padding: 15px;
  }

  .admin-material-row > img {
    width: 78px;
    height: 65px;
  }

  .admin-material-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .uploaded-material-intro {
    grid-template-columns: 1fr;
  }

  .material-launch-panel {
    margin-top: 55px;
    padding: 27px;
  }

  .game-launch-grid {
    display: grid;
  }

  .game-launch-grid .button {
    width: 100%;
  }

  .uploaded-game iframe {
    height: 560px;
  }
}
