/* ============================================================ Chuckles' phone (bottom-right) */
.cc-phone {
  position: fixed;
  right: 22px;
  bottom: 0;
  width: 286px;
  z-index: 20;
  transform: translateY(calc(100% - 64px)) rotate(2deg);
  transform-origin: 50% 100%;
  transition: transform 0.45s cubic-bezier(0.34, 1.45, 0.64, 1);
  font-family: var(--font);
}
.cc-phone.popped { transform: translateY(-16px) rotate(0deg); }
.cc-phone.off { transform: translateY(110%); }
.cc-phone.buzz .cc-phone-shell { animation: cc-buzz 0.6s linear 2; }
@keyframes cc-buzz {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  10% { transform: translate(-3px, 0) rotate(-2deg); }
  20% { transform: translate(3px, -1px) rotate(2deg); }
  30% { transform: translate(-3px, 0) rotate(-1.5deg); }
  40% { transform: translate(3px, 0) rotate(1.5deg); }
  50% { transform: translate(-2px, 0) rotate(-1deg); }
  60% { transform: translate(2px, 0) rotate(1deg); }
  70%, 90% { transform: translate(0, 0) rotate(0); }
}

.cc-phone-shell {
  position: relative;
  background: #1c2140;
  border: 3px solid var(--ink);
  border-radius: 34px;
  padding: 10px 10px 16px;
  box-shadow: 5px 5px 0 var(--ink), inset 0 0 0 3px #3a4170;
}
/* side buttons */
.cc-phone-shell::before,
.cc-phone-shell::after {
  content: "";
  position: absolute;
  width: 6px;
  border: 3px solid var(--ink);
  background: #3a4170;
  border-radius: 4px;
}
.cc-phone-shell::before { left: -9px; top: 70px; height: 34px; }
.cc-phone-shell::after { right: -9px; top: 90px; height: 54px; }

.cc-ph-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  padding: 0 12px;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(160deg, #ffe27a, var(--yolk) 50%, var(--yolk-deep));
  border: 2px solid var(--ink);
  border-bottom: 0;
  font: 800 12px/1 var(--font-display);
  color: var(--ink);
}
.cc-ph-carrier { opacity: 0.75; font-size: 10px; letter-spacing: 0.5px; }
.cc-ph-notch {
  width: 70px;
  height: 18px;
  background: var(--ink);
  border-radius: 10px;
}
.cc-ph-clock { min-width: 34px; text-align: right; }

.cc-ph-screen {
  position: relative;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.55), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(255, 60, 150, 0.35), transparent 45%),
    linear-gradient(170deg, var(--yolk) 0%, #ffb547 45%, #ff8a5c 100%);
  border: 2px solid var(--ink);
  border-top: 0;
  border-radius: 0 0 22px 22px;
  padding: 0 10px 10px;
  min-height: 24px;
  max-height: calc(100vh - 150px);
  overflow: hidden;
}
.cc-ph-homebar {
  width: 90px;
  height: 5px;
  border-radius: 3px;
  background: #5a628f;
  margin: 8px auto 0;
}

/* tucked peek line */
.cc-ph-peek {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 22px;
  font: 800 12px/1 var(--font-display);
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
}
.cc-ph-peek-text { overflow: hidden; text-overflow: ellipsis; }
.cc-phone.popped .cc-ph-peek { display: none; }

/* everything else is hidden until its state */
.cc-ph-lock, .cc-ph-notif, .cc-ph-card, .cc-ph-result { display: none; }
.cc-phone.s-offer .cc-ph-lock,
.cc-phone.s-chat .cc-ph-lock,
.cc-phone.s-offer .cc-ph-notif,
.cc-phone.s-chat .cc-ph-notif,
.cc-phone.s-offer .cc-ph-card,
.cc-phone.s-result .cc-ph-result { display: block; }

.cc-ph-lock { text-align: center; color: var(--ink); padding: 8px 0 6px; }
.cc-ph-lockdate { font: 700 12px/1.2 var(--font); opacity: 0.75; }
.cc-ph-locktime {
  font: 900 46px/1 var(--font-display);
  letter-spacing: -1px;
  color: #fff;
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 3px 3px 0 var(--ink);
}

