body {
  background: var(--duck-blue);
}



.page {
  display: grid;
  grid-template-columns: 30rem 1fr;
  gap: 1rem;
  height: calc(100vh - 12rem);
  padding: 2rem;
  box-sizing: border-box;
  overflow: hidden;
}

/* ============================================================ */
/* SIDEBAR */
/* ============================================================ */
.sidebar-title {
  padding-left: 0.5rem;
  margin: 0rem;
  font-size: 2.5rem;
  font-family: var(--font-main);
}

.sidebar {
  min-height: 0;
  max-height: 99%;
}

.sidebar {
  background: var(--duck-white);
  padding: 1rem 1.6rem;
  box-sizing: border-box;
  border-radius: 2.7rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--page-title-card-shadow);
}


.category-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 0.2rem;
  margin-top: 1rem;
  align-content: start;
}

.category-list.is-awaiting-client-list .category-name,
.category-list.is-awaiting-client-list .category-meta {
  visibility: hidden;
}

.category-list.is-client-list-ready .category-name,
.category-list.is-client-list-ready .category-meta {
  visibility: visible;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: 0;
  max-height: 100%;
  overflow: visible;
  padding: 0.4rem 0.6rem 1rem;
  box-sizing: border-box;
  scrollbar-width: none;
}

.content::-webkit-scrollbar {
  display: none;
}

.content-browser-sr-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.content-browser-intro {
  background: var(--duck-white);
  padding: 1.6rem;
  box-sizing: border-box;
  border-radius: 2.7rem;
  box-shadow: var(--page-title-card-shadow);
}

.content-browser-breadcrumb,
.content-browser-page-title,
.content-browser-page-description {
  margin: 0;
  font-family: var(--font-main);
  color: var(--duck-charcoal);
}

.content-browser-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  font-size: 1.4rem;
}

.content-browser-breadcrumb span:last-child {
  font-weight: 700;
}

.content-browser-breadcrumb a,
.content-browser-inline-link {
  color: var(--duck-charcoal);
  font-weight: 700;
}

.content-browser-page-title {
  margin-top: 0.8rem;
  font-size: 3rem;
  line-height: 1.15;
}

.content-browser-page-description {
  margin-top: 0.9rem;
  font-size: 1.6rem;
  line-height: 1.5;
}

.sidebar-text {
  margin: 0;
  font-size: 1.6rem;
  font-family: var(--font-main);
}

.category-content-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--duck-white);
  padding: 1.6rem;
  box-sizing: border-box;
  border-radius: 2.7rem;
  box-shadow: var(--page-title-card-shadow);
}

.content-header {
  flex: 0 0 auto;
}


/* ============================================================ */
/* SIDEBAR CATEGORY SEARCH INPUT */
/* ============================================================ */
.category-search-input {
  font-family: var(--font-main);  
  font-size: 1.5rem;
  min-height: 4.4rem;
  border: 0.2rem solid var(--duck-disabled);
  background: var(--duck-white-light);
  color: var(--duck-charcoal);
  padding: 0.8rem 1rem;
  border-radius: 1.8rem;
}

.category-search-input {
  width: 100%;
  margin-top: 0.5rem;
  box-sizing: border-box;
}

.category-search-input::placeholder {
  font-size: 1.5rem;
  color: var(--duck-disabled);
}

.category-search-input:focus {
  border-color: var(--duck-yellow);
  outline: none;
}

/* ============================================================ */
/* SIDEBAR CATEGORY BUTTONS */
/* ============================================================ */
.category-list {
  display: grid;
  gap: 0.2rem;
  margin-top: 1rem;
  min-height: 0;
  overflow-y: auto;
}

.category-button{
  cursor: pointer;
}

.category-button {
  width: 100%;
  height: 5.8rem;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;

  padding: 0 1rem;

  box-sizing: border-box;
  border: 2px solid var(--duck-disabled);
  border-radius: 2.7rem;

  background: var(--duck-white);
  color: inherit;

  text-align: left;
  text-decoration: none;
}

.category-button:hover {
  border: 2px solid var(--duck-yellow);
}

.category-button.is-selected {
  border: 2px solid var(--duck-yellow);
  background: var(--duck-yellow);
}

.category-button-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.category-name {
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 1.7rem;
  color: var(--duck-charcoal);
  word-break: break-word;
  line-height: 1.1;
  margin: 0;
}

.category-meta {
  font-family: var(--font-main);
  font-size: 1.3rem;
  line-height: 1.2;
  color: var(--duck-gray);
}

