:root {
  color-scheme:dark;
  --bg:#171717;
  --card:#222222;
  --raised:#2c2c2c;
  --muted:#aaaaaa;
  --text:#eeeeee;
  --line:#393939;
  --accent:#d2d2d2;
  --green:#96d5ad;
  --yellow:#ebc876;
  --red:#f19c95;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-synthesis:none;
}
* {
  box-sizing:border-box;
}
html {
  scrollbar-gutter:stable;
}
.home-board-preview {
  margin-top:28px;
  padding-top:28px;
  border-top:1px solid var(--line);
}
body {
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-size:15px;
  line-height:1.55;
}
a {
  color:inherit;
  text-decoration:none;
}
button,input,textarea,select {
  font:inherit;
}
button,.button {
  min-height:44px;
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px 16px;
  background:var(--raised);
  color:var(--text);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  text-align:center;
}
button:hover,.button:hover {
  background:#383838;
}
button:disabled {
  cursor:wait;
  opacity:.6;
}
button svg,.button svg {
  width:19px;
  height:19px;
  flex:none;
}
button.primary,.primary {
  background:var(--accent);
  color:#1c1c1c;
  border-color:transparent;
  font-weight:650;
}
button.danger {
  background:#54322f;
  border-color:#73443f;
  color:#ffd1c9;
}
button[aria-pressed=true] {
  border-color:#858585;
  background:#3a3a3a;
}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible {
  outline:2px solid var(--accent);
  outline-offset:3px;
}
input,textarea,select {
  background:#1b1b1b;
  border:1px solid #4b4b4b;
  border-radius:10px;
  padding:11px 12px;
  color:var(--text);
  width:100%;
  min-height:44px;
}
input[type=checkbox] {
  appearance:auto;
  accent-color:var(--accent);
  width:21px;
  height:21px;
  min-height:21px;
  flex:none;
  margin:0;
}
textarea {
  resize:vertical;
}
label {
  display:block;
}
form>label {
  margin:18px 0;
}
label>input:not([type=checkbox]),label>textarea,label>select {
  display:block;
  margin-top:7px;
}
svg {
  width:24px;
  height:24px;
  vertical-align:middle;
}
h1,h2,h3,p {
  margin-top:0;
}
h1 {
  font-size:28px;
  font-weight:570;
  line-height:1.13;
  letter-spacing:-.7px;
  margin-bottom:12px;
}
h2 {
  font-size:21px;
  font-weight:580;
  letter-spacing:-.4px;
  line-height:1.35;
  margin-bottom:12px;
}
h3 {
  font-size:16px;
}
p {
  margin-bottom:16px;
}
.muted {
  color:var(--muted);
}
.small {
  font-size:12px;
}
main {
  max-width:1240px;
  margin:0 auto;
  padding:28px 20px 120px;
}
.card {
  background:var(--card);
  border:1px solid #2e2e2e;
  border-radius:16px;
  padding:24px;
}
.bottom-nav {
  position:fixed;
  z-index:10;
  bottom:22px;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  padding:6px;
  gap:4px;
  background:#262626f5;
  backdrop-filter:blur(16px);
  border:1px solid #414141;
  border-radius:16px;
  box-shadow:0 8px 36px #0007;
}
.bottom-nav a {
  width:106px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  padding:14px 12px;
  font-size:13px;
  color:var(--muted);
  border-radius:10px;
  min-height:48px;
}
.bottom-nav a svg {
  width:20px;
  height:20px;
}
.bottom-nav a[aria-current=page] {
  color:var(--accent);
  background:#3b3b3b;
}
.row-actions {
  display:flex;
  align-items:center;
  gap:4px;
}
.icon-button {
  padding:10px;
  width:44px;
  height:44px;
  min-width:44px;
  background:transparent;
  border:0;
  color:var(--muted);
}
.text-button {
  border:0;
  background:transparent;
  color:var(--muted);
  font-size:12px;
  padding:8px;
}
.pending {
  color:#c4c4c4;
}
.completed {
  color:var(--green);
}
.cover {
  color:var(--yellow);
}
.overdue {
  color:var(--red);
}
.home-layout {
  display:grid;
  grid-template-columns:1fr;
  gap:18px;
  align-items:stretch;
}
.personal-card {
  padding:24px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:24px;
}
.personal-icon {
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  width:44px;
  flex:none;
  height:44px;
}
.personal-icon svg {
  width:32px;
  height:32px;
}
.duty-title {
  font-size:26px;
  margin-bottom:0;
  letter-spacing:-.6px;
}
.home-controls {
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:0;
}
.home-controls button[aria-pressed=true] {
  font-weight:700;
  color:#1b1b1b;
}
.home-controls button[data-action=complete][aria-pressed=true] {
  background:var(--green);
  border-color:var(--green);
}
.home-controls button[data-action=cover][aria-pressed=true] {
  background:var(--yellow);
  border-color:var(--yellow);
}
.status-dot {
  display:inline-block;
  width:9px;
  height:9px;
  border-radius:50%;
  background:currentColor;
  flex:none;
}
.reminder {
  padding:24px;
}
.reminder p {
  font-size:13px;
}
.widget-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
  align-items:stretch;
}
.widget {
  min-width:0;
  padding:18px 20px;
  position:relative;
  display:flex;
  flex-direction:column;
}
.widget h2 {
  font-size:18px;
  margin:0 0 8px;
  padding-right:32px;
  min-width:0;
  overflow-wrap:anywhere;
}
.note-body {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font-size:14px;
  color:#d5d5d5;
  line-height:1.8;
  margin-bottom:8px;
}
.check-item {
  display:flex;
  gap:12px;
  padding:12px 0;
  border-bottom:1px solid #363636;
  min-height:48px;
  align-items:center;
  font-size:14px;
  overflow-wrap:anywhere;
}
.check-item span {
  min-width:0;
}
.check-item.is-completed {
  display:none;
  color:var(--muted);
}
.show-completed .check-item.is-completed {
  display:flex;
}
.check-item.is-completed span {
  text-decoration:line-through;
}
.checklist-footer {
  display:flex;
  justify-content:flex-start;
  align-items:center;
  padding-top:0;
  margin-bottom:-8px;
}
.empty-state {
  grid-column:1/-1;
  text-align:center;
  padding:24px;
  margin:0;
}
.rota-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 300px;
  gap:18px;
  align-items:start;
}
.rota-card {
  padding:0;
  overflow:hidden;
}
.table-scroll {
  overflow:auto;
  max-height:650px;
  scrollbar-color:#646464 #252525;
}
.rota {
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  table-layout:auto;
}
.rota th {
  min-width:44px;
  font-size:11px;
  font-weight:550;
  color:#d3d3d3;
  text-align:center;
  white-space:nowrap;
  height:60px;
  padding:5px 0;
  background:#222222;
}
.rota th>span {
  display:block;
  width:44px;
  margin-inline:auto;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  padding:0 3px;
}
.rota th small {
  display:block;
  font-size:9px;
  font-weight:400;
  color:var(--muted);
  letter-spacing:.3px;
  margin-top:3px;
}
.rota .week-label {
  width:80px;
  text-align:left;
  padding-left:18px;
  position:sticky;
  left:0;
  z-index:2;
  border-right:1px solid #373737;
}
.rota thead th {
  position:sticky;
  top:0;
  z-index:3;
  box-shadow:0 1px #373737;
}
.rota thead .week-label {
  z-index:4;
}
.rota td {
  height:48px;
  text-align:center;
  padding:0;
  border-top:1px solid #2e2e2e;
}
.rota tbody th {
  height:48px;
  border-top:1px solid #2e2e2e;
}
.rota .mine {
  background:#2d2d2d;
}
.rota .current td,.rota .current th {
  background:#373737;
}
.rota .current .mine {
  background:#4b4b4b;
}
.rota .current th {
  color:var(--text);
  box-shadow:inset 3px 0 #d2d2d2;
}
.duty-cell {
  position:relative;
  padding:10px;
  min-height:44px;
  min-width:44px;
  width:44px;
  height:44px;
  background:transparent;
  border:0;
  border-radius:9px;
}
.duty-cell:hover {
  background:#ffffff0d;
}
.duty-cell svg {
  width:23px;
  height:23px;
}
.free-slot {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  color:#737373;
}
.free-slot svg {
  width:15px;
}
.week-navigation {
  display:flex;
  justify-content:space-between;
  padding:8px 12px;
  border-top:1px solid var(--line);
  font-size:12px;
}
.week-navigation a {
  padding:10px 6px;
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
}
.legends {
  padding:19px 24px;
  border-top:1px solid var(--line);
}
.chore-legend,.state-legend {
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:13px 17px;
  font-size:11px;
  color:#bdbdbd;
  margin-bottom:18px;
}
.chore-legend span {
  display:flex;
  align-items:center;
  gap:6px;
}
.chore-legend svg {
  width:16px;
  height:16px;
}
.state-legend {
  gap:8px 14px;
  margin-bottom:0;
}
.status-title {
  display:flex;
  align-items:center;
  gap:11px;
  margin-bottom:0;
}
.status-title h2 {
  font-size:16px;
  margin:0;
}
.attention-item strong {
  font-size:13px;
}
.attention-item p {
  font-size:11px;
  color:var(--muted);
  margin:2px 0;
}
.attention-icon svg {
  width:21px;
  height:21px;
}
.attention-icon {
  position:relative;
  display:inline-flex;
}
.login-wrap {
  max-width:460px;
  margin:35px auto;
}
.login-card {
  margin-top:0;
}
.login-card h2 {
  margin-bottom:25px;
}
.login-card .primary {
  width:100%;
  margin:8px 0 20px;
}
.login-card p:last-child {
  margin-bottom:0;
}
.login-card ul {
  padding-left:18px;
  color:var(--red);
  font-size:13px;
}
dialog {
  background:var(--card);
  color:var(--text);
  border:1px solid #494949;
  border-radius:16px;
  padding:28px;
  width:min(540px,calc(100% - 24px));
  max-height:90dvh;
  box-shadow:0 30px 100px #0008;
}
dialog::backdrop {
  background:#080808bb;
  backdrop-filter:blur(4px);
}
.dialog-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
}
.dialog-heading h2 {
  margin:0;
}
.dialog-heading button {
  font-size:24px;
  background:transparent;
  border:0;
  padding:0;
  width:44px;
}
.dialog-footer {
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:26px;
}
.segmented {
  display:flex;
  gap:8px;
  margin:20px 0;
}
.segmented button {
  flex:1;
}
.form-error {
  font-size:13px;
  color:var(--red);
  padding:12px;
  background:#4b2a293b;
  border-radius:9px;
  white-space:pre-wrap;
}
.item-editor {
  display:flex;
  align-items:center;
  gap:8px;
  margin:10px 0;
}
.item-editor button {
  padding:8px;
  width:44px;
  flex:none;
}
.connection {
  position:sticky;
  top:0;
  z-index:20;
  text-align:center;
  background:#503b23;
  color:#ffe2b1;
  font-size:13px;
  padding:10px;
}
#toast {
  position:fixed;
  bottom:calc(92px + env(safe-area-inset-bottom));
  left:50%;
  transform:translateX(-50%);
  display:flex;
  align-items:center;
  gap:11px;
  min-height:48px;
  padding:6px 7px 6px 14px;
  background:#e8e8e8;
  color:#1b1b1b;
  border:1px solid #fff4;
  border-radius:16px;
  box-shadow:0 12px 36px #0009;
  z-index:30;
  width:max-content;
  max-width:calc(100vw - 28px);
  font-size:14px;
  font-weight:600;
  overflow:hidden;
}
#toast .toast-message { min-width:0; overflow-wrap:anywhere; }
.skip {
  position:absolute;
  top:-70px;
  left:20px;
  z-index:100;
  padding:12px;
  background:var(--accent);
  color:#111;
}
.skip:focus {
  top:10px;
}
[hidden] {
  display:none!important;
}
.draft-bar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px;
}
.draft-bar p {
  margin:0;
  font-size:12px;
  color:var(--muted);
}
.draft-tabs {
  display:flex;
}
.draft-tabs button {
  background:transparent;
}
.draft-section h3 {
  margin-bottom:5px;
}
.draft-row {
  padding:18px 0;
  border-top:1px solid var(--line);
}
.resident-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 0;
}
.resident-row label {
  display:flex;
  align-items:center;
  gap:12px;
}
.resident-row .row-actions button {
  width:44px;
  padding:8px;
}
.group-row,.chore-row {
  padding:22px;
  background:#1c1c1c;
  border-radius:15px;
  margin:14px 0;
}
.group-row>label,.chore-row>label {
  margin-bottom:13px;
}
.member-list {
  display:flex;
  flex-wrap:wrap;
  gap:8px 16px;
  margin:18px 0;
}
.member-list label {
  display:flex;
  align-items:center;
  gap:9px;
  min-height:38px;
  font-size:13px;
}
.two-fields {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:15px;
}
.account-card label {
  font-size:12px;
}
.account-flags label {
  display:flex;
  align-items:center;
  gap:8px;
}
.account-card input {
  margin-top:5px;
}
.account-card input[type=checkbox] {
  margin:0;
}
.account-card form>label {
  margin:10px 0;
}
.settings-description {
  font-size:13px;
  max-width:730px;
  color:var(--muted);
}
@media(max-width:1050px) {
  .rota-layout {
    grid-template-columns:minmax(0,1fr) 250px;
  }
  .widget-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:780px) {
  .rota-layout {
    display:flex;
    flex-direction:column;
  }
  .rota-card {
    width:100%;
  }
  .home-layout {
    grid-template-columns:1fr;
  }
  .personal-card {
    padding:27px;
  }
}
@media(max-width:520px) {
  body {
    font-size:14px;
  }
  main {
    padding:18px 14px 120px;
  }
  h1 {
    font-size:28px;
  }
  .card {
    border-radius:16px;
  }
  .widget-grid {
    grid-template-columns:1fr;
    gap:15px;
  }
  .widget {
    padding:18px 20px;
  }
  .bottom-nav {
    bottom:12px;
    max-width:calc(100% - 28px);
    width:400px;
    padding:5px;
    border-radius:16px;
  }
  .bottom-nav a {
    width:auto;
    flex:1;
    gap:4px;
    font-size:11px;
    flex-direction:column;
    padding:8px 4px;
    min-width:0;
  }
  .bottom-nav a svg {
    width:19px;
  }
  .personal-card {
    padding:24px;
  }
  .home-controls {
    gap:10px;
  }
  .home-controls button {
    font-size:13px;
  }
  .duty-title {
    font-size:24px;
  }
  .rota .week-label {
    width:68px;
    padding-left:10px;
  }
  .rota th {
    font-size:10px;
  }
  .legends {
    padding:18px;
  }
  .chore-legend {
    gap:12px;
  }
  .login-wrap {
    margin-top:15px;
  }
  .login-card {
    padding:24px;
  }
  dialog {
    padding:22px;
  }
  .draft-bar {
    flex-wrap:wrap;
    padding:15px;
  }
  .draft-bar .row-actions {
    width:100%;
  }
  .draft-bar button {
    flex:1;
  }
  .draft-tabs {
    gap:6px;
  }
  .draft-tabs button {
    padding:10px 12px;
    font-size:12px;
    flex:1;
  }
  .two-fields {
    grid-template-columns:1fr;
  }
  .group-row,.chore-row {
    padding:17px;
  }
  .table-scroll {
    max-height:620px;
  }
}
@media(prefers-reduced-motion:no-preference) {
  button,a {
    transition:background .15s,color .15s;
  }
  dialog[open] {
    animation:appear .16s ease;
  }
  @keyframes appear {
    from {
      opacity:0;
      transform:translateY(8px);
    }
    to {
      opacity:1;
      transform:translateY(0);
    }
  }
}
#current-week {
  scroll-margin-top:180px;
}
summary {
  cursor:pointer;
  min-height:44px;
  padding:12px 0;
  color:var(--accent);
}
hr {
  border:0;
  border-top:1px solid var(--line);
  margin:26px 0;
}