/* lock-screen notification */
.cc-phone .cc-ph-notif {
  display: none;
  background: rgba(255, 248, 231, 0.97);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 3px 3px 0 var(--ink);
  padding: 9px 10px;
  margin-bottom: 9px;
  animation: cc-drop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cc-phone.s-offer .cc-ph-notif,
.cc-phone.s-chat .cc-ph-notif { display: flex; gap: 9px; align-items: flex-start; }
@keyframes cc-drop { from { transform: translateY(-24px) scale(0.9); opacity: 0; } }
.cc-ph-nicon {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 11px;
  box-shadow: 2px 2px 0 var(--ink);
}
.cc-phone.s-offer .cc-ph-nicon { box-shadow: 0 0 0 3px var(--hot), 2px 2px 0 3px var(--ink); }
.cc-ph-nbody { min-width: 0; flex: 1; }
.cc-ph-ntop { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.cc-ph-nfrom { font: 900 13px/1.2 var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-ph-nnow { font-size: 11px; font-weight: 700; opacity: 0.55; flex: none; }
.cc-ph-ntext { font: 600 12.5px/1.3 var(--font); margin-top: 2px; }

/* mission card */
.cc-ph-card {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 3px 3px 0 var(--ink);
  padding: 10px 10px 0;
  overflow: hidden;
  animation: cc-drop 0.5s 0.12s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
.cc-ph-ctitle { font: 900 18px/1.1 var(--font-display); letter-spacing: -0.3px; }
.cc-ph-cvenue { font: 700 12.5px/1.25 var(--font); margin-top: 3px; opacity: 0.8; }
.cc-ph-cdiff { font: 800 11px/1 var(--font-display); margin-top: 6px; color: #b07800; letter-spacing: 0.3px; }
.cc-ph-cstats { display: flex; gap: 6px; margin-top: 8px; }
.cc-ph-stat {
  flex: 1;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 10px;
  text-align: center;
  padding: 5px 2px 4px;
}
.cc-ph-stat b { display: block; font: 900 16px/1.1 var(--font-display); white-space: nowrap; }
.cc-ph-stat small { display: block; font: 700 9.5px/1.2 var(--font); opacity: 0.65; text-transform: uppercase; letter-spacing: 0.3px; }
.cc-ph-stat:nth-child(2) b { color: var(--hot); }
.cc-ph-stat:nth-child(3) b { color: #179a3e; }
.cc-ph-btns { display: flex; gap: 8px; margin: 10px 0 10px; }
.cc-ph-btn {
  flex: 1;
  font: 900 15px/1 var(--font-display);
  border: 3px solid var(--ink);
  border-radius: 12px;
  padding: 9px 4px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  transition: transform 0.08s;
}
.cc-ph-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.cc-ph-btn kbd {
  display: inline-block;
  font: 800 10px/1 var(--font);
  background: rgba(255, 255, 255, 0.7);
  border: 1.5px solid var(--ink);
  border-radius: 5px;
  padding: 2px 4px;
  vertical-align: 2px;
  margin-right: 3px;
}
.cc-accept { background: var(--leaf); flex: 1.4; animation: cc-throb 1s ease-in-out infinite alternate; }
.cc-skip { background: #e4e0d6; }
@keyframes cc-throb { to { transform: scale(1.04); } }
.cc-ph-expiry { height: 6px; margin: 0 -10px; background: #eee6d2; border-top: 2px solid var(--ink); }
.cc-ph-expiry i { display: block; height: 100%; background: var(--sky); transform-origin: 0 50%; }
.cc-ph-expiry.low i { background: var(--danger); }

/* result card */
.cc-ph-result {
  position: relative;
  margin-top: 10px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 3px 3px 0 var(--ink);
  padding: 12px 12px 10px;
  text-align: center;
  cursor: pointer;
  pointer-events: auto;
}
.cc-ph-stamp {
  display: inline-block;
  font: 900 26px/1 var(--font-display);
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border: 4px solid currentColor;
  border-radius: 10px;
  transform: rotate(-6deg);
  margin: 4px 0 8px;
  animation: cc-stamp 0.5s cubic-bezier(0.2, 1.8, 0.5, 1) backwards 0.15s;
  background: rgba(255, 255, 255, 0.6);
}
@keyframes cc-stamp { from { transform: rotate(-20deg) scale(2.6); opacity: 0; } }
.r-win .cc-ph-stamp { color: #179a3e; }
.r-late .cc-ph-stamp { color: #d98a00; font-size: 21px; }
.r-fail .cc-ph-stamp { color: var(--danger); }
.cc-ph-rtitle { font: 900 14px/1.2 var(--font-display); }
.cc-ph-rline { font: 600 12.5px/1.35 var(--font); margin: 6px 0 8px; }
.cc-ph-rrows { border-top: 2px dashed rgba(18, 22, 42, 0.35); padding-top: 6px; }
.cc-ph-rrow { display: flex; justify-content: space-between; font: 700 12.5px/1.6 var(--font); }
.cc-ph-rrow b { font-family: var(--font-display); }
.cc-ph-rrow.total { font-size: 15px; border-top: 2px solid var(--ink); margin-top: 3px; padding-top: 2px; }
.cc-ph-rrow.total b { color: #179a3e; }
.r-fail .cc-ph-rrow.total b { color: var(--danger); }
.r-fail .cc-ph-rrows { border-top: 0; }
.cc-ph-rrow.streak b { color: var(--hot); }
.cc-ph-rstub {
  margin-top: 9px;
  background: var(--hot);
  color: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  padding: 6px 8px;
  font: 800 11.5px/1.3 var(--font-display);
  transform: rotate(1.5deg);
  box-shadow: 2px 2px 0 var(--ink);
}

/* ============================================================ mission tracker (top-centre) */
.cc-mt {
  position: fixed;
  top: 14px;
  left: 50%;
  width: min(440px, calc(100vw - 560px));
  min-width: 320px;
  transform: translateX(-50%);
  z-index: 10;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 8px 12px 9px;
  color: var(--ink);
  font-family: var(--font);
  transition: background 0.25s;
}
.cc-mt.hidden { display: none; }
.cc-mt.pop { animation: cc-mt-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes cc-mt-in { from { transform: translate(-50%, -140%); } }
.cc-mt-head { display: flex; align-items: center; gap: 8px; }
.cc-mt-emoji {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 19px;
  background: var(--yolk);
  border: 2.5px solid var(--ink);
  border-radius: 10px;
}
.cc-mt-title {
  flex: 1;
  min-width: 0;
  font: 900 17px/1.1 var(--font-display);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cc-mt-bail {
  position: relative;
  overflow: hidden;
  flex: none;
  font: 800 11px/1 var(--font-display);
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 4px 7px;
  cursor: pointer;
  opacity: 0.7;
}
.cc-mt-bail:hover { opacity: 1; background: #ffe1e4; }
.cc-mt-bail i { position: absolute; inset: 0; background: var(--danger); transform: scaleX(0); transform-origin: 0 50%; }
.cc-mt-bail span { position: relative; }
.cc-mt-obj { font: 700 13px/1.3 var(--font); margin: 5px 0 6px; }
.cc-mt-row { display: flex; gap: 8px; align-items: stretch; }
.cc-mt-cell {
  flex: 1;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 3px 8px 4px;
  text-align: center;
}
.cc-mt-cell small { display: block; font: 800 9.5px/1.3 var(--font); text-transform: uppercase; letter-spacing: 0.4px; opacity: 0.6; white-space: nowrap; }
.cc-mt-cell b { display: block; font: 900 18px/1.1 var(--font-display); }
.cc-mt-clock { flex: 1.5; background: var(--yolk); }
.cc-mt-clock b { font-size: 28px; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.cc-mt-reward b { color: #179a3e; }
.cc-mt.urgent .cc-mt-clock { background: var(--hot); color: #fff; animation: cc-urgent 0.5s ease-in-out infinite alternate; }
.cc-mt.urgent .cc-mt-clock small { opacity: 0.9; }
@keyframes cc-urgent { to { transform: scale(1.07); } }
.cc-mt.late { background: #ffd9dc; }
.cc-mt.late .cc-mt-clock { background: var(--danger); color: #fff; }
.cc-mt.late .cc-mt-clock small { opacity: 0.95; }
.cc-mt.late .cc-mt-reward b { color: #b06a00; }

.cc-mt-pips { display: flex; align-items: center; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.cc-pip {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 15px;
  border: 2px dashed rgba(18, 22, 42, 0.45);
  border-radius: 50%;
  filter: grayscale(1);
  opacity: 0.45;
}
.cc-pip.got { filter: none; opacity: 1; border: 2px solid var(--ink); background: var(--yolk); }
.cc-pip.fresh { animation: cc-pip 0.45s cubic-bezier(0.2, 1.8, 0.5, 1); }
@keyframes cc-pip { from { transform: scale(2); } }
.cc-pip-count { font: 900 12px/1 var(--font-display); margin-left: 4px; }

.cc-mt-legs { display: flex; align-items: center; margin-top: 7px; }
.cc-leg {
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font: 900 11px/1 var(--font-display);
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  opacity: 0.6;
}
.cc-leg.cur { background: var(--hot); color: #fff; opacity: 1; transform: scale(1.15); }
.cc-leg.done { background: var(--leaf); color: #fff; opacity: 1; }
.cc-leg-line { flex: 1; height: 3px; background: rgba(18, 22, 42, 0.25); margin: 0 3px; border-radius: 2px; }
.cc-leg-line.on { background: var(--ink); }

/* ============================================================ smaller screens */
@media (max-height: 780px) {
  .cc-phone.popped { transform: translateY(-6px); }
  .cc-phone-shell { padding: 8px 8px 12px; }
  .cc-ph-homebar { margin-top: 6px; }
  .cc-ph-ntext { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .cc-ph-stat b { font-size: 14px; }
  .cc-phone.s-offer .cc-ph-lock { display: none; }
  .cc-phone.s-offer .cc-ph-notif { margin-top: 8px; }
  .cc-ph-locktime { font-size: 32px; }
  .cc-ph-lock { padding: 5px 0 4px; }
  .cc-ph-ctitle { font-size: 16px; }
  .cc-ph-cstats { margin-top: 6px; }
  .cc-phone .cc-ph-notif { margin-bottom: 7px; padding: 7px 9px; }
  .cc-ph-ntext { font-size: 12px; }
  .cc-ph-btns { margin: 8px 0; }
}
@media (max-width: 1180px) {
  .cc-phone { width: 262px; right: 16px; }
  .cc-mt { width: min(400px, calc(100vw - 480px)); min-width: 300px; }
  .cc-mt-title { font-size: 15px; }
}
