@import url("https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;700;800&family=IBM+Plex+Mono:wght@400;500;700&display=swap");

:root {
  --bg: #fff8e8;
  --panel: rgba(255, 248, 235, 0.92);
  --panel-strong: #fffdf7;
  --ink: #2c1f1a;
  --muted: #6b5a50;
  --accent: #de5c2e;
  --accent-2: #2a8f9a;
  --line: #e6d2bf;
  --shadow: 0 12px 35px rgba(114, 57, 29, 0.17);
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Baloo 2", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 0%, #fff4d8 5%, #ffe9cc 37%, #ffe6d8 100%);
}

.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(1px);
  opacity: 0.62;
}

.blob-a {
  width: 28rem;
  height: 28rem;
  top: -9rem;
  right: -7rem;
  background: radial-gradient(circle at 35% 30%, #ffe698 10%, #ffc279 66%, #ffad8f 100%);
  animation: drift 12s ease-in-out infinite;
}

.blob-b {
  width: 24rem;
  height: 24rem;
  left: -10rem;
  bottom: -8rem;
  background: radial-gradient(circle at 45% 40%, #dff5f2 0%, #a6dfe5 65%, #84cfd6 100%);
  animation: drift 15s ease-in-out infinite reverse;
}

.grain {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(44, 31, 26, 0.08) 0.55px, transparent 0.55px);
  background-size: 3px 3px;
  opacity: 0.08;
}

.shell {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem 1rem 1.6rem;
  display: grid;
  gap: 1rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: rise 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.shell > .reveal:nth-child(1) {
  animation-delay: 40ms;
}

.shell > .reveal:nth-child(2) {
  animation-delay: 120ms;
}

.shell > .reveal:nth-child(3) {
  animation-delay: 200ms;
}

.shell > .reveal:nth-child(4) {
  animation-delay: 280ms;
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr minmax(220px, 0.8fr);
  gap: 1rem;
  padding: 1.1rem;
  background: linear-gradient(135deg, rgba(255, 248, 233, 0.95) 10%, rgba(255, 229, 201, 0.95) 62%, rgba(236, 252, 252, 0.93) 100%);
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--accent-2);
  font-family: "IBM Plex Mono", monospace;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-size: clamp(1.45rem, 2.8vw, 2.5rem);
  margin-top: 0.45rem;
}

.hero-text {
  margin: 0.6rem 0;
  color: var(--muted);
  font-size: 1rem;
  max-width: 45ch;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.meta-chip {
  border: 1px solid #e5cab3;
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
  font-family: "IBM Plex Mono", monospace;
}

.mascot-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 180px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 50% 30%, #fff4bf 10%, #ffe89c 53%, #ffd97c 100%);
  border: 1px dashed #efb965;
}

.mascot {
  width: min(180px, 82%);
  aspect-ratio: 1 / 1;
  border-radius: 48% 52% 54% 46% / 46% 48% 52% 54%;
  background: radial-gradient(circle at 45% 30%, #fff2a6 8%, #ffd96a 65%, #f4b83f 100%);
  position: relative;
  box-shadow: inset -6px -10px 20px rgba(201, 135, 28, 0.22);
  animation: mascot-bob 2.8s ease-in-out infinite;
}

.eye {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #27211d;
  top: 43%;
}

.eye-left {
  left: 34%;
}

.eye-right {
  right: 34%;
}

.cheek {
  position: absolute;
  width: 22px;
  height: 12px;
  border-radius: 999px;
  background: rgba(237, 126, 126, 0.55);
  top: 54%;
}

.cheek-left {
  left: 21%;
}

.cheek-right {
  right: 21%;
}

.mouth {
  position: absolute;
  width: 26px;
  height: 12px;
  border: 3px solid #2f2620;
  border-top: 0;
  border-radius: 0 0 16px 16px;
  left: 50%;
  transform: translateX(-50%);
  bottom: 30%;
}

.spark {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: #fff;
  transform: rotate(45deg);
  opacity: 0.9;
}

.spark-1 {
  top: 24px;
  left: 26px;
  animation: twinkle 1.8s ease-in-out infinite;
}

.spark-2 {
  top: 36px;
  right: 38px;
  animation: twinkle 1.8s ease-in-out infinite 0.4s;
}

.spark-3 {
  bottom: 30px;
  right: 48px;
  animation: twinkle 1.8s ease-in-out infinite 0.8s;
}


.workspace {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(270px, 0.38fr) minmax(0, 1fr);
}

.config,
.library,
.status {
  padding: 1rem;
}

.panel-head {
  margin-bottom: 0.75rem;
}

.panel-head p {
  margin: 0.28rem 0 0;
  color: var(--muted);
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.7rem;
}

label {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
  color: #4f3f36;
  font-size: 0.92rem;
}

input {
  border: 1px solid #e6d1bf;
  border-radius: var(--radius-md);
  min-height: 2.6rem;
  padding: 0 0.75rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
  background: #fffdf9;
}

.btn {
  border: 0;
  border-radius: 999px;
  min-height: 2.5rem;
  padding: 0.45rem 0.95rem;
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(140deg, #ea6c3b 5%, #d65523 100%);
  box-shadow: 0 10px 18px rgba(219, 97, 50, 0.32);
}

.btn-ghost {
  color: #1f4950;
  background: rgba(45, 152, 163, 0.18);
  border: 1px solid rgba(41, 128, 138, 0.3);
}

.quick-wrap {
  margin-top: 0.85rem;
  border-top: 1px solid #ead6c7;
  padding-top: 0.85rem;
}

.quick-wrap h3 {
  margin-bottom: 0.45rem;
  font-size: 1rem;
}

.quick-grid {
  display: grid;
  gap: 0.52rem;
}

.quick-grid button {
  width: 100%;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: 0.95rem 0.8rem;
}

.action-card {
  position: relative;
}

.action-trigger {
  appearance: none;
  background: transparent;
  width: 100%;
  border: 0;
  cursor: pointer;
  padding: 0;
  text-align: center;
  display: grid;
  gap: 0.5rem;
  align-content: start;
  position: relative;
  transform: translateY(0);
  transition: transform 160ms ease;
}

.action-visual {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
  position: relative;
  background: radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.15) 32%, transparent 63%);
  box-shadow: 0 6px 18px rgba(44, 31, 26, 0.12), 0 1px 0 rgba(255, 255, 255, 0.52) inset;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.action-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 48%, rgba(44, 31, 26, 0.05) 100%);
}