.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
.duty-summary {
  display:flex;
  align-items:center;
  gap:14px;
  margin:0;
  flex:1;
  min-width:0;
}
.duty-summary p {
  margin:5px 0 0;
  font-size:13px;
}
.free-week {
  font-size:22px;
  margin:14px 0 8px;
}
.duty-summary>div:last-child {
  min-width:0;
}
.duty-title {
  overflow-wrap:anywhere;
}
.duty-meta {
  display:flex;
  flex-wrap:wrap;
  gap:4px 18px;
}
.week-navigation {
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:4px;
}
.week-navigation a:hover {
  background:var(--raised);
}
.week-navigation a:nth-child(2) {
  color:var(--text);
  font-weight:600;
}
@media(max-width:780px), (max-aspect-ratio:1/1) {
  .widget-grid {
    grid-template-columns:1fr;
  }
  .home-controls {
    width:100%;
  }
  .home-controls button {
    flex:1;
  }
  .personal-card {
    gap:20px;
  }
}

.widget-menu {
  position:absolute;
  top:8px;
  right:8px;
  z-index:2;
}
.widget-menu[open] {
  z-index:6;
}
.widget-menu summary {
  display:flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  padding:0;
  border-radius:8px;
  list-style:none;
  color:var(--muted);
  font-size:24px;
  line-height:1;
}
.widget-menu summary::-webkit-details-marker {
  display:none;
}
.widget-menu summary:hover,.widget-menu[open] summary {
  background:var(--raised);
  color:var(--text);
}
.widget-menu summary:focus-visible {
  outline:2px solid var(--accent);
  outline-offset:2px;
}
.widget-menu-items {
  position:absolute;
  right:0;
  top:46px;
  width:116px;
  padding:4px;
  background:var(--raised);
  border:1px solid var(--line);
  border-radius:10px;
  box-shadow:0 6px 20px #0006;
}
.widget-menu-items button {
  width:100%;
  justify-content:flex-start;
  border:0;
  background:transparent;
  padding:8px 12px;
  font-size:13px;
}
.widget-menu-items button:hover {
  background:#3a3a3a;
}
.widget-menu-items button.is-pinned svg path:first-child { fill:currentColor; }
.widget-menu-items button[data-action=delete] {
  color:var(--red);
}
.widget:not(:has(h2))>.note-body,
.widget:not(:has(h2))>.checklist {
  padding-right:32px;
}
.widget .note-body {
  margin-bottom:0;
}
.checklist-footer .text-button {
  padding:0;
  background:transparent;
  border:0;
  text-align:left;
}

