/* 01 메모리 재료 요리 하기! — 왼쪽 숲속(카드판), 오른쪽 주방(기획서 디자인 r03 배치 그대로) */
.g1 {
  position: absolute; inset: 0; display: grid; gap: 12px; padding: 12px 16px 16px;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
}
.g1-say { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 4px; }
.g1-step {
  flex: 0 0 auto; font-family: var(--mono); font-size: 14px; font-weight: 700; letter-spacing: .08em;
  color: var(--paper); background: var(--leaf); padding: 4px 10px; letter-spacing: 0;
}
.g1 .g1-ask { font-size: clamp(20px, 2.9vh, 30px); line-height: 1.25; }
.g1-ask kbd { font-size: .55em; vertical-align: .25em; }

.g1-forest, .g1-kitchen { display: flex; flex-direction: column; min-height: 0; padding: 10px 14px 14px; --vf: var(--k3); }
.g1:not(.kit-on) .g1-forest, .g1.kit-on .g1-kitchen { --vf: var(--leaf); border-color: var(--leaf); }
.g1-head { display: flex; align-items: flex-end; gap: 26px; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.g1-lab { font-size: 24px; font-weight: 900; letter-spacing: -.03em; margin-right: auto; align-self: center; }
.g1-lab::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--k3); margin-right: 10px; vertical-align: .2em; }
.g1:not(.kit-on) .g1-forest .g1-lab::before, .g1.kit-on .g1-kitchen .g1-lab::before { background: var(--m); animation: blink 1.2s steps(2) infinite; }
.g1-head .hud { align-items: flex-end; }
.g1-moneyhud .v { color: var(--leaf); }

/* 카드판 */
.g1-board { flex: 1; min-height: 0; display: grid; grid-auto-rows: minmax(0, 1fr); gap: 10px; transition: opacity .25s; }
.g1.kit-on .g1-board { pointer-events: none; }
.g1.kit-on .g1-card:not(.done) { opacity: .3; }
.g1-card {
  position: relative; min-height: 0; padding: 0; border: 1px solid var(--line2); background: var(--paper3);
  perspective: 600px; overflow: hidden; transition: border-color .15s;
}
.g1-card:hover { border-color: var(--k2); }
.g1-card.cur { border-color: var(--leaf); box-shadow: inset 0 0 0 2px var(--leaf); }
.g1-back, .g1-face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transition: opacity .18s; }
.g1-back {
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 18px 18px; background-position: center;
}
.g1-bk { font-family: var(--mono); font-size: clamp(18px, 3vh, 30px); font-weight: 800; color: var(--k3); letter-spacing: .06em; }
.g1-back::after { content: "?"; position: absolute; right: 8px; bottom: 4px; font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--k3); }
.g1-face { opacity: 0; background: var(--paper); flex-direction: column; padding: 30px 10px 8px; }
.g1-card.up .g1-face { opacity: 1; }
.g1-card.up .g1-back { opacity: 0; }
.g1-pic { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.g1-pic .spr { max-width: 88%; max-height: 100%; }
.g1-card .g1-name { left: 6px; top: 6px; font-size: clamp(14px, 2.2vh, 20px); padding: 2px 8px; }
.g1-card.up { --dc: var(--c); border-color: var(--c); }
.g1-card.hit { --dc: var(--leaf); border-color: var(--leaf); }
.g1-card.miss { --dc: var(--m); border-color: var(--m); }
.g1-card.done { cursor: default; }
.g1-card.done .g1-pic { opacity: .85; }
.g1-role { position: absolute; right: 8px; bottom: 6px; font-size: 14px; font-weight: 800; color: var(--leaf); }
.g1-card.new { animation: g1new .9s ease-out; }
@keyframes g1new { from { box-shadow: inset 0 0 0 200px rgba(56, 211, 232, .35); border-color: var(--c); } }
.g1-card.odd { --dc: var(--k3); border-color: var(--k3); opacity: .7; }

/* 주방 장면 */
.g1-scene { flex: 1; min-height: 0; position: relative; overflow: hidden; }
.g1-shelf { position: absolute; top: 2%; left: 16%; width: 82%; height: 42%; object-position: center top; opacity: .55; }
.g1-tree { position: absolute; left: 0; bottom: 7%; height: 58%; max-width: 18%; opacity: .5; object-position: left bottom; }
.g1-door { position: absolute; left: 2px; top: 2px; font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--k3); letter-spacing: .1em; }
.g1-floor { position: absolute; left: 0; right: 0; bottom: 7%; border-top: 1px solid var(--line2); }

.g1-animal {
  position: absolute; bottom: 7%; height: 30%; width: 22%; transition: left .12s linear, opacity .4s;
  display: flex; align-items: flex-end; justify-content: center; touch-action: none; cursor: grab;
  outline: 1.5px solid var(--leaf); outline-offset: 3px;
}
.g1-animal[hidden] { display: none; }
.g1-animal .g1-ani { max-height: 100%; max-width: 100%; }
.g1-mouth { position: absolute; right: -18%; top: 6%; width: 32%; height: 40%; display: flex; align-items: center; justify-content: center; outline: 1.5px dashed var(--y); outline-offset: 2px; }
.g1-mouth .spr { max-height: 100%; max-width: 100%; }
.g1-alab { --dc: var(--leaf); top: -28px; left: -2px; }
.g1-animal.auto { transition: left .6s ease-in-out; }