.action-icon {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 160ms ease, filter 160ms ease;
}

.action-trigger:hover {
  transform: translateY(-1px);
}

.action-trigger:hover .action-visual {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(44, 31, 26, 0.17), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.action-trigger:hover .action-icon {
  filter: saturate(1.04) contrast(1.01);
}

.action-trigger.is-playing .action-visual {
  box-shadow: 0 14px 30px rgba(44, 31, 26, 0.22), 0 1px 0 rgba(255, 255, 255, 0.62) inset;
}

.action-trigger.is-playing .action-icon {
  filter: saturate(1.08) contrast(1.03);
}

.action-trigger:focus-visible {
  outline: none;
}

.action-trigger:focus-visible .action-visual {
  outline: 3px solid rgba(42, 143, 154, 0.55);
  outline-offset: 2px;
}

.action-trigger:active {
  transform: translateY(0);
}

.action-trigger:active .action-visual {
  transform: translateY(0);
  box-shadow: 0 5px 12px rgba(44, 31, 26, 0.12), 0 1px 0 rgba(255, 255, 255, 0.48) inset;
}

.action-send {
  position: absolute;
  left: 50%;
  bottom: 0.5rem;
  transform: translate(-50%, 8px);
  opacity: 0;
  pointer-events: none;
  border: 0;
  border-radius: 999px;
  min-height: 1.95rem;
  padding: 0.3rem 0.8rem;
  background: rgba(25, 48, 54, 0.88);
  color: #f7fbfc;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(17, 25, 29, 0.22);
  transition: opacity 140ms ease, transform 140ms ease, background-color 140ms ease;
}

.action-card:hover .action-send {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.action-send:hover {
  background: rgba(21, 42, 47, 0.96);
}

.action-send:focus-visible {
  outline: 3px solid rgba(42, 143, 154, 0.55);
  outline-offset: 2px;
}

.icon-fallback {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #ffeccb 8%, #ffddb7 50%, #e8f7f7 100%);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4a3b32;
  font-weight: 700;
}

.action-label {
  display: block;
  margin: 0;
  padding: 0 0.18rem;
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  line-height: 1.2;
  letter-spacing: 0.025em;
  color: #2d211c;
  font-weight: 700;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.status pre {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.35;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  color: #274246;
}

code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
}

@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .mascot-stage {
    min-height: 160px;
  }
}

@media (max-width: 600px) {
  .shell {
    padding: 0.7rem;
  }

  .panel {
    border-radius: 16px;
  }

  .row {
    flex-direction: column;
    align-items: stretch;
  }

  .action-grid {
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 0.75rem 0.6rem;
  }
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(12px) translateX(-9px);
  }
}

@keyframes mascot-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.3;
    transform: rotate(45deg) scale(0.8);
  }
  50% {
    opacity: 1;
    transform: rotate(45deg) scale(1.08);
  }
}