.task-card {
  background:var(--card);
}
.task-card.state-completed {
  background:linear-gradient(110deg,rgba(150,213,173,.12),transparent 80%),var(--card);
}
.task-card.state-cover {
  background:linear-gradient(110deg,rgba(235,200,118,.12),transparent 80%),var(--card);
}
.task-card.state-overdue {
  background:linear-gradient(110deg,rgba(241,156,149,.14),transparent 80%),var(--card);
}
.reminder.task-card {
  display:flex;
  align-items:center;
}
.previous-status {
  display:flex;
  align-items:center;
  gap:7px;
}

.attention {
  padding:16px;
  width:100%;
}
.attention-item {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  padding:16px 0;
  border-top:1px solid var(--line);
}
.attention-item:first-of-type {
  margin-top:6px;
  border-top:0;
}
.attention-item:last-child {
  padding-bottom:0;
}
.attention-icon svg {
  width:18px;
  height:18px;
}
.attention-copy {
  min-width:0;
  overflow-wrap:anywhere;
}
.attention-copy .small {
  font-size:11px;
}
.attention-complete {
  min-height:44px;
  padding:8px;
  font-size:11px;
}
@media(max-width:780px) {
  .attention {
    order:-1;
  }
}

.attention-name {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
}
.attention-item .attention-status {
  margin-top:8px;
  font-size:12px;
  font-weight:600;
}
.attention-item .attention-status.overdue {
  color:var(--red);
}
.attention-item .attention-status.cover {
  color:var(--yellow);
}
.attention-name strong {
  font-weight:600;
}
.attention-copy p {
  margin:4px 0 0;
}
.attention-copy time {
  white-space:nowrap;
}
.attention .status-title {
  gap:8px;
}
.attention .status-title h2 {
  font-size:14px;
}

