* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --grad: linear-gradient(135deg, #ff9a56 0%, #ff6188 40%, #a05cff 100%);
  --card: #ffffff;
  --ink: #2d2440;
  --accent: #ff6188;
  --accent2: #a05cff;
  --chip: #f3edff;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  background: var(--grad);
  background-attachment: fixed;
  color: var(--ink);
  display: flex;
  justify-content: center;
  padding: 24px 12px 48px;
}

.bg-emoji {
  position: fixed;
  font-size: 40vmin;
  opacity: 0.08;
  right: -8vmin;
  bottom: -8vmin;
  pointer-events: none;
  user-select: none;
}

.container { width: 100%; max-width: 640px; position: relative; }

.header { text-align: center; color: #fff; margin-bottom: 20px; }
.header h1 { font-size: 2.4rem; text-shadow: 0 3px 12px rgba(0,0,0,.25); }
.subtitle { opacity: .92; margin-top: 6px; font-size: .95rem; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 16px; }
.tab {
  border: none; cursor: pointer; padding: 10px 16px; border-radius: 24px;
  background: rgba(255,255,255,.25); color: #fff; font-size: 1rem; font-weight: 600;
  backdrop-filter: blur(4px); transition: transform .15s, background .15s;
}
.tab:hover { transform: translateY(-2px); }
.tab.active { background: #fff; color: var(--accent); box-shadow: 0 4px 14px rgba(0,0,0,.18); }

.panel {
  background: var(--card); border-radius: 20px; padding: 22px;
  box-shadow: 0 10px 32px rgba(45,36,64,.25); animation: pop .25s ease;
}
.hidden { display: none !important; }
@keyframes pop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }

label { display: block; font-weight: 700; margin: 12px 0 6px; font-size: .92rem; }
label:first-child { margin-top: 0; }

input[type="text"] {
  width: 100%; padding: 12px 14px; border: 2px solid #e8e0f7; border-radius: 12px;
  font-size: 1.05rem; outline: none; transition: border-color .15s;
}
input[type="text"]:focus { border-color: var(--accent2); }
input[type="range"] { width: 100%; accent-color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 2px solid transparent; background: var(--chip); color: var(--ink);
  padding: 8px 14px; border-radius: 20px; cursor: pointer; font-size: .95rem;
  transition: all .15s;
}
.chip:hover { border-color: var(--accent2); }
.chip.active { background: var(--accent2); color: #fff; font-weight: 700; }

.go {
  width: 100%; margin-top: 18px; padding: 14px; border: none; border-radius: 14px;
  background: var(--grad); color: #fff; font-size: 1.15rem; font-weight: 800;
  cursor: pointer; transition: transform .12s, filter .12s;
  box-shadow: 0 6px 18px rgba(255,97,136,.4);
}
.go:hover { transform: translateY(-2px); filter: brightness(1.06); }
.go:active { transform: translateY(0); }
.go:disabled { opacity: .6; cursor: wait; }

.daily-hint { font-size: .95rem; color: #6d6386; }

.result {
  margin-top: 16px; background: var(--card); border-radius: 20px; padding: 22px;
  box-shadow: 0 10px 32px rgba(45,36,64,.25); animation: pop .25s ease;
  border-left: 6px solid var(--accent);
}
.result-text { font-size: 1.15rem; line-height: 1.55; white-space: pre-wrap; }
.result-text .caption-item { display: block; padding: 8px 0; border-bottom: 1px dashed #e8e0f7; }
.result-text .caption-item:last-child { border-bottom: none; }
.result-meta { margin-top: 10px; font-size: .8rem; color: #9a90b5; }
.result-actions { display: flex; gap: 10px; margin-top: 14px; }
.again, .copy {
  flex: 1; padding: 11px; border: none; border-radius: 12px; cursor: pointer;
  font-size: 1rem; font-weight: 700; transition: transform .12s;
}
.again { background: var(--accent2); color: #fff; }
.copy { background: var(--chip); color: var(--ink); }
.again:hover, .copy:hover { transform: translateY(-2px); }

.result.refused { border-left-color: #f5b301; }

.footer { text-align: center; color: rgba(255,255,255,.85); margin-top: 22px; font-size: .85rem; }
#health-dot { color: #59e08f; }
#health-dot.bad { color: #ff5c5c; }

@media (max-width: 480px) {
  .header h1 { font-size: 1.8rem; }
  .tab { padding: 8px 12px; font-size: .9rem; }
  .panel, .result { padding: 16px; border-radius: 16px; }
  body { padding: 14px 8px 32px; }
}
