/* Create By Asking: white elephant generator. Loaded after style.css, tools.css and family.css. */

#elephant-tool { scroll-margin-top: 84px; grid-template-columns: minmax(0, 1fr); }
.elephant > * { min-width: 0; }
.elephant h3 { font-size: var(--step-1); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 0; }
.elephant h3 small { font: 600 0.68rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: #A9A8A6; }
.elephant .we-go { background: #E8430C; color: #fff; font-size: var(--step-0); padding: 14px 24px; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.2); }
.elephant .we-go:hover { background: #F04E17; }
.elephant .btn:disabled { opacity: 0.45; cursor: not-allowed; }
.we-setup, .we-order, .we-game { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.we-step { margin: 0; color: #CDCCCA; font-size: var(--step--1); }
.we-step b { display: inline-block; margin-right: 8px; padding: 3px 8px; border-radius: 6px; background: #FFC93C; color: #1F1E1C; font: 700 0.72rem/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }

/* setup */
.we-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.we-col { display: grid; gap: 10px; align-content: start; }
.we-add { display: flex; gap: 8px; }
.we-add input { flex: 1 1 auto; }
.we-names { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.we-names li:not(.tool-empty) { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.1); border-radius: 999px; padding: 4px 4px 4px 6px; color: #fff; font-weight: 600; font-size: var(--step--1); max-width: 100%; }
.we-names li span:not(.we-num) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.we-num { flex: none; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.12); color: #CDCCCA; font: 700 0.7rem/1 var(--mono); }
.we-x { flex: none; border: 0; width: 28px; height: 28px; border-radius: 50%; background: none; color: #A9A8A6; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.we-x:hover { color: #FF7A62; background: rgba(255, 255, 255, 0.08); }
.elephant select { width: 100%; }
.we-check { display: flex !important; grid-template-columns: none; gap: 10px !important; align-items: flex-start; cursor: pointer; line-height: 1.45; }
.we-check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; padding: 0; accent-color: #E8430C; }
.we-check b { color: #fff; }
.we-alert { margin: 0; background: rgba(255, 122, 98, 0.16); color: #FFD3C9; border-radius: 10px; padding: 10px 14px; font-size: var(--step--1); }

/* order */
.we-order-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 8px; }
.we-order-list li { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, 0.07); border-radius: 12px; padding: 10px 12px; color: #fff; font-weight: 600; min-width: 0; }
.we-order-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.we-order-list b { flex: none; min-width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #FFC93C; color: #1F1E1C; font: 800 var(--step-0)/1 var(--body); }

/* game */
.we-game { grid-template-columns: minmax(0, 1fr) 260px; grid-template-areas: "status status" "board side" "bar bar"; align-items: start; }
.we-game > [data-turn-panel], .we-game > [data-name-panel], .we-game > [data-final-panel], .we-game > [data-done-panel] { grid-area: status; }
.we-board { grid-area: board; display: grid; gap: 10px; min-width: 0; }
.we-side { grid-area: side; display: grid; gap: 10px; min-width: 0; }
.we-game > .tool-bar { grid-area: bar; }
.we-status { display: grid; gap: 8px; background: rgba(255, 255, 255, 0.06); border: 1.5px solid rgba(255, 201, 60, 0.5); border-radius: 14px; padding: 16px 18px; }
.we-status[hidden] { display: none; }
.we-eyebrow { font: 700 0.72rem/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: #FFC93C; }
.elephant .we-who { font-size: var(--step-2); line-height: 1.15; overflow-wrap: anywhere; }
.we-hint { margin: 0; color: #E6E5E3; }
.we-actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 4px; }
.we-actions input { flex: 1 1 200px; }
.we-pile { color: #A9A8A6; font-size: var(--step--1); }

.we-gifts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 8px; }
.we-gifts > .tool-empty { margin: 0; }
.we-gift { display: grid; gap: 6px; align-content: start; background: rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 12px; min-width: 0; }
.we-gift.mine { box-shadow: inset 0 0 0 1.5px rgba(255, 201, 60, 0.6); }
.we-gift.frozen { background: rgba(120, 190, 255, 0.1); }
.we-gift-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.we-gift-top strong { color: #fff; font-size: var(--step-0); overflow-wrap: anywhere; }
.we-lock { flex: none; font: 700 0.66rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: #9BD0FF; }
.we-holder { color: #CDCCCA; font-size: var(--step--1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.we-holder::before { content: "With "; color: #A9A8A6; }
.we-pips { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.we-pips i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.we-pips i.on { background: #FF7A45; }
.we-gift.frozen .we-pips i.on { background: #9BD0FF; }
.we-pips small { margin-left: 4px; color: #A9A8A6; font-size: 0.75rem; }
.elephant .we-steal { justify-content: center; margin-top: 4px; }
.elephant .we-steal:disabled { background: rgba(255, 255, 255, 0.08); color: #A9A8A6; opacity: 1; }
.we-moved { animation: we-moved 0.7s ease; }
@keyframes we-moved { 0% { transform: scale(0.94); box-shadow: 0 0 0 3px #FFC93C; } 100% { transform: none; } }

.we-strip { grid-template-columns: 1fr; gap: 4px; max-height: 360px; overflow-y: auto; }
.we-strip li { padding: 6px 10px; font-size: var(--step--1); background: none; }
.we-strip b { min-width: 26px; height: 26px; font-size: 0.8rem; background: rgba(255, 255, 255, 0.12); color: #CDCCCA; border-radius: 8px; }
.we-strip li.done { color: #838280; }
.we-strip li.done b { background: rgba(255, 255, 255, 0.05); color: #838280; }
.we-strip li.now { background: rgba(255, 201, 60, 0.14); }
.we-strip li.now b { background: #FFC93C; color: #1F1E1C; }
.we-log summary { cursor: pointer; color: #CDCCCA; font-size: var(--step--1); font-weight: 600; }
.we-log ol { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; color: #CDCCCA; font-size: var(--step--1); max-height: 240px; overflow-y: auto; }

.we-results { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 6px; }
.we-results li { display: flex; justify-content: space-between; gap: 10px; background: rgba(255, 255, 255, 0.06); border-radius: 10px; padding: 8px 12px; min-width: 0; }
.we-results b { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.we-results span { color: #FFC93C; font-weight: 600; text-align: right; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .we-cols { grid-template-columns: 1fr; }
  .we-game { grid-template-columns: minmax(0, 1fr); grid-template-areas: "status" "board" "side" "bar"; }
  .we-strip { grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); max-height: none; }
}
@media (max-width: 420px) {
  .we-gifts { grid-template-columns: 1fr 1fr; }
  .elephant .we-go { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .we-moved { animation: none; } }
