:root {
  color-scheme: light;
  --bg-top: #f4efe4;
  --bg-bottom: #dce9f0;
  --ink: #112233;
  --muted: #546371;
  --card: rgba(255, 255, 255, 0.74);
  --line: rgba(17, 34, 51, 0.08);
  --accent: #d5542f;
  --accent-2: #1f7a8c;
  --accent-3: #f2b134;
  --accent-4: #6b8e23;
  --shadow: 0 18px 42px rgba(17, 34, 51, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans TC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(242, 177, 52, 0.25), transparent 32%),
    radial-gradient(circle at top right, rgba(31, 122, 140, 0.16), transparent 30%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

.page-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.hero-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 32px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) 190px minmax(320px, 1.2fr);
  align-items: stretch;
  gap: 28px;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -60px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(213, 84, 47, 0.28), transparent 68%);
}

.hero-header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 4vw, 4.6rem);
  line-height: 0.95;
}

.qr-card {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(17, 34, 51, 0.08);
}

.qr-card img {
  display: block;
  width: 180px;
  height: 180px;
  border-radius: 14px;
  background: white;
}

.response-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.response-card textarea {
  min-height: 150px;
}

.response-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

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

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--accent), #e98235);
  box-shadow: 0 10px 24px rgba(213, 84, 47, 0.3);
}

.secondary-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(17, 34, 51, 0.1);
}

.danger-button {
  color: #8f2513;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(143, 37, 19, 0.24);
}

.lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 20px;
  margin-top: 20px;
}

.panel {
  padding: 24px;
}

.panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.panel-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 800;
}

textarea {
  width: 100%;
  border: 1px solid rgba(17, 34, 51, 0.12);
  border-radius: 22px;
  padding: 18px;
  resize: vertical;
  font: inherit;
  line-height: 1.8;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
}

textarea:focus {
  outline: 2px solid rgba(31, 122, 140, 0.28);
  border-color: rgba(31, 122, 140, 0.3);
}

.hint,
.summary-text {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.status-text {
  margin: 14px 0 0;
  color: var(--accent-2);
  font-size: 0.95rem;
  font-weight: 700;
}

.top-words {
  margin: 10px 0 0;
  padding-left: 22px;
  line-height: 1.85;
}

.top-words li {
  padding-right: 8px;
}

.cloud-panel {
  margin-top: 20px;
}

.feedback-panel {
  min-height: 100%;
}

.response-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.response-list li {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(17, 34, 51, 0.08);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.cloud-canvas {
  position: relative;
  min-height: 460px;
  border-radius: 28px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(247, 250, 252, 0.88)),
    linear-gradient(90deg, rgba(17, 34, 51, 0.03) 1px, transparent 1px),
    linear-gradient(rgba(17, 34, 51, 0.03) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
  border: 1px solid rgba(17, 34, 51, 0.08);
}

.footer-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding: 20px 4px 0;
}

.designer-credit {
  color: var(--muted);
  font-size: 0.95rem;
  text-align: right;
}

.designer-credit a {
  color: var(--accent-2);
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.cloud-word {
  position: absolute;
  left: 50%;
  top: 50%;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  transform-origin: center;
  animation: rise-in 480ms ease both;
  text-shadow: 0 4px 12px rgba(17, 34, 51, 0.08);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
  }
  to {
    opacity: 1;
  }
}

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

  .qr-card img {
    width: 168px;
    height: 168px;
  }

  .response-actions {
    grid-template-columns: 1fr;
  }

  .response-actions .primary-button {
    width: 100%;
  }

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

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

  .footer-panel button {
    width: 100%;
  }

  .designer-credit {
    text-align: center;
  }

  .hero-card,
  .panel {
    border-radius: 24px;
  }

  .cloud-canvas {
    min-height: 380px;
  }
}