.board-add {
  display:flex;
  justify-content:center;
  margin-top:16px;
}

.account-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.account-heading button[type=submit] {
  margin:0;
  font-size:13px;
}

.account-entry {
  border:1px solid var(--line);
  border-radius:12px;
}
.account-entry>summary {
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 16px;
  list-style:none;
  color:var(--text);
}
.account-entry>summary::-webkit-details-marker {
  display:none;
}
.account-entry>summary::after {
  content:'+';
  margin-left:4px;
  color:var(--muted);
}
.account-entry[open]>summary::after {
  content:'−';
}
.account-identity {
  display:flex;
  flex-direction:column;
  min-width:0;
  overflow-wrap:anywhere;
}
.account-identity strong {
  font-size:14px;
  font-weight:550;
}
.account-role {
  margin-left:auto;
  flex:none;
}
.password-reset {
  margin-bottom:12px;
}
.password-reset .settings-description {
  font-size:12px;
  margin:8px 0;
}
#create-account-dialog .two-fields {
  margin-top:20px;
}
.icon-field { display: grid; gap: 8px; margin: 14px 0; min-width: 0; }
.two-fields .icon-field { margin: 0; align-content: start; }
.icon-trigger { width: 100%; justify-content: flex-start; text-align: left; }
.icon-trigger svg { width: 32px; height: 32px; }
.icon-trigger .muted { margin-left: auto; font-size: 12px; }
#icon-dialog { width: min(850px, calc(100vw - 32px)); max-width: 850px; max-height: 85dvh; overflow-y: auto; }
.icon-search { display: grid; gap: 6px; margin-bottom: 14px; }
.icon-category h3 { margin: 20px 0 10px; color: var(--muted); font-size: 13px; font-weight: 500; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.icon-choice { flex-direction: column; min-height: 100px; padding: 12px 6px; gap: 10px; }
.icon-choice svg { width: 34px; height: 34px; }
.icon-choice span { font-size: 12px; line-height: 1.25; }
.icon-choice[aria-pressed=true] { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
@media (max-width: 500px) {
  #icon-dialog { padding: 18px; }
  .icon-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .icon-choice { min-height: 94px; }
}
.history-value { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .85rem; }
.history-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:12px; }
.history-heading h1 { margin:0; }
.history-actions { display:flex; align-items:center; gap:10px; }
.history-actions a { padding:10px 4px; color:var(--muted); }
.history-actions a:hover { color:var(--text); }
.history-actions button { background:transparent; border-color:var(--line); font-size:13px; }
.history-note { margin:0 0 18px; color:var(--muted); font-size:13px; }

/* Settings */
.settings-page { max-width:1100px; margin:0 auto; }
.settings-signout,.settings-quiet { background:transparent; border-color:transparent; color:var(--muted); }
.settings-signout:hover,.settings-quiet:hover { color:var(--text); }
.settings-signout-row { border-top:1px solid var(--line); margin-top:24px; padding-top:12px; }
.settings-signout { padding-left:0; }
.settings-layout { display:grid; grid-template-columns:210px minmax(0,1fr); align-items:start; gap:46px; }
.settings-nav { display:grid; gap:4px; position:sticky; top:24px; }
.settings-nav button { justify-content:flex-start; background:transparent; border-color:transparent; color:var(--muted); padding:11px 14px; font-size:14px; }
.settings-nav button:hover { background:#ffffff0b; color:var(--text); }
.settings-nav button[aria-current=page] { background:#303030; color:var(--text); font-weight:600; }
.settings-main { min-width:0; }
.settings-panel-actions { display:flex; justify-content:flex-end; margin:0 0 12px; }
.settings-surface { background:var(--card); border:1px solid #333; border-radius:17px; padding:26px; }
.settings-form { max-width:510px; }
.settings-form>label { display:block; margin:0 0 18px; font-size:13px; font-weight:560; }
.settings-form>button { margin-top:2px; }
.settings-disclosure { border-top:1px solid var(--line); margin-top:24px; padding-top:0; }
.settings-disclosure>summary { padding:19px 0; cursor:pointer; font-weight:560; list-style:none; }
.settings-disclosure>summary::-webkit-details-marker { display:none; }
.settings-disclosure>summary::after,.settings-editor>summary::after { content:'+'; float:right; color:var(--muted); font-weight:400; }
.settings-disclosure[open]>summary::after,.settings-editor[open]>summary::after { content:'−'; }
.settings-disclosure .settings-form { padding:2px 0 4px; }
.settings-gate { display:flex; align-items:center; gap:20px; justify-content:space-between; }
.settings-gate p { margin:0; color:var(--muted); }
.settings-divider { display:flex; align-items:center; justify-content:space-between; gap:16px; border-top:1px solid var(--line); margin-top:30px; padding-top:24px; }
.settings-divider h3 { margin:0 0 4px; }
.settings-divider p { color:var(--muted); font-size:13px; margin:0; }
.settings-inline-link { display:inline-block; color:var(--muted); font-size:13px; padding:18px 0 0; }
.settings-inline-link:hover { color:var(--text); }
.account-list { display:grid; grid-template-columns:1fr; gap:10px; }
.account-entry { background:var(--card); border-color:#333; border-radius:14px; }
.account-entry>summary { min-height:70px; padding:13px 20px; cursor:pointer; }
.account-entry>summary::after { font-size:22px; line-height:1; }
.account-card { background:transparent; border-top:1px solid var(--line); border-radius:15px; padding:8px 20px 20px; }
.account-card>label { display:block; max-width:510px; margin:16px 0; font-size:13px; }
.account-flags { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 18px; max-width:510px; margin:20px 0; }
.account-flags label { font-size:13px; }
.password-reset { border-top:1px solid var(--line); padding-top:14px; max-width:510px; }
.password-reset>summary { cursor:pointer; color:var(--text); font-size:13px; }
.password-reset>label { display:block; font-size:13px; margin-top:14px; }
.password-reset .settings-description { display:none; }
.account-card>button[type=submit] { margin-top:18px; }
.rota-settings { padding:0 22px 22px; }
.draft-bar { position:sticky; top:0; z-index:4; border-radius:0; border-bottom:1px solid var(--line); background:var(--card); margin:0 -22px 20px; padding:16px 22px; }
.draft-bar strong { font-size:13px; font-weight:560; }
.draft-bar .row-actions { gap:8px; }
.draft-tabs { border-bottom:1px solid var(--line); gap:2px; margin:0 0 16px; }
.draft-tabs button { border:0; border-radius:0; padding:12px 17px; font-size:13px; color:var(--muted); }
.draft-tabs button[aria-pressed=true] { color:var(--text); background:transparent; box-shadow:inset 0 -2px var(--text); }
.draft-section>.settings-description { margin:0 0 14px; }
.resident-row { padding:10px 3px; border-bottom:1px solid #333; }
.resident-row:last-child { border:0; }
.resident-row .row-actions button { background:transparent; border-color:transparent; color:var(--muted); }
.settings-editor { border:1px solid var(--line); border-radius:12px; margin:9px 0; }
.settings-editor>summary { display:flex; align-items:center; gap:12px; min-height:62px; padding:12px 16px; cursor:pointer; list-style:none; }
.settings-editor>summary::-webkit-details-marker { display:none; }
.settings-editor>summary strong { font-size:14px; font-weight:560; min-width:0; overflow-wrap:anywhere; }
.settings-editor>summary .settings-editor-meta { margin-left:auto; color:var(--muted); font-size:12px; white-space:nowrap; }
.settings-editor>summary::after { float:none; margin-left:6px; }
.settings-editor .group-row,.settings-editor .chore-row { border-top:1px solid var(--line); border-radius:0 0 12px 12px; padding:18px; margin:0; background:#1c1c1c; }
.settings-editor .group-row>label,.settings-editor .chore-row>label { display:block; max-width:510px; font-size:13px; }
.settings-editor .member-list { margin:14px 0; }
.settings-editor .member-list label { font-size:13px; }
.settings-editor .two-fields { margin:14px 0; }
.settings-editor .two-fields label,.settings-editor .icon-field { font-size:13px; }
.settings-editor .icon-field small { display:none; }
.settings-editor .settings-description { margin:8px 0; }
.settings-editor .settings-quiet { margin-top:5px; padding-left:0; }
.draft-section>button { margin:14px 0 0; }
.starting-details { margin:24px 0 0; }
.settings-hint { color:var(--muted); font-size:13px; margin:0 0 12px; }
#starting-pins { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 18px; }
#starting-pins .draft-row { font-size:13px; }
@media(max-width:780px) {
  .settings-layout { grid-template-columns:1fr; gap:18px; }
  .settings-nav { display:flex; position:static; overflow-x:auto; scrollbar-width:none; border-bottom:1px solid var(--line); gap:0; }
  .settings-nav button { flex:none; border-radius:0; padding:11px 15px; }
  .settings-nav button[aria-current=page] { background:transparent; box-shadow:inset 0 -2px var(--text); }
}
@media(max-width:520px) {
  .settings-surface { padding:19px; }
  .settings-gate,.settings-divider { align-items:flex-start; flex-direction:column; }
  .account-entry>summary { padding:12px 14px; }
  .account-card { padding:8px 14px 18px; }
  .account-flags { grid-template-columns:1fr; }
  .rota-settings { padding:0 14px 18px; }
  .draft-bar { margin:0 -14px 16px; padding:13px 14px; }
  .draft-bar .row-actions { width:100%; }
  .draft-bar .row-actions button { flex:1; }
  #starting-pins { grid-template-columns:1fr; }
}
