:root {
  --bg-top: #fff6dc;
  --bg-bottom: #ffd4ac;
  --paper: #fffdf7;
  --paper-2: #fff4dd;
  --ink: #121212;
  --muted: #5e5a54;
  --line: #111111;
  --accent: #ff6d3d;
  --accent-2: #f5c542;
  --danger: #d14836;
  --shadow: 0 24px 60px rgba(17, 17, 17, 0.16);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.85), transparent 30%),
    radial-gradient(circle at 85% 20%, rgba(255, 175, 120, 0.45), transparent 20%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  font-family: "BIZ UDPGothic", "Yu Gothic UI", "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 90%);
}

body.is-overlay-open {
  overflow: hidden;
}

.app-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.app-view {
  display: none;
}

.app-view.is-active {
  display: block;
}

.hero,
.grid {
  display: grid;
  gap: 20px;
}

.hero {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  margin-bottom: 20px;
}

.hero-copy,
.hero-panel,
.panel {
  position: relative;
  border: 4px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-copy,
.hero-panel,
.panel {
  background-image:
    radial-gradient(circle at top right, rgba(255, 191, 117, 0.24), transparent 25%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 248, 231, 0.98));
}

.hero-copy {
  padding: 32px;
}

.hero-panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}

.hero h1 {
  margin: 8px 0 12px;
  font-family: "Arial Black", "BIZ UDPGothic", sans-serif;
  font-size: clamp(2.8rem, 8vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.eyebrow,
.panel-label,
.stone-label,
.monster-type,
.origin-title,
.progress-phase,
.progress-percent,
.log-entry-header,
.collection-rarity {
  font-family: "Consolas", "Courier New", monospace;
}

.eyebrow,
.panel-label {
  margin: 0;
  color: #94411f;
  font-size: 0.82rem;
  letter-spacing: 0.24em;
}

.lead,
.panel-meta,
.monster-description,
.origin-line,
.collection-item-body p,
.log-entry-meta {
  color: var(--muted);
}

.lead {
  max-width: 54ch;
  line-height: 1.85;
  margin-bottom: 24px;
}

.status-row,
.collection-actions,
.panel-head,
.monster-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.monster-card-actions {
  flex-direction: column;
  align-items: stretch;
}

.collection-action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 14px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: white;
  font-weight: 700;
}

.pill-dim {
  color: var(--muted);
  background: #f5ead4;
}

.pill-outline {
  color: var(--ink);
}

.upload-box {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 22px 20px 20px;
  border: 4px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, #ffd897, #ffb168 52%, #ff915c 100%);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  isolation: isolate;
  box-shadow:
    0 10px 0 #7a3418,
    0 20px 28px rgba(17, 17, 17, 0.16);
}

.upload-box:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 0 #7a3418,
    0 24px 32px rgba(17, 17, 17, 0.18);
}

.upload-box:active {
  transform: translateY(6px);
  box-shadow:
    0 4px 0 #7a3418,
    0 12px 20px rgba(17, 17, 17, 0.15);
}

.upload-box::before,
.primary-button::before {
  content: "";
  position: absolute;
  inset: -22%;
  background: conic-gradient(
    from 180deg,
    rgba(255, 255, 255, 0) 0deg,
    rgba(255, 255, 255, 0.9) 36deg,
    rgba(255, 255, 255, 0) 72deg
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.upload-box::after,
.primary-button::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  border: 2px solid rgba(255, 255, 255, 0.8);
  opacity: 0;
  pointer-events: none;
}

.upload-box > * {
  position: relative;
  z-index: 1;
}

.upload-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 32px;
  padding: 0 10px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: #6b2c14;
}

.upload-title {
  display: block;
  font-family: "Arial Black", "BIZ UDPGothic", sans-serif;
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  line-height: 1.2;
  color: #111;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.upload-meta {
  color: #4f2d1e;
  font-weight: 800;
}

.upload-box.is-cta {
  animation: ctaFloat 1800ms infinite ease-in-out;
  box-shadow:
    0 10px 0 #7a3418,
    0 0 0 0 rgba(255, 177, 104, 0.55),
    0 18px 30px rgba(255, 116, 77, 0.2);
}

.upload-box.is-cta::before,
.primary-button.is-cta::before {
  opacity: 0.85;
  animation: ctaSweep 2400ms infinite linear;
}