.category-button.is-selected .category-meta {
  color: var(--duck-charcoal);
}

.category-favorite-indicator {
  flex: 0 0 auto;
  color: var(--duck-yellow);
  font-size: 1.35rem;
  pointer-events: none;
}

.category-button.is-selected .category-favorite-indicator {
  color: var(--duck-charcoal);
}

/* ============================================================ */
/* VOCABULARY */
/* ============================================================ */
.vocabulary-title {
  padding-left: 0.5rem;
  margin: 0rem;
  font-size: 2.4rem;
  font-family: var(--font-main);
}
.subject-title-card {
  background: var(--duck-white);
  padding: 0rem 1.6rem;
  box-sizing: border-box;
  border-radius: 2.7rem;
  background: var(--duck-white);
  padding-top: 1rem;
  padding-bottom: 1.6rem;
  box-shadow: var(--page-title-card-shadow);
}

.subject-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.subject-tab-group-start {
  position: relative;
  margin-left: 1.2rem;
}

.subject-tab-group-start::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  bottom: 0.4rem;
  left: -1.1rem;
  border-left: 0.2rem solid var(--duck-disabled);
  pointer-events: none;
}

.subject-tab {
  border: 0.2rem solid var(--duck-disabled);
  background: var(--duck-white);
  color: var(--duck-charcoal);
  border-radius: 999rem;
  min-height: 4.2rem;
  padding: 0.7rem 1.4rem;
  font-family: var(--font-main);
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  width: 15rem;
}

.subject-tab:hover,
.subject-tab:focus-visible {
  border-color: var(--duck-yellow);
  outline: none;
}

.subject-tab.is-active {
  background: var(--duck-yellow);
  border-color: var(--duck-yellow);
  color: var(--duck-charcoal);
}

.vocabulary-search-wrap {
  position: relative;
  width: 100%;
  max-width: 50rem;
  margin-top: 1.2rem;
}

.vocabulary-search-wrap.is-disabled {
  opacity: 0.75;
}

.vocabulary-search-input {
  font-family: var(--font-main);  
  font-size: 1.5rem;
  min-height: 4.4rem;
  border: 0.2rem solid var(--duck-disabled);
  background: var(--duck-white-light);
  color: var(--duck-charcoal);
  padding: 0.8rem 1rem;
  border-radius: 1.8rem;
  max-width: 50rem;
}

.vocabulary-search-input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0;
}

.vocabulary-search-input::placeholder {
  font-size: 1.5rem;
  color: var(--duck-disabled);
}

.vocabulary-search-input:focus {
  border-color: var(--duck-yellow);
  outline: none;
}

.vocabulary-search-input:disabled {
  /* cursor: not-allowed; */
  background: #f7f7f7;
  color: var(--duck-charcoal);
  opacity: 0;
}

.vocabulary-search-dropdown {
  position: absolute;
  top: calc(100% + 0.8rem);
  left: 0;
  right: 0;
  background: var(--duck-white);
  border-radius: 1.8rem;
  box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, 0.12);
  max-height: 36rem;
  overflow-y: auto;
  z-index: 20;
}

.vocabulary-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
}

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

.vocabulary-search-result,
.vocabulary-search-empty {
  width: 100%;
  padding: 1rem 1.2rem;
  box-sizing: border-box;
  font-family: var(--font-main);
}

.vocabulary-search-result {
  border: none;
  background: var(--duck-white);
  color: var(--duck-charcoal);
  text-align: left;
  cursor: pointer;
}

.vocabulary-search-result:hover {
  background: #fff7cf;
}

.vocabulary-search-result-label,
.vocabulary-search-result-category {
  display: block;
}

.vocabulary-search-result-label {
  font-size: 1.6rem;
  font-weight: 600;
}

.vocabulary-search-result-category {
  margin-top: 0.2rem;
  font-size: 1.3rem;
  color: var(--duck-gray);
}

.vocabulary-search-empty {
  font-size: 1.5rem;
  color: var(--duck-charcoal);
}

/* ============================================================ */
/* CONTENT ARRAY BOX */
/* ============================================================ */
#content-array-title{
  padding-left: 0.5rem;
  margin: 0;
  font-size: 2.5rem;
  font-family: var(--font-main);
}

.category-count {
  padding-left: 0.5rem;
  margin: 0;
  font-size: 1.6rem;
  font-family: var(--font-main);
}

.category-content-card {
  background: var(--duck-white);
  padding: 1.6rem 1.6rem 1.3rem;
  box-sizing: border-box;
  border-radius: 2.7rem;
  box-shadow: var(--page-title-card-shadow-small);
}

