.time-feast-view .play-card {
  max-width: 980px;
  min-height: 680px;
  border-color: #bfe8dc;
  background: linear-gradient(180deg, #ffffff 0%, #f3fff9 100%);
}

.time-feast-view .playground {
  min-height: 520px;
  display: block;
  padding: clamp(12px, 3vw, 24px);
  background:
    linear-gradient(135deg, rgba(255, 247, 207, .82), rgba(219, 247, 255, .78)),
    #f8fbff;
}

.time-feast-view .equation {
  display: none;
}

.timefeast-card .activity-icon {
  background: linear-gradient(145deg, #ff9b5c, #2bb59d);
  box-shadow-color: #b95f2e;
  font-size: 40px;
}

.time-feast-game {
  display: grid;
  grid-template-columns: minmax(260px, .95fr) minmax(280px, .8fr);
  gap: 18px;
  align-items: center;
}

.tf-stage {
  display: grid;
  gap: 14px;
  justify-items: center;
  align-content: center;
  min-height: 410px;
}

.tf-clock {
  position: relative;
  width: min(400px, 84vw);
  aspect-ratio: 1;
  border: 10px solid #2f3a54;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 36%, rgba(255,255,255,.95) 0 46%, rgba(255,255,255,0) 72%),
    conic-gradient(from -90deg, #fffae0 0 25%, #eafbff 0 50%, #f9f0ff 0 75%, #eeffe9 0);
  box-shadow:
    0 22px 44px rgba(39, 50, 72, .22),
    inset 0 0 0 6px rgba(255, 255, 255, .9),
    inset 0 0 28px rgba(83, 103, 169, .12);
}

.tf-clock-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.tf-tick-min {
  stroke: #9aa7c2;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.tf-tick-hour {
  stroke: #2f3a54;
  stroke-width: 3.4;
  stroke-linecap: round;
}

.tf-arc {
  fill: none;
  stroke: #2bb59d;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 1 12;
  opacity: .85;
  filter: drop-shadow(0 1px 2px rgba(43, 181, 157, .45));
}

.tf-number {
  position: absolute;
  transform: translate(-50%, -50%);
  color: #2f3a54;
  font-size: 22px;
  font-weight: 1000;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .85);
}

.tf-food {
  position: absolute;
  z-index: 5;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  font-size: 16px;
  box-shadow: 0 5px 12px rgba(39, 50, 72, .16);
  animation: tfFloat 2.6s ease-in-out infinite alternate;
}

.tf-food-hour {
  box-shadow: 0 5px 12px rgba(39, 50, 72, .16), 0 0 0 2px #ff9b5c;
}

.tf-food-minute {
  box-shadow: 0 5px 12px rgba(39, 50, 72, .16), 0 0 0 2px #55bce8;
  animation-delay: -1.3s;
}

.tf-near .tf-food {
  animation: tfPulse .8s ease-in-out infinite alternate;
}

@property --tf-counter {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0deg;
}

.tf-hand {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 33%;
  border-radius: 999px;
  transform-origin: 50% 100%;
  transition:
    transform .5s cubic-bezier(.3, 1.3, .55, 1),
    --tf-counter .5s cubic-bezier(.3, 1.3, .55, 1);
  will-change: transform;
}

.tf-hour-hand {
  height: 26%;
  background: linear-gradient(180deg, #ffb08a 0%, #ff8c62 35%, #bf4e39 100%);
  box-shadow: 0 3px 8px rgba(191, 78, 57, .4), inset 0 0 0 2px rgba(255, 255, 255, .35);
}

.tf-minute-hand {
  height: 42%;
  width: 8px;
  background: linear-gradient(180deg, #8ed6f5 0%, #55bce8 35%, #3567d9 100%);
  box-shadow: 0 3px 8px rgba(53, 103, 217, .4), inset 0 0 0 2px rgba(255, 255, 255, .35);
}

.tf-animal {
  position: absolute;
  left: 50%;
  top: 22px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: white;
  font-size: 18px;
  box-shadow: 0 5px 12px rgba(39, 50, 72, .18);
  transform: translate(-50%, -50%) rotate(var(--tf-counter, 0deg));
}

.tf-food-mini {
  position: absolute;
  right: -9px;
  bottom: -8px;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: white;
  font-size: 12px;
  box-shadow: 0 4px 10px rgba(39, 50, 72, .22), 0 0 0 2px rgba(255, 255, 255, .85);
  opacity: 0;
  transform: scale(0);
  transition: transform .3s cubic-bezier(.3, 1.5, .55, 1) .28s, opacity .2s ease .28s;
  pointer-events: none;
}

.tf-hour-hand .tf-animal {
  box-shadow: 0 5px 12px rgba(39, 50, 72, .18), 0 0 0 2px #ff9b5c;
}

.tf-minute-hand .tf-animal {
  box-shadow: 0 5px 12px rgba(39, 50, 72, .18), 0 0 0 2px #55bce8;
}

.tf-pin {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  border: 5px solid white;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4a5878, #273248 70%);
  box-shadow: 0 3px 8px rgba(39, 50, 72, .35);
}

.tf-arrived .tf-animal,
.time-feast-won .tf-animal {
  animation: tfNibble .62s ease-in-out infinite alternate;
}

.tf-arrived .tf-food,
.time-feast-won .tf-food {
  animation: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.25);
  transition: transform .35s ease, opacity .3s ease;
}

.tf-arrived .tf-food-mini,
.time-feast-won .tf-food-mini {
  opacity: 1;
  transform: scale(1);
}

.tf-arrived .tf-animal::after,
.time-feast-won .tf-animal::after {
  content: "✨";
  position: absolute;
  top: -11px;
  right: -9px;
  font-size: 13px;
  animation: tfSparkle 1s ease-in-out infinite alternate;
}

.tf-duration-board {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min(400px, 100%);
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 10px 20px rgba(39, 50, 72, .1);
  color: #4a5570;
  font-size: 15px;
  font-weight: 900;
}

.tf-dur-chips {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tf-dur-chip {
  padding: 5px 12px;
  border-radius: 12px;
  color: white;
  font-size: 15px;
  white-space: nowrap;
  box-shadow: 0 3px 0 rgba(39, 50, 72, .18);
}

.tf-dur-hour {
  background: linear-gradient(160deg, #ff9b5c, #e2603f);
}

.tf-dur-min {
  background: linear-gradient(160deg, #55bce8, #3567d9);
}

.tf-dur-plus {
  color: #7a86a0;
  font-weight: 1000;
}

.tf-dur-total {
  width: 100%;
  text-align: center;
  color: #7a86a0;
  font-size: 12.5px;
  font-weight: 800;
}

.tf-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 2px solid rgba(39, 50, 72, .08);
  border-radius: 24px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 14px 28px rgba(53, 58, 74, .1);
}

.tf-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  border-radius: 20px;
  background: #e9eef8;
}

.tf-toggle button,
.tf-button-group button,
.tf-win-card button {
  min-height: 56px;
  border: 0;
  border-radius: 16px;
  font-weight: 1000;
  box-shadow: 0 5px 0 rgba(39, 50, 72, .16);
  transition: transform .1s ease, box-shadow .1s ease;
}

.tf-button-group button:active,
.tf-win-card button:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 rgba(39, 50, 72, .16);
}

.tf-toggle button {
  color: #657086;
  background: transparent;
  box-shadow: none;
}

.tf-toggle button.active {
  color: white;
  background: linear-gradient(160deg, #6579e6, #4356c4);
  box-shadow: 0 5px 0 #394cae;
}

.tf-button-group {
  display: grid;
  gap: 8px;
}

.tf-button-group p {
  margin: 0;
  color: #687086;
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: .06em;
  text-transform: uppercase;
}

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

.tf-button-group button {
  color: #273248;
  background: linear-gradient(180deg, #fff8d8, #ffeda8);
}

.tf-answer-card {
  display: grid;
  gap: 15px;
  justify-items: center;
}

.tf-popup {
  padding: 14px;
  border-radius: 18px;
  color: #176e60;
  background: #e8fff5;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 950;
  text-align: center;
}

.tf-answer-hint {
  margin: 0;
  padding: 10px 14px;
  border-radius: 14px;
  color: #7a5a12;
  background: #fff6da;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
}

.tf-time-input {
  display: grid;
  grid-template-columns: 92px auto 92px;
  gap: 10px;
  align-items: center;
  font-size: 34px;
  font-weight: 1000;
}

.tf-time-box {
  width: 92px;
  min-height: 70px;
  border: 3px solid #c9d6ef;
  border-radius: 18px;
  color: #273248;
  background: white;
  text-align: center;
  cursor: pointer;
  font: inherit;
  box-shadow: inset 0 -4px 0 rgba(39, 50, 72, .08);
}

.tf-time-box.active {
  border-color: #5267d9;
  background: #f0f4ff;
  box-shadow: 0 0 0 7px rgba(82, 103, 217, .13), inset 0 -4px 0 rgba(39, 50, 72, .08);
}

.tf-time-box.filled {
  color: #176e60;
  background: #e8f8f3;
  border-color: #2bb59d;
}

.tf-time-box.error {
  border-color: #e2603f;
  background: #fff0ec;
  color: #bf4e39;
}

.tf-numpad {
  width: min(320px, 100%);
}

.tf-numpad .quick-numpad-next {
  font-size: 18px;
}

.tf-win-card button {
  width: 100%;
  color: white;
  background: linear-gradient(160deg, #ff8f7c, #e25a48);
  box-shadow: 0 5px 0 #c94d3e;
}

.tf-answer-card.wrong {
  animation: tfShake .36s ease;
}

.time-feast-win {
  display: grid;
  gap: 18px;
  justify-items: center;
}

.tf-party-clock {
  pointer-events: none;
}

.time-feast-win .time-feast-game {
  grid-template-columns: 1fr;
}

.time-feast-win .tf-panel,
.time-feast-win .tf-duration-board {
  display: none;
}

.time-feast-win .tf-stage {
  min-height: auto;
}

.tf-win-card {
  width: min(440px, 100%);
  padding: 22px;
  border-radius: 24px;
  background: white;
  box-shadow: 0 14px 28px rgba(53, 58, 74, .12);
  text-align: center;
}

.tf-win-card strong {
  display: block;
  font-size: 34px;
}

.tf-win-card p {
  margin: 8px 0 0;
  color: #687086;
  font-size: 18px;
  font-weight: 800;
}

.tf-win-card .tf-lesson {
  margin: 10px 0 16px;
  padding: 10px 14px;
  border-radius: 14px;
  color: #176e60;
  background: #e8fff5;
  font-size: 15px;
  line-height: 1.45;
}

@keyframes tfShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

@keyframes tfNibble {
  from { transform: translate(-50%, -50%) rotate(var(--tf-counter, 0deg)) scale(1); }
  to { transform: translate(-50%, -50%) rotate(calc(var(--tf-counter, 0deg) + 4deg)) scale(1.12); }
}

@keyframes tfFloat {
  from { transform: translate(-50%, -50%) translateY(-1.5px); }
  to { transform: translate(-50%, -50%) translateY(1.5px); }
}

@keyframes tfPulse {
  from { transform: translate(-50%, -50%) scale(1); }
  to { transform: translate(-50%, -50%) scale(1.18); }
}

@keyframes tfSparkle {
  from { opacity: .4; transform: scale(.8) rotate(-8deg); }
  to { opacity: 1; transform: scale(1.15) rotate(10deg); }
}

@media (max-width: 760px) {
  .time-feast-game {
    grid-template-columns: 1fr;
  }
  .tf-stage {
    min-height: auto;
  }
  .tf-clock {
    width: min(340px, 88vw);
  }
  .tf-panel {
    padding: 14px;
  }
  .tf-number {
    font-size: 19px;
  }
}

@media (max-width: 460px) {
  .time-feast-view .play-card {
    min-height: 640px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .time-feast-view .playground {
    min-height: 500px;
    padding-left: 8px;
    padding-right: 8px;
  }
  .tf-toggle {
    grid-template-columns: 1fr;
  }
  .tf-minute-group {
    gap: 7px;
  }
  .tf-button-group button,
  .tf-toggle button {
    min-height: 52px;
    font-size: 15px;
  }
  .tf-time-input {
    grid-template-columns: 78px auto 78px;
  }
  .tf-time-box {
    width: 78px;
    min-height: 62px;
  }
  .tf-duration-board {
    font-size: 13.5px;
  }
  .tf-dur-chip {
    font-size: 13.5px;
    padding: 4px 10px;
  }
}
