/* Account / kids / auth helper pages — extends brand.css */
body.account-page {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, var(--jand-purple-light) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, var(--jand-orange-light) 0%, transparent 50%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
}

.account-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.account-wrap--wide {
  max-width: 920px;
}

.account-wrap .crumb {
  font-weight: 600;
  margin: 0 0 24px;
}

.account-wrap .crumb a {
  color: var(--sub);
  text-decoration: none;
}

.account-wrap .brand {
  display: flex;
  justify-content: center;
  margin: 0 0 28px;
}

.account-wrap .brand img {
  height: 56px;
  width: auto;
}

.account-wrap h1 {
  font-size: clamp(1.85rem, 4.5vw, 2.5rem);
  margin: 0 0 12px;
  text-align: center;
  letter-spacing: -0.02em;
}

.account-wrap .lede {
  text-align: center;
  color: var(--sub);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.55;
  margin: 0 0 28px;
}

.account-panel {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 14px;
}

.account-panel h2 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  color: var(--jand-purple);
}

.account-panel p {
  margin: 0 0 10px;
  color: var(--sub);
  font-weight: 600;
  line-height: 1.55;
  font-size: 0.98rem;
}

.account-panel p:last-child {
  margin-bottom: 0;
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
  justify-content: center;
}

.tabs button {
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--sub);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
}

.tabs button.active {
  border-color: var(--jand-purple);
  color: var(--ink);
  background: var(--jand-purple-light);
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 0 8px;
  color: var(--ink);
}

.field .hint {
  display: block;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--sub);
  margin: -4px 0 8px;
}

.field input[type='email'],
.field input[type='password'],
.field input[type='text'],
.field input[type='date'],
.field input[type='number'],
.field select,
.field textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  line-height: 1.45;
  appearance: none;
  -webkit-appearance: none;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%239B6FC3' d='M4.2 6.2a.75.75 0 0 1 1.06 0L8 8.94l2.74-2.74a.75.75 0 1 1 1.06 1.06l-3.27 3.27a.75.75 0 0 1-1.06 0L4.2 7.26a.75.75 0 0 1 0-1.06z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 42px;
  cursor: pointer;
}

.field input[type='date'] {
  min-height: 3.25rem;
  padding-right: 14px;
}

.field input[type='date']::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.7;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--jand-purple);
  box-shadow: 0 0 0 3px rgba(155, 111, 195, 0.2);
}

[hidden] {
  display: none !important;
}

.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 12px;
  font-weight: 600;
  color: var(--sub);
  font-size: 0.95rem;
  line-height: 1.4;
}

.check-row input[type='checkbox'] {
  margin-top: 3px;
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--jand-purple);
  cursor: pointer;
}

.check-row--warn {
  padding: 8px 10px;
  border-radius: 12px;
  background: #ffe8e8;
  color: #8b1a2c;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.form-msg {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.45;
}

.form-msg--error {
  background: #ffe8e8;
  color: #8b1a2c;
  border: 2px solid #f5b5b5;
}

.form-msg--ok {
  background: #e8f8ee;
  color: #1a5c34;
  border: 2px solid #a8d9b8;
}

.form-msg--info {
  background: #f3ebfa;
  color: var(--sub);
  border: 2px solid var(--line);
}

.turnstile-slot {
  margin: 8px 0 14px;
  min-height: 0;
  width: 100%;
}

.turnstile-slot.turnstile-slot--ready {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  box-sizing: border-box;
}

.turnstile-slot iframe {
  max-width: 100%;
}

.field .req {
  color: var(--jand-purple);
  font-weight: 700;
}

.field .optional-tag {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--sub);
}

.family-code {
  font-size: 1.55rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  text-align: center;
  padding: 12px;
  background: var(--bg);
  border-radius: 14px;
  border: 2px dashed var(--jand-purple-light);
  margin: 8px 0 12px;
  word-break: break-word;
}

.family-word-form {
  margin-top: 4px;
}

.profile-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-card {
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--bg);
}

.profile-card strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.profile-card .meta {
  font-size: 0.85rem;
  color: var(--sub);
  font-weight: 600;
  margin-bottom: 8px;
}

.profile-card .access-block {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7f1ff;
  border: 1px solid var(--line);
}

.profile-card .access-label {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--jand-purple);
}

.profile-card .access-line {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--sub);
  word-break: break-word;
}

.profile-card .access-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
}