.content-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  margin-bottom: 0;
}

.content-header-text {
  min-width: 0;
}

.content-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1rem;
  margin-left: auto;
}

.favorite-control-wrap,
.customise-control-wrap {
  --favorite-control-min-width: 17rem;
  display: grid;
  min-width: var(--favorite-control-min-width);
}

.favorite-control-wrap[hidden],
.favorite-control-wrap > [hidden],
.customise-control-wrap[hidden],
.customise-control-wrap > [hidden] {
  display: none;
}

.favorite-control-wrap > *,
.customise-control-wrap > * {
  grid-area: 1 / 1;
}

.favorite-category-btn,
.favorite-category-login-link,
.customise-category-btn,
.customise-category-login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 4.8rem;
  box-sizing: border-box;
  border: 0.2rem solid var(--duck-disabled);
  border-radius: 999rem;
  background: var(--duck-white);
  color: var(--duck-charcoal);
  padding: 0.8rem 1.6rem;
  font-family: var(--font-main);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  width: 200px;
}

.favorite-category-btn,
.customise-category-btn {
  gap: 0.55rem;
  cursor: pointer;
}

.favorite-category-btn i,
.customise-category-btn i {
  color: var(--duck-charcoal);
}

.favorite-category-btn[aria-pressed="true"] i {
  color: var(--duck-yellow);
}

.favorite-category-btn:hover:not(:disabled),
.favorite-category-btn:focus-visible,
.favorite-category-login-link:hover,
.favorite-category-login-link:focus-visible,
.customise-category-btn:hover:not(:disabled),
.customise-category-btn:focus-visible,
.customise-category-login-link:hover,
.customise-category-login-link:focus-visible {
  border-color: var(--duck-yellow);
  outline: none;
}

.favorite-category-btn:disabled,
.customise-category-btn:disabled {
  cursor: default;
  opacity: 0.65;
}

.customise-category-status {
  position: fixed;
  z-index: 10002;
  right: 2rem;
  bottom: 2rem;
  max-width: 36rem;
  margin: 0;
  padding: 1rem 1.4rem;
  border: 0.2rem solid var(--duck-pink);
  border-radius: 1.2rem;
  background: var(--duck-white);
  color: var(--duck-charcoal);
  font-family: var(--font-main);
  font-size: 1.5rem;
  font-weight: 700;
}

.customise-selection-modal[hidden] {
  display: none;
}

.customise-selection-modal {
  position: fixed;
  z-index: 10001;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.customise-selection-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(43, 45, 66, 0.55);
}

.customise-selection-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(96rem, 100%);
  max-height: min(82vh, 78rem);
  padding: 2.4rem;
  border: 0.3rem solid var(--duck-charcoal);
  border-radius: 2rem;
  background: var(--duck-white);
  box-shadow: 0 1rem 0 var(--duck-charcoal);
}

.customise-selection-close-btn {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  display: grid;
  place-items: center;
  width: 4.8rem;
  height: 4.8rem;
  border: 0.2rem solid var(--duck-charcoal);
  border-radius: 999rem;
  background: var(--duck-white);
  color: var(--duck-charcoal);
  cursor: pointer;
  font-size: 2rem;
}

.customise-selection-title {
  margin: 0 5rem 0rem 0;
  color: var(--duck-charcoal);
  font-family: var(--title-font);
  font-size: 3rem;
}

.customise-selection-counter {
  margin: 0 0 1rem;
  color: var(--duck-charcoal);
  font-family: var(--font-main);
  font-size: 1.8rem;
  font-weight: 700;
}

.customise-selection-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  min-height: 18rem;
  overflow: auto;
  padding: 0.4rem;
}

.customise-selection-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 7.2rem;
  padding: 1rem;
  border: 0.2rem solid var(--duck-disabled);
  border-radius: 1.4rem;
  background: var(--duck-white);
  color: var(--duck-charcoal);
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 1.45rem;
  font-weight: 700;
  text-align: left;
}

.customise-selection-option:hover,
.customise-selection-option:focus-visible {
  border-color: var(--duck-pink);
  outline: none;
}

.customise-selection-option.is-selected {
  border-color: var(--duck-charcoal);
  background: var(--duck-yellow);
}

.customise-selection-option img {
  width: 5.2rem;
  height: 5.2rem;
  flex: 0 0 auto;
  border-radius: 1rem;
  object-fit: contain;
}

