/* Worlds: the world picker, building a house on a plot, the Store, and the Worlds button on the map */

.hud-worlds, .hud-store { min-height: 60px; padding: 0 22px 0 16px; font-size: 18px; color: var(--ink); }
.hud-worlds .ico { color: var(--blue); }
.hud-store .ico { color: #FF6FA8; }

.worlds-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 4px 6px 10px; }
.world-card {
  display: flex; flex-direction: column; text-align: left; padding: 0; border: 0; border-radius: 26px; overflow: hidden;
  background: rgba(255, 255, 255, .78); box-shadow: 0 8px 24px rgba(30, 40, 80, .12), inset 0 0 0 1px rgba(255, 255, 255, .9);
  transition: transform .18s ease, box-shadow .18s ease;
}
.world-card:active { transform: scale(.97); }
.world-card.here { box-shadow: 0 8px 24px rgba(30, 40, 80, .12), inset 0 0 0 3px var(--accent, var(--blue)); }
.world-art { aspect-ratio: 16 / 9; overflow: hidden; background: #e8f3ff; }
.world-art svg { width: 100%; height: 100%; display: block; }
.world-info { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px 16px; min-height: 92px; }
.world-name { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.world-ico { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--accent, var(--blue)); flex: none; }
.world-tag { font-size: 15px; color: var(--ink-2); line-height: 1.3; }
.world-here { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: 4px; padding: 4px 10px; border-radius: 99px;
  font-size: 13px; font-weight: 700; color: var(--accent, var(--blue)); background: rgba(255, 255, 255, .9); box-shadow: inset 0 0 0 1.5px currentColor; }

.plot-pick { display: flex; flex-direction: column; gap: 14px; padding: 0 6px 6px; }
.plot-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.plot-opt {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px 12px; min-height: 52px; border: 0; border-radius: 22px;
  background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05); font-size: 15px; font-weight: 700; color: var(--ink-2);
  transition: transform .15s ease, box-shadow .15s ease;
}
.plot-opt.on { color: var(--ink); background: #fff; box-shadow: inset 0 0 0 3px var(--blue), 0 6px 16px rgba(10, 132, 255, .18); }
.plot-opt:active { transform: scale(.96); }
.plot-art { width: 100%; aspect-ratio: 5 / 4.4; }
.plot-art svg { width: 100%; height: 100%; display: block; }
.plot-buy .price { margin-left: 6px; background: rgba(255, 255, 255, .22); color: #fff; }

/* Custom house colour and sequential 1..8 number rows */
.plot-custom-bar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 20px; background: rgba(255, 255, 255, .65); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05); }
.plot-custom-row { display: flex; flex-direction: column; gap: 6px; }
.plot-row-label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; color: var(--ink-2); }
.plot-colors { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.plot-sw {
  width: 34px; height: 34px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: var(--sw, #ccc); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .9), 0 2px 6px rgba(0, 0, 0, .14);
  transition: transform .15s ease, box-shadow .15s ease;
}
.plot-sw.on { transform: scale(1.14); box-shadow: 0 0 0 3px var(--blue), inset 0 0 0 2px #fff; }
.plot-sw-any {
  display: inline-grid; place-items: center; position: relative; overflow: hidden;
  background: conic-gradient(#FF5A5F, #FF9F43, #FFD45C, #7ED957, #2EC4B6, #5B7CFA, #B49CF2, #FF6FA8, #FF5A5F);
  color: #fff;
}
.plot-color-input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.plot-nums { display: flex; flex-wrap: wrap; gap: 6px; }
.plot-num-btn {
  width: 36px; height: 36px; border-radius: 12px; border: 0; font-size: 16px; font-weight: 800;
  color: var(--ink-2); background: rgba(255, 255, 255, .85); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
  cursor: pointer; transition: transform .12s ease, background .12s ease;
}
.plot-num-btn.on { color: #fff; background: var(--blue); box-shadow: 0 4px 10px rgba(10, 132, 255, .28); }

/* Store buildings section inside plot modal */
.plot-store-sec { display: flex; flex-direction: column; gap: 8px; padding: 10px 14px; border-radius: 20px; background: rgba(255, 255, 255, .6); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05); }
.plot-store-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.plot-store-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.plot-store-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px 10px; border: 0; border-radius: 18px;
  background: rgba(255, 255, 255, .82); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.plot-store-card.on { background: #fff; box-shadow: inset 0 0 0 3px var(--blue), 0 6px 16px rgba(10, 132, 255, .18); }
.plot-store-art { width: 100%; aspect-ratio: 5 / 4.2; }
.plot-store-art svg { width: 100%; height: 100%; display: block; }
.plot-store-name { font-size: 13px; font-weight: 800; color: var(--ink); text-align: center; }
.plot-store-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--ink-2); }
.plot-store-card.owned .plot-store-tag { color: var(--green); }

/* Bottom-right Store Modal */
.store-wrap { display: flex; flex-direction: column; gap: 14px; padding: 0 6px 8px; }
.store-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.store-tab {
  display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 16px; border: 0; border-radius: 99px;
  font-size: 15px; font-weight: 800; color: var(--ink-2); background: rgba(255, 255, 255, .75);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); cursor: pointer;
}
.store-tab.on { color: #fff; background: var(--blue); box-shadow: 0 4px 12px rgba(10, 132, 255, .28); }
.store-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.store-card {
  display: flex; flex-direction: column; border-radius: 22px; overflow: hidden;
  background: rgba(255, 255, 255, .88); box-shadow: 0 6px 18px rgba(30, 40, 80, .08), inset 0 0 0 1px rgba(0, 0, 0, .06);
}
.store-card.owned { box-shadow: 0 6px 18px rgba(30, 40, 80, .08), inset 0 0 0 2.5px var(--green); }
.store-art { aspect-ratio: 5 / 3.8; background: linear-gradient(180deg, #E8F4FF 0%, #F7FBFF 100%); padding: 6px; }
.store-art.dog-art { aspect-ratio: 5 / 3.2; background: linear-gradient(180deg, #FFF3E0 0%, #FFFDF9 100%); }
.store-art svg { width: 100%; height: 100%; display: block; }
.store-info { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px 14px; flex: 1; }
.store-name { display: flex; align-items: center; gap: 7px; font-size: 17px; font-weight: 800; color: var(--ink); }
.store-desc { font-size: 13px; color: var(--ink-2); line-height: 1.35; flex: 1; }
.store-act-btn { align-self: flex-start; margin-top: 4px; }

/* Ice Cream Maker Modal */
.ic-maker { display: flex; flex-direction: column; gap: 14px; padding: 2px 6px 8px; }
.ic-top { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: start; }
.ic-preview-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px; border-radius: 24px;
  background: linear-gradient(180deg, #FFF0F6 0%, #FFFFFF 100%); box-shadow: inset 0 0 0 2px #FFD6E7;
}
.ic-preview-svg { width: 140px; height: 180px; display: grid; place-items: center; }
.ic-preview-svg svg { width: 100%; height: 100%; display: block; }
.ic-count { font-size: 14px; font-weight: 800; color: #D94E8F; text-align: center; }
.ic-scoop-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.ic-flavors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-height: 270px; overflow-y: auto; padding: 4px; }
.ic-flavor-btn {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 0; border-radius: 16px;
  background: rgba(255, 255, 255, .9); box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .07);
  font-size: 13px; font-weight: 800; color: var(--ink); cursor: pointer; text-align: left;
  transition: transform .12s ease, box-shadow .12s ease;
}
.ic-flavor-btn:active { transform: scale(.95); }
.ic-flavor-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--fl-col, #FF8FB1); box-shadow: inset 0 -2px 4px rgba(0,0,0,.15), 0 1px 3px rgba(0,0,0,.12); flex: none; }
.ic-give-row { display: flex; flex-direction: column; gap: 8px; padding: 10px 14px; border-radius: 18px; background: rgba(255, 255, 255, .7); }
.ic-give-label { font-size: 14px; font-weight: 800; color: var(--ink-2); }
.ic-give-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ic-actions { justify-content: flex-end; }

/* a house that was just built pops up out of the ground */
.built-pop { animation: built-pop .7s cubic-bezier(.2, 1.4, .4, 1) both; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes built-pop { from { transform: scale(.2, 0); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 760px) {
  .worlds-grid { grid-template-columns: minmax(0, 1fr); }
  .plot-opts, .plot-store-grid, .store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ic-top { grid-template-columns: minmax(0, 1fr); }
  .ic-flavors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
