* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  background-color: #FCFBF7;
  overflow: hidden;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.app {
  position: relative;
  width: 1420px;
  height: 2178px;
  flex-shrink: 0;
  transform-origin: center center;
}

/* ─── Timer display ─────────────────────── */

.timer-display {
  position: absolute;
  top: 32%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;   /* 只有可編輯的字才開啟 pointer */
}

.phase-label {
  font-family: 'Cookie', cursive;
  font-size: 80px;
  line-height: 1;
  color: #A89A6E;
  margin-bottom: 4px;
}

#timer-text {
  font-family: 'Cookie', cursive;
  font-size: 240px;
  line-height: 1;
  color: #75663F;
}

.break-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 24px;
}

.break-label {
  font-family: 'Cookie', cursive;
  font-size: 64px;
  line-height: 1;
  color: #A89A6E;
}

.break-text {
  font-family: 'Cookie', cursive;
  font-size: 120px;
  line-height: 1;
  color: #75663F;
}

/* ─── Editable (idle) ───────────────────── */

#timer-text.editable,
.break-text.editable {
  pointer-events: auto;
  cursor: text;
  border: 6px dashed #C9BE97;
  border-radius: 28px;
  padding: 0 28px;
  outline: none;
  transition: background 0.15s ease;
}

#timer-text.editable:hover,
.break-text.editable:hover {
  background: rgba(201, 190, 151, 0.15);
}

/* ─── Buttons ───────────────────────────── */

.btn {
  position: absolute;
  z-index: 20;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.btn img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: transform 0.15s ease;
}

.btn:hover img { transform: scale(1.05); }

.btn:active img { animation: btn-press 0.3s ease forwards; }

@keyframes btn-press {
  0%   { transform: scale(1); }
  30%  { transform: scale(0.95); }
  60%  { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* ─── Button positions ─────────────────── */

.btn-start {
  bottom: 240px;
  left: 50%;
  transform: translateX(-50%);
}

.btn-pause {
  bottom: 240px;
  left: 35%;
  transform: translateX(-50%);
  display: none;
}

.btn-end {
  bottom: 240px;
  left: 65%;
  transform: translateX(-50%);
  display: none;
}

.btn-mute {
  top: 240px;
  right: 80px;
}