﻿:root {
  --bg: #ececef;
  --frame: #f23852;
  --ink: #2f3340;
  --gauge-height: 760px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top right, #ffffff, #d8d8dd 65%);
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  overflow: auto;
  padding: 16px;
}

.poster {
  width: 1100px;
  background: var(--bg);
  border: 4px solid var(--frame);
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 16px 44px rgba(30, 30, 50, 0.2);
}

.title-wrap {
  display: inline-flex;
  margin: 0 auto 18px;
  font-size: clamp(1.6rem, 3vw, 3rem);
  font-weight: 900;
  letter-spacing: 0.02em;
}

.title-main {
  background: #f03e55;
  color: #fff;
  padding: 10px 16px;
}

.title-sub {
  background: #bec4ca;
  color: #4f5962;
  padding: 10px 16px;
}

.board {
  display: grid;
  grid-template-columns: 130px minmax(560px, 1fr) minmax(220px, 290px);
  gap: 18px;
  align-items: center;
}

.thermometer {
  height: var(--gauge-height);
  width: 110px;
  border-radius: 55px;
  background: linear-gradient(#c7cdd2, #e8ecef);
  padding: 18px;
  position: relative;
  box-shadow: inset 0 0 0 2px #adb4bc;
}

.track {
  position: absolute;
  left: 50%;
  top: 30px;
  transform: translateX(-50%);
  width: 36px;
  height: calc(100% - 65px);
  border-radius: 18px;
  background: linear-gradient(#fb4659, #3067c7);
}

.fill {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: 36px;
  height: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

.thumb {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 4px solid #eaf1f8;
  background: linear-gradient(145deg, #3180ee, #1b4398);
  box-shadow: 0 8px 18px rgba(27, 67, 152, 0.45);
  cursor: grab;
}

.thumb.is-dragging {
  cursor: grabbing;
  box-shadow: 0 10px 28px rgba(27, 67, 152, 0.65);
}

.mood-list {
  overflow: hidden;
  border-radius: 48px;
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  height: var(--gauge-height);
}

.help-box {
  background: linear-gradient(180deg, #d9dde1, #c9cdd2);
  color: #3d4046;
  border-radius: 44px;
  padding: 26px 24px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.45);
}

.help-box h3 {
  margin: 0 0 14px;
  font-size: 1.8rem;
  line-height: 1.2;
}

.help-box ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 12px;
  font-size: 1.2rem;
  font-weight: 700;
}

.mood {
  padding: 14px 22px;
  color: #fff;
  display: grid;
  align-content: center;
  transition: transform 180ms ease, filter 180ms ease;
  filter: saturate(0.82);
}

.mood h2 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2.2vw, 2.4rem);
  line-height: 1;
}

.mood p {
  margin: 0;
  font-size: clamp(0.88rem, 1.2vw, 1.22rem);
  font-weight: 700;
  line-height: 1.2;
}

.mood.is-active {
  transform: scale(1.015);
  filter: saturate(1);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.4);
}

.mood-0 { background: #f63f55; }
.mood-1 { background: #f08bb0; }
.mood-2 { background: #ffc004; color: #704100; }
.mood-3 { background: #78cb6a; color: #1d5e2f; }
.mood-4 { background: #2fb5ea; color: #0d437d; }
.mood-5 { background: #3167c1; }

.status {
  margin: 16px 0 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.controls {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stop-mail-btn {
  background: #d9182d;
  color: #fff;
  border: 2px solid #a30f1f;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.stop-mail-btn.is-active {
  background: #7a7d83;
  border-color: #5f6368;
}


.code-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(12, 18, 28, 0.55);
  z-index: 1000;
}

.code-modal.is-hidden {
  display: none;
}

.code-modal-card {
  width: min(92vw, 420px);
  background: #ffffff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

.code-modal-card h3 {
  margin: 0 0 8px;
}

.code-modal-card p {
  margin: 0 0 12px;
}

.code-form input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #cad2db;
  border-radius: 8px;
  font-size: 1rem;
}

.code-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.code-confirm,
.code-cancel {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.code-confirm {
  background: #1e64c8;
  color: #fff;
}

.code-cancel {
  background: #e8edf3;
  color: #24344a;
}

.code-error {
  color: #cc1028;
  margin-top: 8px;
  font-weight: 700;
}

.code-error.is-hidden {
  display: none;
}