.customise-selection-option-copy {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.customise-selection-option-detail {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.35;
}

.customise-selection-error {
  margin: 1rem 0 0;
  color: #b42318;
  font-family: var(--font-main);
  font-size: 1.4rem;
  font-weight: 700;
}

.customise-selection-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.6rem;
}

.customise-selection-cancel-btn,
.customise-selection-confirm-btn {
  min-width: 14rem;
  min-height: 4.8rem;
  padding: 0.8rem 1.4rem;
  border: 2px solid var(--duck-charcoal);
  border-radius: 999rem;
  font-family: var(--font-main);
  font-size: 1.7rem;
  font-weight: 700;
  cursor: pointer;
}

.customise-selection-cancel-btn {
  background: var(--duck-white);
  border: 2px solid var(--duck-disabled);
  color: var(--duck-charcoal);
}

.customise-selection-cancel-btn:hover {
  border: 2px solid var(--duck-charcoal);
}

.customise-selection-confirm-btn {
  background: var(--duck-pink);
  border: 2px solid var(--duck-pink);
  color: var(--duck-white);
}

.customise-selection-confirm-btn:hover {
  background: var(--duck-pink-light);
}

.customise-selection-confirm-btn:disabled {
  border-color: var(--duck-disabled);
  border: 2px solid var(--duck-disabled);
  background: var(--duck-disabled);
  cursor: default;
}


/* ============================================================ */
/* TITLES */
/* ============================================================ */
.image-label,
.empty-state{
  margin: 0;
  font-size: 1.6rem;
  font-family: var(--font-main);
}

/* ============================================================ */
/* IMAGES */
/* ============================================================ */
.image-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  padding-right: 0.4rem;
  padding-bottom: 1rem;
}

.image-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  padding-right: 0.4rem;
  padding-bottom: 1rem;
}

.content-browser-hub-group {
  grid-column: 1 / -1;
  display: grid;
  gap: 1.2rem;
}

.content-browser-hub-group + .content-browser-hub-group {
  margin-top: 0.4rem;
}

.content-browser-hub-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.content-browser-hub-group-title,
.content-browser-hub-group-meta {
  margin: 0;
  font-family: var(--font-main);
  color: var(--duck-charcoal);
}

.content-browser-hub-group-title {
  font-size: 2rem;
}

.content-browser-hub-group-meta {
  margin-top: 0.2rem;
  font-size: 1.4rem;
}

.content-browser-hub-select-btn {
  border: 0.2rem solid var(--duck-disabled);
  background: var(--duck-white);
  color: var(--duck-charcoal);
  border-radius: 999rem;
  min-height: 4.2rem;
  padding: 0.7rem 2rem;
  font-family: var(--font-main);
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
}

.content-browser-hub-select-btn:hover,
.content-browser-hub-select-btn:focus-visible {
  border-color: var(--duck-yellow);
  outline: none;
}

.content-browser-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1.2rem;
}

.image-card {
  background: var(--duck-white);
  padding: 0.8rem;
  box-sizing: border-box;
  border-radius: 2.7rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, outline-color 0.2s ease;
  border: 4px solid var(--duck-white);
  align-self: start;
}

.image-card:hover {
  /* scale: 1.01; */
  border: 4px solid var(--duck-yellow);
}

.image-card:focus-visible {
  outline: 0.35rem solid var(--duck-yellow);
}

.image-card.is-search-highlighted {
  /* outline: 0.35rem solid var(--duck-yellow); */
  /* transform: translateY(-0rem) scale(1.02); */
  /* border-radius: 2.7rem; */
  border: 4px solid var(--duck-yellow);
}

.image-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 1.8rem;
  background: var(--duck-white);
  box-shadow: var(--card-div-shadow-light);
}

.image-label {
  margin-top: 1rem;
  line-height: 1.3;
  word-break: break-word;
  text-align: center;
}

.image-grid.is-grammar-grid {
  grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr));
  align-content: start;
  gap: 0.5rem;
  margin-top: 1rem;
}

.grammar-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: var(--duck-white-light);
  border: 2px solid var(--duck-disabled-light);
  border-radius: 1.8rem;
  padding: 1.5rem;
  box-sizing: border-box;
  box-shadow: var(--card-div-shadow-lighter);
}

.grammar-question,
.grammar-answer {
  margin: 0;
  font-family: var(--font-main);
  color: var(--duck-charcoal);
  line-height: 1.4;
}

.grammar-question {
  font-size: 1.8rem;
  font-weight: 700;
}

