/* D-HR · Buttons, app shell, top hero, check-in orb */
/* ---------- buttons ---------- */
.btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  transition:
    transform 0.12s ease,
    box-shadow 0.2s ease,
    opacity 0.2s;
}
.btn:active {
  transform: scale(0.97);
}
.btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.btn-block {
  width: 100%;
}
.btn-mint {
  background: linear-gradient(135deg, #55e6a8, #1fa873);
  color: #062a1c;
  box-shadow: 0 8px 20px rgba(31, 168, 115, 0.35);
}
.btn-plum {
  background: linear-gradient(135deg, #5a3482, #2a1742);
  color: #fff;
  box-shadow: 0 8px 20px rgba(42, 23, 66, 0.35);
}
.btn-soft {
  background: var(--chip);
  color: var(--text);
}
.btn-red {
  background: var(--redbg);
  color: var(--red);
}
.btn-ok {
  background: var(--mintbg);
  color: var(--mint2);
}
.btn-sm {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 13.5px;
  border-radius: 11px;
}
.iconbtn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  display: grid;
  place-items: center;
}
.iconbtn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- app shell ---------- */
#app {
  min-height: 100dvh;
}
#view {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 0 calc(var(--tabh) + var(--safe-b) + 24px);
  outline: none;
}
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabh) + var(--safe-b));
  padding: 6px 8px var(--safe-b);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  max-width: 620px;
  margin: 0 auto;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -6px 24px rgba(30, 17, 48, 0.08);
}
.tabbar button {
  position: relative;
  border: 0;
  background: none;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  border-radius: 14px;
}
.tabbar svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s;
}
.tabbar button.on {
  color: var(--plum);
}
:root[data-theme='dark'] .tabbar button.on {
  color: #7cf0be;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .tabbar button.on {
    color: #7cf0be;
  }
}
.tabbar button.on svg {
  transform: translateY(-2px);
}
.tabbar button.on::before {
  content: '';
  position: absolute;
  top: 2px;
  width: 30px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, #55e6a8, #5a3482);
}
.tabbar .dot {
  position: absolute;
  top: 8px;
  right: calc(50% - 18px);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--card);
}

/* top hero area */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 85% 0%, #55e6a8 0%, rgba(85, 230, 168, 0) 38%),
    radial-gradient(circle at 10% 10%, #5a3482 0%, #2a1742 55%, #160b24 100%);
  padding: calc(14px + var(--safe-t)) 18px 26px;
  border-radius: 0 0 30px 30px;
}
.hero.tall {
  padding-bottom: 84px;
}
.bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.bar .nm {
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.01em;
}
.bar .nm small {
  display: block;
  font-family: var(--body);
  font-weight: 600;
  font-size: 12px;
  color: #cbb9e6;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: -2px;
}
.bar .sp {
  flex: 1;
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  background: linear-gradient(135deg, #e9fff5, #55e6a8);
  color: #0b3d29;
  border: 0;
}
.hello {
  font-size: 13.5px;
  color: #d8cceb;
  margin: 0;
}
.hero h1 {
  font-size: 28px;
  line-height: 1.15;
  margin-top: 2px;
}
.hero .sub {
  color: #d8cceb;
  margin: 4px 0 0;
  font-size: 14px;
}
.sec-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 18px 10px;
}
.sec-title h2 {
  font-size: 18px;
  color: var(--ink);
}
.sec-title a,
.sec-title button {
  border: 0;
  background: none;
  color: var(--plum);
  font-weight: 700;
  font-size: 13.5px;
}
:root[data-theme='dark'] .sec-title a,
:root[data-theme='dark'] .sec-title button {
  color: #7cf0be;
}
.pad {
  padding: 0 16px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.card + .card {
  margin-top: 12px;
}
.muted {
  color: var(--muted);
}
.empty {
  padding: 26px 16px;
  text-align: center;
  color: var(--muted);
}
.empty b {
  display: block;
  font-size: 30px;
  margin-bottom: 6px;
}

/* ---------- check-in orb ---------- */
.punch {
  margin: -64px 16px 0;
  position: relative;
  z-index: 2;
  background: var(--card);
  border-radius: 26px;
  padding: 18px;
  box-shadow: var(--shadow2);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
}
.orb {
  position: relative;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 0;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1.15;
  padding: 0 12px;
  transform-style: preserve-3d;
}
.orb span {
  position: relative;
  z-index: 1;
}
.orb small {
  display: block;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.9;
  margin-top: 4px;
}
.orb::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow:
    inset 0 -10px 18px rgba(0, 0, 0, 0.25),
    inset 0 10px 16px rgba(255, 255, 255, 0.35);
}
.orb.in {
  background: radial-gradient(circle at 35% 28%, #8bf5c8, #22b57c 55%, #0e6c49);
  box-shadow: 0 14px 28px rgba(34, 181, 124, 0.45);
}
.orb.out {
  background: radial-gradient(circle at 35% 28%, #b18ae0, #5a3482 55%, #2a1742);
  box-shadow: 0 14px 28px rgba(90, 52, 130, 0.45);
}
.orb.done {
  background: radial-gradient(circle at 35% 28%, #e3ddf0, #a79fba 60%, #6d6680);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
  cursor: default;
}
.orb.in::after,
.orb.out::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 3px solid currentColor;
  opacity: 0;
  animation: ping 2.2s ease-out infinite;
}
.orb.in::after {
  color: #2fcb8c;
}
.orb.out::after {
  color: #8b5cf6;
}
@keyframes ping {
  0% {
    transform: scale(0.92);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.18);
    opacity: 0;
  }
}
.orb:active {
  transform: scale(0.96);
}
@media (prefers-reduced-motion: reduce) {
  .orb::after {
    animation: none !important;
  }
}
.clock {
  font-family: var(--display);
  font-size: 36px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}
.clock small {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  margin-left: 3px;
}
.pdate {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  margin: 2px 0 8px;
}
.pl {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--chip);
  color: var(--text);
}
.pill.ok {
  background: var(--mintbg);
  color: var(--mint2);
}
.pill.bad {
  background: var(--redbg);
  color: var(--red);
}
.pill.warn {
  background: var(--amberbg);
  color: var(--amber);
}
.pill.blue {
  background: var(--bluebg);
  color: var(--blue);
}
:root[data-theme='dark'] .pill.ok {
  color: #7cf0be;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .pill.ok {
    color: #7cf0be;
  }
}
