:root {
  color-scheme: light;
  --bg: #fff;
  --text: #161616;
  --muted: #666;
  --soft: #f6f6f6;
  --line: #dedede;
  --line-strong: #bdbdbd;
  --max: 1160px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid #111; outline-offset: 3px; }
.page-width { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
.site-header { min-height: 76px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { text-decoration: none; font-size: 18px; font-weight: 600; letter-spacing: -.035em; }
.header-link { color: #444; font-size: 14px; text-decoration: none; }
.header-link:hover { color: #000; text-decoration: underline; }
.home-main { padding-top: 48px; padding-bottom: 56px; }
.home-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .86fr); gap: clamp(36px, 6vw, 76px); align-items: start; }
.portrait { margin: 0; min-width: 0; }
.portrait img { display: block; width: 100%; height: auto; max-height: 720px; object-fit: cover; object-position: center; }
.home-copy { padding: 8px 0 0; min-width: 0; }
.home-copy h1 { font-weight: 500; letter-spacing: -.04em; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.18; margin: 0 0 9px; }
.real-name { margin: 0; font-size: 16px; color: var(--muted); }
.role { margin: 5px 0 28px; font-size: 17px; }
.references { margin-bottom: 28px; }
.references p { margin: 0 0 13px; }
.references a { font-size: 16px; font-weight: 500; }
.references span { display: inline-block; font-size: 13px; text-decoration: none; margin-left: 3px; }
.contacts { margin: 0 0 30px; border-top: 1px solid var(--line); }
.contacts h2 { margin: 14px 0 7px; font-size: 13px; font-weight: 600; }
.contacts p { display: grid; grid-template-columns: 125px minmax(0,1fr); gap: 12px; margin: 0; padding: 7px 0; border-bottom: 1px solid #eee; font-size: 15px; }
.contacts p span { color: var(--muted); }
.contacts p a { overflow-wrap: anywhere; }
.vote-invite { display: grid; grid-template-columns: 96px minmax(0,1fr); align-items: center; gap: 16px; padding: 12px 0 0; border-top: 1px solid var(--line); text-decoration: none; }
.vote-invite img { width: 96px; height: 112px; object-fit: cover; object-position: center; display: block; }
.vote-invite span { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.vote-invite small { color: var(--muted); font-size: 12px; }
.vote-invite strong { font-size: 15px; font-weight: 600; line-height: 1.35; }
.vote-invite em { margin-top: 4px; font-size: 13px; font-style: normal; text-decoration: underline; text-underline-offset: 3px; }
.site-footer { min-height: 64px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 13px; color: var(--muted); }
.site-footer a { color: inherit; }
/* Voting */
.vote-main { padding-top: 32px; padding-bottom: 56px; }
.vote-heading { margin-bottom: 24px; }
.vote-heading h1 { margin: 0 0 7px; font-size: clamp(27px, 3vw, 36px); font-weight: 500; line-height: 1.2; letter-spacing: -.035em; }
.vote-heading p { margin: 0; font-size: 16px; color: var(--muted); }
.vote-layout { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.artwork-frame { margin: 0; min-width: 0; }
.artwork-frame img { display: block; width: 100%; max-height: 780px; aspect-ratio: .61; object-fit: contain; object-position: top center; background: #fafafa; }
.artwork-frame figcaption { padding-top: 9px; color: var(--muted); font-size: 12px; }
.vote-panel { min-width: 0; }
.panel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 0 0 12px; border-bottom: 1px solid var(--line); }
.panel-heading h2, .suggest-panel h2 { font-size: 21px; font-weight: 500; letter-spacing: -.02em; line-height: 1.3; margin: 0; }
.votes-hint { color: var(--muted); font-size: 13px; white-space: nowrap; }
.title-list { border-bottom: 1px solid var(--line); }
.title-row { display: grid; grid-template-columns: 26px minmax(0,1fr) 34px 92px; align-items: center; gap: 10px; min-height: 58px; padding: 7px 0; border-bottom: 1px solid #ededed; }
.title-row:last-child { border-bottom: 0; }
.title-rank { color: #777; font-size: 13px; font-variant-numeric: tabular-nums; }
.title-row-leader .title-rank { color: #111; font-weight: 700; }
.title-name { min-width: 0; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.title-count { text-align: right; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.vote-form { margin: 0; }
.vote-button { min-height: 34px; width: 92px; border: 1px solid var(--line-strong); border-radius: 2px; background: #fff; color: #161616; padding: 5px 8px; font-size: 12px; cursor: pointer; }
.vote-button:hover { border-color: #111; background: #f5f5f5; }
.voted-note { margin: 14px 0 0; padding: 10px 12px; border: 1px solid var(--line); color: #333; font-size: 14px; }
.suggest-panel { padding-top: 26px; }
.suggest-panel h2 { margin-bottom: 7px; }
.suggest-copy { color: var(--muted); margin: 0 0 15px; font-size: 14px; }
.suggest-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
.suggest-form input, .login-form input { width: 100%; min-width: 0; min-height: 46px; padding: 11px 12px; color: var(--text); background: #fff; border: 1px solid var(--line-strong); border-radius: 2px; font-size: 15px; }
.suggest-form input::placeholder { color: #777; }
.button { min-height: 46px; padding: 0 18px; border: 1px solid #171717; border-radius: 2px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.button-dark, .button-red { background: #171717; color: #fff; }
.button-dark:hover, .button-red:hover { background: #333; }
.button-quiet { background: #fff; color: #171717; border-color: var(--line-strong); }
.button-quiet:hover { background: #f6f6f6; }
.button-small { min-height: 34px; padding: 0 11px; font-size: 12px; }
.flash { margin: 0 0 20px; padding: 12px 14px; border: 1px solid var(--line); background: #f8f8f8; font-size: 14px; }
.flash-success { border-color: #c7d7c9; background: #f3f8f3; }
.flash-error { border-color: #e2c4c4; background: #fff7f7; }
.flash-info { border-color: #ddd; background: #f7f7f7; }
.empty-state { padding: 18px 0; color: var(--muted); font-size: 15px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
/* Admin */
.admin-label { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.admin-main { min-height: 70vh; padding-top: 36px; padding-bottom: 60px; }
.admin-title-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.admin-title-row h1, .login-card h1 { font-size: clamp(26px, 3vw, 34px); line-height: 1.2; letter-spacing: -.03em; font-weight: 500; margin: 0; }
.login-card { width: min(100%, 440px); margin: 42px auto; }
.login-card > p:not(.eyebrow) { color: var(--muted); margin: 9px 0 22px; }
.login-form { display: grid; gap: 10px; }
.login-form label { font-size: 14px; }
.login-form .button { margin-top: 4px; }
.admin-section { padding: 22px 0 27px; border-top: 1px solid var(--line); }
.admin-section h2 { margin: 0; font-size: 20px; font-weight: 500; }
.admin-add-form { margin-top: 16px; }
.admin-list, .pending-list { margin-top: 8px; }
.admin-item { display: grid; grid-template-columns: 26px minmax(0,1fr) auto auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eee; }
.admin-item-name { overflow-wrap: anywhere; }
.text-button { border: 0; background: transparent; color: #444; cursor: pointer; font-size: 13px; padding: 6px; text-decoration: underline; text-underline-offset: 3px; }
.text-button.danger { color: #8f2222; }
.pending-item { display: flex; justify-content: space-between; align-items: center; gap: 18px; border-bottom: 1px solid #eee; padding: 14px 0; }
.pending-item strong, .pending-item small { display: block; }
.pending-item small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.pending-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (min-width: 1400px) { .home-layout { grid-template-columns: minmax(0, 1.02fr) minmax(350px, .8fr); } }
@media (max-width: 820px) {
  .page-width { width: min(100% - 36px, 620px); }
  .site-header { min-height: 64px; }
  .home-main { padding-top: 28px; }
  .home-layout { grid-template-columns: 1fr; gap: 28px; }
  .portrait img { max-height: none; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
  .home-copy { padding-top: 0; }
  .home-copy h1 { font-size: clamp(28px, 7vw, 36px); }
  .role { margin-bottom: 23px; }
  .vote-layout { grid-template-columns: 1fr; gap: 25px; }
  .artwork-frame img { max-height: 75vh; aspect-ratio: auto; }
  .vote-heading { margin-bottom: 20px; }
}
@media (max-width: 480px) {
  .page-width { width: calc(100% - 28px); }
  .wordmark { font-size: 16px; }
  .header-link { font-size: 13px; }
  .contacts p { grid-template-columns: 100px minmax(0,1fr); gap: 8px; font-size: 14px; }
  .vote-invite { grid-template-columns: 82px minmax(0,1fr); gap: 12px; }
  .vote-invite img { width: 82px; height: 96px; }
  .vote-heading h1 { font-size: 28px; }
  .title-row { grid-template-columns: 20px minmax(0,1fr) 25px 82px; gap: 7px; min-height: 56px; }
  .title-name { font-size: 15px; }
  .vote-button { width: 82px; font-size: 11px; }
  .suggest-form { grid-template-columns: 1fr; }
  .suggest-form .button { width: 100%; }
  .site-footer { align-items: flex-start; padding: 15px 0; flex-direction: column; gap: 5px; }
  .admin-item { grid-template-columns: 22px minmax(0,1fr) auto; gap: 8px; }
  .admin-item .title-count { grid-column: 2; text-align: left; }
  .admin-item form { grid-column: 3; grid-row: 1 / span 2; }
  .pending-item { align-items: flex-start; flex-direction: column; }
  .admin-title-row { align-items: flex-start; flex-direction: column; }
}
