:root {
  --bg-top: #9DB5C0;
  --bg-bottom: #B8C9D1;
  --card: #F5EFE6;
  --card-soft: #EFE7DA;
  --text: #3A3A3A;
  --text-soft: #6B6B6B;
  --accent: #7C9EAE;
  --accent-deep: #5F8392;
  --accent-warm: #C9B79C;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.header {
  text-align: center;
  padding: 16px 0 24px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.header h1 {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: 0.02em;
}

.subtitle {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.9;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.card-title {
  margin: 0 0 16px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.play-btn {
  width: 100%;
  min-height: 96px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(95, 131, 146, 0.35);
  transition: transform 0.08s ease, box-shadow 0.2s ease, background 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.play-btn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 6px rgba(95, 131, 146, 0.3);
}

.play-btn.playing {
  background: linear-gradient(180deg, #C9B79C 0%, #A8946F 100%);
  box-shadow: 0 4px 12px rgba(168, 148, 111, 0.4);
}

.play-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.control {
  margin-top: 22px;
}

.control label,
.control-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-soft);
  margin-bottom: 10px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: var(--card-soft);
  border-radius: 999px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-deep);
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-deep);
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.timer-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.timer-btn {
  min-height: 56px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: var(--card-soft);
  color: var(--text-soft);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.timer-btn:active {
  transform: scale(0.97);
}

.timer-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-deep);
}

.timer-status {
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: var(--text-soft);
  text-align: center;
  min-height: 1.2em;
}

.video-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.footer {
  text-align: center;
  color: #fff;
  opacity: 0.85;
  font-size: 0.8rem;
  margin-top: 8px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.footer p {
  margin: 0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-top: #4F6470;
    --bg-bottom: #3D4C56;
  }
}
