.ag-page {
  max-width: 64rem;
  margin-inline: auto;
  padding: 1rem 0 3rem;
  color: #443e33;
}
.ag-heading h1 {
  margin: 0.25rem 0 1rem;
  font-size: clamp(1.8rem, 4vw, 2.55rem);
}
.ag-heading > span,
.ag-line,
.ag-cell small {
  color: #635e51;
}
.ag-tabs,
.ag-controls,
.ag-stories,
.ag-menu {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 0.65rem 0;
}
.ag-page .btn,
.ag-card .btn,
.ag-stories .btn,
.ag-menu .btn,
.ag-tabs .btn {
  margin: 0.15rem;
}
.ag-card {
  padding: 1rem 1.05rem;
  margin: 0.7rem 0;
  border: 1px solid #dfd2b9;
  border-radius: 18px;
  background: #fffaf0;
  box-shadow: 0 3px 0 #dfd5bc66;
  min-width: 0;
}
.ag-card .ag-card {
  box-shadow: none;
  background: #fffdf7;
}
.ag-card h3 {
  font-size: 1.08rem;
  margin: 0.1rem 0 0.5rem;
}
.ag-line {
  font-size: 0.91rem;
  line-height: 1.55;
  margin: 0.4rem 0 0.65rem;
}
.ag-person {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.ag-person .tk-person {
  width: 4rem;
  height: 4.5rem;
  flex-shrink: 0;
}
.ag-levels,
.ag-stoves {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 0.5rem;
}
.ag-levels .ag-card {
  margin: 0.15rem 0;
}
.ag-board,
.ag-gridlab {
  display: grid;
  gap: 4px;
  padding: 0.45rem;
  border-radius: 12px;
  background: #ded6be;
  margin: 1rem auto;
  max-width: 25rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.ag-gridlab {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  max-width: 34rem;
}
.ag-board button,
.ag-gridlab button {
  position: relative;
  min-width: 0;
  aspect-ratio: 1/1;
  border: 1px solid #c6bc9f;
  border-radius: 8px;
  background: #fff9e6;
  color: #4c4635;
  font-size: clamp(0.6rem, 2.3vw, 0.92rem);
  touch-action: manipulation;
}
.ag-board button:disabled,
.ag-gridlab button:disabled {
  opacity: 1;
  color: #706955;
  background: #e9e5d2;
}
.ag-cell.target {
  outline: 2px dashed #829a6a;
  outline-offset: -4px;
}
.ag-cell.chosen {
  background: #e3efd5;
  outline: 3px solid #557b57;
}
.ag-cell small,
.ag-gridlab small {
  display: block;
  font-size: 0.64rem;
}
.ag-cell .tk-art {
  width: 55%;
  height: 55%;
}
.ag-gridlab button.facility {
  background: #fae7ba;
}
.ag-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  border-bottom: 1px solid #e6dbc6;
  padding: 0.55rem 0;
}
.ag-choice b {
  overflow-wrap: anywhere;
}
.ag-collection {
  padding-left: 1.2em;
  line-height: 1.8;
}
.ag-page button:focus-visible,
.ag-card button:focus-visible {
  outline: 3px solid #34684b;
  outline-offset: 2px;
}
.ag-drag-meal {
  padding: 0.6rem;
  border: 1px solid #8ba479;
  background: #e7f1d9;
  border-radius: 9px;
  color: #385631;
  cursor: grab;
  touch-action: none;
}
.ag-cell {
  touch-action: none !important;
}