.profile-card .access-row + .access-row {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.profile-card .access-remove {
  flex-shrink: 0;
  padding: 6px 10px;
  font-size: 0.85rem;
}

.profile-card .row-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.profile-card .row-actions .btn {
  width: 100%;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}

@media (min-width: 560px) {
  .profile-card .row-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.unlock-inline {
  border: 2px solid var(--jand-purple-light);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  margin: 0 0 4px;
}

.unlock-inline h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.unlock-inline > p {
  margin: 0 0 10px;
  color: var(--sub);
  font-weight: 600;
  font-size: 0.92rem;
}

.icon-picker-wrap {
  margin: 8px 0 4px;
}

.icon-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.icon-pick {
  font-family: var(--font);
  border: 2px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 12px 8px;
  cursor: pointer;
  min-height: 64px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.icon-pick:hover:not(:disabled) {
  border-color: var(--jand-purple-light);
  transform: translateY(-1px);
}

.icon-pick.selected {
  border-color: var(--jand-purple);
  background: #f3eaff;
}

.icon-pick:disabled {
  opacity: 0.5;
  cursor: default;
  box-shadow: none;
  transform: none;
}

.icon-glyph {
  font-size: 1.85rem;
  display: block;
  line-height: 1;
  font-family: "JAND Emoji", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

.icon-sequence {
  margin-top: 18px;
  margin-bottom: 6px;
  padding: 18px 16px 14px;
  border: 2px solid var(--jand-purple-light);
  border-radius: var(--radius);
  background: #f7f1ff;
}

.icon-sequence-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 52px;
}

.icon-sequence-icon {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  line-height: 1;
  border-radius: 0;
  box-shadow: none;
}

.icon-sequence-icon .icon-glyph {
  font-size: 2.1rem;
}

.icon-sequence-icon:hover {
  transform: scale(1.08);
}

.icon-sequence-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--jand-purple-light);
  flex-shrink: 0;
}

.icon-sequence-actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.icon-sequence-clear {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 4px 8px;
  margin: 0;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--jand-purple);
  cursor: pointer;
  box-shadow: none;
  border-radius: 0;
}

.icon-sequence-clear:hover {
  color: var(--ink);
}

.account-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.account-modal[hidden] {
  display: none !important;
}

.account-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 18, 36, 0.45);
}

.account-modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 22px 22px 18px;
  box-shadow: var(--shadow);
}

#share-child-modal .account-modal-card {
  width: min(100%, 480px);
}

#share-child-url {
  font-size: 0.85rem;
  word-break: break-all;
}

.share-points {
  margin: 0 0 12px;
  padding-left: 1.15em;
  color: var(--sub);
  font-weight: 600;
  line-height: 1.45;
}

.share-points li + li {
  margin-top: 6px;
}

.share-accept-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
  max-width: 22rem;
}

.share-accept-actions .btn {
  width: 100%;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}

.account-modal-card h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  color: var(--jand-purple);
}

.account-modal-card p {
  margin: 0 0 10px;
  color: var(--sub);
  font-weight: 600;
  line-height: 1.5;
}

.account-modal-card .form-actions {
  margin-top: 16px;
}

.unlock-view {
  margin-top: 12px;
  padding: 14px 16px;
  border: 2px solid var(--jand-purple-light);
  border-radius: var(--radius);
  background: #f7f1ff;
}

.unlock-view .icon-sequence-row {
  justify-content: flex-start;
  gap: 14px;
}

.unlock-view .icon-glyph {
  font-size: 2rem;
}

.kid-choice {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--font);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 16px;
  margin: 0 0 8px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  color: var(--ink);
}

.kid-choice:hover,
.kid-choice.selected {
  border-color: var(--jand-purple);
  background: var(--jand-purple-light);
}

.hidden {
  display: none !important;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: center;
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--jand-purple);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-actions .btn {
  padding: 6px 10px;
  font-size: 0.8rem;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 10px;
}

.admin-stat {
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: #f7f1ff;
  text-align: center;
}

.admin-stat strong {
  display: block;
  font-size: 1.4rem;
  color: var(--jand-purple);
  margin-bottom: 4px;
}

.admin-stat span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--sub);
}

.report-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.report-filters-actions {
  grid-column: 1 / -1;
  margin-top: 4px;
}

.report-week-headline {
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--ink);
}

.report-suggestion {
  margin: 14px 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid var(--jand-purple-light);
  background: #f7f1ff;
}

.report-suggestion strong {
  display: block;
  margin-bottom: 6px;
  color: var(--jand-purple);
}

.report-suggestion p {
  margin: 0;
  font-weight: 600;
  color: var(--sub);
  line-height: 1.45;
}

.report-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  font-weight: 600;
}

.report-table th,
.report-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.report-table th {
  color: var(--jand-purple);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.board-table .board-row-you td {
  background: color-mix(in srgb, var(--jand-orange-light) 55%, #fff);
}

.challenge-hero {
  text-align: center;
}

.challenge-emoji {
  font-size: 2.4rem;
  margin: 0 0 8px;
  line-height: 1;
}

.challenge-badge {
  display: inline-block;
  margin: 8px 0 4px;
  padding: 8px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--jand-orange) 18%, #fff);
  border: 2px solid var(--jand-orange);
  color: var(--ink);
  font-weight: 800;
}

.stage-pips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.stage-pip {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
  color: var(--sub);
  font-size: 0.85rem;
  font-weight: 800;
}

.stage-pip.is-done {
  background: var(--jand-purple);
  border-color: var(--jand-purple);
  color: #fff;
}

.profile-boards-row {
  margin: 8px 0 4px;
  font-size: 0.9rem;
}

.together-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--sub);
  cursor: pointer;
}

.together-check input {
  accent-color: var(--jand-purple);
  width: 1.05rem;
  height: 1.05rem;
}

@media (max-width: 640px) {
  .report-filters {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .icon-picker {
    grid-template-columns: repeat(3, 1fr);
  }
}