.g1-chef { position: absolute; left: 52%; bottom: 7%; height: 66%; width: 13%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; transition: left .45s ease; }
.g1-chef .spr { max-height: calc(100% - 30px); }
.g1-chefname { margin-top: 4px; font-size: 14px; padding: 1px 8px; white-space: nowrap; }
.g1-chef.go { left: 58%; }

.g1-dish { position: absolute; left: 26%; bottom: 9%; width: 25%; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; transition: left .45s ease, bottom .45s ease, opacity .3s; }
.g1-dish[hidden] { display: none; }
.g1-dish svg { width: 70%; }
.g1-dish.served { left: 63%; bottom: 40%; opacity: .0; }
.g1-bowl { fill: var(--paper3); stroke: var(--k); stroke-width: 2.5; stroke-linejoin: round; }
.g1-soup { stroke: var(--y); stroke-width: 5; stroke-linecap: round; }
.g1-steam { fill: none; stroke: var(--k2); stroke-width: 2; stroke-linecap: round; animation: g1steam 1.4s ease-in-out infinite alternate; }
@keyframes g1steam { from { opacity: .25; transform: translateY(3px); } to { opacity: .9; transform: none; } }
.g1-dishby { font-size: 14px; font-weight: 700; color: var(--k2); white-space: nowrap; }
.g1-ing { position: absolute; left: 34%; bottom: 9%; width: 14%; height: 16%; display: flex; align-items: center; justify-content: center; outline: 1.5px dashed var(--y); outline-offset: 3px; --dc: var(--y); }
.g1-ing[hidden] { display: none; }
.g1-ing .spr { max-height: 100%; }
.g1-ing .detect-l { top: -28px; }
.g1-dishname { font-size: 15px; text-align: center; white-space: normal; line-height: 1.25; border-color: var(--y); }

.g1-guest {
  position: absolute; right: 1%; bottom: 7%; height: 44%; width: 17%; border: 0; background: none; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px;
}
.g1-guest svg { flex: 1; min-height: 0; width: 100%; }
.g1-gl { fill: none; stroke: var(--k2); stroke-width: 2.5; }
.g1-guest.wait .g1-gl { stroke: var(--leaf); }
.g1-guest.wait { cursor: pointer; }
.g1-gno { font-size: 14px; padding: 1px 8px; white-space: nowrap; }
.g1-guest.in { animation: g1in .5s ease-out; }
@keyframes g1in { from { transform: translateX(40%); opacity: 0; } }
.g1-bubble {
  position: absolute; right: 0; bottom: 104%; display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  padding: 8px 12px; background: var(--paper); border: 1px solid var(--leaf); font-size: 18px; font-weight: 800; white-space: nowrap; z-index: 3;
}
.g1-bubble[hidden] { display: none; }
.g1-st { color: var(--y); font-size: 24px; letter-spacing: .05em; }
.g1-st i { font-style: normal; color: var(--k3); }
.g1-bubble b { font-family: var(--mono); font-size: 28px; color: var(--leaf); }

/* 불 세기: 주방 그림을 가리지 않게 장면 아래 따로 한 줄 */
.g1-cook {
  flex: 0 0 auto; margin-top: 8px; padding: 8px 12px; border: 1px solid var(--line2); background: var(--paper);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 2px 14px; align-items: center;
  opacity: .45; transition: opacity .2s, border-color .2s;
}
.g1-cook.on { opacity: 1; border-color: var(--leaf); }
.g1-cooklab { grid-row: 1 / 3; font-size: 17px; font-weight: 800; color: var(--k2); }
.g1-cook.on .g1-cooklab { color: var(--leaf); }
.g1-meter { position: relative; height: 26px; background: var(--paper3); border: 1px solid var(--line2); }
.g1-meter i { position: absolute; top: 0; bottom: 0; }
.g1-meter .z2 { background: rgba(255, 200, 61, .28); }
.g1-meter .z3 { background: var(--leaf); opacity: .75; }
.g1-needle { position: absolute; top: -4px; bottom: -4px; left: 0; width: 4px; margin-left: -2px; background: var(--k); box-shadow: 0 0 8px var(--k); }
.g1-meterlab { grid-column: 2; grid-row: 2; position: relative; height: 20px; margin-top: 4px; font-size: 15px; font-weight: 700; color: var(--k2); }
.g1-meterlab span { position: absolute; top: 0; white-space: nowrap; }
.g1-meterlab span:nth-child(1) { left: 0; }
.g1-meterlab span:nth-child(2) { color: var(--leaf); transform: translateX(-50%); }
.g1-meterlab span:nth-child(3) { right: 0; }
.g1-stop { grid-column: 3; grid-row: 1 / 3; height: 46px; }

.g1-big { font-family: var(--mono); font-size: 40px; color: var(--leaf); }

@media (max-height: 700px) {
  .g1 { gap: 10px; padding: 8px 14px 12px; }
  .g1-say { min-height: 40px; }
  .g1-head { padding-bottom: 6px; margin-bottom: 8px; }
  .g1-lab { font-size: 21px; }
  .g1-cook { padding: 6px 10px; margin-top: 6px; }
  .g1-stop { height: 40px; font-size: 16px; }
}
