:root {
  --wlt-bg: #f8efdf;
  --wlt-bg-deep: #f3dfc3;
  --wlt-surface: rgba(255, 250, 244, 0.92);
  --wlt-surface-soft: rgba(255, 250, 244, 0.74);
  --wlt-ink: #201a16;
  --wlt-muted: #695b4f;
  --wlt-line: rgba(32, 26, 22, 0.1);
  --wlt-theme: #ef7649;
  --wlt-theme-deep: #bb4629;
  --wlt-mint: #b8decf;
  --wlt-gold: #ffcf77;
  --wlt-sky: #d9eff2;
  --wlt-shadow: 0 18px 44px rgba(88, 56, 27, 0.12);
  --wlt-body-font-size: 16px;
  --wlt-button-font-size: 16px;
  --wlt-button-radius: 999px;
  --wlt-card-radius: 30px;
  --wlt-content-width: 1180px;
  --wlt-radius-lg: var(--wlt-card-radius);
  --wlt-radius-md: calc(var(--wlt-card-radius) * 0.74);
  --wlt-radius-sm: 16px;
}

.wlt-tool-app,
.wlt-plugin-block,
.wlt-tool-fallback,
.wlt-page-intro,
.wlt-copy-block {
  font-family: "Noto Sans SC", sans-serif;
  font-size: var(--wlt-body-font-size);
  color: var(--wlt-ink);
}

.wlt-tool-app *,
.wlt-plugin-block *,
.wlt-tool-fallback *,
.wlt-page-intro *,
.wlt-copy-block * {
  box-sizing: border-box;
}

.wlt-page-intro,
.wlt-copy-block {
  width: 100%;
  max-width: var(--wlt-content-width);
  margin: 0 auto 24px;
}

.wlt-page-intro {
  padding: 26px;
  border-radius: var(--wlt-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: var(--wlt-surface-soft);
  backdrop-filter: blur(18px);
  box-shadow: var(--wlt-shadow);
}

.wlt-page-subtitle {
  margin: 0;
  color: var(--wlt-muted);
  font-size: 1.04rem;
  line-height: 1.82;
}

.wlt-copy-block {
  padding: 24px 26px;
  border-radius: var(--wlt-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: var(--wlt-surface-soft);
  backdrop-filter: blur(18px);
  box-shadow: var(--wlt-shadow);
}

.wlt-copy-block h2,
.wlt-copy-block h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  line-height: 1.08;
}

.wlt-copy-block .wlt-kicker {
  margin-bottom: 10px;
}

.wlt-copy-block p {
  color: var(--wlt-muted);
  line-height: 1.78;
}

.wlt-copy-list {
  margin: 18px 0 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 10px;
  color: var(--wlt-muted);
  line-height: 1.72;
}

.wlt-tool-shell {
  position: relative;
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: var(--wlt-content-width);
  margin: 0 auto 28px;
  padding: 22px;
  border-radius: calc(var(--wlt-card-radius) + 6px);
  border: 1px solid rgba(255, 255, 255, 0.82);
  background:
    radial-gradient(circle at top left, rgba(239, 118, 73, 0.18), transparent 22%),
    radial-gradient(circle at top right, rgba(184, 222, 207, 0.32), transparent 18%),
    linear-gradient(180deg, #fcf6ee 0%, #f8efdf 54%, #f2dfc5 100%);
  box-shadow: var(--wlt-shadow);
  overflow: hidden;
}

.wlt-tool-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.34), transparent 92%);
}

.wlt-tool-shell > * {
  position: relative;
  z-index: 1;
}

.wlt-tool-hero,
.wlt-panel,
.wlt-plugin-block__inner {
  padding: 26px;
  border-radius: var(--wlt-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: var(--wlt-surface-soft);
  backdrop-filter: blur(18px);
  box-shadow: var(--wlt-shadow);
}

.wlt-plugin-block {
  margin: 0 auto 24px;
  width: 100%;
  max-width: var(--wlt-content-width);
}

.wlt-plugin-kicker,
.wlt-kicker,
.wlt-result-kicker {
  margin: 0 0 12px;
  color: var(--wlt-theme-deep);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
}

.wlt-tool-title,
.wlt-panel h2,
.wlt-plugin-block h2,
.wlt-panel h3,
.wlt-stat-value,
.wlt-result-title {
  margin: 0;
  font-family: "Fraunces", serif;
  line-height: 1.06;
}

.wlt-tool-title {
  font-size: clamp(2.1rem, 4vw, 4rem);
}

.wlt-tool-subtitle,
.wlt-panel p,
.wlt-plugin-block p,
.wlt-result-summary,
.wlt-field-help,
.wlt-inline-note,
.wlt-result-placeholder {
  color: var(--wlt-muted);
  line-height: 1.78;
}

.wlt-tool-subtitle {
  margin: 16px 0 0;
  font-size: 1.02rem;
  max-width: 62rem;
}

.wlt-tool-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.wlt-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: var(--wlt-button-radius);
  border: 1px solid rgba(32, 26, 22, 0.09);
  background: rgba(255, 255, 255, 0.6);
  color: var(--wlt-muted);
  font-size: 0.9rem;
}

