/* WHITEOUT tasks: tracker chip, toast, task log, offer + turn-in cards. Same chip language as ui.css. */
#task-chip {
  position: fixed;
  left: 14px;
  top: calc(116px + env(safe-area-inset-top));
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(340px, calc(100vw - 100px));
  height: auto;
  min-height: 40px;
  padding: 5px 12px 5px 7px;
  border-radius: 999px;
  text-align: left;
  font-size: 12px;
  letter-spacing: 0;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.25);
  pointer-events: auto;
  touch-action: manipulation;
  cursor: pointer;
}
#task-chip[hidden] { display: none; }
#task-chip:active { background: #E3F2FC; }
.tk-cwords { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.tk-cwords b { font: 700 13px "Cooper Hewitt", sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-cwords span { font: 600 11px "Avenir Next", system-ui, sans-serif; color: #003FBA; }
body.titled #task-chip, body.in-arcade #task-chip, body.decorating #task-chip { visibility: hidden; }

/* the gold ticket */
.tk-ticket {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 21px;
  background: #F2C94C;
  border: 2px solid #000;
  border-radius: 4px;
  font: 700 13px "Cooper Hewitt", sans-serif;
  color: #000;
  position: relative;
  -webkit-mask: radial-gradient(circle 4px at 0 50%, #0000 97%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 4px at 100% 50%, #0000 97%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 4px at 0 50%, #0000 97%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 4px at 100% 50%, #0000 97%, #000) right / 51% 100% no-repeat;
}
.tk-ticket.ready { background: #34A1E5; }
.tk-ticket.ledger { background: #fff; }

/* toast */
.task-toast {
  position: fixed;
  left: 50%;
  top: calc(66px + env(safe-area-inset-top));
  transform: translate(-50%, calc(-100% - 90px));
  z-index: 21;
  background: #F2C94C;
  border: 3px solid #000;
  border-radius: 16px;
  padding: 7px 16px 8px;
  max-width: min(440px, calc(100vw - 28px));
  display: flex; flex-direction: column; align-items: center; text-align: center;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
  transition: transform 0.35s cubic-bezier(.2, 1.4, .4, 1);
  pointer-events: none;
}
.task-toast.show { transform: translate(-50%, 0); }
.task-toast:empty { display: none; }
.task-toast b { font: 700 15px "Cooper Hewitt", sans-serif; line-height: 1.15; }
.task-toast span { font: 600 12px "Avenir Next", system-ui, sans-serif; margin-top: 1px; }

/* shared card bits */
.tk-card { max-width: 640px !important; }
.tk-pips { display: inline-flex; gap: 3px; flex: none; }
.tk-pips i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid #000; background: #fff; display: block; }
.tk-pips i.on { background: #003FBA; }
.tk-pay { font: 700 13px "Cooper Hewitt", sans-serif; color: #003FBA; flex: none; }

/* offer */
.tk-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; overflow-y: auto; padding: 2px; }
.tk-choice { border: 3px solid #000; border-radius: 16px; padding: 10px 12px 12px; background: #fff; display: flex; flex-direction: column; gap: 4px; box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.15); }
.tk-ctop { display: flex; align-items: center; gap: 8px; }
.tk-ctop .tk-pay { margin-left: auto; font-size: 15px; }
.tk-choice h3 { margin: 4px 0 0; font: 700 16px/1.15 "Cooper Hewitt", sans-serif; letter-spacing: -0.02em; }
.tk-text { font-size: 13px !important; line-height: 1.4 !important; margin: 2px 0 6px !important; color: #222; }
.tk-take { margin-top: auto; height: 42px; background: #F2C94C; border-radius: 12px; font-size: 15px; touch-action: manipulation; }
.tk-take:active { background: #34A1E5; }
.tk-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 12px; color: #003FBA; font-weight: 600; }
.tk-later { height: 36px; padding: 0 14px; font-size: 13px; touch-action: manipulation; }

/* standing */
.tk-stand { border: 3px solid #000; border-radius: 16px; background: #E3F2FC; padding: 10px 12px; margin-bottom: 4px; }
.tk-shead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tk-shead b { font: 700 20px "Cooper Hewitt", sans-serif; letter-spacing: -0.03em; }
.tk-shead span { font-size: 12px; color: #003FBA; font-weight: 600; }
.tk-bar { height: 16px; border: 2px solid #000; border-radius: 999px; background: #fff; overflow: hidden; margin: 6px 0 4px; }
.tk-bar i { display: block; height: 100%; background: #F2C94C; border-right: 2px solid #000; transition: width 0.9s cubic-bezier(.3, 1.3, .5, 1); }
.tk-next { font-size: 12px !important; margin: 2px 0 0 !important; line-height: 1.35 !important; }
.tk-hearts { font: 700 12px "Cooper Hewitt", sans-serif !important; color: #003FBA; margin: 2px 0 0 !important; }

/* log */
.tk-log { display: flex; flex-direction: column; }
.tk-body { overflow-y: auto; min-height: 0; padding: 2px 2px 6px; }
.tk-h { font: 700 13px "Cooper Hewitt", sans-serif; text-transform: uppercase; letter-spacing: 0.06em; color: #003FBA; margin: 14px 0 6px; }
.tk-lnote { font-size: 12px !important; margin: -2px 0 8px !important; }
.tk-job { border: 3px solid #000; border-radius: 14px; padding: 8px 10px; margin-bottom: 8px; background: #fff; }
.tk-job.pinned { box-shadow: inset 0 0 0 3px #F2C94C; }
.tk-job.ready { background: #E3F2FC; }
.tk-job.done { opacity: 0.55; }
.tk-jtop { display: flex; align-items: center; gap: 9px; }
.tk-jtitle { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tk-jtitle b { font: 700 15px/1.15 "Cooper Hewitt", sans-serif; }
.tk-jtitle span { font-size: 11px; color: #003FBA; font-weight: 600; }
.tk-step { font-size: 13px !important; margin: 6px 0 4px !important; line-height: 1.35 !important; }
.tk-prow { display: flex; align-items: center; gap: 8px; }
.tk-pbar { flex: 1; height: 10px; border: 2px solid #000; border-radius: 999px; background: #fff; overflow: hidden; }
.tk-pbar i { display: block; height: 100%; background: #34A1E5; }
.tk-job.ready .tk-pbar i { background: #F2C94C; }
.tk-count { font: 700 12px "Cooper Hewitt", sans-serif; min-width: 30px; text-align: right; }
.tk-btns { display: flex; gap: 6px; margin-top: 7px; justify-content: flex-end; }
.tk-btns button { height: 32px; padding: 0 12px; font-size: 12px; border-radius: 999px; touch-action: manipulation; }
.tk-pin.on { background: #F2C94C; }
.tk-drop { color: #8A2433; }
.tk-empty { border: 3px dashed #9AA6B8; border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; font-size: 12px; color: #46546B; background: #F4F7FB; }

/* turn-in */
.tk-dwrap { display: flex; gap: 14px; align-items: center; margin: 6px 0 10px; }
.tk-stamp { flex: none; width: 96px; height: 96px; border-radius: 50%; background: #F2C94C; border: 3px solid #000; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3); transform: rotate(-8deg); animation: tk-stamp 0.5s cubic-bezier(.2, 1.6, .4, 1); }
.tk-stamp b { font: 700 32px/1 "Cooper Hewitt", sans-serif; letter-spacing: -0.04em; }
.tk-stamp span { font: 700 12px "Cooper Hewitt", sans-serif; }
@keyframes tk-stamp { 0% { transform: scale(2.2) rotate(-24deg); opacity: 0; } 100% { transform: scale(1) rotate(-8deg); opacity: 1; } }
.tk-dwords { min-width: 0; }
.tk-dwords h3 { margin: 0 0 4px; font: 700 18px/1.15 "Cooper Hewitt", sans-serif; letter-spacing: -0.02em; }
.tk-quote { font-style: italic; color: #003FBA; font-size: 14px !important; margin: 0 !important; }
.tk-prize { display: flex; align-items: center; gap: 12px; border: 3px solid #000; border-radius: 14px; background: #FFF4D6; padding: 6px 12px; margin-bottom: 10px; }
.tk-prize b { font: 700 15px "Cooper Hewitt", sans-serif; }
.tk-prize p { font-size: 12px !important; margin: 2px 0 0 !important; }
.tk-rankup { margin-top: 10px; border: 3px solid #000; border-radius: 14px; background: #003FBA; color: #fff; padding: 10px 12px; display: flex; flex-direction: column; animation: tk-pop 0.6s cubic-bezier(.2, 1.5, .4, 1) 0.3s both; }
.tk-rankup b { font: 700 18px "Cooper Hewitt", sans-serif; color: #F2C94C; }
.tk-rankup span { font-size: 13px; }
@keyframes tk-pop { 0% { transform: scale(0.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.tk-ok { margin-top: 12px; height: 48px; width: 100%; background: #F2C94C; font-size: 17px; border-radius: 14px; touch-action: manipulation; }

#menu #menu-tasks { background: #FFF4D6; }

@media (max-width: 760px) {
  #task-chip { top: calc(136px + env(safe-area-inset-top)); left: 8px; min-height: 36px; padding: 4px 10px 4px 6px; max-width: calc(100vw - 80px); }
  .tk-cwords b { font-size: 12px; }
  .tk-choices { grid-template-columns: 1fr; }
  .tk-stamp { width: 78px; height: 78px; }
  .tk-stamp b { font-size: 26px; }
  .task-toast { top: calc(60px + env(safe-area-inset-top)); }
}
@media (max-width: 400px) {
  .overlay.catalog .tk-card { padding: 14px 12px 12px; }
  .tk-shead b { font-size: 17px; }
  .tk-dwords h3 { font-size: 16px; }
}
