@import url("https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400;500;700&family=Press+Start+2P&display=swap");

/* Daydream — Minecraft-esque tablet studio. Not glass. Not iOS. Blocks. */

:root {
  --grass: #5d9c3f;
  --grass-hi: #86c45c;
  --grass-lo: #3a6e24;
  --dirt: #8b5a2b;
  --dirt-hi: #b07940;
  --dirt-lo: #5c3a18;
  --stone: #8b8b8b;
  --stone-hi: #c6c6c6;
  --stone-lo: #4a4a4a;
  --oak: #c6a15b;
  --oak-hi: #e4c888;
  --oak-lo: #6e4c18;
  --coal: #141414;
  --void: #0b0b0b;
  --emerald: #2ecc71;
  --emerald-hi: #7dffb0;
  --emerald-lo: #0e7a3d;
  --gold: #ffe566;
  --ink: #1a120b;
  --cream: #f3e6c4;
  --tap: 52px;
  --tap-lg: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--void);
  color: var(--cream);
  font-family: "Pixelify Sans", "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}

body {
  position: relative;
  max-width: 1024px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.void {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: #12100e;
  background-image:
    repeating-linear-gradient(90deg, rgba(0,0,0,.35) 0 8px, transparent 8px 16px),
    repeating-linear-gradient(0deg, #1c1814 0 16px, #161310 16px 32px);
  background-size: 32px 32px, 32px 32px;
  image-rendering: pixelated;
}
.void::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, #000 100%);
  pointer-events: none;
}

.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.dirt-bar {
  background:
    repeating-linear-gradient(90deg, #7a4e24 0 10px, #8b5a2b 10px 20px, #6e431c 20px 28px, #9a6532 28px 40px);
  border-bottom: 4px solid #3a220e;
  box-shadow:
    inset 0 3px 0 #b07940,
    inset 0 -3px 0 #4a2c10,
    0 6px 0 #0a0a0a;
  position: sticky;
  top: 0;
  z-index: 20;
}
.dirt-bar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  min-height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.logo {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(14px, 3.2vw, 22px);
  letter-spacing: 1px;
  color: #5dce4a;
  text-shadow:
    3px 3px 0 #0a1a06,
    -2px 0 0 #081408,
    2px 0 0 #081408,
    0 -2px 0 #081408,
    0 4px 0 #2a5a18,
    0 6px 0 #000;
}
.studio-mark {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
  flex-shrink: 0;
}
.studio-name {
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  line-height: 1.4;
  color: #d4b07a;
  text-shadow: 1px 1px 0 #000;
}
.ver-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 32px;
  padding: 4px 8px;
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  line-height: 1;
  color: var(--cream);
  background:
    repeating-linear-gradient(90deg, #8b5a2b 0 8px, #7a4e24 8px 16px, #9a6532 16px 24px);
  border: 3px solid;
  border-color: #b07940 #3a220e #3a220e #b07940;
  box-shadow: 2px 2px 0 #000;
  text-shadow: 1px 1px 0 #000;
}

.block {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  position: relative;
  border: 3px solid #1a1a1a;
  box-shadow: 3px 3px 0 #000;
  image-rendering: pixelated;
}
.block.lg { width: 56px; height: 56px; margin: 0 auto 12px; }
.grass-block { background: #8b5a2b; }
.grass-block .block-top {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 38%;
  background:
    repeating-linear-gradient(90deg, #5d9c3f 0 6px, #6faf4a 6px 12px, #4e8a32 12px 18px);
  border-bottom: 3px solid #3a6e24;
  box-shadow: inset 0 2px 0 #86c45c;
}
.grass-block .block-face {
  position: absolute;
  left: 0; right: 0; bottom: 0; top: 38%;
  background:
    repeating-linear-gradient(90deg, #8b5a2b 0 8px, #7a4e24 8px 16px, #9a6532 16px 24px);
  box-shadow: inset 2px 0 0 #b07940, inset -2px 0 0 #5c3a18;
}
.dirt-block {
  background:
    repeating-linear-gradient(45deg, #8b5a2b 0 6px, #7a4e24 6px 12px, #9a6532 12px 18px);
  box-shadow: inset 2px 2px 0 #b07940, inset -2px -2px 0 #5c3a18, 3px 3px 0 #000;
}
.dirt-block .block-speck {
  position: absolute;
  width: 6px; height: 6px;
  background: #5c3a18;
  top: 10px; left: 8px;
  box-shadow: 12px 8px 0 #4a2c10, 4px 18px 0 #b07940;
}

main {
  flex: 1;
  padding: 20px 16px 32px;
}

.view { animation: pop .18s steps(2, end); }
@keyframes pop {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.splash {
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  color: var(--gold);
  text-align: center;
  transform: rotate(-4deg);
  text-shadow: 2px 2px 0 #000;
  margin: 8px 0 18px;
}

.view-title {
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
  color: var(--cream);
  text-shadow: 2px 2px 0 #000;
  margin: 0 0 16px;
}

.wood-panel {
  background:
    repeating-linear-gradient(
      180deg,
      #c6a15b 0 18px,
      #b8944a 18px 20px,
      #a07838 20px 22px,
      #c6a15b 22px 40px
    );
  border: 4px solid #3a220e;
  border-color: var(--oak-hi) var(--oak-lo) var(--oak-lo) var(--oak-hi);
  box-shadow:
    inset 3px 3px 0 rgba(255,230,160,.35),
    inset -3px -3px 0 rgba(40,20,0,.45),
    6px 6px 0 #000;
  padding: 16px;
  margin-bottom: 20px;
  color: var(--ink);
}
.panel-head {
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
  margin: 0 0 8px;
  color: var(--ink);
  text-shadow: 1px 1px 0 var(--oak-hi);
}
.hint, .mini-empty, .save-hint {
  margin: 0 0 12px;
  font-size: 16px;
  color: #3a220e;
}
.mini-empty { margin-top: 8px; opacity: .8; }
.save-hint { margin: 8px 0 0; font-size: 15px; color: #4a3010; }

.empty-panel {
  text-align: center;
  padding: 28px 16px;
}
.empty-copy {
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  line-height: 1.7;
  color: var(--ink);
  margin: 0;
}

.btn {
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  line-height: 1.2;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  border: 4px solid #111;
  min-height: var(--tap);
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  image-rendering: pixelated;
  border-radius: 0;
}
.btn:focus { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-stone {
  background:
    repeating-linear-gradient(90deg, #8f8f8f 0 8px, #7a7a7a 8px 16px, #9a9a9a 16px 24px);
  border-color: var(--stone-hi) var(--stone-lo) var(--stone-lo) var(--stone-hi);
  box-shadow:
    inset 3px 3px 0 rgba(255,255,255,.28),
    inset -3px -3px 0 rgba(0,0,0,.35),
    4px 4px 0 #000;
}
.btn-stone:hover {
  filter: brightness(1.08);
  color: var(--gold);
}
.btn-stone:active {
  border-color: var(--stone-lo) var(--stone-hi) var(--stone-hi) var(--stone-lo);
  box-shadow: inset 3px 3px 0 rgba(0,0,0,.4);
  transform: translate(3px, 3px);
}

.btn-emerald {
  background: linear-gradient(#3ee07a, #1aa85a);
  border-color: var(--emerald-hi) var(--emerald-lo) var(--emerald-lo) var(--emerald-hi);
  box-shadow:
    inset 3px 3px 0 rgba(180,255,210,.5),
    inset -3px -3px 0 rgba(0,40,10,.4),
    4px 4px 0 #000;
  color: #08220f;
  text-shadow: 1px 1px 0 #b6ffd2;
}
.btn-emerald:active {
  transform: translate(3px, 3px);
  box-shadow: inset 3px 3px 0 rgba(0,40,10,.4);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.btn-row .btn { flex: 1 1 200px; }

.btn-danger {
  background: #8a2c2c;
  border-color: #c06060 #3a1010 #3a1010 #c06060;
  min-width: 48px;
  min-height: 48px;
  padding: 8px;
  font-size: 14px;
}

.back-btn {
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
  min-width: var(--tap);
  min-height: var(--tap);
  background: #6e6e6e;
  color: #fff;
  border: 4px solid;
  border-color: #c0c0c0 #333 #333 #c0c0c0;
  box-shadow: 3px 3px 0 #000;
  cursor: pointer;
  border-radius: 0;
}
.back-btn:active { transform: translate(2px, 2px); }
.chev { display: block; }

.chunk-input, .chunk-notes {
  width: 100%;
  font-family: "Pixelify Sans", sans-serif;
  font-size: 18px;
  color: var(--cream);
  background: #1a120b;
  border: 4px solid #000;
  border-color: #3a220e #c6a15b #c6a15b #3a220e;
  box-shadow: inset 3px 3px 0 #000;
  padding: 12px 14px;
  min-height: var(--tap);
  border-radius: 0;
}
.chunk-notes {
  min-height: 140px;
  resize: vertical;
  line-height: 1.4;
}
.chunk-input::placeholder, .chunk-notes::placeholder { color: #8a7050; }
.field-label {
  display: block;
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  margin-bottom: 8px;
  color: var(--ink);
}

.new-form .btn { width: 100%; margin-top: 12px; min-height: var(--tap-lg); }
.name-taken {
  margin: 10px 0 0;
  font-family: "Pixelify Sans", sans-serif;
  font-size: 16px;
  color: #7a2010;
}

.project-grid {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.project-card {
  display: block;
  width: 100%;
  text-align: left;
  background:
    repeating-linear-gradient(180deg, #c6a15b 0 16px, #a07838 16px 18px, #c6a15b 18px 32px);
  border: 4px solid;
  border-color: var(--oak-hi) var(--oak-lo) var(--oak-lo) var(--oak-hi);
  box-shadow: 5px 5px 0 #000;
  color: var(--ink);
  padding: 16px;
  cursor: pointer;
  font-family: "Pixelify Sans", sans-serif;
  min-height: 96px;
  border-radius: 0;
}
.project-card:hover { filter: brightness(1.05); }
.project-card:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 #000;
}
.card-name {
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
  line-height: 1.5;
  margin: 0 0 10px;
  word-break: break-word;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 16px;
}

.dirt-nameplate {
  background:
    repeating-linear-gradient(90deg, #7a4e24 0 12px, #8b5a2b 12px 24px, #9a6532 24px 36px);
  border: 4px solid #3a220e;
  border-color: var(--dirt-hi) var(--dirt-lo) var(--dirt-lo) var(--dirt-hi);
  box-shadow: inset 2px 2px 0 rgba(255,200,120,.2), 5px 5px 0 #000;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.project-name {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(11px, 2.6vw, 16px);
  margin: 0;
  line-height: 1.5;
  text-shadow: 2px 2px 0 #000;
  background: transparent;
  border: none;
  color: inherit;
  width: 100%;
  min-width: 0;
  padding: 0;
}
.status-chip {
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  padding: 8px 10px;
  background: #555;
  border: 3px solid #222;
  border-color: #999 #222 #222 #999;
  white-space: nowrap;
}
.status-chip.ready {
  background: var(--emerald-lo);
  color: #d8ffe8;
}

.ready-banner {
  background: #146c38;
  border: 4px solid;
  border-color: var(--emerald-hi) #063 #063 var(--emerald-hi);
  box-shadow: 4px 4px 0 #000;
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 16px;
}
.ready-banner strong {
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  color: var(--gold);
}

.thumb-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}
.thumb {
  position: relative;
  border: 4px solid #111;
  border-color: #555 #111 #111 #555;
  background: #0d0d0d;
  aspect-ratio: 1;
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb .btn-danger {
  position: absolute;
  top: 4px;
  right: 4px;
}

.btn-go {
  position: sticky;
  bottom: 12px;
  z-index: 15;
  width: 100%;
  min-height: 72px;
  margin: 8px 0 24px;
  font-size: 22px;
  letter-spacing: 2px;
  color: #062010;
  text-shadow: 2px 2px 0 #b6ffd2;
  background:
    repeating-linear-gradient(90deg, #2ecc71 0 12px, #27ae60 12px 24px, #3ee07a 24px 36px);
  border: 5px solid #041a0c;
  border-color: #9fffc4 #0a4a24 #0a4a24 #9fffc4;
  box-shadow:
    inset 4px 4px 0 rgba(200,255,220,.45),
    inset -4px -4px 0 rgba(0,40,10,.5),
    0 8px 0 #041a0c,
    8px 8px 0 #000;
  border-radius: 0;
}
.btn-go:hover { filter: brightness(1.08); }
.btn-go:active {
  transform: translate(4px, 6px);
  box-shadow:
    inset 4px 4px 0 rgba(0,40,10,.5),
    0 2px 0 #041a0c;
}
.go-gem {
  width: 22px;
  height: 22px;
  background: #b6ffd2;
  border: 3px solid #062010;
  box-shadow: 2px 2px 0 #0a4a24;
  transform: rotate(45deg);
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  color: var(--cream);
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  padding: 14px 18px;
  border: 4px solid #555;
  border-color: #999 #222 #222 #999;
  box-shadow: 4px 4px 0 #000;
  z-index: 40;
  max-width: 90%;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.modal-panel {
  width: min(440px, 100%);
  background:
    repeating-linear-gradient(180deg, #8b8b8b 0 14px, #6e6e6e 14px 16px, #8b8b8b 16px 28px);
  border: 5px solid #111;
  border-color: #cfcfcf #333 #333 #cfcfcf;
  box-shadow: 8px 8px 0 #000;
  padding: 24px 18px;
  text-align: center;
  color: #111;
}
.modal-title {
  font-family: "Press Start 2P", monospace;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 12px;
  color: #146c38;
  text-shadow: 2px 2px 0 #d8ffe8;
}
.modal-copy {
  font-size: 18px;
  margin: 0 0 18px;
}
.modal-panel .btn { width: 100%; min-height: var(--tap-lg); }

.foot {
  padding: 12px 16px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  color: #7a6a50;
  text-shadow: 1px 1px 0 #000;
}
.whats-new {
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  line-height: 1.5;
  color: #7a6a50;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  text-shadow: 1px 1px 0 #000;
}
.whats-new:focus { outline: 2px solid var(--gold); outline-offset: 2px; }
#whats-new-more {
  flex-basis: 100%;
  text-align: center;
}
#whats-new-more p {
  margin: 6px 0 0;
  color: #9a8a70;
}

@media (min-width: 768px) {
  main { padding: 28px 28px 40px; }
  .btn-go { font-size: 26px; min-height: 80px; }
  .logo { font-size: 22px; }
}

@media (max-width: 420px) {
  .studio-name { display: none; }
  .logo { font-size: 13px; }
}

/* Store back-control + Prototypes handoff (integration) */
.store-btn {
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  line-height: 1.2;
  min-width: 72px;
  min-height: var(--tap);
  padding: 8px 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #3a6e24;
  color: #d8ffe8;
  border: 4px solid;
  border-color: #86c45c #1a3a10 #1a3a10 #86c45c;
  box-shadow: 3px 3px 0 #000;
  text-shadow: 1px 1px 0 #000;
  flex-shrink: 0;
}
.store-btn:hover,
.store-btn:focus {
  color: var(--gold);
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.store-btn:active { transform: translate(2px, 2px); }

.ready-proto-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  margin-top: 8px;
  padding: 10px 12px;
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  line-height: 1.4;
  color: #062010;
  text-decoration: none;
  background: var(--gold);
  border: 3px solid #041a0c;
  box-shadow: 3px 3px 0 #000;
}
.ready-proto-link:active { transform: translate(2px, 2px); }

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-actions .btn { width: 100%; min-height: var(--tap-lg); }

@media (max-width: 420px) {
  .store-btn { font-size: 11px; min-width: 72px; padding: 8px 6px; }
}

.review-chip {
  display: inline-block;
  margin: 0 0 14px;
  padding: 8px 10px;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  line-height: 1.5;
  color: #062010;
  background: var(--gold);
  border: 3px solid #041a0c;
  box-shadow: 3px 3px 0 #000;
}
.review-chip.modal-review { margin: 0 0 16px; }
.status-chip.queued,
.status-chip.building,
.status-chip.ready,
.status-chip.shipped {
  background: var(--emerald-lo);
  color: #d8ffe8;
}

.project-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.card-actions .btn {
  flex: 1 1 30%;
  min-height: 44px;
  min-width: 44px;
  font-size: 10px;
}
.status-chip.paused {
  background: #6b5b2a;
  color: #ffe566;
}


/* Notes chat — append-only bubbles, Pyle/stone */
.note-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  margin: 0 0 12px;
  padding: 2px;
}
.note-bubble {
  background: #1a120b;
  color: var(--cream);
  border: 3px solid #000;
  border-color: #3a220e #c6a15b #c6a15b #3a220e;
  box-shadow: inset 2px 2px 0 #000, 3px 3px 0 #3a220e;
  padding: 10px 12px;
  word-wrap: break-word;
}
.note-bubble-at {
  margin: 0 0 4px;
  font-size: 14px;
  color: #c6a15b;
}
.note-bubble-text {
  margin: 0;
  white-space: pre-wrap;
  font-size: 18px;
  line-height: 1.4;
  color: var(--cream);
}
.note-composer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.note-composer-input {
  min-height: 72px;
  resize: vertical;
}
.note-composer .btn {
  min-height: var(--tap);
  width: 100%;
}

.who-gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(11, 11, 11, 0.78);
}
.who-gate.hidden, .who-gate[hidden] { display: none !important; }
.who-card { max-width: 420px; width: 100%; text-align: center; }
.who-kicker { margin: 0 0 8px; color: var(--oak); letter-spacing: 0.08em; }
.who-card h2 {
  margin: 0 0 18px;
  font-family: "Press Start 2P", monospace;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
}
.who-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.who-row button {
  min-height: var(--tap);
  min-width: 120px;
  font-family: "Pixelify Sans", sans-serif;
  font-size: 22px;
  background: var(--stone);
  color: #1a120b;
  border: 3px solid #000;
  box-shadow: inset 2px 2px 0 var(--stone-hi), 3px 3px 0 #3a220e;
}
.who-else { margin-top: 16px; text-align: center; color: var(--cream); font-size: 18px; line-height: 1.4; }
.card-who { display: block; margin-top: 8px; color: #3a220e; font-size: 16px; }

.who-bar { margin: 0 0 12px; color: #e4c888; font-size: 18px; }
.who-bar button {
  background: none;
  border: none;
  color: var(--oak-hi);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.who-else .life-lock, .who-else .life-chip { color: var(--cream); }
.who-else .life-lock input {
  display: block;
  width: 100%;
  margin: 8px 0;
  min-height: var(--tap);
  font-size: 20px;
}

.who-else .life-lock p { color: var(--ink); font-size: 18px; }
.who-else .ask-row { display: flex; flex-wrap: wrap; gap: 8px; }
.who-else .btn-sticker, .who-else .btn-tiny {
  min-height: var(--tap);
  padding: 10px 14px;
  font-family: "Pixelify Sans", sans-serif;
  font-size: 18px;
  background: var(--stone);
  color: #1a120b;
  border: 3px solid #000;
  box-shadow: inset 2px 2px 0 var(--stone-hi), 3px 3px 0 #3a220e;
}
.who-else .life-err { color: #7a2010; }

.quota-bar { margin: 0 0 14px; }
.quota-label { margin: 0 0 6px; color: #e4c888; font-size: 18px; }
.quota-track {
  height: 16px;
  background: #3a220e;
  border: 3px solid #000;
  box-shadow: inset 2px 2px 0 #1a120b;
}
.quota-fill {
  height: 100%;
  width: 0;
  background: var(--grass-hi);
}
.quota-bar.is-full .quota-fill { background: #c45c3a; }
.card-archive {
  display: block;
  width: 100%;
  margin-top: 6px;
  min-height: 52px;
  font-family: "Pixelify Sans", sans-serif;
  font-size: 18px;
  background: #c4a06a;
  color: #1a120b;
  border: 3px solid #000;
}
.card-archive:hover,
.card-archive:focus {
  background: #e6b84d;
  outline: none;
}
#archive-btn { margin-top: 12px; }
.show-archived {
  width: 100%;
  min-height: 52px;
  margin: 0 0 14px;
  font-size: 18px;
}
.show-archived.is-on {
  background: #c4a06a;
  color: #1a120b;
}
.card-keep-going {
  display: block;
  width: 100%;
  margin-top: 6px;
  min-height: 44px;
}
#keep-going-btn { margin-top: 12px; }

/* Ask Piper — game-page chat + sketch drop. Wood/cream, not June, not a FAB. */
.piper-stage {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}
#view-project.hidden .piper-stage,
#view-project[hidden] .piper-stage,
#pin-gate:not(.hidden) ~ * #ask-piper,
#who-gate:not(.hidden) ~ * #ask-piper,
body.is-gated .piper-stage {
  display: none !important;
}
.piper-stage .wood-panel { margin-bottom: 0; }
@media (min-width: 768px) {
  .piper-stage {
    grid-template-columns: 1.45fr 0.9fr;
    align-items: start;
  }
}
.ask-piper { margin-top: 0; }
.ask-piper .ask-form,
.piper-drop-col .ask-form { display: grid; gap: 10px; }
.ask-piper .ask-form .btn,
.piper-drop-col .ask-form .btn { width: 100%; min-height: var(--tap-lg); }
.piper-status {
  margin: 0 0 10px;
  min-height: 1.2em;
  font-size: 16px;
  color: #3a220e;
}
.piper-auth { margin: 0 0 12px; }
.piper-auth-row { margin-top: 10px; }
.piper-auth .btn { width: auto; min-width: 140px; }
.piper-thread {
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}
.piper-note {
  background: #1a120b;
  color: var(--cream);
  border: 3px solid #000;
  border-color: #3a220e #c6a15b #c6a15b #3a220e;
  box-shadow: inset 2px 2px 0 #000, 3px 3px 0 #3a220e;
  padding: 10px 12px;
}
.piper-note .from {
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  color: var(--oak-hi);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.piper-note .kind-tag {
  font-size: 8px;
  letter-spacing: 0.06em;
  color: #1a120b;
  background: var(--cream);
  border: 2px solid #000;
  padding: 2px 6px;
}
.piper-note .when-asked { font-size: 14px; color: #c6a15b; }
.piper-note .q { margin: 8px 0 0; color: var(--cream); white-space: pre-wrap; }
.piper-note .a {
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 2px dashed #5c3a18;
  color: #d8ffe8;
}
.piper-note .a-label {
  display: block;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  letter-spacing: 0.08em;
  color: var(--oak-hi);
  margin-bottom: 4px;
}
.piper-note.is-piper .from { color: var(--cream); }
.piper-shot {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  margin-top: 8px;
  background: var(--cream);
  border: 3px solid #000;
  border-color: var(--oak-hi) var(--oak-lo) var(--oak-lo) var(--oak-hi);
  image-rendering: auto;
}
.piper-drop-zone {
  min-height: 88px;
  margin: 10px 0 12px;
  padding: 14px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  line-height: 1.5;
  color: #3a220e;
  background: var(--cream);
  border: 3px dashed #3a220e;
  box-shadow: inset 2px 2px 0 rgba(255,230,160,.35);
  cursor: pointer;
}
.piper-drop-zone.is-over {
  background: #fff6d8;
  border-color: #1a120b;
}


.pin-gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(11, 11, 11, 0.86);
}
.pin-gate.hidden, .pin-gate[hidden] { display: none !important; }
.pin-card { position: relative; max-width: 380px; width: 100%; text-align: center; }
.pin-type {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 56px;
  height: 80px;
  z-index: 2;
  opacity: 0.02;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: #ffe566;
  font-size: 28px;
  text-align: center;
}
.pin-pad, .pin-im-dad, .pin-dad-box, .pin-status, .pin-dots, .pin-display { position: relative; z-index: 3; }
.pin-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 8px 0 12px;
  min-height: 36px;
}
.pin-dots span {
  width: 22px;
  height: 22px;
  border: 3px solid #000;
  background: var(--cream);
  box-shadow: inset 2px 2px 0 var(--oak-hi), 2px 2px 0 #3a220e;
  color: var(--ink);
  font-size: 18px;
  line-height: 16px;
}
.pin-dots span.on, .pin-dots span.is-on { background: var(--oak); }
.pin-status { min-height: 28px; margin: 0 0 12px; color: var(--ink); font-size: 18px; }
.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 auto 16px;
  max-width: 280px;
}
.pin-pad button {
  min-height: var(--tap-lg);
  font-family: "Pixelify Sans", sans-serif;
  font-size: 28px;
  background: var(--stone);
  color: #1a120b;
  border: 3px solid #000;
  box-shadow: inset 2px 2px 0 var(--stone-hi), 3px 3px 0 #3a220e;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}
.pin-pad.is-shut button { cursor: default; }
.pin-dad {
  background: none;
  border: none;
  color: var(--oak-hi);
  font: inherit;
  font-size: 18px;
  text-decoration: underline;
  min-height: var(--tap);
}
.pin-dad-set { margin-top: 12px; }
.pin-dad-set.hidden { display: none !important; }

.pin-display { display: flex; justify-content: center; gap: 12px; margin: 8px 0 12px; min-height: 36px; }
.pin-display .pin-slot, .pin-slot {
  width: 22px; height: 28px; border: 3px solid #000; background: var(--cream);
  box-shadow: inset 2px 2px 0 var(--oak-hi), 2px 2px 0 #3a220e;
  color: var(--ink); font-size: 18px; line-height: 22px;
}
.pin-slot.is-on { background: var(--oak); }
.pin-im-dad {
  background: none; border: none; color: var(--oak-hi); font: inherit;
  font-size: 18px; text-decoration: underline; min-height: var(--tap);
}
.pin-dad-box { margin-top: 12px; }


/* Concept cards + tabs — wood/cream default (kids). */
.project-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.project-tabs [role="tab"] {
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  min-height: var(--tap);
  min-width: 44px;
  padding: 10px 14px;
  cursor: pointer;
  color: var(--cream);
  background:
    repeating-linear-gradient(90deg, #8f8f8f 0 8px, #7a7a7a 8px 16px, #9a9a9a 16px 24px);
  border: 4px solid;
  border-color: var(--stone-hi) var(--stone-lo) var(--stone-lo) var(--stone-hi);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.25), 3px 3px 0 #000;
}
.project-tabs [role="tab"]:focus {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.project-tabs [role="tab"][aria-selected="true"],
.project-tabs [role="tab"].is-on {
  color: #08220f;
  background: linear-gradient(#3ee07a, #1aa85a);
  border-color: var(--emerald-hi) var(--emerald-lo) var(--emerald-lo) var(--emerald-hi);
}
.tab-panel.hidden { display: none !important; }
.concept-name {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #3a220e;
}
.signoff-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.signoff-head .panel-head { margin: 0; }
.signoff-chip { flex-shrink: 0; }
.look-art {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin: 10px 0 12px;
}
.look-art figure { margin: 0; }
.look-art img {
  width: 100%;
  display: block;
  border: 4px solid #111;
  border-color: var(--oak-hi) var(--oak-lo) var(--oak-lo) var(--oak-hi);
  background: #1a120b;
}
.look-art figcaption {
  margin-top: 6px;
  font-size: 15px;
  color: #3a220e;
}
.story-outline {
  margin: 0 0 12px;
  white-space: pre-wrap;
  color: #3a220e;
  font-size: 17px;
}
.signoff-actions { margin-top: 10px; }
.signoff-actions.is-locked { opacity: .72; }
.issue-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.issue-item {
  background: #1a120b;
  color: var(--cream);
  border: 3px solid #000;
  border-color: #3a220e #c6a15b #c6a15b #3a220e;
  padding: 12px;
}
.issue-title {
  margin: 0 0 4px;
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
}
.issue-meta { margin: 0 0 6px; font-size: 14px; color: #c6a15b; }
.issue-detail { margin: 0; white-space: pre-wrap; }
.issue-item.is-done { opacity: .7; }
.issue-form .btn { width: 100%; margin-top: 12px; min-height: var(--tap-lg); }
.issue-done { margin-top: 8px; min-height: var(--tap); }

/* Graham — clean modern dark. No grass, dirt chrome, or pixel toys. */
html[data-who="graham"],
html[data-who="graham"] body {
  background: #121418;
  color: #f4efe4;
  font-family: "Segoe UI", system-ui, sans-serif;
}
html[data-who="graham"] .void {
  background: #0e1014;
  background-image: none;
  image-rendering: auto;
}
html[data-who="graham"] .void::after { display: none; }
html[data-who="graham"] .grass-block,
html[data-who="graham"] .dirt-block,
html[data-who="graham"] .go-gem { display: none !important; }
html[data-who="graham"] .dirt-bar {
  background: #181b22;
  border-bottom: 1px solid #2a303a;
  box-shadow: none;
}
html[data-who="graham"] .logo {
  font-family: "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.08em;
  color: #f4efe4;
  text-shadow: none;
}
html[data-who="graham"] .studio-name,
html[data-who="graham"] .ver-chip,
html[data-who="graham"] .view-title,
html[data-who="graham"] .panel-head,
html[data-who="graham"] .card-name,
html[data-who="graham"] .project-name,
html[data-who="graham"] .field-label,
html[data-who="graham"] .btn,
html[data-who="graham"] .store-btn,
html[data-who="graham"] .back-btn,
html[data-who="graham"] .whats-new,
html[data-who="graham"] .status-chip,
html[data-who="graham"] .ready-proto-link,
html[data-who="graham"] .project-tabs [role="tab"] {
  font-family: "Segoe UI", system-ui, sans-serif;
}
html[data-who="graham"] .ver-chip {
  background: #222833;
  border: 1px solid #3a4250;
  box-shadow: none;
  color: #f4efe4;
  text-shadow: none;
  border-radius: 8px;
}
html[data-who="graham"] .wood-panel,
html[data-who="graham"] .project-card,
html[data-who="graham"] .dirt-nameplate,
html[data-who="graham"] .ready-banner,
html[data-who="graham"] .modal-panel,
html[data-who="graham"] .who-card,
html[data-who="graham"] .issue-item {
  background: #1c2028;
  border: 1px solid #2e3440;
  box-shadow: none;
  color: #f4efe4;
  border-radius: 12px;
}
html[data-who="graham"] .panel-head,
html[data-who="graham"] .hint,
html[data-who="graham"] .mini-empty,
html[data-who="graham"] .save-hint,
html[data-who="graham"] .empty-copy,
html[data-who="graham"] .field-label,
html[data-who="graham"] .card-name,
html[data-who="graham"] .story-outline,
html[data-who="graham"] .look-art figcaption,
html[data-who="graham"] .piper-status,
html[data-who="graham"] .who-card h2 {
  color: #f4efe4;
  text-shadow: none;
}
html[data-who="graham"] .hint,
html[data-who="graham"] .mini-empty,
html[data-who="graham"] .save-hint { color: #c8c2b6; }
html[data-who="graham"] .btn,
html[data-who="graham"] .store-btn,
html[data-who="graham"] .back-btn,
html[data-who="graham"] .ready-proto-link,
html[data-who="graham"] .card-archive,
html[data-who="graham"] .who-row button {
  border-radius: 10px;
  image-rendering: auto;
  box-shadow: none;
  text-shadow: none;
  border: 1px solid #3a4250;
  min-height: var(--tap);
}
html[data-who="graham"] .btn-emerald,
html[data-who="graham"] .btn-go,
html[data-who="graham"] .project-tabs [role="tab"][aria-selected="true"] {
  background: #2f8f5b;
  color: #f4efe4;
  border-color: #3fb56f;
}
html[data-who="graham"] .btn-stone,
html[data-who="graham"] .project-tabs [role="tab"] {
  background: #2a303a;
  color: #f4efe4;
  border-color: #3a4250;
}
html[data-who="graham"] .btn:focus,
html[data-who="graham"] .store-btn:focus,
html[data-who="graham"] .back-btn:focus,
html[data-who="graham"] .project-tabs [role="tab"]:focus,
html[data-who="graham"] .whats-new:focus,
html[data-who="graham"] .chunk-input:focus,
html[data-who="graham"] .chunk-notes:focus {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
html[data-who="graham"] .chunk-input,
html[data-who="graham"] .chunk-notes,
html[data-who="graham"] .note-bubble,
html[data-who="graham"] .piper-note {
  background: #12161d;
  color: #f4efe4;
  border: 1px solid #2e3440;
  box-shadow: none;
  border-radius: 10px;
}
html[data-who="graham"] .status-chip,
html[data-who="graham"] .review-chip {
  background: #2a303a;
  color: #f4efe4;
  border: 1px solid #3a4250;
  box-shadow: none;
  border-radius: 999px;
}
html[data-who="graham"] .status-chip.ready { background: #1d4d34; color: #d8ffe8; }
html[data-who="graham"] .splash { color: #e6d7a8; text-shadow: none; transform: none; }
html[data-who="graham"] .look-art img {
  border: 1px solid #2e3440;
  border-radius: 10px;
}

/* Kate — light sticker / scrapbook. Not June-red. Not Minecraft. */
html[data-who="kate"],
html[data-who="kate"] body {
  background: #faf6ef;
  color: #3a2f28;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}
html[data-who="kate"] .void {
  background: #f7f1e6;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255,210,230,.35) 0 28px, transparent 29px),
    radial-gradient(circle at 86% 12%, rgba(190,230,210,.4) 0 22px, transparent 23px),
    radial-gradient(circle at 70% 80%, rgba(255,230,170,.35) 0 26px, transparent 27px);
  image-rendering: auto;
}
html[data-who="kate"] .void::after { display: none; }
html[data-who="kate"] .grass-block,
html[data-who="kate"] .dirt-block { display: none !important; }
html[data-who="kate"] .dirt-bar {
  background: #fffdf8;
  border-bottom: 2px solid #eadfce;
  box-shadow: 0 4px 0 #f3e7d4;
}
html[data-who="kate"] .logo {
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: #6a4a88;
  text-shadow: 1px 1px 0 #ffe8f4;
}
html[data-who="kate"] .studio-name,
html[data-who="kate"] .ver-chip,
html[data-who="kate"] .view-title,
html[data-who="kate"] .panel-head,
html[data-who="kate"] .card-name,
html[data-who="kate"] .project-name,
html[data-who="kate"] .field-label,
html[data-who="kate"] .btn,
html[data-who="kate"] .store-btn,
html[data-who="kate"] .whats-new,
html[data-who="kate"] .status-chip,
html[data-who="kate"] .project-tabs [role="tab"] {
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}
html[data-who="kate"] .ver-chip,
html[data-who="kate"] .status-chip,
html[data-who="kate"] .review-chip,
html[data-who="kate"] .piper-note .kind-tag {
  background: #ffe8f2;
  color: #6a3a55;
  border: 2px solid #f3c6d8;
  border-radius: 999px;
  box-shadow: 2px 2px 0 #f8d5e4;
  text-shadow: none;
}
html[data-who="kate"] .status-chip.ready { background: #d8f5e4; color: #24563a; border-color: #9ed4b4; }
html[data-who="kate"] .wood-panel,
html[data-who="kate"] .project-card,
html[data-who="kate"] .dirt-nameplate,
html[data-who="kate"] .ready-banner,
html[data-who="kate"] .modal-panel,
html[data-who="kate"] .who-card,
html[data-who="kate"] .issue-item {
  background: #fffef9;
  border: 2px solid #ead9c4;
  border-radius: 22px;
  box-shadow: 0 6px 0 #f0e0cc;
  color: #3a2f28;
}
html[data-who="kate"] .panel-head,
html[data-who="kate"] .card-name,
html[data-who="kate"] .empty-copy,
html[data-who="kate"] .field-label,
html[data-who="kate"] .who-card h2 {
  color: #4a3540;
  text-shadow: none;
}
html[data-who="kate"] .hint,
html[data-who="kate"] .mini-empty,
html[data-who="kate"] .save-hint,
html[data-who="kate"] .story-outline,
html[data-who="kate"] .look-art figcaption,
html[data-who="kate"] .piper-status { color: #6a5648; }
html[data-who="kate"] .btn,
html[data-who="kate"] .store-btn,
html[data-who="kate"] .back-btn,
html[data-who="kate"] .ready-proto-link,
html[data-who="kate"] .who-row button,
html[data-who="kate"] .project-tabs [role="tab"] {
  border-radius: 18px;
  image-rendering: auto;
  box-shadow: 0 3px 0 #e6d5c2;
  text-shadow: none;
  min-height: var(--tap);
}
html[data-who="kate"] .btn-emerald,
html[data-who="kate"] .btn-go,
html[data-who="kate"] .project-tabs [role="tab"][aria-selected="true"] {
  background: #b7e4c7;
  color: #24563a;
  border: 2px solid #7fc49a;
}
html[data-who="kate"] .btn-stone,
html[data-who="kate"] .project-tabs [role="tab"] {
  background: #ffe8c8;
  color: #5a4030;
  border: 2px solid #f0c890;
}
html[data-who="kate"] .btn:focus,
html[data-who="kate"] .store-btn:focus,
html[data-who="kate"] .project-tabs [role="tab"]:focus,
html[data-who="kate"] .whats-new:focus,
html[data-who="kate"] .chunk-input:focus,
html[data-who="kate"] .chunk-notes:focus {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
html[data-who="kate"] .chunk-input,
html[data-who="kate"] .chunk-notes,
html[data-who="kate"] .note-bubble,
html[data-who="kate"] .piper-note {
  background: #fff8ee;
  color: #3a2f28;
  border: 2px solid #ead9c4;
  box-shadow: none;
  border-radius: 16px;
}
html[data-who="kate"] .look-art img {
  border: 2px solid #ead9c4;
  border-radius: 16px;
  box-shadow: 3px 3px 0 #f3e0cc;
}
html[data-who="kate"] .splash { color: #7a4a88; text-shadow: none; transform: rotate(-2deg); }
html[data-who="kate"] .go-gem {
  border-radius: 50%;
  transform: none;
  background: #ffe08a;
  border-color: #d4a84a;
}

.proto-build .proto-ver {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 10px;
  border: 3px solid #111;
  border-radius: 999px;
  background: #f3e6c4;
  color: #1a120b;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
  vertical-align: middle;
}
.proto-notes {
  margin: 8px 0 0;
  padding: 0 0 0 18px;
}
.proto-notes li {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}
