/* Shared by the playable game and /ui-kit. No gameplay rules live here. */
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  touch-action: manipulation;
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
}
button > *,
.k-icon {
  pointer-events: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--ui-focus);
  outline-offset: 4px;
}
button:focus:not(:focus-visible) {
  outline: none;
}
a {
  color: var(--ui-teal-dark);
  text-underline-offset: 3px;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
button,
input,
select {
  color: var(--ui-ink);
}
.k-icon {
  display: inline-block;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  object-fit: contain;
  vertical-align: middle;
}
.k-panel,
.ui-sheet {
  color: var(--ui-ink);
  background: var(--ui-paper);
  border: 2px solid var(--ui-outline);
  border-radius: var(--ui-radius-lg);
  box-shadow: var(--ui-shadow-card);
}
.k-inset {
  background: var(--ui-paper-dark);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  padding: 12px;
}
.k-button,
.k-round,
.claim-small,
.ui-button {
  --button-face: var(--ui-paper-light);
  --button-edge: #b99b76;
  --button-border: #b99b76;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 18px;
  border: 2px solid var(--button-border);
  border-radius: 12px;
  background: var(--button-face);
  color: var(--ui-ink);
  box-shadow:
    0 4px 0 var(--button-edge),
    inset 0 2px 0 #ffffff55;
  font:
    900 14px/1.25 'Nunito',
    system-ui,
    sans-serif;
  text-decoration: none;
  text-align: center;
  transition:
    transform var(--ui-fast) ease-out,
    box-shadow var(--ui-fast) ease-out,
    background var(--ui-fast);
}
.k-button-primary,
.ui-button-primary {
  --button-face: var(--ui-primary);
  --button-edge: var(--ui-primary-edge);
  --button-border: var(--ui-primary-edge);
  color: #fffdf6;
}
.k-button-teal {
  --button-face: var(--ui-teal);
  --button-edge: var(--ui-teal-dark);
  --button-border: var(--ui-teal-dark);
  color: white;
}
.k-button-danger {
  --button-face: var(--ui-danger);
  --button-edge: #722925;
  --button-border: #722925;
  color: white;
}
.k-button-quiet {
  --button-face: transparent;
  --button-border: transparent;
  --button-edge: transparent;
  box-shadow: none;
  color: var(--ui-muted);
}
.k-button:disabled,
.ui-button:disabled,
.k-round:disabled,
.claim-small:disabled {
  --button-face: var(--ui-disabled);
  --button-border: #c8bcaa;
  --button-edge: #c8bcaa;
  color: #716759;
  box-shadow: 0 2px 0 var(--button-edge);
  transform: none;
}
.k-button[aria-busy='true'],
.ui-button[aria-busy='true'] {
  pointer-events: none;
}
[aria-busy='true'] > .ui-spinner {
  display: inline-block;
}
.ui-spinner {
  width: 18px;
  height: 18px;
  border: 3px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: ui-spin 0.7s linear infinite;
}
.k-round {
  width: 48px;
  min-width: 48px;
  height: 48px;
  padding: 7px;
  border-radius: 15px;
}
.k-round .k-icon {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}
.close-button {
  --button-face: #f5d9ca;
  --button-edge: #bb876e;
  --button-border: #bb876e;
}
.k-button:not(:disabled):active,
.k-round:not(:disabled):active,
.claim-small:not(:disabled):active,
.ui-button:not(:disabled):active,
.is-pressed {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--button-edge);
}
@media (hover: hover) {
  .k-button:not(:disabled):hover,
  .k-round:not(:disabled):hover,
  .claim-small:hover {
    background-image: linear-gradient(#fff1, #fff1);
  }
}
.text-button,
.text-danger {
  border: 0;
  background: none;
  min-height: 44px;
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--ui-teal-dark);
}
.text-danger {
  color: var(--ui-danger);
}
.eyebrow,
.ui-kicker {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ui-muted);
}
.panel-intro {
  color: var(--ui-muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 16px;
  max-width: 52ch;
}
.panel-footnote {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ui-muted);
  margin: 14px 0 4px;
}
.ui-badge,
.active-pill,
.npc-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #b5c6a8;
  border-radius: 7px;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 900;
  background: var(--ui-teal-light);
  color: var(--ui-teal-dark);
  white-space: nowrap;
}
.ui-badge .k-icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}
.ui-badge-gold {
  background: var(--ui-gold-light);
  border-color: #dcb456;
  color: #795620;
}
.ui-badge-locked {
  background: #eee6d9;
  color: #716251;
  border-color: #c8bba8;
}
.ui-badge-danger {
  color: var(--ui-danger);
  background: var(--ui-danger-light);
  border-color: #ddb6a3;
}
.tabs {
  display: flex;
  gap: 5px;
  padding: 5px;
  border-radius: 14px;
  background: #eadfc9;
  border: 1px solid #d8c3a5;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 0 20px;
  flex-shrink: 0;
}
.tabs button {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: transparent;
  min-height: 46px;
  padding: 8px 12px;
  color: var(--ui-muted);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.tabs button.selected,
.tabs button[aria-pressed='true'] {
  background: var(--ui-paper-light);
  color: var(--ui-ink-strong);
  border-color: #b99b76;
  box-shadow: 0 2px 0 #b99b76;
}
.tabs .k-icon {
  width: 25px;
  height: 25px;
  flex-basis: 25px;
}
.xp-track,
.energy-track,
.quest-progress,
.loading-track {
  background: #e6dac4;
  border: 1px solid #c2b091;
  height: 10px;
  border-radius: 8px;
  overflow: hidden;
}
.xp-track i,
.energy-track i,
.quest-progress i,
.loading-track i {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: var(--ui-teal);
  box-shadow: inset 0 2px 0 #ffffff40;
  transition: width 200ms ease;
}
.energy-track i {
  background: #719458;
}
.energy-track {
  height: 9px;
  margin: 4px 0 15px;
}
.currency-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ui-paper-light);
  border: 2px solid #bda17f;
  border-radius: 16px;
  padding: 5px 13px 5px 6px;
  box-shadow: 0 3px 0 #bda17f;
  min-height: 48px;
  color: var(--ui-ink-strong);
  font-variant-numeric: tabular-nums;
}
.currency-pill .k-icon {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
}
.currency-pill strong {
  font-size: 23px;
  line-height: 1;
  font-weight: 1000;
}
.currency-pill small {
  color: var(--ui-muted);
  font-size: 11px;
  font-weight: 800;
}
.currency-pill.gems {
  background: #edf5ed;
  border-color: #93af9f;
  box-shadow: 0 3px 0 #93af9f;
}
.currency-pill.gems strong {
  font-size: 19px;
}
.gem-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.gem-balance strong {
  font-size: 20px;
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.catalog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  padding: 0;
  overflow: hidden;
  border: 2px solid #d0b99a;
  border-radius: 16px;
  background: var(--ui-paper-light);
  box-shadow: 0 3px 0 #d0b99a;
  min-width: 0;
  transition:
    border-color 100ms,
    transform 100ms;
}
.catalog-card:not(:disabled):hover {
  border-color: var(--ui-teal);
}
.catalog-card:not(:disabled):active {
  transform: translateY(2px);
}
.catalog-card.selected {
  border-color: var(--ui-teal);
  box-shadow:
    0 0 0 2px var(--ui-teal-light),
    0 3px 0 var(--ui-teal);
}
.item-preview {
  width: 100%;
  height: 136px;
  flex-shrink: 0;
  position: relative;
  background: #eee5cf;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid #decdb3;
}
.item-preview::after {
  content: '';
  position: absolute;
  width: 65%;
  height: 12px;
  border-radius: 50%;
  background: #66503a10;
  bottom: 16px;
  pointer-events: none;
}
.item-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 4px 6px;
}
.item-preview > .k-icon {
  width: 68px;
  height: 68px;
  padding: 0;
}
.item-chair,
.item-floor_decor {
  background: #e4ead7;
}
.item-stove {
  background: #f1ded0;
}
.item-wall_decor,
.item-wall_style {
  background: #dde8e2;
}
.item-preview .item-category {
  position: absolute;
  z-index: 2;
  left: 8px;
  top: 8px;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 6px;
  background: #fffcf0e8;
  border-radius: 5px;
  color: #75604c;
}
.item-preview .owned-count {
  position: absolute;
  z-index: 2;
  right: 8px;
  bottom: 8px;
  padding: 3px 6px;
  color: var(--ui-teal-dark);
  background: #fffdf2ee;
  border: 1px solid #abc0a4;
  border-radius: 7px;
  font-weight: 900;
  font-size: 11px;
}
.catalog-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}
.catalog-copy strong {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 900;
  min-height: 38px;
  /* Long German compounds (Sahnepfannkuchen-Platte) break inside the card. */
  overflow-wrap: anywhere;
  hyphens: auto;
}
.price-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 35px;
  border: 1px solid #d8b76b;
  border-radius: 8px;
  background: #fff0c2;
  color: #664a25;
  font-size: 14px;
  font-weight: 1000;
  margin-top: auto;
}
.price-tag .k-icon {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
}
.gem-price {
  background: #e5efe3;
  border-color: #a1baa9;
  color: var(--ui-teal-dark);
}
.catalog-card.locked {
  background: #f4ede0;
  border-color: #cbbda9;
  box-shadow: 0 3px 0 #cbbda9;
}
.catalog-card.locked .item-preview img {
  filter: saturate(0.45);
  opacity: 0.78;
}
.catalog-card.locked .price-tag {
  background: #e9e0d1;
  border-color: #c7b69b;
  color: #6e5b48;
}
.catalog-card.unaffordable .price-tag {
  color: var(--ui-danger);
  background: #fff0e9;
  border-color: #d7a58e;
}
.catalog-card .item-shortage {
  color: var(--ui-danger);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  min-height: 15px;
}
.catalog-card.applied .price-tag {
  color: var(--ui-teal-dark);
  background: #e5efe3;
  border-color: #9ab396;
}
.shop-toolbar,
.panel-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 18px;
}
.shop-toolbar .panel-intro {
  margin: 0;
}
.storage-link {
  flex-shrink: 0;
  font-size: 13px;
  padding: 8px 12px;
}
.expand-button {
  width: 100%;
  margin: 20px 0 8px;
}
.ui-details {
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 20px 0 6px;
  color: var(--ui-muted);
  font-size: 13px;
}
.ui-details summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--ui-ink);
  min-height: 24px;
}
.ui-details p {
  margin: 8px 0 0;
  line-height: 1.55;
}
.style-swatch {
  display: block;
  width: 80px;
  height: 70px;
  border: 3px solid #fffbec;
  border-radius: 8px;
  box-shadow: 3px 5px 0 #79603d26;
  transform: rotate(-8deg);
}
.swatch-F031 {
  background: conic-gradient(#f6ebd2 25%, #e4dbc2 0 50%, #f6ebd2 0 75%, #e4dbc2 0) 0 0/24px 24px;
}
.swatch-F032 {
  background: #f6ebd2;
}

.swatch-F033 {
  background: repeating-linear-gradient(
    0deg,
    #a67b56 0 1px,
    #c79b70 2px 14px,
    #d8ad80 15px 27px,
    #ab805c 28px
  );
}
.swatch-F034 {
  background: #f7e4c5;
  border-bottom: 12px solid #6e9c83;
}
.swatch-F035 {
  background: #91b9a8;
  border-bottom: 12px solid #377569;
}
.swatch-F036 {
  background:
    repeating-linear-gradient(0deg, transparent 0 13px, #dac7af 14px 16px),
    repeating-linear-gradient(90deg, #c98e70 0 25px, #dac7af 26px 28px);
}
.recipe-list,
.staff-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.recipe-card,
.staff-card,
.neighbor-card,
.storage-card {
  background: var(--ui-paper-light);
  border: 2px solid #d0b99a;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 3px 0 #d0b99a66;
  min-width: 0;
}
.recipe-card {
  display: flex;
  flex-direction: column;
}
.recipe-card.locked,
.staff-card.locked {
  background: #f2ecdf;
}
.recipe-card.locked .recipe-art {
  filter: saturate(0.4);
}
.recipe-top {
  display: flex;
  gap: 11px;
  align-items: center;
  position: relative;
}
.recipe-art {
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
  background: #eee6d0;
  border: 1px solid #dfceb1;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.recipe-art img {
  width: 108%;
  height: 108%;
  object-fit: contain;
}
.recipe-top h3 {
  font-size: 16px;
  font-weight: 1000;
  line-height: 1.2;
}
.recipe-top p {
  display: flex;
  gap: 4px;
  align-items: center;
  color: #7c602c;
  font-size: 12px;
  font-weight: 800;
  margin: 6px 0;
}
.recipe-top p .k-icon {
  width: 21px;
  height: 21px;
  flex-basis: 21px;
}
.recipe-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 7px;
}
.recipe-rank {
  color: #806436;
  font-size: 11px;
  font-weight: 900;
}
.food-icon {
  display: inline-block;
  background-image: url('../food-atlas.png');
  background-size: 600% 500%;
  background-repeat: no-repeat;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}
.ingredients-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  border-top: 1px dashed var(--ui-line);
  margin: 13px 0;
  padding-top: 11px;
}
.ingredients-line > span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 5px;
  background: #f1ebdd;
  border-radius: 7px;
}
.ingredients-line .food-icon {
  width: 26px;
  height: 26px;
  flex-basis: 26px;
}
.ingredients-line b {
  font-size: 11px;
  color: var(--ui-teal-dark);
}
.ingredients-line b.missing {
  color: var(--ui-danger);
}
.ingredients-line > small {
  width: 100%;
  color: var(--ui-muted);
  font-size: 11px;
}
.recipe-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.recipe-actions .k-button {
  flex: 1;
  padding: 9px 8px;
  font-size: 12px;
}
.recipe-state-note {
  font-size: 12px;
  line-height: 1.4;
  color: var(--ui-danger);
  margin-bottom: 9px;
}
.menu-summary {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 900;
}
.menu-summary button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 10px;
  background: var(--ui-teal-light);
  color: var(--ui-teal-dark);
  padding: 10px 12px;
  min-height: 46px;
  font-size: 13px;
  font-weight: 900;
}
.ingredient-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.ingredient-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  border: 2px solid #d0b99a;
  border-radius: 12px;
  background: var(--ui-paper-light);
  padding: 10px 6px;
  gap: 5px;
  min-height: 156px;
  box-shadow: 0 2px 0 #d0b99a66;
}
.ingredient-card .food-icon {
  width: 62px;
  height: 62px;
  flex-basis: 62px;
}
.ingredient-card strong {
  font-size: 13px;
  line-height: 1.25;
}
.ingredient-card small {
  color: var(--ui-muted);
  font-size: 11px;
}
.ingredient-card > span:last-child {
  font-size: 12px;
  font-weight: 1000;
  color: #755525;
}
.ingredient-card.locked {
  background: #ece5d8;
  color: #776a5a;
}
.ingredient-lock {
  width: 100%;
  min-height: 44px;
  background: #e9e3d4;
  border: 1px solid var(--ui-line);
  border-radius: 0 0 10px 10px;
  font-size: 11px;
  font-weight: 800;
  padding: 8px;
}
.ingredient-lock.unlocked {
  background: #e1eddb;
  color: var(--ui-teal-dark);
}
.staff-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.staff-top h3 {
  font-size: 19px;
  font-weight: 1000;
}
.staff-top p {
  font-size: 12px;
  font-weight: 800;
  color: var(--ui-muted);
  margin-top: 3px;
}
.portrait {
  width: 68px;
  height: 74px;
  flex: 0 0 68px;
  border-radius: 22px 22px 14px 14px;
  background: #e5e9d7;
  border: 1px solid #c7d0ae;
  position: relative;
  display: grid;
  place-items: center;
}
.portrait img {
  width: 78px;
  height: 84px;
  object-fit: contain;
  transform: translateY(-5px);
}
.portrait b {
  display: none;
}
.portrait-1 {
  background: #f2dfcf;
  border-color: #d9bda4;
}
.portrait-2 {
  background: #e7e1ed;
  border-color: #c6b8ce;
}
.portrait-3 {
  background: #deebed;
  border-color: #aec6c9;
}
.energy-label {
  margin-left: auto;
  color: var(--ui-teal-dark);
  font-size: 13px;
  font-weight: 1000;
}
.staff-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}
.staff-actions label {
  font-size: 12px;
  color: var(--ui-muted);
  font-weight: 800;
}
.staff-actions select {
  width: 100%;
  margin-top: 5px;
}
.staff-actions .k-button {
  font-size: 12px;
}
.staff-card > .k-button {
  width: 100%;
}
.staff-role-next {
  color: var(--ui-primary);
  font-weight: 1000;
}
/* Pending role picks stay in view until confirmed or cancelled. */
.staff-confirm {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 12px;
  padding: 10px;
  display: grid;
  gap: 6px;
  background: var(--ui-gold-light);
  border: 2px solid var(--ui-gold);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow-card);
}
.staff-confirm p {
  margin: 0;
  overflow-wrap: anywhere;
}
.staff-confirm-count {
  color: var(--ui-ink-strong);
  font-weight: 900;
}
.staff-confirm-warning {
  color: var(--ui-danger);
  font-size: 12px;
  font-weight: 800;
}
/* One row even in long locales, so the bar stays short at 360px. */
.staff-confirm-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 8px;
}
.staff-confirm-actions .k-button {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
.staff-card .text-button {
  font-size: 12px;
}
.friend-staff-label {
  margin-top: 14px;
}
.neighbor-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.neighbor-card {
  padding: 10px;
}
.neighbor-art {
  min-height: 112px;
  border-radius: 12px;
  background: var(--neighbor-color, #e1e8cf);
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.neighbor-art > .k-icon {
  width: 86px;
  height: 86px;
  flex-basis: 86px;
}
.npc-tag {
  position: absolute;
  right: 6px;
  top: 6px;
  background: #fffcf0ed;
  color: var(--ui-muted);
  border-color: transparent;
  font-size: 9px;
}
.neighbor-card h3 {
  font-size: 16px;
  font-weight: 1000;
  margin: 12px 0 5px;
}
.neighbor-card > p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ui-muted);
  min-height: 54px;
  margin-bottom: 12px;
}
.neighbor-card > .k-button {
  width: 100%;
  font-size: 12px;
  padding: 8px;
  margin: 0 0 9px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.section-heading h3 {
  font-size: 15px;
  font-weight: 1000;
}
.section-heading > span {
  font-size: 11px;
  font-weight: 900;
  color: var(--ui-muted);
}
.quest {
  padding: 14px 0;
  border-bottom: 1px dashed var(--ui-line);
}
.quest:last-child {
  border-bottom: 0;
}
.quest-label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.quest-label > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
}
.quest-label .k-icon {
  width: 35px;
  height: 35px;
}
.quest-label p {
  flex: 1;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
}
.quest-label small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--ui-muted);
  font-weight: 800;
}
.quest .quest-progress {
  margin: 9px 0 0 48px;
  height: 8px;
}
.quest.done .quest-label p {
  color: var(--ui-muted);
}
.claim-small {
  margin: 10px 0 0 48px;
  min-height: 44px;
  background: var(--ui-gold-light);
  --button-edge: #c6a05f;
  --button-border: #c6a05f;
  padding: 8px 15px;
  font-size: 13px;
}
.claim-small .k-icon {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
}
.daily-actions,
.button-row,
.tree-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 18px;
}
.daily-actions .k-button {
  flex: 1;
}
.login-ticket {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px;
  border: 2px solid #d4b16b;
  border-radius: 15px;
  background: var(--ui-gold-light);
  margin: 0 0 20px;
}
.login-ticket > .k-icon {
  width: 54px;
  height: 54px;
  flex-basis: 54px;
}
.login-ticket > div {
  flex: 1;
}
.login-ticket h3 {
  font-size: 17px;
  font-weight: 1000;
}
.login-ticket p {
  font-size: 12px;
  line-height: 1.4;
  color: #7a5b2f;
  margin-top: 4px;
}
.login-ticket .k-button {
  font-size: 13px;
}
.feature-section {
  border-top: 1px dashed var(--ui-line);
  margin: 24px 0 0;
  padding: 20px 0 0;
}
.feature-section h3,
.market-section h3 {
  font-size: 19px;
  font-weight: 1000;
  margin-bottom: 10px;
  display: flex;
  gap: 9px;
  align-items: center;
}
.feature-section > p,
.market-section > p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ui-muted);
  margin-bottom: 14px;
}
.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.quiz-options .k-button {
  text-align: left;
  justify-content: flex-start;
  font-size: 13px;
}
.quiz-result {
  background: var(--ui-teal-light);
  padding: 13px;
  border-left: 4px solid var(--ui-teal);
  border-radius: 0 10px 10px 0;
  margin-top: 14px;
}
.achievement-list {
  display: grid;
  gap: 13px;
}
.achievement-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--ui-paper-light);
  border: 1px solid var(--ui-line);
  border-radius: 14px;
}
.achievement-card > .k-icon {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
}
.achievement-card > div {
  flex: 1;
  min-width: 0;
}
.achievement-card h3 {
  font-size: 15px;
  font-weight: 900;
}
.achievement-card p {
  font-size: 12px;
  color: var(--ui-muted);
  margin: 5px 0 8px;
}
.achievement-card .k-button {
  font-size: 12px;
  min-width: 95px;
}
.storage-card {
  display: flex;
  flex-direction: column;
  text-align: center;
  padding: 10px;
}
.storage-card > img {
  width: 100%;
  height: 115px;
  object-fit: contain;
  background: #eee5d0;
  border-radius: 10px;
}
.storage-card h3 {
  font-size: 14px;
  margin: 10px 0;
  min-height: 38px;
}
.storage-card .k-button {
  width: 100%;
  margin: 5px 0;
  font-size: 12px;
  padding: 8px;
}
.empty-state {
  text-align: center;
  padding: 36px 18px;
  background: #f4ecd9;
  border: 2px dashed #cdbb9e;
  border-radius: 18px;
  margin: 18px 0;
}
.empty-state .k-icon {
  width: 78px;
  height: 78px;
  margin-bottom: 14px;
}
.empty-state h3 {
  font-size: 21px;
  margin-bottom: 8px;
}
.empty-state p {
  font-size: 14px;
  color: var(--ui-muted);
  line-height: 1.6;
  max-width: 32ch;
  margin: 0 auto 18px;
}
.settings-list {
  background: var(--ui-paper-light);
  border: 1px solid var(--ui-line);
  border-radius: 14px;
  padding: 0 16px;
}
.settings-list > label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 66px;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 800;
}
/* A long option (de "Beste Optik, bei Bedarf reduzieren") moves the select
   below its label instead of running past the panel edge and hiding the arrow. */
