:root {
  color-scheme: light;
  --ink: #17324d;
  --muted: #5b6d80;
  --line: #dce4ed;
  --accent: #0056cc;
  --accent-hover: #00419c;
  --accent-light: #edf4ff;
  --paper: #fff;
  --bg: #f4f7fb;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.75 -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: .22em; }
a:hover { color: var(--accent-hover); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { color: var(--ink); line-height: 1.5; overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.2rem); letter-spacing: .015em; font-weight: 750; }
h2 { margin: 0 0 .7em; font-size: 1.15rem; font-weight: 700; }
h3 { margin: 0 0 .35em; font-size: 1.05rem; }
img { max-width: 100%; height: auto; }
svg { display: block; }
form { margin: 0; }
button, input, select, textarea { font: inherit; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 1.25rem; min-height: 48px; padding: .7rem 1.35rem; border: 1px solid var(--accent); border-radius: 9px; background: var(--accent); color: white; font-weight: 700; line-height: 1.55; text-align: center; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { color: white; border-color: var(--accent-hover); background: var(--accent-hover); }
button:disabled { background: #dfe5ec; color: #596b7b; border-color: #dfe5ec; cursor: not-allowed; }
.button-secondary { background: white; color: var(--accent); border-color: #adc5e7; }
.button-secondary:hover { background: var(--accent-light); color: var(--accent-hover); border-color: var(--accent); }
.button-small { min-height: 40px; padding: .45rem .85rem; font-size: .85rem; }
.button-wide { width: 100%; }
.button-quiet { border: 0; border-radius: 6px; background: transparent; color: var(--accent); padding: .45rem .6rem; font-size: .9rem; font-weight: 600; min-height: 44px; }
.button-quiet:hover { background: var(--accent-light); color: var(--accent-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #ffbf47; outline-offset: 3px; }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]), select, textarea { width: 100%; max-width: 100%; min-width: 0; min-height: 48px; padding: .7rem .85rem; border: 1px solid #8294a7; border-radius: 7px; background: white; color: var(--ink); font-size: 1rem; line-height: 1.5; }
input:disabled, select:disabled { background: #f1f4f8 !important; color: #647487; border-color: var(--line) !important; }
input::placeholder { color: #738296; opacity: 1; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; flex-shrink: 0; margin: 0; accent-color: var(--accent); }
label { display: block; color: var(--ink); font-weight: 650; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
dt { font-weight: 600; }
dd { margin: 0; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: absolute; top: 8px; left: 8px; z-index: 10; padding: 10px 18px; background: white; }
.site-header { background: white; border-bottom: 1px solid var(--line); }
.header-main { max-width: 1216px; padding: 22px 24px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.header-account { display: flex; align-items: center; justify-content: flex-end; gap: 22px; min-width: 0; }
.account-name { display: flex; align-items: center; gap: 8px; max-width: 20em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; font-weight: 600; }
.account-indicator { flex-shrink: 0; height: 8px; width: 8px; border-radius: 50%; background: #2a8765; }
.logout-button { color: var(--muted); }
.header-help { font-size: .88rem; text-decoration: none; }
.main-nav { border-top: 1px solid #eef2f7; }
.nav-inner { display: flex; max-width: 1216px; margin: auto; padding: 0 24px; gap: 30px; overflow-x: auto; }
.nav-inner a { flex-shrink: 0; padding: 15px 3px 13px; border-bottom: 3px solid transparent; text-decoration: none; color: var(--muted); font-size: .9rem; font-weight: 600; white-space: nowrap; }
.nav-inner a:hover { color: var(--accent); }
.nav-inner a[aria-current] { color: var(--accent); border-bottom-color: var(--accent); }
main { max-width: 1216px; margin: 42px auto 64px; padding: 0 24px; min-height: 65vh; }
main:focus { outline: none; }
.site-footer { max-width: 1168px; margin: 0 auto; padding: 24px 0 32px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 24px; color: var(--muted); font-size: .8rem; }
.site-footer a { color: var(--muted); }
.page-heading { margin-bottom: 30px; }
.page-description { margin: 10px 0 0; color: var(--muted); font-size: .95rem; }
.heading-with-actions { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.heading-with-actions > div { min-width: 0; }
.heading-with-actions > .button { flex-shrink: 0; }
.heading-links { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin: -8px 0 22px; font-size: .88rem; text-decoration: none; }
.content-heading, .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.content-heading h2, .panel-heading h2 { margin: 0; }
.content-heading a, .panel-heading a { font-size: .85rem; }
.panel { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin-bottom: 24px; }
.muted, .helptext { color: var(--muted); font-size: .83rem; }
.helptext { margin: 10px 0 0; }
.text-link { font-size: .9rem; text-decoration: none; }
.messages { margin-bottom: 28px; border: 1px solid #bddbd0; border-radius: 10px; padding: 16px 20px; background: #edf8f2; color: #1c6045; }
.messages p { margin: 0; }
.notice { background: #fffbec; border: 1px solid #eddb9d; border-radius: 12px; padding: 22px 24px; margin-bottom: 28px; }
.notice-label { display: block; font-weight: 700; color: #624c0a; }
.notice p { margin-top: 5px; font-size: .9rem; }
.confirmation-notice { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.confirmation-notice .button { flex-shrink: 0; }
.status-badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 5px; font-size: .7rem; font-weight: 650; white-space: nowrap; }
.status-badge.success { color: #1a6849; background: #e9f7ef; }
.status-badge.neutral { color: #566b7f; background: #edf1f6; }
.error-summary { margin-bottom: 24px; padding: 20px; background: #fff2f0; border: 1px solid #edb7b3; border-radius: 10px; color: #a3241b; }
.error-summary h2 { color: inherit; font-size: 1rem; }
.errorlist { color: #a3241b; font-size: .88rem; padding-left: 1.25rem; margin: 8px 0; }
.has-error input:not([type=checkbox]), .has-error select { border-color: #b93127; background: #fffafa; }
.edit-layout { display: grid; grid-template-columns: 240px minmax(0,1fr); align-items: start; gap: 32px; }
.edit-aside { position: sticky; top: 24px; }
.section-nav { display: flex; flex-direction: column; margin-bottom: 26px; padding: 6px 0; }
.section-nav p { margin: 0 0 12px 14px; color: var(--muted); font-size: .75rem; font-weight: 700; }
.section-nav a { padding: 9px 14px; border-left: 2px solid #d7e2ef; color: var(--ink); text-decoration: none; font-size: .9rem; }
.section-nav a:hover { border-left-color: var(--accent); background: #eaf1fc; color: var(--accent); }
.sharing-guide { border-radius: 12px; padding: 20px; background: #e9f1fc; color: #345370; }
.sharing-guide h2 { margin: 10px 0; font-size: .85rem; color: #234569; }
.sharing-guide p { font-size: .8rem; }
.guide-icon { display: inline-grid; place-items: center; border: 1.5px solid #52799f; border-radius: 50%; height: 20px; width: 20px; font-size: .75rem; font-weight: 700; }
.profile-form { min-width: 0; }
.form-section { margin: 0 0 24px; border: 1px solid var(--line); border-radius: var(--radius); background: white; overflow: hidden; }
.section-heading { display: flex; gap: 15px; align-items: center; padding: 24px 28px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0; font-size: 1.15rem; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: .82rem; }
.section-symbol { display: inline-grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-light); color: var(--accent); font-weight: 750; font-size: .8rem; }
.form-section-body { padding: 0 28px; }
.form-field { padding: 24px 0; border-bottom: 1px solid #edf1f6; }
.form-field:last-child { border-bottom: 0; }
.field-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 12px; }
.field-label-group, .field-heading > div:first-child { min-width: 0; }
.field-label { display: block; font-size: .95rem; font-weight: 650; line-height: 1.6; }
.field-label-en { display: block; color: var(--muted); margin: 2px 0 0; font-size: .74rem; font-weight: 400; line-height: 1.5; }
.required-label { margin-left: 9px; padding: 1px 5px; border-radius: 3px; color: #a32b29; background: #fff0ee; font-size: .63rem; font-weight: 600; vertical-align: .08em; white-space: nowrap; }
.readonly-value { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; overflow-wrap: anywhere; padding: 12px 15px; background: #f6f8fb; border-radius: 7px; }
.share-control { position: relative; display: grid; grid-template-columns: 42px 26px; justify-content: center; align-items: center; column-gap: 7px; row-gap: 3px; margin: 0; min-width: 88px; min-height: 44px; flex-shrink: 0; cursor: pointer; }
.share-caption { grid-column: 1 / -1; font-size: .66rem; line-height: 1.5; color: var(--muted); text-align: center; font-weight: 500; }
.share-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-track { position: relative; display: block; width: 42px; height: 24px; border: 1px solid #8997a6; border-radius: 14px; background: #e4e9ef; transition: background-color .15s; }
.switch-track::after { content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; border-radius: 50%; background: #64768a; transition: transform .15s; }
.share-control input:checked + .switch-track { background: var(--accent); border-color: var(--accent); }
.share-control input:checked + .switch-track::after { background: white; transform: translateX(18px); }
.share-control input:focus-visible + .switch-track { outline: 3px solid #ffbf47; outline-offset: 3px; }
.switch-state { font-size: .65rem; font-weight: 750; color: #617286; line-height: 1; }
.switch-on { display: none; }
.share-control input:checked ~ .switch-state { color: var(--accent); }
.share-control input:checked ~ .switch-state .switch-off { display: none; }
.share-control input:checked ~ .switch-state .switch-on { display: inline; }
.checkbox-field .field-input > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.checkbox-field .field-input label { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; font-size: .85rem; font-weight: 500; cursor: pointer; }
.checkbox-field .field-input label:has(input:checked) { background: var(--accent-light); border-color: #b5cff0; color: #00479f; }
.save-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 26px; border: 1px solid #cbdaf0; border-radius: 12px; background: #eaf2fe; }
.save-bar p { font-size: .83rem; color: #3a5777; }
.save-bar button { flex-shrink: 0; }
.photo-section { margin-bottom: 30px; }
.photos { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.photo-card { display: flex; align-items: center; gap: 22px; background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; min-width: 0; }
.photo-card-image { width: 142px; flex-shrink: 0; }
.photo-card-image img, .photo-card-image .photo-placeholder { display: block; width: 142px; height: 156px; border-radius: 12px; object-fit: cover; }
.photo-card-image .photo-placeholder { display: flex; }
.photo-card-body { min-width: 0; }
.photo-card-body h3 { margin: 8px 0 0; }
.photo-visibility { margin: 9px 0 15px; color: var(--muted); font-size: .74rem; }
.photo-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: #edf2f8; color: #72869d; padding: 14px; text-align: center; font-size: .68rem; }
.photo-placeholder svg { width: 52px; max-width: 100%; }
.profile-panel { padding-bottom: 18px; }
.profile-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 36px; margin: 0; }
.profile-field { padding: 18px 0; border-top: 1px solid #e7edf4; min-width: 0; }
.profile-field dt { color: var(--muted); font-size: .78rem; line-height: 1.65; }
.profile-field dd { margin-top: 6px; font-size: .95rem; overflow-wrap: anywhere; }
.profile-updated { margin-top: 20px; text-align: right; color: var(--muted); font-size: .75rem; }
.page-actions { display: flex; align-items: center; justify-content: space-between; gap: 24px; font-size: .88rem; }
.filters { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr) minmax(0,.8fr) auto; gap: 16px; align-items: end; margin-bottom: 24px; padding: 24px; }
.filter-field { min-width: 0; }
.filter-field label { margin: 0 0 8px; font-size: .83rem; }
.filter-field label span { margin-left: 8px; color: var(--muted); font-size: .7rem; font-weight: 400; }
.filters button { min-height: 50px; }
.results-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin: 0 0 18px; }
.results-heading p { margin: 0; font-size: .85rem; }
.results-heading strong { font-size: 1.4rem; margin-right: 5px; }
.member-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.member-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; min-width: 0; }
.member-card-main { display: flex; align-items: center; gap: 15px; text-decoration: none; color: var(--ink); }
.member-card-main > span { min-width: 0; }
.avatar { height: 72px; width: 72px; border-radius: 14px; object-fit: cover; flex-shrink: 0; }
.member-name { display: block; font-size: 1rem; font-weight: 700; overflow-wrap: anywhere; }
.member-username { display: block; color: var(--muted); margin-top: 3px; font-size: .75rem; overflow-wrap: anywhere; }
.member-arrow { margin: 0 0 auto auto; color: var(--accent); font-size: 1rem; }
.member-summary { margin: 20px 0 0; padding-top: 14px; border-top: 1px solid #edf1f6; font-size: .78rem; }
.member-summary > div { display: grid; grid-template-columns: 74px minmax(0,1fr); gap: 8px; padding: 3px 0; }
.member-summary dt { color: var(--muted); font-size: .7rem; font-weight: 500; }
.member-summary dd { overflow-wrap: anywhere; }
.view-tabs { display: flex; gap: 8px; margin-bottom: 26px; padding: 5px; border-radius: 10px; background: #e6edf6; width: fit-content; }
.view-tabs a { padding: 10px 22px; text-decoration: none; border-radius: 7px; color: var(--muted); font-size: .87rem; }
.view-tabs a[aria-current] { background: white; color: var(--accent); font-weight: 650; box-shadow: 0 1px 3px #17324d12; }
.photo-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 24px; }
.gallery-card { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.gallery-card a { display: block; color: var(--ink); text-decoration: none; }
.gallery-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #edf2f8; }
.gallery-card figcaption { display: flex; justify-content: space-between; gap: 12px; padding: 17px 20px; font-weight: 650; overflow-wrap: anywhere; }
.gallery-card figcaption span:last-child { color: var(--accent); }
.upload-zone { padding: 34px 24px 22px; background: #f7faff; border: 2px dashed #b4c9e4; border-radius: 12px; text-align: center; }
.upload-zone.is-dragging { background: #e8f1ff; border-color: var(--accent); }
.upload-symbol { display: grid; place-items: center; margin: 0 auto 15px; width: 64px; height: 64px; border-radius: 50%; background: #e5effe; color: var(--accent); }
.upload-symbol svg { width: 40px; height: 40px; }
.upload-empty h2 { font-size: 1.1rem; margin: 0 0 10px; }
.upload-empty p { font-size: .85rem; color: var(--muted); margin-bottom: 22px; }
.file-control { position: relative; width: fit-content; margin: auto; }
.file-control input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; top: 50%; left: 50%; }
.file-control:focus-within label { outline: 3px solid #ffbf47; outline-offset: 3px; }
.file-name { margin: 12px 0 0; color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.file-name:empty { display: none; }
.upload-preview img { display: block; width: 100%; max-height: 340px; object-fit: contain; border-radius: 8px; margin: 0 auto 10px; }
.preview-label { margin-bottom: 18px; color: var(--muted); font-size: .75rem; }
.photo-upload > .helptext { text-align: center; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin: 26px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.upload-error { color: #a3241b; background: #fff2f0; border-radius: 6px; padding: 12px; margin-top: 16px; font-size: .88rem; }
.current-photo img { display: block; border-radius: 10px; margin: auto; width: 100%; max-height: 240px; object-fit: contain; background: #f6f8fb; }
.current-photo .panel-heading { align-items: flex-start; flex-wrap: wrap; gap: 8px; }
.term-banner { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 25px 30px; background: #e9f1ff; border: 1px solid #c8daf4; border-radius: var(--radius); margin-bottom: 28px; }
.term-badge { color: var(--accent); font-size: .75rem; font-weight: 650; }
.term-banner h2 { margin: 3px 0 4px; font-size: 1.45rem; }
.term-banner p { color: #49678e; font-size: .84rem; }
.term-deadline { display: flex; flex-direction: column; color: #49678e; gap: 6px; font-size: .8rem; }
.term-deadline strong { color: var(--ink); font-size: 1rem; }
.missing-list { display: flex; flex-wrap: wrap; gap: 5px 25px; margin: 12px 0 18px; padding-left: 20px; font-size: .85rem; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 20px; font-size: .85rem; }
.shared-tags { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0 0 18px; gap: 8px; }
.shared-tags li { padding: 5px 10px; background: #edf4ff; color: #295b9a; border-radius: 6px; font-size: .75rem; }
.shared-tags .tag-neutral { background: #edf1f6; color: var(--muted); }
.confirm-submit { text-align: center; }
.confirmation-checkbox { display: flex; align-items: flex-start; justify-content: center; gap: 12px; margin-bottom: 24px; text-align: left; }
.confirmation-checkbox input { margin-top: 3px; }
.confirmation-checkbox label { font-size: .93rem; cursor: pointer; }
.confirmation-checkbox label span { display: block; margin-top: 4px; color: var(--muted); font-size: .74rem; font-weight: 400; }
.confirm-submit button { min-width: 260px; }
.timeline { padding-left: 24px; border-left: 2px solid #d9e3ef; margin-left: 9px; }
.timeline-entry { position: relative; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 24px; margin-bottom: 24px; }
.timeline-entry::before { content: ""; position: absolute; top: 32px; left: -33px; width: 12px; height: 12px; border: 3px solid var(--bg); border-radius: 50%; background: var(--accent); }
.timeline-meta { display: flex; align-items: center; gap: 16px; font-size: .83rem; }
.timeline-entry dl { margin: 20px 0 0; }
.history-change { padding-top: 14px; margin-top: 14px; border-top: 1px solid #edf1f6; }
.history-change dt { color: var(--muted); font-size: .78rem; }
.history-change dd { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 7px; font-size: .9rem; overflow-wrap: anywhere; }
.before-value { color: var(--muted); }
.change-arrow { color: #7a8ca2; }
.help-layout { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.help-section { padding: 28px; }
.help-section .section-symbol { margin-bottom: 20px; }
.help-section h2 { font-size: 1.1rem; }
.help-section p { color: var(--muted); font-size: .86rem; }
.help-section a { font-size: .86rem; }
.support-note { border-top: 1px solid var(--line); margin-top: 12px; padding: 26px 0 0; }
.support-note h2 { font-size: 1rem; }
.support-note p { color: var(--muted); font-size: .86rem; }
.export-form { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; }
.export-form .filter-field { flex: 1; max-width: 360px; }
.export-form .helptext { flex-basis: 100%; margin: 0; }
.table-scroll { position: relative; overflow: auto; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; min-width: 760px; border-collapse: collapse; background: white; font-size: .85rem; }
th, td { padding: 18px 20px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .75rem; font-weight: 600; background: #f9fbfd; }
tbody tr:last-child td { border-bottom: 0; }
.empty-cell { text-align: center; padding: 36px; color: var(--muted); }
.empty-state { grid-column: 1 / -1; padding: 40px; text-align: center; }
.empty-state h2 { font-size: 1.1rem; }
.empty-state p { color: var(--muted); font-size: .9rem; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 24px; margin: 36px 0 0; font-size: .9rem; }
.pagination .button { min-height: 42px; padding: .5rem 1rem; }
.login-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,420px); align-items: center; gap: 80px; min-height: 65vh; max-width: 1050px; margin: auto; padding: 30px 0; }
.login-intro h1 { font-size: clamp(1.8rem,3vw,2.6rem); line-height: 1.65; letter-spacing: .03em; margin-bottom: 22px; }
.login-intro > p { color: var(--muted); font-size: 1rem; line-height: 1.9; }
.login-card { border: 1px solid var(--line); border-radius: 20px; background: white; padding: 36px; box-shadow: 0 12px 36px #24466a08; }
.login-card h2 { font-size: 1.5rem; margin-bottom: 8px; }
.login-card > p { color: var(--muted); font-size: .86rem; }
.login-card form { margin-top: 28px; }
.login-card .login-note { margin-top: 12px; font-size: .74rem; text-align: center; }
.login-help { border-top: 1px solid #e8edf4; padding-top: 22px; margin-top: 26px; font-size: .8rem; }
.login-help p { color: var(--muted); }
form[aria-busy=true] button[type=submit] { background: #e9f1fd; color: var(--accent); border-color: #c2d6f0; }
@media (max-width: 1100px) {
  .edit-layout { grid-template-columns: 210px minmax(0,1fr); gap: 24px; }
  .member-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .photo-card { padding: 20px; gap: 17px; }
  .photo-card-image, .photo-card-image img, .photo-card-image .photo-placeholder { width: 115px; }
  .photo-card-image img, .photo-card-image .photo-placeholder { height: 140px; }
  .photo-card-body h3 { font-size: .95rem; }
  .photo-card .button { gap: 8px; }
  .site-footer { margin: 0 24px; }
  .login-layout { gap: 45px; }
}
@media (max-width: 840px) {
  .header-main { padding: 18px 24px; }
  .nav-inner { gap: 24px; }
  .edit-layout { grid-template-columns: minmax(0,1fr); }
  .edit-aside { position: static; }
  .section-nav { display: none; }
  .sharing-guide { padding: 16px 20px; }
  .sharing-guide .guide-icon { float: left; margin-right: 10px; }
  .sharing-guide h2 { margin-top: 0; }
  .sharing-guide p { margin: 0; }
  .sharing-guide p:last-child { margin-top: 3px; }
  .heading-with-actions { align-items: flex-start; }
  .heading-with-actions > .button { margin-top: 20px; }
  .filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .photo-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
  .photos { grid-template-columns: minmax(0,1fr); }
  .photo-card-image, .photo-card-image img, .photo-card-image .photo-placeholder { width: 140px; }
  .photo-card-image img, .photo-card-image .photo-placeholder { height: 150px; }
  .photo-card-body h3 { font-size: 1.05rem; }
  .help-layout { grid-template-columns: minmax(0,1fr); gap: 0; }
  .help-section { padding: 26px; }
  .login-layout { grid-template-columns: minmax(0,1fr); max-width: 500px; gap: 28px; padding-top: 6px; }
  .login-intro h1 { font-size: 1.9rem; margin-bottom: 14px; }
  .login-card { padding: 30px; }
  .desktop-break { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 14px; }
  .header-main { padding: 16px; gap: 14px; }
  .brand { gap: 9px; }
  .header-account { gap: 5px; flex-wrap: wrap; }
  .account-name { display: none; }
  .logout-button { font-size: .7rem; padding: .45rem .2rem; }
  .nav-inner { padding: 0 16px; gap: 22px; }
  .nav-inner a { padding: 13px 0 11px; font-size: .8rem; }
  main { margin-top: 28px; padding: 0 16px; margin-bottom: 40px; }
  .site-footer { margin: 0 16px; font-size: .7rem; padding-top: 20px; }
  h1 { font-size: 1.65rem; }
  .page-heading { margin-bottom: 24px; }
  .page-description { font-size: .85rem; line-height: 1.8; }
  .heading-with-actions { display: block; }
  .heading-with-actions > .button { margin-top: 20px; }
  .heading-links { align-items: flex-start; margin-top: 20px; }
  .back-link { font-size: .8rem; margin-bottom: 18px; }
  .panel { padding: 20px; border-radius: 12px; margin-bottom: 20px; }
  .panel-heading { flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
  .panel-heading h2 { font-size: 1.05rem; }
  .panel-heading a { font-size: .75rem; }
  .notice { padding: 18px 20px; }
  .confirmation-notice { display: block; }
  .confirmation-notice .button { margin-top: 16px; }
  .form-section { border-radius: 12px; margin-bottom: 20px; }
  .section-heading { padding: 20px; gap: 12px; }
  .section-heading h2 { font-size: 1.05rem; }
  .section-heading p { font-size: .75rem; }
  .form-section-body { padding: 0 20px; }
  .form-field { padding: 21px 0; }
  .field-heading { gap: 10px; }
  .field-label { font-size: .87rem; }
  .field-label-en { font-size: .65rem; }
  .required-label { margin-left: 5px; font-size: .56rem; }
  .share-control { min-width: 75px; grid-template-columns: 38px 23px; gap: 4px 5px; }
  .share-caption { font-size: .6rem; }
  .switch-track { width: 38px; height: 22px; }
  .switch-track::after { width: 16px; height: 16px; }
  .share-control input:checked + .switch-track::after { transform: translateX(16px); }
  .switch-state { font-size: .59rem; }
  .checkbox-field .field-input > div { grid-template-columns: minmax(0,1fr); gap: 7px; }
  .checkbox-field .field-input label { padding: 11px 12px; font-size: .85rem; }
  .save-bar { display: block; padding: 20px; }
  .save-bar p { margin-bottom: 14px; }
  .save-bar button { width: 100%; }
  .photo-card { padding: 18px; gap: 16px; border-radius: 12px; }
  .photo-card-image, .photo-card-image img, .photo-card-image .photo-placeholder { width: 100px; }
  .photo-card-image img, .photo-card-image .photo-placeholder { height: 128px; }
  .photo-card-body h3 { font-size: .9rem; }
  .photo-visibility { margin: 8px 0 12px; font-size: .65rem; }
  .photo-card .button { font-size: .75rem; padding: .4rem .65rem; }
  .profile-fields { grid-template-columns: minmax(0,1fr); }
  .profile-field { padding: 16px 0; }
  .profile-field dt { font-size: .73rem; }
  .profile-field dd { font-size: .9rem; }
  .profile-updated { font-size: .65rem; }
  .page-actions { align-items: flex-start; flex-direction: column; gap: 22px; }
  .filters { padding: 20px; gap: 15px; }
  .filter-search { grid-column: 1 / -1; }
  .filters button { grid-column: 1 / -1; }
  .filter-field label { font-size: .75rem; }
  .filter-field label span { display: block; margin: 1px 0 0; font-size: .65rem; }
  .results-heading { display: block; margin-bottom: 18px; }
  .results-heading .muted { margin-top: 5px; font-size: .75rem; }
  .member-grid { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .member-card { padding: 22px; border-radius: 12px; }
  .photo-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
  .gallery-card { border-radius: 10px; }
  .gallery-card figcaption { padding: 12px; font-size: .8rem; }
  .view-tabs { width: 100%; gap: 3px; }
  .view-tabs a { flex: 1; padding: 9px 8px; font-size: .77rem; text-align: center; }
  .upload-zone { padding: 26px 16px 18px; }
  .upload-empty p { font-size: .75rem; }
  .form-actions { gap: 10px; }
  .form-actions .button, .form-actions button { min-width: 0; padding: .65rem .85rem; gap: 9px; font-size: .78rem; }
  .form-actions button[type=submit] { flex: 1; }
  .term-banner { padding: 22px; display: block; }
  .term-banner h2 { font-size: 1.25rem; }
  .term-deadline { margin-top: 20px; padding-top: 14px; border-top: 1px solid #cadbf1; }
  .missing-list { flex-direction: column; }
  .confirmation-checkbox label { font-size: .85rem; }
  .confirmation-checkbox label span { font-size: .65rem; }
  .confirm-submit button { min-width: 0; width: 100%; }
  .timeline { padding-left: 18px; margin-left: 5px; }
  .timeline-entry { padding: 20px; }
  .timeline-entry::before { left: -27px; }
  .timeline-meta { flex-wrap: wrap; gap: 8px; font-size: .75rem; }
  .history-change dd { font-size: .8rem; }
  .empty-state { padding: 30px 20px; }
  .empty-state h2 { font-size: 1rem; }
  .export-form { display: block; }
  .export-form button { margin-top: 16px; }
  .export-form .helptext { margin-top: 16px; }
  .pagination { gap: 16px; }
  .pagination .button { font-size: .8rem; gap: 8px; }
  .login-layout { padding-top: 0; }
  .login-intro h1 { font-size: 1.65rem; letter-spacing: 0; }
  .login-intro > p { font-size: .88rem; }
  .login-card { padding: 26px; border-radius: 16px; }
  .login-card .button { font-size: .85rem; gap: 12px; }
}
@media (min-width: 375px) and (max-width: 600px) {
  .checkbox-field .field-input > div { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .checkbox-field .field-input label { padding: 11px 8px; gap: 8px; font-size: .78rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Controls share the same focus, pending and pressed states. */
button, .button, .button-quiet, .nav-inner a, .member-card, .gallery-card {
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .12s ease;
}
button:active:not(:disabled), .button:active { transform: translateY(1px); }
button:disabled:hover { background: #dfe5ec; color: #596b7b; border-color: #dfe5ec; }
.brand { font-size: 1.5rem; line-height: 1.5; font-weight: 750; letter-spacing: -.025em; }
.header-main { min-height: 82px; padding-top: 17px; padding-bottom: 17px; }
.nav-dot { display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-radius: 50%; background: #ba6500; vertical-align: .15em; }
.site-footer { align-items: center; flex-wrap: wrap; gap: 12px 24px; }
.footer-contacts { display: flex; flex-wrap: wrap; gap: 6px 24px; min-width: 0; }
.site-footer p { margin: 0; }
.site-footer p span { display: inline-block; }
.messages { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.messages p { min-width: 0; overflow-wrap: anywhere; }
.message-close { flex-shrink: 0; color: inherit; font-size: 1.2rem; margin: -8px -8px -8px 0; min-width: 38px; min-height: 38px; }
.message-error { color: #9b271c; background: #fff2f0; border-color: #edb7b3; }
.message-warning { color: #70520b; background: #fffbec; border-color: #eddb9d; }
.message-info { color: #265b94; background: #edf4ff; border-color: #c6d8f0; }
.message-stack .messages + .messages { margin-top: -16px; }
.profile-heading h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.profile-heading .page-description { margin-top: 5px; font-size: .85rem; }
.edit-profile-button { gap: 8px; }
.edit-profile-button svg { width: 17px; height: 17px; }
.photo-card-body h3 { margin-top: 0; }
.photo-card .status-badge { margin-right: 8px; vertical-align: middle; }
.photo-card .button { margin: 5px 0; vertical-align: middle; }
.photo-card .photo-status-message { font-size: .72rem; line-height: 1.6; }
.photo-status-message:empty { display: none; }
.status-badge.danger { background: #fff0ee; color: #9b271c; }
.photo-processing { opacity: .65; }
.photo-retry { display: block; font-size: .75rem; padding-left: 0; }
.photo-feedback { margin-top: -5px; margin-bottom: 24px; }
.photo-placeholder { min-height: 100px; }
.member-card:hover, .gallery-card:hover { border-color: #a9c3e5; box-shadow: 0 4px 14px #17324d0a; }
.save-bar { position: sticky; bottom: 18px; z-index: 2; background: #fff; border-color: #ccd9e9; box-shadow: 0 6px 24px #17324d12; }
.save-bar p { margin: 0; }
.save-actions { display: flex; gap: 16px; align-items: center; flex-shrink: 0; }
.save-actions > a { text-decoration: none; white-space: nowrap; }
.has-unsaved-changes .save-bar { border-color: #7fa5d5; }
.has-unsaved-changes [data-save-status] { color: #365d90; }
form[aria-busy=true] button[type=submit] { cursor: progress; background: #e9f1fd; color: var(--accent); border-color: #c2d6f0; }
form[aria-busy=true] button[type=submit]::before { content: ""; flex-shrink: 0; width: 15px; height: 15px; border: 2px solid #a1bfe5; border-right-color: var(--accent); border-radius: 50%; animation: control-spin .8s linear infinite; }
@keyframes control-spin { to { transform: rotate(360deg); } }
.upload-page { max-width: 660px; margin: 0 auto; }
.upload-zone { padding: 26px 22px 18px; border-width: 1px; }
.upload-empty h3 { font-size: 1rem; margin-bottom: 8px; }
.upload-empty p { max-width: 24em; margin: 0 auto 20px; }
.upload-symbol { width: 56px; height: 56px; }
.upload-specs { text-align: center; margin: 16px 0 0; color: var(--muted); font-size: .76rem; }
.upload-specs + .helptext { font-size: .72rem; margin-top: 5px; }
.upload-progress { margin-top: 16px; color: var(--accent); font-size: .8rem; }
.photo-dialog:not([open]) { display: none; }
.photo-dialog { width: min(560px, calc(100% - 32px)); max-width: none; max-height: calc(100vh - 48px); max-height: calc(100svh - 48px); margin: auto; padding: 28px; border: 1px solid #d3deec; border-radius: 18px; color: var(--ink); background: white; box-shadow: 0 24px 80px #11294b33; overflow-y: auto; overscroll-behavior: contain; }
.photo-dialog::backdrop { background: #142a486b; backdrop-filter: blur(3px); }
body:has(.photo-dialog[open]) { overflow: hidden; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.dialog-heading > div { min-width: 0; }
.dialog-heading h2 { margin: 0 0 6px; font-size: 1.2rem; }
.dialog-heading p { color: var(--muted); font-size: .79rem; }
.dialog-close { min-width: 40px; min-height: 40px; flex-shrink: 0; font-size: 1.45rem; font-weight: 400; color: var(--muted); margin-top: -6px; margin-right: -8px; }
.photo-dialog .upload-preview img { max-height: min(34svh, 280px); }
.photo-dialog .preview-label { margin-bottom: 12px; font-size: .72rem; }
.photo-dialog .form-actions { padding-top: 20px; margin-top: 20px; }
.photo-dialog .form-actions button[type=submit] { min-width: 190px; }
.photo-dialog [aria-busy=true] .file-control { opacity: .6; }
.photo-dialog [aria-busy=true] .file-control label { cursor: wait; }
.login-intro h1 { line-height: 1.4; letter-spacing: -.025em; font-size: clamp(1.9rem, 3vw, 2.7rem); }
.login-card { border-radius: 16px; box-shadow: 0 8px 30px #24466a06; }
@media (max-width: 840px) {
  .save-bar { bottom: 12px; }
  .save-actions { gap: 10px; }
  .site-footer { align-items: flex-start; }
}
@media (max-width: 600px) {
  .header-main { min-height: 68px; }
  .brand { font-size: 1.25rem; }
  .site-footer { padding-bottom: 24px; gap: 14px; }
  .site-footer p { width: 100%; }
  .site-footer p span { font-size: .68rem; }
  .photo-card .button { display: flex; width: fit-content; margin-top: 9px; }
  .photo-card .status-badge { font-size: .65rem; }
  .photo-card .photo-visibility { margin: 6px 0 9px; }
  .save-bar { padding: 16px; bottom: 10px; }
  .save-bar p { margin-bottom: 11px; font-size: .75rem; }
  .save-actions { width: 100%; gap: 12px; }
  .save-actions button { flex: 1; width: auto; }
  .save-actions > a { padding-left: 0; font-size: .8rem; }
  .photo-dialog { width: calc(100% - 24px); padding: 22px 18px 18px; border-radius: 14px; max-height: calc(100vh - 24px); max-height: calc(100svh - 24px); }
  .dialog-heading { margin-bottom: 18px; gap: 8px; }
  .dialog-heading h2 { font-size: 1.05rem; }
  .dialog-heading p { font-size: .72rem; }
  .dialog-close { min-width: 36px; min-height: 36px; }
  .photo-dialog .upload-zone { padding: 22px 14px 16px; }
  .photo-dialog .upload-empty h3 { font-size: .9rem; }
  .photo-dialog .upload-empty p { font-size: .75rem; }
  .photo-dialog .form-actions button[type=submit] { min-width: 0; }
  .upload-specs { font-size: .67rem; }
  .upload-specs + .helptext { font-size: .65rem; }
  .login-intro h1 { font-size: 1.85rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

.language-switch { display: inline-flex; align-items: center; padding: 3px; border: 1px solid var(--line); border-radius: 8px; gap: 2px; flex-shrink: 0; }
.language-switch button { min-width: 34px; min-height: 34px; padding: 4px 7px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; font-size: .72rem; font-weight: 650; gap: 0; }
.language-switch button:hover { background: var(--accent-light); color: var(--accent); }
.language-switch button[aria-pressed=true] { background: var(--accent-light); color: var(--accent); }
.always-shared { white-space: normal; text-align: center; flex-shrink: 0; max-width: 7.5rem; }
html[lang=en] .readonly-field .field-label-en, html[lang=en] .photo-card .field-label-en,
html[lang=en] .confirmation-checkbox label > span[lang=en], html[lang=en] .filter-field label > span[lang=en] { display: none; }
html[lang=en] .photo-visibility { line-height: 1.65; }
html[lang=en] .share-caption { line-height: 1.3; }
html[lang=en] .site-footer p span { white-space: normal; }
@media (max-width: 1100px) {
  .account-name { max-width: 14em; }
  .header-account { gap: 14px; }
}
@media (max-width: 600px) {
  .header-main { flex-wrap: wrap; row-gap: 10px; }
  .header-account { flex-basis: 100%; justify-content: space-between; flex-wrap: nowrap; }
  .language-switch button { min-width: 36px; min-height: 34px; }
  .logout-button { font-size: .75rem; padding: .45rem .5rem; }
  .photo-dialog .form-actions { flex-wrap: wrap; }
  html[lang=en] .confirmation-notice .button { white-space: normal; }
  html[lang=en] .view-tabs a { overflow-wrap: anywhere; }
  html[lang=en] .member-summary > div { grid-template-columns: 82px minmax(0,1fr); }
}
html:has(.profile-form) { scroll-padding-bottom: 130px; }
@media (max-width: 600px) {
  html:has(.profile-form) { scroll-padding-bottom: 180px; }
}