.upload-box.is-cta::after,
.primary-button.is-cta::after {
  opacity: 1;
  animation: ctaRing 1800ms infinite ease-out;
}

.upload-box.is-cta span,
.primary-button.is-cta {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.upload-box.is-dimmed {
  opacity: 0.78;
  transform: none;
  box-shadow:
    0 8px 0 #7a3418,
    0 16px 22px rgba(17, 17, 17, 0.12);
}

.upload-box input {
  display: none;
}

.stone-block {
  display: grid;
  gap: 10px;
}

.selected-thumb-stage {
  min-height: 168px;
  padding: 12px;
  display: grid;
  place-items: center;
  border: 4px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at top, rgba(255, 208, 143, 0.45), transparent 42%),
    linear-gradient(180deg, #fffaf0, #fff2dc);
}

.selected-thumb-stage.empty {
  color: var(--muted);
  text-align: center;
}

.selected-thumb-frame {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 4px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: 0 16px 28px rgba(17, 17, 17, 0.12);
}

.selected-thumb-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.stone-label {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
}

.stone-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stone-chip,
.primary-button,
.ghost-button,
.tiny-button,
.save-button {
  border: 3px solid var(--line);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.stone-chip:hover,
.primary-button:hover,
.ghost-button:hover,
.tiny-button:hover,
.save-button:hover {
  transform: translateY(-1px);
}

.stone-chip {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: white;
  color: var(--ink);
  font-weight: 700;
}

.stone-chip.is-selected {
  background: #111;
  color: white;
  box-shadow: 0 8px 0 #f5c542;
}

.primary-button,
.ghost-button,
.tiny-button,
.save-button {
  position: relative;
  overflow: hidden;
  min-height: 50px;
  padding: 0 18px;
  border-radius: 18px;
  font-weight: 800;
}

.primary-button {
  background: linear-gradient(180deg, #ffb168, #ff744d);
  color: var(--ink);
  letter-spacing: 0.22em;
}

.primary-button.is-cta {
  transform: translateY(-2px) scale(1.01);
  box-shadow:
    0 0 0 0 rgba(255, 177, 104, 0.6),
    0 16px 28px rgba(255, 116, 77, 0.28);
  animation: ctaFloat 1500ms infinite ease-in-out;
}

.primary-button.is-cta:hover {
  transform: translateY(-3px) scale(1.02);
}

.ghost-button,
.tiny-button {
  background: #fff;
  color: var(--ink);
}

.save-button {
  width: 100%;
  background: linear-gradient(180deg, #f5d95b, #f39f34);
  color: var(--ink);
}

.save-button:disabled {
  cursor: not-allowed;
  opacity: 1;
}

.save-button.is-saved {
  background: linear-gradient(180deg, #9ce47e, #59b45c);
}

.save-status {
  min-height: 1.4em;
  margin: 0;
  color: #6b4024;
  font-size: 0.88rem;
  font-weight: 800;
  text-align: center;
}

.primary-button:disabled,
.ghost-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.grid {
  grid-template-columns: 1fr;
  margin-bottom: 20px;
}

.panel-guide {
  display: flex;
  flex-direction: column;
}

.flow-card-list {
  display: grid;
  gap: 12px;
}

.flow-card {
  padding: 16px;
  border: 4px solid var(--line);
  border-radius: 20px;
  background: white;
}

.flow-card h2,
.flow-card p {
  margin: 0;
}

.flow-card h2 {
  margin-bottom: 8px;
  font-family: "Arial Black", sans-serif;
  font-size: 1.2rem;
}

.flow-card p {
  color: var(--muted);
  line-height: 1.7;
  font-weight: 700;
}

.flow-number {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  margin-bottom: 12px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  font-family: "Consolas", "Courier New", monospace;
  font-weight: 900;
}

.panel {
  padding: 22px;
}

.panel-head {
  margin-bottom: 18px;
}

.progress-meter {
  margin-bottom: 18px;
}

.progress-track {
  height: 14px;
  border: 3px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #f5c542, #ff7d50);
  transition: width 220ms ease;
}

.progress-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.progress-phase,
.progress-percent {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
}

.progress-phase {
  color: #6b4024;
}

.progress-meter.is-done .progress-fill {
  background: linear-gradient(90deg, #8ce57b, #f5c542);
}

.progress-meter.is-error .progress-fill {
  background: linear-gradient(90deg, #ff7e72, #d14836);
}

.preview-stage,
.result-stage {
  min-height: 560px;
  padding: 20px;
  display: grid;
  place-items: center;
  border: 4px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at top, rgba(255, 208, 143, 0.55), transparent 36%),
    linear-gradient(180deg, #fffaf0, #fff2dc);
}

.result-view {
  padding-top: 10px;
}

.result-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  margin-bottom: 20px;
}

.result-hero-copy h1,
.result-hero-copy p {
  margin: 0;
}

.result-hero-copy h1 {
  margin: 8px 0 10px;
  font-family: "Arial Black", sans-serif;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 0.95;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  min-width: 220px;
}

.panel-result-full {
  margin-bottom: 20px;
}

.preview-stage.empty,
.result-stage.empty,
.collection-grid.empty,
.log-list.empty {
  color: var(--muted);
  text-align: center;
}

.preview-frame {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 4 / 5;
  border: 4px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  background: white;
  box-shadow: 0 20px 36px rgba(17, 17, 17, 0.12);
  animation: floatIn 420ms ease;
}

.preview-frame img,
.monster-card-image,
.collection-image-wrap img,
.source-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.monster-card {
  width: 100%;
  overflow: hidden;
  border: 4px solid var(--line);
  border-radius: 28px;
  background: white;
  animation: revealUp 420ms ease;
}

.monster-card-header-bar {
  min-height: 62px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 4px solid var(--line);
  background: #f1efe8;
}

.monster-number,
.rarity-badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.monster-card-image-panel {
  padding: 18px 18px 0;
  background: white;
}

.monster-card-image-wrap {
  min-height: 360px;
  border: 4px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle, white 12%, #ffe0b9 72%, #f3b270 100%);
}

.monster-card-image {
  object-fit: contain;
  padding: 16px;
}

.monster-card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}

.monster-name {
  margin: 0;
  font-family: "Arial Black", "BIZ UDPGothic", sans-serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1;
}

.monster-type {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
}

.monster-description {
  margin: 0;
  line-height: 1.8;
  font-weight: 700;
}

.attribute-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.main-attribute,
.sub-attributes,
.feature-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  font-weight: 800;
}

.monster-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stat {
  padding: 14px;
  border: 4px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.stat span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: #7a4f31;
}

.stat strong {
  font-size: 1.9rem;
  font-family: "Arial Black", sans-serif;
}

.origin-log {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 12px;
  border: 4px solid var(--line);
  border-radius: 20px;
  background: #efefef;
}

.origin-thumb {
  height: 96px;
  border: 4px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: white;
}

.origin-copy {
  display: grid;
  gap: 6px;
}

.origin-title,
.origin-line {
  margin: 0;
}

.origin-title {
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.origin-line {
  font-size: 0.88rem;
  line-height: 1.45;
  font-weight: 700;
}

.log-panel,
.collection-panel {
  margin-bottom: 20px;
}

.log-list {
  display: grid;
  gap: 10px;
}

.log-entry {
  border: 3px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  background: #fff;
}

.log-entry-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.log-entry-message {
  margin: 0 0 8px;
  font-weight: 700;
  line-height: 1.6;
}

.log-entry-meta,
.error-meta {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}

.error-block {
  width: 100%;
  max-width: 720px;
  padding: 18px;
  border: 4px solid var(--line);
  border-radius: 20px;
  background: #ffe0da;
}

.summon-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(10px);
  z-index: 20;
}

.box-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  min-width: min(360px, calc(100vw - 32px));
  max-width: min(420px, calc(100vw - 32px));
  padding: 0 18px;
  border: 4px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #f5d95b, #f39f34);
  box-shadow:
    0 10px 0 #7a3418,
    0 22px 32px rgba(17, 17, 17, 0.24);
  transform: translateY(120px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 220ms ease, opacity 220ms ease;
}

.box-toast.is-visible {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.box-toast p {
  margin: 14px 0;
  font-family: "Arial Black", "BIZ UDPGothic", sans-serif;
  font-size: 1rem;
  text-align: center;
}

.summon-overlay.is-active {
  display: flex;
}

.summon-panel {
  width: min(560px, 100%);
  padding: 28px;
  border: 4px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at top, rgba(255, 206, 128, 0.7), transparent 30%),
    linear-gradient(180deg, #fffef9, #ffeccc);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  text-align: center;
}

.summon-panel h2,
.summon-copy {
  margin: 0;
}

.summon-panel h2 {
  margin-top: 8px;
  font-family: "Arial Black", sans-serif;
  font-size: clamp(2rem, 8vw, 3.2rem);
}

.summon-copy {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
  font-weight: 700;
}

.summon-preview-shell {
  display: flex;
  justify-content: center;
  margin: 24px 0 18px;
}

.summon-preview-frame {
  width: min(260px, 72vw);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 4px solid var(--line);
  border-radius: 24px;
  background: white;
  box-shadow: 0 20px 40px rgba(17, 17, 17, 0.18);
}

.summon-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.summon-pulse-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

.summon-pulse {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffb168, #ff744d);
  animation: pulseDot 1000ms infinite ease-in-out;
}

.summon-pulse:nth-child(2) {
  animation-delay: 140ms;
}

.summon-pulse:nth-child(3) {
  animation-delay: 280ms;
}

.error-title {
  margin: 0 0 8px;
  font-family: "Arial Black", sans-serif;
  color: var(--danger);
}

.error-meta {
  margin-top: 12px;
  padding: 12px;
  border: 3px solid var(--line);
  border-radius: 14px;
  background: #fff9f5;
  color: #7b2e24;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.collection-item {
  overflow: hidden;
  border: 4px solid var(--line);
  border-radius: 22px;
  background: white;
}

.collection-rarity {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-bottom: 4px solid var(--line);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  font-weight: 900;
}

.collection-image-wrap {
  aspect-ratio: 1;
  background:
    radial-gradient(circle, white 18%, #ffe0b9 72%, #f3b270 100%);
}

.collection-image-wrap img {
  object-fit: contain;
  padding: 12px;
}

.collection-item-body {
  padding: 14px;
  display: grid;
  gap: 6px;
}

.collection-item-body h3,
.collection-item-body p {
  margin: 0;
}

.collection-item-body h3 {
  font-size: 1rem;
  font-family: "Arial Black", sans-serif;
}

.rarity-common {
  background-color: #ebebeb;
}

.rarity-rare {
  background-color: #b9d9ff;
}

.rarity-epic {
  background-color: #e1c0ff;
}

.rarity-legendary {
  background-color: #ffe58f;
}

.rarity-mythic {
  background: linear-gradient(90deg, #ffd8ef, #ffe58f, #b7fff0);
}

@keyframes floatIn {
  from {
    transform: translateY(12px) rotate(-1deg);
    opacity: 0;
  }
  to {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
}

@keyframes revealUp {
  from {
    transform: translateY(18px) scale(0.985);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes pulseDot {
  0%,
  100% {
    transform: translateY(0) scale(0.85);
    opacity: 0.55;
  }
  50% {
    transform: translateY(-8px) scale(1.1);
    opacity: 1;
  }
}

@keyframes ctaFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.015);
  }
}

@keyframes ctaSweep {
  0% {
    transform: translateX(-68%) rotate(0deg);
  }
  100% {
    transform: translateX(68%) rotate(360deg);
  }
}

@keyframes ctaRing {
  0% {
    transform: scale(0.98);
    opacity: 0.95;
  }
  70% {
    transform: scale(1.04);
    opacity: 0.2;
  }
  100% {
    transform: scale(1.05);
    opacity: 0;
  }
}

@media (max-width: 960px) {
  .hero,
  .grid {
    grid-template-columns: 1fr;
  }

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

  .result-actions {
    min-width: 0;
  }

  .status-row,
  .collection-actions,
  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .preview-stage,
  .result-stage {
    min-height: 420px;
  }

  .origin-log {
    grid-template-columns: 1fr;
  }

  .origin-thumb {
    width: 96px;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 16px, 1180px);
    padding-top: 18px;
  }

  .hero-copy,
  .hero-panel,
  .panel {
    border-width: 3px;
  }

  .hero-copy {
    padding: 22px;
  }

  .panel {
    padding: 16px;
  }

  .preview-stage,
  .result-stage {
    padding: 14px;
    min-height: 340px;
  }

  .summon-panel {
    padding: 22px 16px;
  }

  .monster-card-header-bar,
  .monster-card-body,
  .monster-card-image-panel {
    padding-left: 14px;
    padding-right: 14px;
  }

  .monster-card-image-wrap {
    min-height: 280px;
  }

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