.grammar-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.grammar-option {
  display: inline-flex;
  align-items: center;
  min-height: 3.6rem;
  padding: 0.4rem 1rem;
  border: 0.2rem solid var(--duck-disabled);
  border-radius: 999rem;
  background: var(--duck-white);
  font-family: var(--font-main);
  font-size: 1.4rem;
  color: var(--duck-charcoal);
  box-sizing: border-box;
}

.grammar-answer {
  font-size: 1.5rem;
}


/* ============================================================ */
/* PLAY CATEGORY BUTTON */
/* ============================================================ */
.play-category-row {
  display: flex;
  justify-content: center;
  margin-top: 1.6rem;
}

.play-category-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 25rem;
  margin: 0;
  padding: 1rem 1.5rem;

  border: none;
  border-radius: 999px;

  background: var(--go-btn-gradient);
  box-shadow: var(--go-btn-shadow-soft);

  color: var(--duck-white);
  font-family: var(--font-main);
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 0.15rem 0.25rem rgba(43, 45, 66, 0.22);

  cursor: pointer;

  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* .play-category-btn {
  background: var(--duck-pink-light);
} */
.play-category-btn:hover {
  background: var(--duck-pink-light);
}

.play-category-btn:disabled {
  cursor: default;
  background: var(--duck-disabled);
  color: var(--duck-white);
  box-shadow: none;
  opacity: 0.85;
}


.empty-state {
  padding: 1rem 0;
}


/* ============================================================ */
/* TABLET 900PX */
/* ============================================================ */
/* @media (max-width: 900px) {
  .page {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .category-list,
  .content {
    overflow: visible;
  }
} */


/* ============================================================ */
/* MOBILE 550 PX */
/* ============================================================ */
@media (max-width: 550px) {
  .subject-tab-group-start {
    margin-left: 0.4rem;
  }

  .subject-tab-group-start::before {
    display: none;
  }

  .page {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    height: auto;
    min-height: auto;
    padding: 1rem;
    overflow: visible;
  }

  .sidebar,
  .content {
    width: 100%;
    max-height: none;
    min-height: 0;
  }

  .sidebar {
    height: auto;
    padding: 1rem;
    border-radius: 2rem;
  }

  .content {
    gap: 1.2rem;
    padding: 0;
    overflow: visible;
  }

  .sidebar-title,
  .vocabulary-title,
  #content-array-title {
    font-size: 2.2rem;
  }

  .content-browser-intro {
    border-radius: 2rem;
    padding: 1.2rem;
  }

  .content-browser-page-title {
    font-size: 2.4rem;
  }

  .subject-title-card,
  .category-content-card {
    border-radius: 2rem;
    padding: 1.2rem;
  }

  .vocabulary-search-input,
  .category-search-input {
    max-width: none;
    width: 100%;
    min-height: 4.2rem;
    font-size: 1.5rem;
  }

  .category-list {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.4rem;
  }

  .category-button {
    flex: 0 0 15rem;
    height: 7rem;
  }

  .category-name {
    font-size: 1.5rem;
  }

  .category-meta {
    font-size: 1.25rem;
  }

  .content-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    margin-bottom: 1.2rem;
  }

  .content-header-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    align-items: stretch;
    gap: 0.8rem;
    margin-left: 0;
  }

  .favorite-control-wrap,
  .customise-control-wrap {
    --favorite-control-min-width: 0;
    width: 100%;
  }

  .favorite-category-btn,
  .favorite-category-login-link,
  .customise-category-btn,
  .customise-category-login-link {
    width: 100%;
    min-height: 5.2rem;
    padding: 0.9rem 1rem;
    font-size: 1.45rem;
  }

  .play-category-btn {
    grid-column: 1 / -1;
    width: 100%;
    padding: 1.2rem 2rem;
    font-size: 2rem;
  }

  .customise-selection-modal {
    padding: 1rem;
  }

  .customise-selection-panel {
    max-height: 92vh;
    padding: 1.8rem;
  }

  .customise-selection-list {
    grid-template-columns: 1fr;
  }

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

  .customise-selection-cancel-btn,
  .customise-selection-confirm-btn {
    min-width: 0;
    width: 100%;
  }

  .image-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    overflow: visible;
    padding-right: 0;
    padding-bottom: 0;
  }

  .image-card {
    padding: 0.4rem;
  }

  .image-card img {
    border-radius: 1.4rem;
  }

  .image-label {
    font-size: 1.4rem;
    margin-top: 0.6rem;
  }

  .image-grid.is-grammar-grid {
    grid-template-columns: 1fr;
  }

  .grammar-card {
    padding: 1rem;
  }

  .grammar-question {
    font-size: 1.6rem;
  }
}