.wlt-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
}

.wlt-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.wlt-panel-head h2,
.wlt-panel-head h3 {
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.wlt-form-grid {
  display: grid;
  gap: 14px;
}

.wlt-field {
  display: grid;
  gap: 8px;
}

.wlt-field label,
.wlt-field > span {
  font-weight: 600;
  font-size: 0.95rem;
}

.wlt-field textarea,
.wlt-field input,
.wlt-field select {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--wlt-radius-sm);
  border: 1px solid rgba(32, 26, 22, 0.11);
  background: rgba(255, 255, 255, 0.82);
  color: var(--wlt-ink);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.wlt-field textarea {
  min-height: 160px;
  resize: vertical;
}

.wlt-field textarea:focus,
.wlt-field input:focus,
.wlt-field select:focus {
  border-color: rgba(239, 118, 73, 0.36);
  box-shadow: 0 0 0 4px rgba(239, 118, 73, 0.12);
}

.wlt-field--compact textarea {
  min-height: 108px;
}

.wlt-field-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wlt-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
  border-radius: var(--wlt-radius-sm);
  border: 1px solid rgba(32, 26, 22, 0.11);
  background: rgba(255, 255, 255, 0.82);
  font-weight: 600;
}

.wlt-checkbox input {
  width: auto;
  margin: 0;
}

.wlt-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.wlt-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--wlt-button-radius);
  border: 1px solid transparent;
  font-size: var(--wlt-button-font-size);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.wlt-button:hover {
  transform: translateY(-1px);
}

.wlt-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.wlt-button--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--wlt-theme), var(--wlt-theme-deep));
  box-shadow: 0 14px 30px rgba(187, 70, 41, 0.22);
}

.wlt-button--secondary {
  color: var(--wlt-ink);
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(32, 26, 22, 0.1);
}

.wlt-button--ghost {
  color: var(--wlt-muted);
  background: rgba(255, 255, 255, 0.36);
  border-color: rgba(32, 26, 22, 0.08);
}

.wlt-inline-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--wlt-radius-sm);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(32, 26, 22, 0.08);
  color: var(--wlt-muted);
}

.wlt-inline-status.is-warning {
  background: rgba(255, 207, 119, 0.24);
  border-color: rgba(255, 177, 59, 0.24);
}

.wlt-inline-status.is-success {
  background: rgba(184, 222, 207, 0.35);
  border-color: rgba(96, 164, 137, 0.18);
}

.wlt-inline-status.is-danger {
  background: rgba(239, 118, 73, 0.12);
  border-color: rgba(239, 118, 73, 0.24);
}

.wlt-stage {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--wlt-radius-md);
  border: 1px dashed rgba(32, 26, 22, 0.12);
  background: rgba(255, 255, 255, 0.45);
}

.wlt-result-shell {
  display: grid;
  gap: 16px;
}

.wlt-result-card {
  padding: 18px;
  border-radius: var(--wlt-radius-md);
  border: 1px solid rgba(32, 26, 22, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

.wlt-result-title {
  font-size: 1.4rem;
}

.wlt-result-summary {
  margin: 10px 0 0;
}

.wlt-stat-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.wlt-stat {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(32, 26, 22, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.74));
}

.wlt-stat-value {
  font-size: clamp(1.4rem, 3vw, 2.1rem);
}

.wlt-stat-label {
  margin-top: 6px;
  color: var(--wlt-muted);
  font-size: 0.92rem;
}

.wlt-output-pre,
.wlt-output-html,
.wlt-log-panel {
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(32, 26, 22, 0.08);
  background: rgba(248, 239, 223, 0.58);
}

.wlt-output-pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  line-height: 1.68;
  overflow: auto;
}

.wlt-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 10px;
  color: var(--wlt-muted);
}

.wlt-faq-list {
  display: grid;
  gap: 12px;
}

.wlt-faq-item {
  border-radius: 20px;
  border: 1px solid rgba(32, 26, 22, 0.08);
  background: rgba(255, 255, 255, 0.74);
  overflow: hidden;
}

.wlt-faq-trigger {
  width: 100%;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 700;
  color: var(--wlt-ink);
  text-align: left;
}

.wlt-faq-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: var(--wlt-button-radius);
  background: rgba(239, 118, 73, 0.12);
  color: var(--wlt-theme-deep);
  font-size: 1rem;
}