.settings-list > label:has(> select) {
  flex-wrap: wrap;
  row-gap: 8px;
}
.settings-list > label > select {
  min-width: 0;
  margin-left: auto;
  text-overflow: ellipsis;
}
.settings-list > label + label {
  border-top: 1px solid #e7dac5;
}
.setting-name {
  display: flex;
  align-items: center;
  gap: 10px;
}
input[type='checkbox'] {
  accent-color: var(--ui-teal);
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  margin: 0;
  cursor: pointer;
}
.settings-list input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 52px;
  height: 30px;
  flex-basis: 52px;
  background: #d7cbb5;
  border: 2px solid #ab977c;
  border-radius: 17px;
  transition: background 120ms;
}
.settings-list input[type='checkbox']::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fffdf5;
  box-shadow: 0 1px 2px #483c2838;
  transition: transform 120ms;
}
.settings-list input[type='checkbox']:checked {
  background: var(--ui-teal);
  border-color: var(--ui-teal-dark);
}
.settings-list input[type='checkbox']:checked::after {
  transform: translateX(21px);
}
.settings-list input[type='checkbox']:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
select {
  min-height: 46px;
  border: 2px solid #c3ab8c;
  border-radius: 10px;
  background: var(--ui-paper-light);
  padding: 9px 30px 9px 11px;
  color: var(--ui-ink);
  font-size: 14px;
  font-weight: 800;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m2 2 4 4 4-4' fill='none' stroke='%23594237' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  max-width: 100%;
}
input[type='text'],
input[type='email'],
input[type='password'],
input[type='number'],
.field-label input,
.inline-form input {
  min-height: 48px;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 2px solid #c3ab8c;
  border-radius: 10px;
  background: var(--ui-paper-light);
  color: var(--ui-ink-strong);
  font-size: 16px;
}
input[aria-invalid='true'] {
  border-color: var(--ui-danger);
  background: var(--ui-danger-light);
}
.field-label,
.account-fields label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 13px;
}
.field-label + .k-button {
  margin: 4px 0 6px;
}
.account-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.account-fields .button-row {
  grid-column: 1/-1;
}
.consent-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.55;
  margin: 18px 0 12px;
  cursor: pointer;
}
.consent-option input {
  margin-top: 1px;
}
.about-box,
.credits {
  margin-top: 24px;
  border-top: 1px dashed var(--ui-line);
  padding-top: 20px;
}
.about-box h3,
.credits h3 {
  font-size: 17px;
  margin-bottom: 10px;
}
.about-box p,
.credits p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ui-muted);
  margin-bottom: 12px;
}
.credits a {
  font-size: 12px;
}
.about-box .k-button {
  margin: 4px 8px 8px 0;
  font-size: 13px;
}
.import-label {
  cursor: pointer;
}
.account-status {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--ui-teal-light);
  border: 1px solid #a7bda6;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
}
.account-status > .k-icon {
  width: 45px;
  height: 45px;
  flex-basis: 45px;
}
.account-status strong,
.account-status small {
  display: block;
}
.account-status small {
  margin-top: 4px;
  color: var(--ui-muted);
  overflow-wrap: anywhere;
}
.account-status + p {
  font-size: 14px;
  color: var(--ui-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}
.auth-button {
  width: 100%;
  margin-top: 4px;
}
.inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
}
.inline-form input {
  flex: 1;
}
.friend-code {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.friend-code strong {
  letter-spacing: 0.06em;
  color: var(--ui-ink-strong);
  user-select: all;
}
.friend-list {
  margin-top: 16px;
}
.friend-card,
.trade-card {
  background: var(--ui-paper-light);
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}
.friend-card h4 {
  font-size: 16px;
  overflow-wrap: anywhere;
}
.friend-card small,
.trade-card small {
  color: var(--ui-muted);
}
.trade-card p {
  font-size: 14px;
  line-height: 1.5;
}
.trade-card[data-state='pending'] {
  border-left: 4px solid #c7a04b;
}
.trade-card[data-state='accepted'] {
  border-left: 4px solid var(--ui-teal);
}
.trade-card[data-state='declined'],
.trade-card[data-state='cancelled'],
.trade-card[data-state='expired'] {
  border-left: 4px solid #a79683;
}
.error-copy {
  color: var(--ui-danger) !important;
}
.market-section {
  padding: 18px;
  border: 1px solid #d4b16b;
  border-radius: 15px;
  background: #fff0ca;
  margin: 0 0 20px;
}
.market-offers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.market-offer {
  text-align: left;
  padding: 8px;
  font-size: 12px;
}
.market-offer .food-icon {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
}
.market-offer small {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  color: var(--ui-muted);
}
.modal-card {
  color: var(--ui-ink);
  width: min(440px, calc(100vw - 32px));
  background: var(--ui-paper);
  border: 2px solid var(--ui-outline);
  border-radius: 24px;
  padding: 28px;
  text-align: center;
  box-shadow: var(--ui-shadow-window);
}
.modal-symbol {
  width: 90px;
  height: 90px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--ui-gold-light);
  display: grid;
  place-items: center;
}
.modal-symbol .k-icon {
  width: 64px;
  height: 64px;
  flex-basis: 64px;
}
.modal-card[data-tone='danger'] .modal-symbol {
  background: #f6dfd3;
}
.modal-card[data-tone='info'] .modal-symbol {
  background: #dfebe3;
}
.modal-card h2 {
  font-size: 27px;
  font-weight: 1000;
  line-height: 1.2;
}
.modal-card > p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ui-muted);
  margin: 13px 0 22px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.modal-actions .k-button {
  flex: 1;
}
.toast-sample {
  border: 2px solid var(--ui-teal-dark);
  background: var(--ui-teal);
  color: white;
  border-radius: 12px;
  padding: 13px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
}
.toast-sample.bad {
  border-color: #823a2c;
  background: var(--ui-primary);
}
.open-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  background: var(--ui-teal);
  border: 1px solid #2f6356;
  border-radius: 50%;
}
.open-dot.closed {
  background: #bd9253;
  border-color: #8d693a;
}
@keyframes ui-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes ui-enter {
  from {
    opacity: 0;
    translate: 0 8px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
@media (max-width: 700px) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .recipe-list,
  .staff-list {
    grid-template-columns: 1fr;
  }
  .ingredient-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
  }
  .neighbor-list {
    grid-template-columns: 1fr;
  }
  .neighbor-card {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 8px 12px;
  }
  .neighbor-art {
    grid-row: span 2;
    min-height: 110px;
  }
  .neighbor-card h3 {
    margin-top: 6px;
  }
  .neighbor-card > p {
    min-height: 0;
    margin: 0;
  }
  .neighbor-card > .k-button {
    margin-top: 4px;
  }
  .shop-toolbar {
    align-items: flex-start;
    gap: 8px;
  }
  .shop-toolbar .panel-intro {
    font-size: 12px;
  }
  .storage-link {
    padding: 8px;
    font-size: 12px;
  }
  .item-preview {
    height: 124px;
  }
  .catalog-copy {
    padding: 10px;
  }
  .catalog-copy strong {
    font-size: 14px;
  }
  .tabs {
    margin-bottom: 16px;
  }
  .tabs button {
    padding: 8px 10px;
    font-size: 12px;
  }
  .tabs button .k-icon {
    display: none;
  }
  .account-fields {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .market-offers {
    grid-template-columns: 1fr;
  }
  .market-offer .food-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }
  .settings-list {
    padding: 0 12px;
  }
  .settings-list > label {
    gap: 10px;
  }
  .setting-name .k-icon {
    width: 23px;
    height: 23px;
    flex-basis: 23px;
  }
  .login-ticket {
    flex-wrap: wrap;
    padding: 13px;
    gap: 10px;
  }
  .login-ticket > .k-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }
  .login-ticket .k-button {
    width: 100%;
  }
  .achievement-card {
    padding: 12px;
    gap: 9px;
  }
  .achievement-card > .k-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }
  .achievement-card .k-button {
    min-width: 80px;
    padding: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
.reduced-motion *,
.reduced-motion *::before,
.reduced-motion *::after {
  animation: none !important;
  transition: none !important;
}
.reduced-motion button:active {
  transform: none;
}

/* Image Gen frame uses nine slices; text and interactions stay live. */
.ui-art-frame {
  background: transparent;
  border: 28px solid transparent;
  border-image: url('./raster/window-frame-v1.png') 160 fill / 28px / 0 stretch;
  border-radius: 28px;
  color: var(--ui-ink);
}
.k-icon {
  background-repeat: no-repeat;
}
.recipe-meta .active-pill .k-icon {
  width: 17px;
  height: 17px;
  flex-basis: 17px;
}
