* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Nunito", "Avenir", "Segoe UI", sans-serif;
  background: #e7f7fa;
  color: #163d4d;
}

.page-layout {
  min-height: 100vh;
}

.prototype-area {
  width: 100%;
  min-height: 100vh;
  padding: 24px;
  display: flex;
  justify-content: center;
  background: linear-gradient(135deg, #d9f5f8, #dceeff);
}

.app {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: #f8fdff;
  box-shadow: 0 0 30px rgba(0, 80, 110, 0.14);
}

header {
  height: 70px;
  padding: 0 18px;
  background: linear-gradient(135deg, #008c95, #2474b8);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header h1 {
  font-size: 1.1rem;
  margin: 0;
}

header button,
.menu-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
}

.screen {
  display: none;
  padding: 22px;
  animation: fadeIn 0.35s ease;
}

.screen.active {
  display: block;
}

h2 {
  margin-top: 8px;
  font-size: 1.7rem;
  color: #17465c;
}

h3,
h4 {
  color: #17465c;
}

.subtitle {
  color: #5c7882;
  line-height: 1.5;
}

.choice-card,
.practice,
.insight-card,
.graph-card,
.list-item,
.function-card,
.prompt-card,
.reflection-card,
.summary-card {
  background: white;
  border-radius: 22px;
  padding: 18px;
  margin: 16px 0;
  box-shadow: 0 10px 25px rgba(0, 80, 110, 0.08);
  border: 1px solid #ccecf2;
}

.choice-card {
  display: flex;
  gap: 16px;
  align-items: center;
  cursor: pointer;
}

.choice-card:hover,
.practice:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(0, 80, 110, 0.14);
}

.choice-card.teal {
  background: linear-gradient(135deg, #e3fbfb, #ffffff);
}

.choice-card.blue {
  background: linear-gradient(135deg, #e8f3ff, #ffffff);
}

.icon {
  font-size: 2.4rem;
}

label {
  display: block;
  margin-top: 16px;
  margin-bottom: 6px;
  font-weight: 700;
  color: #17465c;
}

input,
textarea,
select {
  width: 100%;
  padding: 13px;
  border-radius: 14px;
  border: 1px solid #b7dfe8;
  font-family: inherit;
  font-size: 1rem;
  background: white;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

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

.toggle-row button {
  flex: 1;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid #b7dfe8;
  background: white;
  font-weight: 700;
  cursor: pointer;
}

.impact-building.selected {
  background: #2fa66a;
  color: white;
}

.impact-maintained.selected {
  background: #2474b8;
  color: white;
}

.impact-draining.selected {
  background: #d95f59;
  color: white;
}

.primary,
.secondary,
.back {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  border-radius: 16px;
  border: none;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
}

.primary {
  background: linear-gradient(135deg, #008c95, #2474b8);
  color: white;
}

.secondary {
  background: #e8f3ff;
  color: #2474b8;
  border: 1px solid #b7dfe8;
}

.back {
  width: auto;
  background: transparent;
  color: #2474b8;
  padding-left: 0;
}

.table-wrap {
  overflow-x: auto;
}

.activity-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: white;
  border-radius: 14px;
  overflow: hidden;
  font-size: 0.82rem;
}

.activity-table th,
.activity-table td {
  border: 1px solid #ccecf2;
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

.activity-table th {
  background: #e3fbfb;
  color: #17465c;
}

.chart-row {
  margin: 14px 0;
}

.chart-label {
  font-size: 0.85rem;
  margin-bottom: 5px;
  color: #17465c;
}

.bar {
  height: 18px;
  border-radius: 20px;
  margin: 4px 0;
}

.bar-building {
  background: #2fa66a;
}

.bar-maintained {
  background: #2474b8;
}

.bar-draining {
  background: #d95f59;
}

.practice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.practice span {
  color: #5c7882;
  font-size: 0.9rem;
}

.media-box {
  height: 260px;
  margin-top: 24px;
  border-radius: 26px;
  background: linear-gradient(135deg, #00a7a7, #2474b8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  box-shadow: 0 12px 28px rgba(0, 80, 110, 0.16);
}

.play {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: #2474b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 12px;
}

.low-fidelity-section,
.core-function-section,
.function-mapping-section,
.javascript-generation-section,
.prototype-summary-section {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid #ccecf2;
}

.prototype-image-card {
  width: 100%;
  background: white;
  border-radius: 18px;
  padding: 10px;
  box-shadow: 0 8px 20px rgba(0, 80, 110, 0.08);
  border: 1px solid #ccecf2;
  overflow: hidden;
}

.prototype-image-card img {
  width: 100%;
  display: block;
  border-radius: 12px;
}

.code-block {
  background: #173447;
  color: #d9f7ff;
  border-radius: 16px;
  padding: 18px;
  overflow-x: auto;
  margin-top: 12px;
}

.code-block pre {
  margin: 0;
  font-family: "Courier New", monospace;
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.ai-options {
  background: white;
  border: 1px solid #ccecf2;
  border-radius: 18px;
  padding: 16px;
  margin-top: 16px;
  box-shadow: 0 8px 20px rgba(0, 80, 110, 0.06);
}

.ai-options p {
  color: #17465c;
  line-height: 1.4;
}

.hidden {
  display: none;
}

.saved-msg,
.note {
  color: #5c7882;
  text-align: center;
  margin-top: 18px;
}

.saved-msg {
  font-weight: 700;
  color: #008c95;
}

.summary-card a {
  color: #2474b8;
  word-break: break-word;
}

.summary-card p {
  color: #5c7882;
  line-height: 1.5;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

@media (max-width: 760px) {
  .prototype-area {
    padding: 12px;
  }

  .app {
    min-height: auto;
  }
}