/* /member: a member's own page inside the site, in the look they picked, with the editor beside it. */
.member { inline-size: min(100% - 2 * var(--gutter), 76rem); margin: 0 auto; padding: 112px 0 12vh; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px 40px; align-items: start; }
.member.editing { grid-template-columns: minmax(0, 1fr) minmax(300px, 24rem); }
.member-bar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.member-bar .button { height: 36px; padding-inline: 16px; font-size: 14px; }
.member-bar .button[hidden] { display: none; }
/* Shown to a member looking at their own page while it's still hidden from everyone else. */
.member-note { margin: 0 0 0 auto; font-size: 14px; color: var(--faint); }

/* Themes: each sets the page's paper, ink and a quieter ink; the accent is the member's own colour. */
.sheet {
  --paper: #0d0e11; --ink: #e6e7ea; --muted: #8f9298; --rule: #ffffff14; --accent: #f3d59e;
  position: relative; padding: clamp(24px, 5vw, 56px); border-radius: 22px; background: var(--paper); color: var(--ink);
  box-shadow: 0 0 0 1px var(--rule); transition: background-color 300ms var(--ease-out), color 300ms var(--ease-out);
}
.sheet[data-theme="paper"] { --paper: #efebe3; --ink: #1f1d1a; --muted: #6d685f; --rule: #0000001a; }
.sheet[data-theme="blueprint"] {
  --paper: #0f2747; --ink: #eaf2ff; --muted: #9db4d6; --rule: #ffffff24;
  background-image: linear-gradient(#ffffff0d 1px, transparent 1px), linear-gradient(90deg, #ffffff0d 1px, transparent 1px); background-size: 24px 24px;
}
.sheet[data-theme="lamp"] { --paper: #17120a; --ink: #f7e7c8; --muted: #b9a681; --rule: #f3d59e26; }
.sheet[data-type="serif"] { font-family: ui-serif, "New York", Georgia, "Times New Roman", serif; }
.sheet[data-type="mono"] { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 15px; }

.sheet-head { display: grid; grid-template-columns: minmax(160px, 240px) minmax(0, 1fr); gap: 28px clamp(28px, 5vw, 64px); align-items: start; }
.sheet-name { margin: 6px 0 22px; font-size: clamp(32px, 5vw, 52px); font-weight: 600; line-height: 1.05; letter-spacing: -.02em; color: var(--ink); }
.sheet-name::after { content: ""; display: block; inline-size: 48px; block-size: 4px; margin-block-start: 16px; border-radius: 2px; background: var(--accent); }
.sheet-block { margin-block-end: 18px; }
.sheet-block h2, .sheet-media h2 { margin: 0 0 4px; font-size: 13px; font-weight: 500; color: var(--muted); font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.sheet-block p { margin: 0; max-inline-size: 36rem; font-size: 17px; line-height: 1.55; text-wrap: pretty; }
.sheet-empty { color: var(--muted); font-style: italic; }
.sheet-links { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sheet-links li > * { display: inline-flex; align-items: center; block-size: 32px; padding-inline: 13px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--rule); font-size: 14px; color: var(--ink); }
.sheet-links a { text-decoration: none; box-shadow: inset 0 0 0 1px var(--accent) !important; }
.sheet-links a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sheet-links .sheet-empty { box-shadow: none; padding: 0; }

.sheet-media { margin-block-start: 44px; padding-block-start: 28px; border-block-start: 1px solid var(--rule); }
.media { margin-block-start: 14px; display: grid; gap: 14px; }
.media-item { margin: 0; }
.media-item img { display: block; inline-size: 100%; border-radius: 10px; }
.sheet[data-layout="grid"] .media { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.sheet[data-layout="grid"] .media-item img { aspect-ratio: 1; object-fit: cover; }
.sheet[data-layout="column"] .media { max-inline-size: 44rem; }
.sheet[data-layout="polaroids"] .media { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 26px; }
.sheet[data-layout="polaroids"] .media-item { padding: 9px 9px 30px; background: #111215; border-radius: 3px; box-shadow: inset 0 0 0 1.5px #e6e7eacc, 0 12px 26px -14px #000; transform: rotate(var(--tilt)); }
.sheet[data-layout="polaroids"] .media-item img { aspect-ratio: 1; object-fit: cover; border-radius: 0; }
.media-empty { grid-column: 1 / -1; margin: 0; }
.sheet-missing { margin: 0 0 12px; }

/* The editor: a panel of plain fields, then the look. */
.editor { position: sticky; inset-block-start: 96px; max-block-size: calc(100svh - 120px); overflow: auto; padding: 22px; border-radius: 18px; background: #0d0e11; box-shadow: inset 0 0 0 1px var(--line); }
.editor[hidden] { display: none; }
.editor h2 { margin: 0 0 4px; font-size: 17px; font-weight: 500; color: var(--strong); }
.editor-note { margin: 0 0 18px; font-size: 13px; color: var(--faint); }
.editor-group { display: grid; gap: 18px; padding-block: 4px 18px !important; border-block-end: 1px solid var(--line) !important; }
.editor-group legend { margin-block-end: 6px; font-size: 13px; color: var(--faint); }
.upload-line { position: relative; display: inline-flex; align-items: center; block-size: 36px; padding-inline: 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px #ffffff2e; color: var(--strong); font-size: 14px; cursor: pointer; justify-self: start; }
.upload-line input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-line:has(input:focus-visible) { outline: 2px solid var(--faint); outline-offset: 2px; }
.upload-line[hidden] { display: none; }
/* Their photo: change it, or take it off the page. */
.editor-photo { display: flex; flex-wrap: wrap; gap: 8px; }
button.upload-line { border: 0; background: none; font: inherit; font-size: 14px; }
button.upload-line:focus-visible { outline: 2px solid var(--faint); outline-offset: 2px; }
.editor-public { padding-block-end: 18px; border-block-end: 1px solid var(--line); }
.editor-public .field-hint { padding-inline-start: 30px; }   /* lines up with the label, past the 19px box and its gap */
.editor-media { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.editor-media:empty { display: none; }
.editor-media li { position: relative; }
.editor-media img { display: block; inline-size: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.editor-remove { position: absolute; inset-block-end: 4px; inset-inline: 4px; padding: 2px 0; border: 0; border-radius: 999px; background: #08090bcc; color: var(--strong); font-size: 11px; cursor: pointer; }
.choice { display: grid; gap: 8px; }
.swatches { display: flex; gap: 8px; }
.swatch { position: relative; display: grid; place-items: center; inline-size: 30px; block-size: 30px; border-radius: 50%; cursor: pointer; }
.swatch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.swatch-dot { inline-size: 18px; block-size: 18px; border-radius: 50%; background: var(--c); }
.swatch:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--strong); }
.swatch:has(input:focus-visible) { outline: 2px solid var(--faint); outline-offset: 2px; }
.editor .form-foot { margin-block-start: 4px; }

@media (max-width: 900px) {
  .member.editing { grid-template-columns: minmax(0, 1fr); }
  .editor { position: static; max-block-size: none; }
}
@media (max-width: 640px) {
  .member { padding-block-start: 128px; }
  .member-note { order: 1; flex-basis: 100%; margin: 0; }
  .sheet-head { grid-template-columns: minmax(0, 1fr); }
  .sheet-head .polaroid { max-inline-size: 220px; }
}
@media (prefers-reduced-motion: reduce) { .sheet { transition: none; } }