.wlt-faq-body {
  display: none;
  padding: 0 18px 18px;
  color: var(--wlt-muted);
  line-height: 1.74;
}

.wlt-faq-item.is-open .wlt-faq-body {
  display: block;
}

.wlt-faq-item.is-open .wlt-faq-icon {
  transform: rotate(45deg);
}

.wlt-mini-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wlt-mini-card {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(32, 26, 22, 0.08);
  background: rgba(255, 255, 255, 0.76);
}

.wlt-reaction-zone,
.wlt-wheel-display,
.wlt-challenge-board,
.wlt-game-screen {
  display: grid;
  place-items: center;
  min-height: 240px;
  border-radius: 26px;
  border: 1px solid rgba(32, 26, 22, 0.09);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.66));
  text-align: center;
}

.wlt-reaction-zone.is-ready {
  background: linear-gradient(180deg, rgba(255, 207, 119, 0.4), rgba(255, 207, 119, 0.22));
}

.wlt-reaction-zone.is-go {
  background: linear-gradient(180deg, rgba(184, 222, 207, 0.55), rgba(184, 222, 207, 0.32));
}

.wlt-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.wlt-memory-card {
  min-height: 88px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(239, 118, 73, 0.22), rgba(217, 239, 242, 0.72));
  font-size: 1.75rem;
  font-weight: 700;
  color: transparent;
}

.wlt-memory-card.is-flipped,
.wlt-memory-card.is-matched {
  color: var(--wlt-ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(32, 26, 22, 0.08);
}

.wlt-log-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.wlt-log-item {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(32, 26, 22, 0.08);
}

.wlt-plugin-related__grid,
.wlt-team-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wlt-plugin-related__card,
.wlt-team-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(32, 26, 22, 0.08);
  background: rgba(255, 255, 255, 0.76);
  color: var(--wlt-ink);
  text-decoration: none;
}

.wlt-team-card ol {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--wlt-muted);
}

.wlt-score-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.wlt-score-badge {
  display: inline-flex;
  min-height: 40px;
  padding: 0 14px;
  align-items: center;
  justify-content: center;
  border-radius: var(--wlt-button-radius);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(32, 26, 22, 0.08);
  font-weight: 700;
}

.wlt-tool-fallback {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(239, 118, 73, 0.24);
  background: rgba(255, 244, 238, 0.92);
}

.wlt-toast-shell {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 999999;
  display: grid;
  gap: 10px;
  max-width: min(420px, calc(100vw - 28px));
}

.wlt-toast {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #bb4629, #ef7649);
  box-shadow: 0 16px 36px rgba(112, 48, 25, 0.24);
}

.wlt-toast[data-tone="cool"] {
  background: linear-gradient(135deg, #3f7ca4, #5ea6ff);
}

.wlt-toast[data-tone="success"] {
  background: linear-gradient(135deg, #4a8769, #6db58f);
}

.wlt-toast-title {
  font-weight: 700;
}

.wlt-toast-copy {
  opacity: 0.92;
  font-size: 0.93rem;
}

.wlt-modal-open {
  overflow: hidden;
}

.wlt-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 999998;
}

.wlt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 15, 11, 0.54);
  backdrop-filter: blur(8px);
}

.wlt-modal {
  position: relative;
  width: min(560px, calc(100vw - 28px));
  margin: 8vh auto 0;
  padding: 28px;
  border-radius: var(--wlt-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.82);
  background:
    radial-gradient(circle at top left, rgba(239, 118, 73, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(255, 250, 244, 0.98), rgba(248, 239, 223, 0.94));
  box-shadow: 0 24px 56px rgba(17, 12, 9, 0.24);
}

.wlt-modal h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  line-height: 1.08;
}

.wlt-modal-copy {
  margin: 14px 0 0;
  color: var(--wlt-muted);
  line-height: 1.78;
}

.wlt-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.wlt-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: var(--wlt-button-radius);
  background: rgba(255, 255, 255, 0.86);
  color: var(--wlt-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 960px) {
  .wlt-tool-shell {
    padding: 16px;
    border-radius: 28px;
  }

  .wlt-layout-grid,
  .wlt-plugin-related__grid,
  .wlt-team-grid {
    grid-template-columns: 1fr;
  }

  .wlt-field-grid,
  .wlt-stat-grid,
  .wlt-mini-grid {
    grid-template-columns: 1fr;
  }

  .wlt-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .wlt-page-intro,
  .wlt-copy-block {
    padding: 18px;
  }

  .wlt-tool-hero,
  .wlt-panel,
  .wlt-plugin-block__inner {
    padding: 18px;
  }

  .wlt-tool-title {
    font-size: 2rem;
  }

  .wlt-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wlt-button {
    width: 100%;
  }

  .wlt-modal {
    padding: 20px;
    margin-top: 6vh;
  }
}
