:root {
  --paper: #f3ecdd;
  --paper-deep: #e6dbc5;
  --ink: #252922;
  --muted: #737264;
  --line: rgba(58, 56, 44, 0.16);
  --red: #c84f38;
  --red-dark: #983624;
  --green: #426b59;
  --card: rgba(255, 252, 244, 0.88);
  --shadow: 0 16px 45px rgba(69, 55, 31, 0.1);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { margin: 0; min-height: 100vh; color: var(--ink); font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif; background: radial-gradient(circle at 10% 4%, rgba(216, 91, 63, .11), transparent 25%), radial-gradient(circle at 90% 38%, rgba(66, 107, 89, .1), transparent 25%), linear-gradient(145deg, #f7f1e5, var(--paper)); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.paper-noise { position: fixed; inset: 0; pointer-events: none; opacity: .24; z-index: 20; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E"); mix-blend-mode: multiply; }
.auth-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(30px, 7vh, 64px) 18px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(26px, 6vh, 52px);
  position: relative;
  isolation: isolate;
}
.auth-shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 240px;
  height: 240px;
  top: -128px;
  right: 8px;
  border: 1px solid rgba(66, 107, 88, .11);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(66, 107, 88, .025), 0 0 0 68px rgba(198, 91, 66, .018);
}
.auth-brand { display: grid; grid-template-columns: 60px minmax(0, 1fr); align-items: start; gap: 17px; animation: rise .55s ease both; }
.seal-logo {
  width: 58px;
  height: 76px;
  padding: 8px 0;
  flex: 0 0 auto;
  border: 2px solid var(--red);
  color: var(--red-dark);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  text-align: center;
  transform: rotate(-2.5deg);
  background: rgba(255, 250, 239, .34);
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px rgba(198, 91, 66, .75), 4px 6px 0 rgba(198, 91, 66, .06);
}
.seal-logo span + span { margin-top: -4px; }
.eyebrow { margin: 0 0 7px; color: var(--red); font-size: 10px; letter-spacing: .2em; font-weight: 800; }
h1, h2, h3, p { margin-top: 0; }
.auth-brand-copy { min-width: 0; }
.auth-brand h1 { margin: 0; font-family: "STKaiti", "KaiTi", serif; font-size: clamp(29px, 8.6vw, 42px); line-height: 1.22; font-weight: 700; letter-spacing: .025em; }
.auth-lead { max-width: 330px; margin: 13px 0 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.auth-brand-meta { margin-top: 15px; display: flex; align-items: center; gap: 8px; color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.auth-brand-meta i { width: 18px; height: 1px; background: rgba(66, 107, 88, .34); }
.auth-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 253, 247, .92);
  border: 1px solid rgba(66, 74, 62, .13);
  border-radius: 30px 30px 10px 30px;
  padding: 24px 22px 20px;
  box-shadow: 0 24px 58px rgba(58, 53, 38, .11), inset 0 1px 0 rgba(255, 255, 255, .7);
  backdrop-filter: blur(14px);
  animation: rise .6s .08s ease both;
}
.auth-card::before {
  content: "";
  position: absolute;
  width: 94px;
  height: 94px;
  top: -54px;
  left: -48px;
  border: 1px solid rgba(198, 91, 66, .15);
  border-radius: 50%;
  box-shadow: 0 0 0 15px rgba(198, 91, 66, .035);
  pointer-events: none;
}
.auth-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; position: relative; }
.auth-card-kicker { margin: 1px 0 4px; color: var(--green); font-size: 8px; font-weight: 800; letter-spacing: .18em; }
.auth-card-head h2 { margin: 0; font-family: "STKaiti", "KaiTi", serif; font-size: 25px; line-height: 1.2; }
.auth-card-intro { margin: 8px 0 20px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.auth-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; flex: 0 0 auto; padding: 3px; border: 1px solid rgba(53, 64, 55, .09); border-radius: 12px; background: rgba(66, 107, 88, .065); }
.auth-tab { min-width: 48px; min-height: 32px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); padding: 0 11px; font-size: 11px; font-weight: 800; cursor: pointer; transition: .18s background, .18s color, .18s box-shadow; }
.auth-tab.active { color: #fffaf1; background: var(--green); box-shadow: 0 5px 12px rgba(41, 75, 61, .18); }
.stack-form { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field > span, .field-group legend { font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.field em { color: var(--muted); font-size: 11px; font-style: normal; font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.5); color: var(--ink); outline: 0; padding: 13px 14px; transition: .2s border-color, .2s box-shadow; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(200,79,56,.65); box-shadow: 0 0 0 3px rgba(200,79,56,.1); }
.auth-form { gap: 13px; }
.auth-field { gap: 7px; }
.auth-field > span:first-child { padding-left: 2px; color: #3b433c; font-size: 11px; }
.input-shell {
  min-height: 49px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid rgba(53, 64, 55, .14);
  border-radius: 15px 15px 5px 15px;
  background: rgba(247, 244, 235, .78);
  transition: .2s border-color, .2s box-shadow, .2s background;
}
.input-shell > .ui-icon { width: 18px; height: 18px; color: var(--green); opacity: .82; }
.auth-field > .input-shell { font-weight: 400; letter-spacing: 0; }
.auth-field .input-shell input { min-width: 0; height: 47px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 13px; }
.auth-field .input-shell input:focus { border: 0; box-shadow: none; }
.input-shell:focus-within { border-color: rgba(66, 107, 88, .65); background: rgba(255, 254, 250, .96); box-shadow: 0 0 0 3px rgba(66, 107, 88, .09); }
.input-shell:focus-within > .ui-icon { color: var(--red-dark); opacity: 1; }
.primary-button { border: 0; border-radius: 12px; background: var(--red); color: #fff8ed; min-height: 50px; padding: 0 18px; font-weight: 800; cursor: pointer; box-shadow: 0 9px 20px rgba(152,54,36,.18); display: inline-flex; align-items: center; justify-content: center; gap: 12px; }
.primary-button:active { transform: translateY(1px); }
.primary-button:disabled { opacity: .55; cursor: wait; }
.primary-button .arrow { margin-left: auto; font-size: 20px; }
.wide { width: 100%; }
.auth-submit { min-height: 54px; margin-top: 3px; padding: 0 8px 0 19px; justify-content: space-between; border-radius: 16px 16px 6px 16px; background: var(--red-dark); letter-spacing: .05em; box-shadow: 0 12px 24px rgba(152, 54, 36, .2); }
.auth-submit-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px 12px 4px 12px; background: rgba(255, 255, 255, .13); }
.auth-submit-icon .ui-icon { width: 18px; height: 18px; }
.auth-tip { margin: 15px 0 0; display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 9px; line-height: 1.5; text-align: center; }
.auth-tip .ui-icon { width: 12px; height: 12px; color: var(--green); }
.field-help { margin-top: -2px; padding-left: 2px; color: var(--muted); font-size: 9px; line-height: 1.5; }
@media (min-width: 560px) {
  .auth-shell { width: min(100%, 900px); padding: 30px 34px; display: grid; grid-template-columns: minmax(205px, .82fr) minmax(310px, 1.18fr); align-items: center; gap: 28px; }
  .auth-brand { grid-template-columns: 1fr; gap: 22px; }
  .auth-brand h1 { font-size: clamp(29px, 4.9vw, 40px); }
  .auth-brand h1 br { display: none; }
  .auth-lead { font-size: 11px; }
  .auth-card { padding: 27px 24px 22px; }
}
@media (max-width: 370px) {
  .auth-shell { padding-left: 14px; padding-right: 14px; gap: 24px; }
  .auth-brand { grid-template-columns: 52px minmax(0, 1fr); gap: 13px; }
  .seal-logo { width: 50px; height: 68px; font-size: 20px; }
  .auth-brand h1 { font-size: 27px; }
  .auth-lead { margin-top: 9px; font-size: 10px; }
  .auth-brand-meta { display: none; }
  .auth-card { padding: 21px 17px 18px; }
  .auth-card-head h2 { font-size: 22px; }
  .auth-tab { min-width: 43px; padding: 0 8px; }
  .collection-toolbar { padding-left: 12px; padding-right: 10px; }
  .collection-summary { gap: 9px; }
  .collection-symbol { width: 39px; height: 39px; }
  .collection-summary small { max-width: 150px; }
  .collection-add { width: 42px; padding: 0; }
  .collection-add span { display: none; }
}
.app-shell { width: 100%; max-width: 560px; min-height: 100vh; margin: 0 auto; position: relative; padding-bottom: calc(94px + var(--safe-bottom)); }
.topbar { height: 104px; padding: 24px 20px 12px; display: flex; align-items: flex-end; justify-content: space-between; position: relative; z-index: 2; }
.date-line { margin: 0 0 2px; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.topbar h1 { margin: 0; font-family: "STKaiti", "KaiTi", serif; font-size: 27px; line-height: 1.2; }
.avatar-button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--ink); background: transparent; font-family: "STKaiti", "KaiTi", serif; font-size: 17px; cursor: pointer; position: relative; }
.avatar-button::after { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--red); right: 0; top: 1px; border: 2px solid var(--paper); }
.content { padding: 8px 16px 30px; }
.view { display: none; animation: rise .35s ease both; }
.view.active { display: block; }
.hero-card { min-height: 204px; padding: 27px; border-radius: 30px 30px 8px 30px; background: var(--ink); color: #f7f1e3; position: relative; overflow: hidden; box-shadow: 0 18px 42px rgba(37,41,34,.2); display: flex; align-items: center; }
.hero-card::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(255,255,255,.09); border-radius: 23px 23px 5px 23px; }
.hero-card > div:first-child { position: relative; z-index: 1; }
.hero-kicker { font-size: 12px; letter-spacing: .12em; color: #cfc9b9; margin-bottom: 5px; }
.hero-number { display: flex; align-items: baseline; gap: 7px; }
.hero-number strong { font-family: Georgia, "Times New Roman", serif; font-size: 74px; font-weight: 400; line-height: 1; letter-spacing: -.06em; }
.hero-number span { color: #d6cfbe; font-size: 14px; }
.hero-card #hero-caption { margin: 13px 0 0; color: #aaa998; font-size: 12px; }
.sun-dial { position: absolute; right: -28px; top: -24px; width: 170px; height: 170px; border: 1px solid rgba(243,236,221,.16); border-radius: 50%; }
.sun-dial::before, .sun-dial::after { content: ""; position: absolute; inset: 25px; border: 1px dashed rgba(243,236,221,.15); border-radius: 50%; }
.sun-dial::after { inset: 55px; background: var(--red); border: 0; box-shadow: 0 0 45px rgba(216,91,63,.35); }
.sun-dial span { position: absolute; left: 50%; top: -9px; width: 1px; height: 188px; background: rgba(243,236,221,.13); transform: rotate(40deg); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 11px 0 30px; }
.stat-card { padding: 14px 13px 12px; border-radius: 8px 18px 18px 18px; background: rgba(255,252,244,.62); border: 1px solid var(--line); }
.stat-card span { display: block; color: var(--muted); font-size: 10px; margin-bottom: 8px; white-space: nowrap; }
.stat-card strong { font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.stat-card small { margin-left: 3px; color: var(--muted); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin: 10px 3px 15px; }
.section-heading h2 { font-family: "STKaiti", "KaiTi", serif; font-size: 25px; margin: 0; }
.section-heading.compact { margin-top: 28px; }
.text-button { border: 0; background: transparent; color: var(--red-dark); font-size: 12px; padding: 7px; cursor: pointer; }
.timeline { display: grid; gap: 0; }
.timeline-item { display: grid; grid-template-columns: 42px 1fr auto; gap: 11px; align-items: center; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.timeline-mark { width: 38px; height: 38px; border-radius: 50% 50% 50% 8px; color: white; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.timeline-main strong { display: block; font-size: 14px; margin-bottom: 3px; }
.timeline-main span, .timeline-time { color: var(--muted); font-size: 11px; }
.timeline-actions { display: flex; align-items: center; gap: 6px; }
.delete-record { border: 0; background: transparent; color: #a64a3b; padding: 8px 5px; cursor: pointer; font-size: 11px; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); border: 1px dashed rgba(58,56,44,.22); border-radius: 24px; background: rgba(255,255,255,.18); }
.empty-state strong { display: block; color: var(--ink); font-family: "STKaiti", "KaiTi", serif; font-size: 20px; margin-bottom: 7px; }
.empty-state p { margin: 0 0 17px; font-size: 12px; line-height: 1.7; }
.circle-add { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--ink); color: white; font-size: 22px; cursor: pointer; box-shadow: 0 8px 18px rgba(37,41,34,.16); }
.collection-toolbar {
  --collection-accent: var(--green-dark);
  --collection-soft: rgba(66, 107, 88, .1);
  position: relative;
  overflow: hidden;
  min-height: 76px;
  margin: 2px 0 18px;
  padding: 13px 13px 13px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(53, 64, 55, .1);
  border-radius: 20px 20px 7px 20px;
  background: linear-gradient(135deg, rgba(255, 253, 247, .94), rgba(233, 239, 231, .72));
  box-shadow: 0 9px 28px rgba(65, 58, 42, .05);
}
.collection-toolbar::after {
  content: "";
  position: absolute;
  right: 82px;
  bottom: -42px;
  width: 86px;
  height: 86px;
  border: 1px solid color-mix(in srgb, var(--collection-accent) 14%, transparent);
  border-radius: 50%;
  pointer-events: none;
}
.people-toolbar {
  --collection-accent: var(--red-dark);
  --collection-soft: rgba(198, 91, 66, .1);
  background: linear-gradient(135deg, rgba(255, 253, 247, .94), rgba(244, 228, 220, .66));
}
.collection-summary { min-width: 0; display: flex; align-items: center; gap: 11px; position: relative; z-index: 1; }
.collection-symbol { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px 14px 5px 14px; color: var(--collection-accent); background: var(--collection-soft); }
.collection-symbol .ui-icon { width: 21px; height: 21px; }
.collection-summary div { min-width: 0; }
.collection-summary strong { display: block; margin-bottom: 4px; font-family: "STKaiti", "KaiTi", serif; font-size: 17px; line-height: 1.1; }
.collection-summary small { display: block; overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.collection-add { min-height: 42px; flex: 0 0 auto; position: relative; z-index: 1; padding: 0 10px 0 7px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid color-mix(in srgb, var(--collection-accent) 18%, transparent); border-radius: 14px; color: var(--collection-accent); background: rgba(255, 253, 247, .76); box-shadow: 0 6px 16px rgba(65, 58, 42, .07), inset 0 1px 0 rgba(255, 255, 255, .72); font-size: 10px; font-weight: 800; cursor: pointer; transition: .18s border-color, .18s background, .18s box-shadow, .18s transform; }
.collection-add .ui-icon { width: 28px; height: 28px; padding: 7px; border-radius: 10px 10px 4px 10px; color: #fffaf1; background: var(--collection-accent); box-shadow: 0 4px 10px color-mix(in srgb, var(--collection-accent) 18%, transparent); }
.collection-add:hover { border-color: color-mix(in srgb, var(--collection-accent) 32%, transparent); background: rgba(255, 253, 247, .94); box-shadow: 0 8px 18px rgba(65, 58, 42, .09); }
.collection-add:active { transform: translateY(1px); box-shadow: 0 3px 9px rgba(65, 58, 42, .08); }
.collection-empty { padding-top: 39px; padding-bottom: 39px; }
.collection-empty-icon { width: 50px; height: 50px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 18px 18px 6px 18px; color: var(--green); background: var(--soft-green); transform: rotate(-2deg); }
.collection-empty-icon .ui-icon { width: 23px; height: 23px; }
.view[data-view="people"] .collection-empty-icon { color: var(--red-dark); background: var(--soft-red); }
.collection-empty p { max-width: 280px; margin-left: auto; margin-right: auto; }

.card-list { display: grid; gap: 12px; }
.course-card, .person-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px 20px 8px 20px; padding: 18px; box-shadow: 0 8px 25px rgba(69,55,31,.05); position: relative; overflow: hidden; }
.course-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--course-color); }
.course-card-head, .person-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.course-card h3, .person-card h3 { font-size: 16px; margin: 0 0 6px; }
.course-meta, .person-meta { color: var(--muted); font-size: 11px; margin: 0; line-height: 1.65; }
.course-balance { text-align: right; flex: 0 0 auto; }
.course-balance strong { display: block; font-family: Georgia, serif; font-size: 27px; line-height: 1; }
.course-balance small { color: var(--muted); font-size: 10px; }
.progress-track { height: 5px; border-radius: 10px; background: var(--paper-deep); overflow: hidden; margin: 17px 0 12px; }
.progress-fill { height: 100%; border-radius: inherit; background: var(--course-color); }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.member-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.member-chip { padding: 4px 8px; border-radius: 12px; background: rgba(66,107,89,.09); color: var(--green); font-size: 10px; font-weight: 700; }
.card-actions { display: flex; flex: 0 0 auto; }
.card-action { border: 0; background: transparent; padding: 6px 7px; color: var(--muted); font-size: 11px; cursor: pointer; }
.card-action.danger { color: #a64a3b; }
.person-card { display: grid; grid-template-columns: auto 1fr; gap: 13px; }
.person-initial { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50% 50% 10px 50%; background: var(--green); color: white; font-family: "STKaiti", "KaiTi", serif; font-size: 19px; }
.person-card-content { min-width: 0; }
.person-card-stats { display: flex; gap: 18px; margin-top: 13px; }
.person-card-stats span { font-size: 11px; color: var(--muted); }
.person-card-stats strong { color: var(--ink); font-family: Georgia, serif; font-size: 16px; margin-right: 3px; }
.checkin-toolbar {
  --collection-accent: var(--red-dark);
  --collection-soft: rgba(198, 91, 66, .1);
  background: linear-gradient(135deg, rgba(255, 253, 247, .94), rgba(244, 228, 220, .66));
}
.checkin-deduction { min-width: 74px; height: 44px; flex: 0 0 auto; position: relative; z-index: 1; padding: 0 11px; display: flex; align-items: center; justify-content: center; gap: 3px; border: 1px solid rgba(198, 91, 66, .16); border-radius: 14px 14px 5px 14px; color: var(--red-dark); background: rgba(255, 253, 247, .76); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75); }
.checkin-deduction small { margin-right: 2px; color: var(--muted); font-size: 9px; }
.checkin-deduction strong { font-family: Georgia, serif; font-size: 22px; font-weight: 500; line-height: 1; }
.checkin-deduction span { font-size: 10px; font-weight: 800; }
.checkin-card { background: var(--card); border: 1px solid var(--line); border-radius: 28px 28px 9px 28px; padding: 22px; display: grid; gap: 18px; box-shadow: var(--shadow); }
.course-availability { padding: 11px 13px; border-radius: 10px; background: rgba(66,107,89,.09); color: var(--green); font-size: 12px; }
.checkin-submit { margin-top: 5px; font-size: 15px; }
.stamp-mini { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; }
.gentle-note { margin: 18px auto; color: var(--muted); text-align: center; font-size: 10px; max-width: 270px; line-height: 1.6; }
.person-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 0 16px 5px; }
.person-tabs::-webkit-scrollbar { display: none; }
.person-tab { flex: 0 0 auto; border: 1px solid var(--line); background: rgba(255,255,255,.35); border-radius: 18px; padding: 8px 13px; font-size: 12px; cursor: pointer; }
.person-tab.active { color: #fff; background: var(--ink); border-color: var(--ink); }
.calendar-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px 24px 8px 24px; padding: 18px 14px; box-shadow: 0 12px 32px rgba(69,55,31,.06); }
.calendar-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 17px; }
.calendar-toolbar h3 { margin: 0; font-family: "STKaiti", "KaiTi", serif; font-size: 19px; }
.icon-button { width: 35px; height: 35px; border-radius: 50%; border: 1px solid var(--line); background: transparent; font-size: 23px; cursor: pointer; }
.weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.weekdays span { text-align: center; color: var(--muted); font-size: 10px; padding: 6px 0 10px; }
.calendar-day { aspect-ratio: 1; border: 0; background: transparent; display: grid; place-items: center; position: relative; border-radius: 50%; font-size: 12px; cursor: pointer; }
.calendar-day.outside { opacity: .22; cursor: default; }
.calendar-day.today { box-shadow: inset 0 0 0 1px var(--red); }
.calendar-day.has-class { color: white; font-weight: 800; background: var(--day-color, var(--green)); box-shadow: 0 5px 10px color-mix(in srgb, var(--day-color, var(--green)) 26%, transparent); }
.calendar-day.selected::after { content: ""; position: absolute; inset: -3px; border: 1px solid var(--ink); border-radius: 50%; }
.modal { border: 0; padding: 0; margin: auto 0 0; width: 100%; max-width: none; background: transparent; overflow: visible; }
.modal::backdrop { background: rgba(29,28,24,.48); backdrop-filter: blur(4px); }
.modal-sheet { width: min(100%, 560px); margin: 0 auto; max-height: 88vh; overflow-y: auto; background: #f8f2e7; border-radius: 28px 28px 0 0; padding: 11px 22px calc(24px + var(--safe-bottom)); display: grid; gap: 17px; box-shadow: 0 -18px 60px rgba(0,0,0,.16); }
.modal-handle { width: 44px; height: 4px; border-radius: 5px; background: rgba(37,41,34,.18); justify-self: center; }
.modal-title { display: flex; align-items: flex-start; justify-content: space-between; }
.modal-title h2 { margin: 0; font-family: "STKaiti", "KaiTi", serif; font-size: 25px; }
.close-button { width: 35px; height: 35px; border: 0; border-radius: 50%; background: rgba(37,41,34,.07); font-size: 22px; cursor: pointer; }
.form-row { display: grid; grid-template-columns: .7fr 1.3fr; gap: 10px; }
.field-group { border: 1px solid var(--line); border-radius: 14px; margin: 0; padding: 13px; }
.field-group p { color: var(--muted); font-size: 10px; margin: 4px 0 12px; }
.people-options { display: flex; flex-wrap: wrap; gap: 7px; }
.person-option input { position: absolute; opacity: 0; pointer-events: none; }
.person-option span { display: block; border: 1px solid var(--line); border-radius: 17px; padding: 7px 11px; font-size: 11px; cursor: pointer; background: rgba(255,255,255,.4); }
.person-option input:checked + span { background: var(--green); color: white; border-color: var(--green); }
.color-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.color-field legend { margin-bottom: 8px; padding: 0; font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.color-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.color-option { min-width: 0; position: relative; cursor: pointer; }
.color-option input { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; opacity: 0; pointer-events: none; }
.color-option > span { min-height: 58px; padding: 8px 3px 6px; border: 1px solid var(--line); border-radius: 14px 14px 5px 14px; display: grid; place-items: center; align-content: center; gap: 5px; background: rgba(255,255,255,.42); transition: .18s border-color, .18s background, .18s transform, .18s box-shadow; }
.color-option i { width: 25px; height: 25px; border: 3px solid #fff9ee; border-radius: 50%; display: block; background: var(--swatch); box-shadow: 0 0 0 1px rgba(58,56,44,.16); }
.color-option small { overflow: hidden; color: var(--muted); font-size: 8px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.color-option input:checked + span { border-color: var(--swatch); background: rgba(255,253,247,.9); box-shadow: inset 0 -3px 0 var(--swatch), 0 6px 16px rgba(58,53,38,.06); transform: translateY(-1px); }
.color-option input:checked + span small { color: var(--ink); }
.color-option input:checked + span i { box-shadow: 0 0 0 2px #fff9ee, 0 0 0 4px var(--swatch); }
.color-option input:focus-visible + span { outline: 3px solid rgba(66,107,89,.14); outline-offset: 2px; }
.bottom-nav { position: fixed; z-index: 10; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 560px); height: calc(72px + var(--safe-bottom)); padding: 8px 12px var(--safe-bottom); display: grid; grid-template-columns: 1fr 1fr 72px 1fr 1fr; background: rgba(249,245,235,.9); border-top: 1px solid var(--line); backdrop-filter: blur(18px); }
.nav-item { border: 0; background: transparent; color: var(--muted); display: grid; justify-items: center; align-content: center; gap: 3px; cursor: pointer; }
.nav-item.active { color: var(--red-dark); }
.nav-icon { font-size: 20px; line-height: 1; font-family: Georgia, serif; }
.nav-item small { font-size: 9px; }
.floating-checkin { position: fixed; z-index: 11; left: 50%; bottom: calc(25px + var(--safe-bottom)); transform: translateX(-50%); width: 62px; height: 62px; border: 5px solid #f4eddf; border-radius: 50%; background: var(--red); color: white; box-shadow: 0 9px 24px rgba(152,54,36,.28); display: grid; place-content: center; gap: 0; cursor: pointer; }
.floating-checkin span { font-size: 21px; line-height: .9; } .floating-checkin small { font-size: 9px; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(92px + var(--safe-bottom)); transform: translate(-50%, 20px); max-width: calc(100% - 40px); background: var(--ink); color: white; padding: 11px 16px; border-radius: 12px; font-size: 12px; opacity: 0; pointer-events: none; transition: .25s; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 700px) { body { padding: 24px 0; } .app-shell { min-height: calc(100vh - 48px); border: 1px solid var(--line); border-radius: 34px; overflow: hidden; box-shadow: 0 24px 80px rgba(58,48,30,.13); background: rgba(243,236,221,.72); } .bottom-nav { bottom: 24px; border-radius: 0 0 34px 34px; } .floating-checkin { bottom: 49px; } .auth-shell { min-height: calc(100vh - 48px); } }
@media (max-width: 360px) { .content { padding-left: 12px; padding-right: 12px; } .hero-card { padding: 22px; } .hero-number strong { font-size: 62px; } .form-row { grid-template-columns: 1fr; } }


/* Cohesive notebook-style visual refresh */
:root {
  --paper: #f4efe4;
  --paper-deep: #e7ddca;
  --ink: #243029;
  --muted: #77786d;
  --line: rgba(53, 64, 55, 0.13);
  --red: #c65b42;
  --red-dark: #9f412f;
  --green: #426b58;
  --green-dark: #294b3d;
  --card: rgba(255, 253, 247, 0.94);
  --soft-green: #e9efe7;
  --soft-red: #f4e4dc;
  --shadow: 0 18px 50px rgba(58, 53, 38, 0.09);
}
body {
  background:
    linear-gradient(rgba(74, 78, 65, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 78, 65, .025) 1px, transparent 1px),
    radial-gradient(circle at 8% 2%, rgba(198, 91, 66, .12), transparent 27%),
    radial-gradient(circle at 92% 36%, rgba(66, 107, 88, .1), transparent 28%),
    var(--paper);
  background-size: 24px 24px, 24px 24px, auto, auto, auto;
}
.app-shell { background: rgba(248, 244, 235, .34); }
.topbar {
  height: 100px;
  padding: 24px 20px 14px;
  border-bottom: 1px solid rgba(53, 64, 55, .06);
}
.topbar h1, .section-heading h2, .modal-title h2 {
  color: var(--ink);
  letter-spacing: .02em;
}
.avatar-button {
  width: 44px;
  height: 44px;
  border: 0;
  color: #fffaf0;
  background: var(--green-dark);
  box-shadow: 0 8px 22px rgba(41, 75, 61, .2);
}
.avatar-button::after { border-color: var(--paper); background: #e7b14b; }
.content { padding: 12px 16px 34px; }
.eyebrow { color: var(--red); letter-spacing: .18em; }
.section-heading { margin: 14px 4px 18px; }
.section-heading h2 { font-size: 27px; }
.hero-card {
  min-height: 210px;
  border-radius: 28px;
  background: linear-gradient(140deg, var(--green-dark), #203b32);
  box-shadow: 0 20px 46px rgba(36, 48, 41, .2);
}
.hero-card::before { border-radius: 20px; border-color: rgba(255,255,255,.1); }
.hero-number strong { letter-spacing: -.045em; }
.stat-card, .course-card, .person-card, .checkin-card {
  border-color: var(--line);
  background: var(--card);
  box-shadow: 0 10px 30px rgba(65, 58, 42, .055);
}
.stat-card { border-radius: 16px; }
.course-card, .person-card { border-radius: 22px; }
.course-card::before { width: 4px; }
.progress-track { background: rgba(66, 107, 88, .1); }
.member-chip { background: var(--soft-green); }
.circle-add {
  background: var(--green-dark);
  box-shadow: 0 9px 22px rgba(41, 75, 61, .2);
}
.checkin-card { border-radius: 26px; }
.field input, .field select, .field textarea {
  min-height: 46px;
  border-color: var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .62);
}
.field select {
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23426b59' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 9 7 7 7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  cursor: pointer;
}
.field input[type="date"],
.field input[type="datetime-local"] {
  position: relative;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23426b59' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15' rx='2.5'/%3E%3Cpath d='M7.5 3v4M16.5 3v4M3.5 9h17'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  cursor: pointer;
}
.field input[type="date"]::-webkit-calendar-picker-indicator,
.field input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.primary-button {
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red), #b54a35);
  box-shadow: 0 10px 24px rgba(159, 65, 47, .2);
}
.modal-sheet { background: #f8f3e8; border-radius: 30px 30px 0 0; }
.bottom-nav {
  height: calc(76px + var(--safe-bottom));
  background: rgba(250, 247, 239, .94);
  border-color: rgba(53, 64, 55, .1);
  box-shadow: 0 -10px 35px rgba(48, 50, 39, .06);
}
.nav-item { gap: 5px; }
.nav-icon {
  width: 30px;
  height: 26px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  transition: .22s ease;
}
.nav-item.active .nav-icon { color: white; background: var(--green-dark); transform: translateY(-1px); }
.nav-item.active { color: var(--green-dark); }
.floating-checkin {
  width: 64px;
  height: 64px;
  bottom: calc(27px + var(--safe-bottom));
  border-color: #f8f3e9;
  background: linear-gradient(145deg, #d2664b, #b54632);
  box-shadow: 0 12px 28px rgba(159, 65, 47, .3);
}

/* Calendar */
.calendar-view { padding-top: 2px; }
.calendar-intro {
  min-height: 176px;
  margin-bottom: 14px;
  padding: 25px 24px;
  border-radius: 28px;
  color: #f8f1e4;
  background:
    radial-gradient(circle at 82% 23%, rgba(230, 177, 75, .24), transparent 23%),
    linear-gradient(140deg, #294b3d, #1f3930);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 18px 42px rgba(41, 75, 61, .18);
}
.calendar-intro::before {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -74px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  box-shadow: 0 0 0 22px rgba(255,255,255,.035), 0 0 0 52px rgba(255,255,255,.025);
}
.calendar-intro > div { position: relative; z-index: 1; }
.calendar-intro .eyebrow { color: #e9bd74; margin-bottom: 11px; }
.calendar-intro h2 {
  margin: 0;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 28px;
  line-height: 1.36;
  letter-spacing: .035em;
  font-weight: 700;
}
.calendar-intro h2 em { color: #efc17d; font-style: normal; }
.month-stamp {
  width: 76px;
  height: 88px;
  flex: 0 0 auto;
  margin-left: 12px;
  border: 1px solid rgba(239, 193, 125, .65);
  border-radius: 38px 38px 12px 38px;
  display: grid;
  place-content: center;
  text-align: center;
  transform: rotate(2deg);
  background: rgba(255,255,255,.055);
}
.month-stamp::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(239, 193, 125, .18);
  border-radius: inherit;
}
.month-stamp strong { font-family: Georgia, serif; font-size: 32px; line-height: 1; font-weight: 500; }
.month-stamp span { margin-top: 6px; color: #d9d8c9; font-size: 9px; letter-spacing: .08em; }
.people-switcher {
  padding: 16px 0 11px;
  margin-bottom: 5px;
}
.switcher-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 3px 11px;
}
.switcher-label > span { font-size: 13px; font-weight: 800; }
.switcher-label small { color: var(--muted); font-size: 10px; }
.person-tabs { gap: 9px; margin-bottom: 0; padding-bottom: 7px; }
.person-tab {
  min-width: 126px;
  padding: 9px 12px 9px 9px;
  border-color: var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 247, .72);
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  box-shadow: 0 6px 20px rgba(58, 53, 38, .035);
  transition: .2s ease;
}
.person-tab-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 9px 50%;
  color: white;
  background: var(--green);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 15px;
}
.person-tab-copy { display: grid; gap: 2px; }
.person-tab-copy strong { font-size: 12px; white-space: nowrap; }
.person-tab-copy small { color: var(--muted); font-size: 9px; white-space: nowrap; }
.person-tab.active {
  color: var(--ink);
  border-color: rgba(41, 75, 61, .34);
  background: #fffdf8;
  box-shadow: 0 10px 25px rgba(41, 75, 61, .09), inset 0 -3px 0 var(--green);
}
.person-tab.active .person-tab-avatar { background: var(--red); }
.person-tab.active .person-tab-copy small { color: var(--green); }
.calendar-card {
  padding: 20px 15px 17px;
  border-radius: 26px;
  border-color: var(--line);
  background: var(--card);
  box-shadow: 0 16px 42px rgba(58, 53, 38, .075);
}
.calendar-toolbar { margin: 0 3px 12px; align-items: center; }
.month-copy { display: grid; gap: 1px; }
.month-copy > span { color: var(--muted); font-size: 10px; letter-spacing: .12em; }
.calendar-toolbar .month-copy h3 {
  margin: 0;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 27px;
  line-height: 1.1;
}
.month-controls { display: flex; align-items: center; gap: 6px; }
.icon-button {
  width: 34px;
  height: 34px;
  border-color: var(--line);
  background: rgba(247, 242, 231, .8);
  font-family: inherit;
  font-size: 15px;
  line-height: 1;
}
.today-button {
  min-width: 44px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid rgba(198, 91, 66, .25);
  border-radius: 16px;
  color: var(--red-dark);
  background: var(--soft-red);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.calendar-overview {
  min-height: 34px;
  margin: 0 2px 13px;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(66, 107, 88, .065);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
}
.calendar-overview strong { color: var(--green-dark); font-family: Georgia, serif; font-size: 13px; }
.calendar-overview > i { width: 1px; height: 12px; background: var(--line); }
.calendar-legend { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; }
.calendar-legend b { width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(198,91,66,.12); }
.weekdays { margin-bottom: 4px; }
.weekdays span { padding: 7px 0; color: #929185; font-size: 9px; font-weight: 700; }
.weekdays span:nth-last-child(-n+2) { color: #b36a5b; }
.calendar-grid { gap: 3px; }
.calendar-day {
  aspect-ratio: auto;
  min-width: 0;
  height: 49px;
  padding: 6px 2px 5px;
  border: 1px solid transparent;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  color: #51574f;
  background: transparent;
  transition: .18s ease;
}
.calendar-day:not(.outside):active { transform: scale(.95); }
.calendar-day.outside { height: 49px; }
.calendar-day .day-number {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 12px;
  line-height: 1;
}
.calendar-day.today { box-shadow: none; }
.calendar-day.today .day-number { color: var(--red-dark); background: var(--soft-red); font-weight: 800; }
.calendar-day.has-class {
  color: var(--ink);
  background: #f7f3e9;
  border-color: rgba(66, 107, 88, .09);
  box-shadow: none;
}
.calendar-day.has-class .day-number { font-weight: 800; }
.day-marks { min-height: 7px; display: flex; align-items: center; justify-content: center; gap: 2px; }
.day-marks i { width: 5px; height: 5px; border-radius: 50%; background: var(--mark-color); box-shadow: 0 0 0 1px rgba(255,255,255,.75); }
.day-count {
  position: absolute;
  right: 3px;
  top: 3px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--red);
  font-size: 8px;
  font-weight: 800;
}
.calendar-day.selected {
  color: white;
  background: var(--green-dark);
  border-color: var(--green-dark);
  box-shadow: 0 7px 16px rgba(41, 75, 61, .2);
}
.calendar-day.selected::after { display: none; }
.calendar-day.selected .day-number { color: white; background: transparent; }
.calendar-day.selected .day-marks i { box-shadow: 0 0 0 1px rgba(255,255,255,.4); }
.calendar-day.selected .day-count { color: var(--green-dark); background: #f2c880; }
.day-log-panel {
  margin-top: 16px;
  padding: 20px 18px 8px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 253, 247, .72);
  box-shadow: 0 12px 35px rgba(58, 53, 38, .05);
}
.day-log-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.day-log-heading h2 { margin: 0; font-family: "STKaiti", "KaiTi", serif; font-size: 22px; }
.clear-date-button {
  border: 0;
  padding: 7px 0;
  color: var(--red-dark);
  background: transparent;
  font-size: 10px;
  cursor: pointer;
}
.day-log-summary { margin: 7px 0 11px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.calendar-timeline .timeline-item {
  grid-template-columns: 40px 1fr auto;
  margin: 0 -4px;
  padding: 12px 4px;
  border-color: rgba(53,64,55,.09);
}
.calendar-timeline .timeline-item:last-child { border-bottom: 0; }
.calendar-timeline .timeline-mark { width: 36px; height: 36px; border-radius: 12px; }
.calendar-timeline .empty-state { margin: 12px 0 10px; background: rgba(244,239,228,.5); }

@media (max-width: 360px) {
  .calendar-intro { min-height: 160px; padding: 21px 19px; }
  .calendar-intro h2 { font-size: 24px; }
  .month-stamp { width: 68px; height: 80px; }
  .calendar-card { padding-left: 10px; padding-right: 10px; }
  .calendar-day { height: 46px; }
  .calendar-overview { gap: 5px; padding-left: 7px; padding-right: 7px; }
}


/* Unified rounded-line icon system */
.ui-icon {
  width: 20px;
  height: 20px;
  display: block;
  flex: 0 0 auto;
  overflow: visible;
  color: currentColor;
}
.icon-text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.icon-text-button .ui-icon { width: 15px; height: 15px; }
.primary-button .ui-icon { width: 18px; height: 18px; }
.auth-submit-icon .button-tail { margin: 0; }
.circle-add {
  display: grid;
  place-items: center;
  padding: 0;
}
.circle-add .ui-icon { width: 21px; height: 21px; }
.checkin-submit .ui-icon { width: 21px; height: 21px; }
.icon-button {
  display: grid;
  place-items: center;
  padding: 0;
}
.icon-button .ui-icon { width: 17px; height: 17px; }
.close-button {
  display: grid;
  place-items: center;
  padding: 0;
}
.close-button .ui-icon { width: 19px; height: 19px; }
.nav-icon { font-family: inherit; }
.nav-icon .ui-icon { width: 19px; height: 19px; }
.floating-checkin .ui-icon {
  width: 23px;
  height: 23px;
  justify-self: center;
  margin-bottom: 1px;
}
.floating-checkin small { line-height: 1; }
.card-action.icon-text-button {
  gap: 4px;
  border-radius: 9px;
  transition: background .18s ease, color .18s ease;
}
.card-action.icon-text-button:hover { background: rgba(66, 107, 88, .08); color: var(--green-dark); }
.card-action.icon-text-button.danger:hover { background: rgba(198, 91, 66, .09); color: var(--red-dark); }
.delete-record.icon-text-button {
  gap: 4px;
  white-space: nowrap;
}
.delete-record.icon-text-button .ui-icon { width: 14px; height: 14px; }
.text-button.icon-text-button { gap: 5px; }
.text-button.icon-text-button .ui-icon { width: 15px; height: 15px; }

.avatar-button { display: grid; place-items: center; padding: 0; }
.avatar-button .ui-icon { width: 19px; height: 19px; }
.avatar-button::after { display: none; }


/* Records archive and account settings */
.avatar-button { display: grid; place-items: center; }
.avatar-button .ui-icon { width: 22px; height: 22px; }
.records-view { padding-top: 2px; }
.records-intro {
  margin-bottom: 14px;
  padding: 20px;
  border: 1px solid rgba(255, 248, 230, .1);
  border-radius: 28px 28px 10px 28px;
  color: #fff8eb;
  background:
    radial-gradient(circle at 92% 8%, rgba(224, 173, 96, .2), transparent 28%),
    linear-gradient(145deg, #315b4b 0%, #234538 60%, #1d382f 100%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(35, 69, 56, .18);
}
.records-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .08;
  background-image: linear-gradient(rgba(255,255,255,.4) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.4) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(110deg, transparent 25%, black 100%);
}
.records-intro::after {
  content: "";
  position: absolute;
  right: -48px;
  top: -66px;
  width: 168px;
  height: 168px;
  border: 1px solid rgba(244, 201, 132, .18);
  border-radius: 50%;
  box-shadow: 0 0 0 25px rgba(244, 201, 132, .035), 0 0 0 50px rgba(244, 201, 132, .02);
}
.records-intro > * { position: relative; z-index: 1; }
.records-intro-main { display: flex; align-items: flex-start; gap: 14px; }
.archive-mark {
  width: 46px;
  height: 54px;
  flex: 0 0 auto;
  border: 1px solid rgba(244, 201, 132, .45);
  border-radius: 16px 16px 5px 16px;
  display: grid;
  place-items: center;
  color: #f1c887;
  background: rgba(255,255,255,.07);
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.025);
}
.archive-mark .ui-icon { width: 23px; height: 23px; }
.records-intro-copy { min-width: 0; }
.records-intro .eyebrow { margin-bottom: 5px; color: #efc17b; }
.records-intro h2 { margin: 0; font-family: "STKaiti", "KaiTi", serif; font-size: 28px; line-height: 1.26; letter-spacing: .02em; }
.records-intro h2 em { color: #f2ca88; font-style: normal; }
.records-intro-copy > p:last-child { max-width: 310px; margin: 8px 0 0; color: rgba(255,248,235,.66); font-size: 10px; line-height: 1.65; }
.records-intro-footer { margin-top: 13px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.archive-metrics { min-width: 0; display: flex; align-items: center; }
.archive-metrics > span { min-width: 60px; padding: 0 13px; display: grid; gap: 1px; }
.archive-metrics > span:first-child { padding-left: 0; }
.archive-metrics > span + span { border-left: 1px solid rgba(255,255,255,.12); }
.archive-metrics strong { font-family: Georgia, serif; font-size: 18px; line-height: 1.15; font-weight: 500; }
.archive-metrics small { color: rgba(255,248,235,.55); font-size: 8px; white-space: nowrap; }
.export-button {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 13px 13px 4px 13px;
  color: #294b3d;
  background: #f2ca88;
  box-shadow: 0 8px 20px rgba(13, 31, 25, .18);
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}
.export-button .ui-icon { width: 16px; height: 16px; }
.export-button:disabled { opacity: .55; cursor: wait; }
.records-filter-card {
  display: grid;
  gap: 12px;
  padding: 17px;
  border: 1px solid rgba(66, 79, 60, .14);
  border-radius: 24px 24px 8px 24px;
  background: rgba(255, 253, 247, .86);
  box-shadow: 0 12px 32px rgba(58, 53, 38, .055);
  backdrop-filter: blur(10px);
}
.records-filter-heading { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.filter-mark { width: 38px; height: 38px; border-radius: 13px 13px 4px 13px; display: grid; place-items: center; color: var(--green-dark); background: var(--soft-green); }
.filter-mark .ui-icon { width: 18px; height: 18px; }
.records-filter-heading p { margin: 0 0 1px; color: var(--red); font-size: 8px; font-weight: 900; letter-spacing: .16em; }
.records-filter-heading h3 { margin: 0; font-family: "STKaiti", "KaiTi", serif; font-size: 17px; line-height: 1.15; }
.records-filter-heading small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.filter-reset-button { min-height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: transparent; font-size: 9px; font-weight: 800; cursor: pointer; }
.filter-reset-button .ui-icon { width: 13px; height: 13px; }
.records-search-field {
  min-width: 0;
  height: 47px;
  padding-left: 13px;
  border: 1px solid rgba(66, 107, 89, .18);
  border-radius: 15px 15px 5px 15px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  background: rgba(239, 241, 232, .72);
  transition: .2s border-color, .2s box-shadow;
}
.records-search-field:focus-within { border-color: rgba(66, 107, 89, .5); box-shadow: 0 0 0 3px rgba(66, 107, 89, .08); }
.records-search-field > .ui-icon { width: 17px; height: 17px; color: var(--green); }
.records-search-field input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.records-search-field input::placeholder { color: #9a998d; }
.records-search-field button { align-self: stretch; min-width: 62px; padding: 0 14px; border: 0; border-radius: 0 14px 5px 0; color: #fff9ee; background: var(--red); font-size: 11px; font-weight: 900; cursor: pointer; }
.records-advanced-filters { border: 1px solid rgba(58,56,44,.1); border-radius: 14px; background: rgba(255,255,255,.38); overflow: hidden; }
.records-advanced-filters summary { min-height: 42px; padding: 0 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto 15px; align-items: center; gap: 8px; color: var(--green-dark); cursor: pointer; list-style: none; }
.records-advanced-filters summary::-webkit-details-marker { display: none; }
.records-advanced-filters summary > span { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 900; }
.records-advanced-filters summary > span .ui-icon { width: 15px; height: 15px; }
.records-advanced-filters summary > small { color: var(--muted); font-size: 8px; }
.records-advanced-filters .advanced-arrow { width: 14px; height: 14px; color: var(--muted); transition: transform .2s ease; }
.records-advanced-filters[open] .advanced-arrow { transform: rotate(90deg); }
.records-advanced-body { display: grid; gap: 10px; padding: 0 11px 11px; border-top: 1px solid rgba(58,56,44,.08); }
.records-advanced-body .records-filter-grid { margin-top: 11px; }
.records-filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 10px; }
.records-filter-card .field { gap: 6px; }
.records-filter-card .field > span:first-child { padding-left: 2px; color: #52574f; font-size: 10px; }
.records-control-shell {
  position: relative;
  min-width: 0;
  height: 42px;
  border: 1px solid rgba(58,56,44,.12);
  border-radius: 12px;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.68);
  cursor: pointer;
  transition: .2s border-color, .2s box-shadow, .2s background;
}
.records-control-shell:focus-within { border-color: rgba(200,79,56,.55); background: rgba(255,255,255,.9); box-shadow: 0 0 0 3px rgba(200,79,56,.08); }
.records-control-shell select,
.records-control-shell input {
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 0 34px 0 12px;
  border: 0;
  border-radius: inherit;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}
.records-control-shell select { appearance: none; }
.records-control-shell > .ui-icon { position: absolute; right: 11px; width: 15px; height: 15px; color: var(--green); pointer-events: none; }
.records-select-shell > .ui-icon { transform: rotate(90deg); }
.records-date-picker input { position: relative; font-size: 10px; }
.records-date-picker input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; margin: 0; opacity: 0; cursor: pointer; }
.records-result-heading { display: flex; align-items: flex-end; justify-content: space-between; margin: 23px 4px 13px; }
.records-result-heading .eyebrow { margin-bottom: 4px; }
.records-result-heading h2 { margin: 0; font-family: "STKaiti", "KaiTi", serif; font-size: 24px; }
.records-result-heading > span { padding: 5px 9px; border-radius: 10px; color: var(--green-dark); background: var(--soft-green); font-size: 9px; font-weight: 800; }
.records-list { display: grid; gap: 20px; }
.record-month-group { display: grid; gap: 9px; }
.record-month-heading { display: flex; align-items: center; gap: 9px; padding: 0 3px; color: var(--muted); }
.record-month-heading::after { content: ""; height: 1px; flex: 1; order: 2; background: linear-gradient(90deg, var(--line), transparent); }
.record-month-heading span { color: var(--ink); font-family: "STKaiti", "KaiTi", serif; font-size: 15px; font-weight: 800; }
.record-month-heading small { order: 3; font-size: 8px; white-space: nowrap; }
.record-month-items { display: grid; gap: 9px; }
.record-card {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
  min-height: 92px;
  padding: 13px 13px 13px 11px;
  border: 1px solid rgba(58,56,44,.13);
  border-radius: 20px 20px 7px 20px;
  background: rgba(255, 253, 247, .9);
  box-shadow: 0 9px 25px rgba(58, 53, 38, .045);
  position: relative;
  overflow: hidden;
}
.record-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--record-color); }
.record-date { min-height: 64px; border-right: 1px solid var(--line); display: grid; align-content: center; justify-items: center; gap: 3px; }
.record-date strong { color: var(--record-color); font-family: Georgia, serif; font-size: 24px; line-height: 1; font-weight: 500; }
.record-date small { color: var(--muted); font-size: 8px; }
.record-content { min-width: 0; display: grid; align-content: center; gap: 7px; }
.record-title { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.record-title-copy { min-width: 0; display: grid; gap: 4px; }
.record-title strong { font-size: 13px; line-height: 1.2; }
.record-course { max-width: 100%; display: inline-flex; align-items: center; gap: 5px; overflow: hidden; color: var(--green-dark); font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.record-course::before { content: ""; width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--record-color); box-shadow: 0 0 0 3px rgba(66, 107, 89, .1); }
.record-delete { width: 29px; height: 29px; flex: 0 0 auto; padding: 0; border: 0; border-radius: 10px; display: grid; place-items: center; color: #a64a3b; background: var(--soft-red); cursor: pointer; }
.record-delete .ui-icon { width: 14px; height: 14px; }
.record-note { margin: 0; overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.record-note.is-empty { color: #aaa89d; }
.record-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 8px; }
.record-meta time { color: inherit; }
.record-session-chip { padding: 3px 6px; border-radius: 7px; color: var(--red-dark); background: var(--soft-red); font-weight: 800; white-space: nowrap; }
.records-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 18px 2px 8px; }
.records-pagination > span { color: var(--muted); font-size: 9px; text-align: center; }
.pagination-button { min-height: 40px; border: 1px solid var(--line); border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: var(--green-dark); background: rgba(255,253,247,.72); font-size: 10px; font-weight: 800; cursor: pointer; }
.pagination-button:last-child { justify-self: stretch; }
.pagination-button:disabled { opacity: .38; cursor: default; }
.pagination-button .ui-icon { width: 15px; height: 15px; }
.day-log-actions { display: flex; align-items: center; gap: 10px; }
.day-log-actions .ui-icon { width: 14px; height: 14px; }
.account-sheet { gap: 16px; }
.account-summary { display: flex; align-items: center; gap: 13px; padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.45); }
.account-mark { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: white; background: var(--green-dark); }
.account-mark .ui-icon { width: 23px; height: 23px; }
.account-summary strong, .account-summary small { display: block; }
.account-summary strong { margin-bottom: 3px; font-size: 15px; }
.account-summary small { color: var(--muted); font-size: 10px; }
.account-summary > div { min-width: 0; flex: 1; }
.account-role { flex: 0 0 auto; padding: 5px 8px; border: 1px solid rgba(198,91,66,.18); border-radius: 999px; color: var(--red-dark); background: rgba(198,91,66,.08); font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.admin-invite-panel { position: relative; overflow: hidden; display: grid; gap: 12px; padding: 15px; border: 1px solid rgba(65,103,136,.14); border-radius: 19px 19px 7px 19px; background: linear-gradient(135deg, rgba(255,253,247,.92), rgba(224,235,240,.72)); }
.admin-invite-panel::after { content: ""; position: absolute; right: -28px; top: -35px; width: 86px; height: 86px; border: 1px solid rgba(65,103,136,.12); border-radius: 50%; pointer-events: none; }
.admin-invite-heading { position: relative; z-index: 1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.admin-invite-mark { width: 38px; height: 38px; overflow: hidden; display: grid; place-items: center; border-radius: 13px 13px 5px 13px; color: #416788; background: rgba(65,103,136,.11); }
.admin-invite-mark .ui-icon { width: 18px; height: 18px; }
.admin-invite-heading strong, .admin-invite-heading small { display: block; }
.admin-invite-heading strong { margin-bottom: 3px; font-size: 13px; }
.admin-invite-heading small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.generate-invite-button { min-height: 36px; padding: 0 10px; border: 1px solid rgba(65,103,136,.18); border-radius: 12px 12px 4px 12px; color: #416788; background: rgba(255,253,247,.72); font-size: 10px; font-weight: 900; cursor: pointer; }
.generate-invite-button:disabled { opacity: .55; cursor: wait; }
.generate-invite-button .ui-icon { width: 15px; height: 15px; }
.invite-result { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 10px 11px 13px; border: 1px dashed rgba(65,103,136,.24); border-radius: 13px; background: rgba(255,255,255,.48); }
.invite-result small { display: block; margin-bottom: 4px; color: var(--muted); font-size: 8px; }
.invite-result code { display: block; overflow-x: auto; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 15px; font-weight: 700; letter-spacing: .08em; white-space: nowrap; scrollbar-width: none; }
.invite-result code::-webkit-scrollbar { display: none; }
.copy-invite-button { min-height: 36px; padding: 0 10px; border: 0; border-radius: 11px 11px 4px 11px; color: #fffaf1; background: #416788; font-size: 10px; font-weight: 900; cursor: pointer; }
.copy-invite-button .ui-icon { width: 14px; height: 14px; }
.admin-invite-panel > p { position: relative; z-index: 1; margin: -2px 1px 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.password-form { display: grid; gap: 14px; padding-top: 3px; }
.settings-heading { display: flex; align-items: flex-start; gap: 10px; }
.settings-heading > .ui-icon { width: 20px; height: 20px; color: var(--red-dark); }
.settings-heading strong, .settings-heading small { display: block; }
.settings-heading strong { margin-bottom: 3px; font-size: 13px; }
.settings-heading small { color: var(--muted); font-size: 9px; line-height: 1.5; }
.logout-button { min-height: 45px; border: 1px solid rgba(166, 74, 59, .18); border-radius: 14px; color: #9d493c; background: rgba(166, 74, 59, .06); font-size: 12px; font-weight: 800; cursor: pointer; }
.logout-button .ui-icon { width: 17px; height: 17px; }

@media (max-width: 390px) {
  .records-intro { padding: 18px; }
  .records-intro h2 { font-size: 25px; }
  .archive-mark { width: 42px; height: 50px; }
  .records-intro-footer { align-items: stretch; flex-direction: column; }
  .archive-metrics { justify-content: space-between; }
  .archive-metrics > span { flex: 1; min-width: 0; }
  .export-button { width: 100%; }
  .records-filter-card { padding: 15px; }
  .records-filter-heading { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .records-filter-grid { gap: 10px 8px; }
  .records-control-shell select,
  .records-control-shell input { padding-left: 10px; padding-right: 30px; }
  .records-control-shell > .ui-icon { right: 9px; }
  .record-card { grid-template-columns: 46px minmax(0, 1fr); gap: 9px; padding-right: 11px; }
}
