:root {
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  color: #18334d;
  background: #faf7f2;
  color-scheme: light;
  --blue: #2166a3;
  --ink: #18334d;
  --muted: #496074;
  --mango: #f8d88a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header,
main {
  max-width: 1200px;
  margin: auto;
  padding: 24px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border-bottom: 1px solid #e7e2d8;
}
header img {
  width: min(240px, 65vw);
  height: auto;
}
a {
  color: #164e82;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}
h1 {
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  line-height: 1.15;
  margin: 0.3em 0;
  overflow-wrap: anywhere;
}
h2 {
  font-size: 1.65rem;
  margin: 0.25em 0 0.8em;
}
h3 {
  font-size: 1.15rem;
  line-height: 1.35;
  margin: 0.25em 0;
  overflow-wrap: anywhere;
}
p {
  line-height: 1.55;
  overflow-wrap: anywhere;
}
button,
input {
  font: inherit;
  min-height: 48px;
  border-radius: 14px;
  padding: 12px 18px;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
button {
  background: var(--blue);
  color: white;
  border: 2px solid transparent;
  cursor: pointer;
  font-weight: 650;
  transition:
    transform 0.15s,
    background 0.15s;
}
button:hover {
  background: #174f80;
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #a6530e;
  outline-offset: 4px;
}
input {
  width: 100%;
  border: 1px solid #67798a;
  background: white;
}
label {
  display: block;
  margin-bottom: 8px;
}
.panel {
  background: white;
  border: 1px solid #e2e4df;
  border-radius: 24px;
  padding: 26px;
  overflow-wrap: anywhere;
}
.pair {
  max-width: 560px;
  margin: 24px 0;
}
form button {
  margin-top: 16px;
}
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  font-weight: 750;
  color: #526453;
  margin: 8px 0;
}
.intro {
  font-size: 1.15rem;
  color: var(--muted);
}
.muted {
  color: var(--muted);
  font-size: 0.95rem;
}
.quiet {
  background: transparent;
  color: #164e82;
  border-color: #cdd9df;
}
.quiet:hover {
  background: #eaf0f4;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}
.hero {
  border-radius: 28px;
  background: #f8e8bd;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.identity {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
}
.identity > div {
  min-width: 0;
}
.avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 76px;
  height: 76px;
  background: #fff7df;
  color: #5f4b19;
  border: 3px solid white;
  border-radius: 26px;
  font-size: 2.2rem;
  font-weight: 750;
  box-shadow: 0 5px 0 #e5cd8f;
}
.star-total {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 0 10px;
  flex-shrink: 0;
  background: white;
  border-radius: 22px;
  padding: 18px 24px;
}
.star-total strong {
  font-size: 2.8rem;
  line-height: 1.2;
}
.star-total > span:last-child {
  grid-column: 1/-1;
  text-align: center;
  color: #496074;
}
.star-symbol {
  font-size: 2.4rem;
  color: #976000;
}
.today {
  margin: 24px 0;
  background: #f0f5f1;
}
.day-row {
  display: flex;
  gap: 14px;
  padding: 8px 0;
  line-height: 1.5;
}
.day-dot {
  color: #2166a3;
  font-weight: bold;
}
.member-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-top: 32px;
}
.work,
.progress-column {
  min-width: 0;
}
.task-card {
  padding: 22px 24px;
  border: 1px solid #dce2df;
  border-left: 6px solid #2166a3;
  border-radius: 20px;
  background: white;
  margin: 14px 0;
}
.task-head {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: start;
}
.task-head h3 {
  min-width: 0;
}
.star-pill {
  white-space: nowrap;
  background: #fff2cf;
  color: #705014;
  border-radius: 10px;
  padding: 6px 10px;
  font-weight: 700;
}
.status {
  font-weight: 700;
  font-size: 0.95rem;
}
.pending {
  border-left-color: #b78329;
  background: #fffbef;
}
.completed {
  border-left-color: #47774f;
  background: #f1f7ef;
}
.rejected {
  border-left-color: #8c5d70;
}
.instructions {
  color: #496074;
}
.routine-label {
  font-size: 0.85rem;
  color: #496074;
}
.goal {
  background: #fff4d8;
}
.goal-count {
  font-size: 1.35rem;
  font-weight: 750;
}
.goal progress {
  width: 100%;
  height: 20px;
  accent-color: #2166a3;
}
.goal-path {
  display: flex;
  justify-content: space-between;
  margin: 12px 0;
  color: #a49b88;
  font-size: 1.35rem;
}
.goal-path .reached {
  color: #805318;
}
.rewards {
  margin: 40px 0;
}
.reward-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 18px;
}
.reward-card {
  background: white;
  border: 1px solid #e2e4df;
  border-radius: 22px;
  padding: 24px;
  min-width: 0;
}
.reward-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #f8e8bd;
  color: #805318;
  font-size: 2rem;
  margin-bottom: 14px;
}
.reward-cost {
  font-weight: 750;
  color: #705014;
}
.claim-confirm {
  border-top: 1px solid #dce2df;
  margin-top: 16px;
}
.claim-confirm button {
  margin: 4px;
}
.claim-history {
  margin-top: 20px;
}
.chooser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 22px;
  margin: 32px 0;
  max-width: 950px;
}
.profile-tile {
  background: white;
  color: var(--ink);
  border: 2px solid #e0e3d9;
  border-radius: 26px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  min-height: 220px;
}
.profile-tile:hover {
  background: #fff3d6;
  border-color: #be9d4d;
}
.profile-name {
  font-size: 1.25rem;
}
.tile-invite {
  color: #164e82;
  font-size: 0.9rem;
}
.notice {
  border-radius: 16px;
  padding: 18px 24px;
  background: #eaf3e5;
  border: 1px solid #73906c;
  color: #2e5335;
}
.error {
  color: #963a25;
  background: #fff0e9;
}
.empty {
  color: #496074;
}
.loading {
  padding: 32px;
}
.balance-changed {
  animation: settle 0.45s ease-out;
}
@keyframes settle {
  from {
    transform: scale(0.96);
  }
  to {
    transform: scale(1);
  }
}
@media (max-width: 800px) {
  .hero {
    padding: 24px;
    flex-wrap: wrap;
  }
  .member-grid {
    grid-template-columns: 1fr;
  }
  .star-total {
    grid-template-columns: auto auto auto;
    gap: 12px;
  }
  .star-total > span:last-child {
    grid-column: auto;
  }
  .star-total strong {
    font-size: 2rem;
  }
  .progress-column {
    order: 1;
  }
}
@media (max-width: 500px) {
  header,
  main {
    padding: 16px;
  }
  .panel,
  .task-card,
  .reward-card {
    padding: 20px;
  }
  .hero {
    padding: 22px;
  }
  .identity {
    align-items: start;
    gap: 14px;
  }
  .avatar {
    width: 52px;
    height: 52px;
    font-size: 1.6rem;
    border-radius: 18px;
  }
  .task-head {
    flex-wrap: wrap;
  }
  .actions button {
    flex: 1 1 auto;
  }
  .chooser-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .profile-tile {
    padding: 18px 12px;
    min-height: 190px;
  }
  .profile-name {
    font-size: 1rem;
  }
  .eyebrow {
    letter-spacing: 0.04em;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
