@charset "utf-8";
/* Shared gallery and administration styles. No external font or build dependency. */
:root { --accent:#004a3e; --ink:#243b32; --muted:#52675e; --line:#d3dfd8; --paper:#fff; --canvas:#f1f5f2; }
* { box-sizing:border-box; }
body { margin:0; padding:24px 16px; background:var(--canvas); color:var(--ink); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP","Yu Gothic",Meiryo,sans-serif; font-size:16px; line-height:1.7; overflow-wrap:anywhere; }
a { color:var(--accent); text-underline-offset:3px; }
a:hover { text-decoration:none; }
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible { outline:3px solid #c38121; outline-offset:3px; }
img { max-width:100%; height:auto; vertical-align:middle; }
h1 { margin:0 0 20px; padding:22px 20px; color:white; background:var(--accent); font-size:clamp(1.25rem,3vw,1.75rem); font-weight:600; line-height:1.45; }
h2 { margin:30px 0 14px; font-size:1.3rem; }
h3 { margin:20px 0 12px; font-size:1.1rem; }
p { margin:12px 0; }
ul,ol { padding-left:1.5em; }
em { font-style:normal; font-weight:600; }
#container { width:100%; max-width:1080px; margin:0 auto; padding:28px; border:1px solid var(--line); background:var(--paper); }
/* Consistent navigation for the existing and new admin screens. */
#menu { display:flex; flex-wrap:wrap; gap:4px 12px; padding:10px 0; margin:0 0 20px; border-block:1px solid var(--line); }
#menu h2 { display:none; }
#menu ul { display:flex; flex-wrap:wrap; gap:4px 12px; list-style:none; padding:0; margin:0; }
#menu a { display:inline-flex; align-items:center; min-height:42px; padding:4px; }
#navi ul,#page ul { display:flex; flex-wrap:wrap; gap:12px; padding:0; list-style:none; }
.hint { color:var(--muted); font-size:.88rem; font-weight:400; }
.attention { color:#a22d2d; }
p.attention,p.success { padding:12px 16px; border-left:4px solid currentColor; background:#f8f5f0; }
.success { color:#176440; }
/* Gallery retains full uncropped photographs and the existing category structure. */
.gallery { padding:8px 0 24px; border-bottom:1px solid var(--line); }
#gallery ul.image { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:18px; padding:0; margin:16px 0; list-style:none; }
#gallery ul.image li { min-width:0; background:var(--canvas); }
#gallery ul.image a { display:flex; justify-content:center; align-items:center; min-height:180px; padding:8px; }
#gallery ul.image img { width:auto; max-height:260px; object-fit:contain; }
#gallery ul.info { padding:0; list-style:none; text-align:right; }
.image { display:flex; flex-wrap:wrap; gap:12px; grid-column:1/-1; margin:12px 0; }
.image img { object-fit:contain; background:var(--canvas); }
/* Public photo overview and category pages only. Existing admin and roster layouts stay scoped. */
.public-gallery-page #container { max-width:1200px; padding:28px 32px; }
.public-gallery-page .gallery-heading h2 { margin:0 0 6px; font-size:1.6rem; }
.public-gallery-page .gallery-description { margin:0; }
.public-gallery-page .gallery-help { margin:8px 0 0; color:var(--muted); font-size:.88rem; }
.public-gallery-page .gallery-category-nav { display:flex; flex-wrap:wrap; gap:8px; margin:22px 0 8px; }
.public-gallery-page .gallery-category-nav a { display:inline-flex; align-items:center; min-height:44px; padding:7px 16px; border:1px solid var(--line); border-radius:4px; text-decoration:none; }
.public-gallery-page .gallery-category-nav a:hover { border-color:var(--accent); background:var(--canvas); }
.public-gallery-page .gallery { padding:22px 0 28px; border-bottom:1px solid var(--line); scroll-margin-top:20px; }
.public-gallery-page .gallery:last-child { border-bottom:0; padding-bottom:0; }
.public-gallery-page #gallery:focus-visible { outline:3px solid #c38121; outline-offset:4px; }
.public-gallery-page .gallery-section-head { display:flex; align-items:center; justify-content:space-between; gap:12px 20px; }
.public-gallery-page .gallery-section-head h3 { min-width:0; margin:0; font-size:1.2rem; }
.public-gallery-page .gallery-all { display:inline-flex; align-items:center; gap:6px; flex-shrink:0; min-height:44px; font-size:.88rem; }
.public-gallery-page #gallery ul.image { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px; margin:16px 0 0; padding:0; list-style:none; }
.public-gallery-page #gallery ul.image li.gallery-photo { display:flex; flex-direction:column; min-width:0; background:transparent; }
.public-gallery-page #gallery .photo-link { display:flex; align-items:center; justify-content:center; width:100%; min-height:0; aspect-ratio:2/3; padding:0; border:1px solid var(--line); background:#f5f7f5; }
.public-gallery-page #gallery .photo-link img { display:block; width:100%; height:100%; max-height:none; object-fit:contain; margin:0; }
.public-gallery-page #gallery .photo-link:hover { border-color:var(--accent); }
.public-gallery-page .photo-caption { display:flex; flex-direction:column; flex:1; padding:12px 0 0; }
.public-gallery-page .photo-name { margin:0 0 5px; font-size:1.05rem; font-weight:600; line-height:1.5; }
.public-gallery-page .photo-meta { display:grid; gap:2px; margin:0; color:var(--muted); font-size:.8rem; }
.public-gallery-page .photo-description { margin-top:10px; font-size:.85rem; }
.public-gallery-page .photo-description summary { width:fit-content; min-height:44px; padding:10px 0; color:var(--accent); cursor:pointer; }
.public-gallery-page .photo-description p { margin:4px 0 0; line-height:1.8; }
.public-gallery-page .gallery-empty { grid-column:1/-1; padding:22px 18px; border:1px dashed var(--line); color:var(--muted); background:#f8faf8; font-size:.9rem; }
.public-gallery-page .gallery-empty h3 { margin:0 0 6px; font-size:1rem; }
.public-gallery-page .gallery-empty p { margin:0; }
.public-gallery-page .gallery-breadcrumb { display:flex; flex-wrap:wrap; gap:6px 10px; margin:0 0 16px; font-size:.85rem; }
.public-gallery-page .gallery-pagination { margin:24px 0 0; }
.public-gallery-page .gallery-pagination ul { align-items:center; gap:8px; margin:0; }
.public-gallery-page .gallery-pagination a,.public-gallery-page .gallery-pagination span { display:inline-flex; align-items:center; justify-content:center; min-width:44px; min-height:44px; padding:7px 14px; border:1px solid var(--line); border-radius:4px; text-decoration:none; }
.public-gallery-page .gallery-pagination [aria-current] { color:white; background:var(--accent); border-color:var(--accent); }
.gallery-skip-link { position:absolute; top:0; left:16px; z-index:5; padding:8px 12px; color:white; background:var(--accent); transform:translateY(-120%); }
.gallery-skip-link:focus { transform:none; }
.public-gallery-page summary:focus-visible { outline:3px solid #c38121; outline-offset:3px; }
@media (max-width:1023px) {
 .public-gallery-page #gallery ul.image { grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
}
@media (max-width:640px) {
 .public-gallery-page #container { padding:16px; }
 .public-gallery-page h1 { margin:-16px -16px 12px; padding:18px 16px; font-size:1.15rem; }
 .public-gallery-page .gallery-heading h2 { font-size:1.3rem; }
 .public-gallery-page .gallery-description { font-size:.9rem; }
 .public-gallery-page .gallery-help { font-size:.8rem; }
 .public-gallery-page .gallery-category-nav { margin:18px 0 4px; gap:6px; }
 .public-gallery-page .gallery-category-nav a { padding:7px 12px; font-size:.82rem; }
 .public-gallery-page .gallery { padding:18px 0 24px; }
 .public-gallery-page .gallery-section-head { gap:8px; }
 .public-gallery-page .gallery-section-head h3 { font-size:1.05rem; }
 .public-gallery-page .gallery-all { font-size:.78rem; }
 .public-gallery-page #gallery ul.image { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 12px; margin-top:10px; }
 .public-gallery-page .photo-caption { padding-top:9px; }
 .public-gallery-page .photo-name { font-size:.95rem; }
 .public-gallery-page .photo-meta { font-size:.75rem; }
 .public-gallery-page .photo-description { margin-top:5px; font-size:.8rem; }
 .public-gallery-page .gallery-empty { padding:18px 12px; font-size:.85rem; }
 .public-gallery-page .gallery-breadcrumb { margin-bottom:12px; font-size:.8rem; }
}

/* Shared site navigation: the same labels, order and destinations on every full page. */
#menu.site-nav { position:relative; align-items:center; justify-content:space-between; gap:8px 20px; padding:10px 0; margin:0 0 24px; font-size:.9rem; }
#menu.site-nav .site-public-links { display:flex; align-items:center; flex-wrap:wrap; gap:6px 22px; }
#menu.site-nav a { min-height:44px; text-decoration:none; }
#menu.site-nav a:hover { text-decoration:underline; }
#menu.site-nav [aria-current] { font-weight:600; box-shadow:inset 0 -2px var(--accent); }
#menu.site-nav .site-management { position:relative; font-size:.88rem; }
#menu.site-nav summary { display:list-item; min-height:44px; padding:9px 12px; border:1px solid var(--line); border-radius:4px; cursor:pointer; }
#menu.site-nav summary.is-current { font-weight:600; color:var(--accent); }
#menu.site-nav summary:focus-visible { outline:3px solid #c38121; outline-offset:3px; }
#menu.site-nav .site-management ul { position:absolute; z-index:5; top:100%; right:0; display:grid; gap:0; width:216px; margin:6px 0 0; padding:8px; border:1px solid var(--line); background:white; box-shadow:0 8px 20px rgb(0 74 62 / .08); }
#menu.site-nav .site-management a { display:flex; align-items:center; padding:8px 10px; }
@media (max-width:640px) {
 #menu.site-nav { display:block; padding:8px 0 12px; margin-bottom:20px; }
 #menu.site-nav .site-public-links { display:grid; grid-template-columns:minmax(0,1.5fr) repeat(2,minmax(0,1fr)); gap:2px 8px; font-size:.82rem; }
 #menu.site-nav .site-public-links li:first-child { grid-column:auto; }
 #menu.site-nav .site-public-links a { display:flex; align-items:center; width:fit-content; padding:4px 0; }
 #menu.site-nav .site-management { margin-top:8px; }
 #menu.site-nav .site-management ul { position:static; width:100%; margin-top:4px; box-shadow:none; }
}

/* Forms: native controls remain usable with or without JavaScript. */
form { margin:18px 0; padding:20px; border:1px solid var(--line); background:#f8faf8; }
fieldset { min-width:0; padding:0; margin:0 0 20px; border:0; }
legend { font-weight:600; margin-bottom:12px; }
label { display:block; margin:12px 0; }
input,select,textarea,button { font:inherit; max-width:100%; }
input:not([type=hidden]):not([type=checkbox]):not([type=radio]),select,textarea { border:1px solid #a8bdb0; border-radius:4px; padding:9px 10px; background:white; color:var(--ink); min-height:44px; }
input[type=text],input[type=password],input:not([type]),textarea { width:100%; }
input[type=checkbox],input[type=radio] { width:20px; height:20px; vertical-align:middle; accent-color:var(--accent); }
input[type=color] { display:block; width:90px; }
input[type=file] { width:100%; padding:8px; font-size:.9rem; }
textarea { display:block; resize:vertical; min-height:130px; }
dl { display:grid; grid-template-columns:140px minmax(0,1fr); gap:12px 16px; margin:12px 0; }
dt { font-weight:600; padding-top:8px; }
dd { margin:0; min-width:0; }
dd input[name^="date["] { width:5em; margin:3px 0; }
button,input[type=submit],input[type=reset],.button { display:inline-block; width:auto; min-height:44px; border:1px solid var(--accent); border-radius:4px; padding:9px 16px; margin:4px 6px 4px 0; background:var(--accent); color:white; text-decoration:none; cursor:pointer; text-align:center; }
button:hover,input[type=submit]:hover { filter:brightness(1.15); }
input[type=reset],.button { background:white; color:var(--accent); }
button.danger { border-color:#a22d2d; background:white; color:#a22d2d; }
.inline-form { display:inline-block; padding:0; margin:0; border:0; background:transparent; }
.inline-form button { margin:2px 0; padding:5px 10px; }
.image-preview { display:block; max-width:180px; max-height:200px; object-fit:contain; margin:10px 0; }
.date-inputs { display:flex; flex-wrap:wrap; gap:12px; }
.date-inputs label { max-width:120px; }
.date-inputs input { width:100%; }
/* Data tables scroll inside their own region on narrow phones. */
.table-scroll { width:100%; overflow-x:auto; }
table { width:100%; border-collapse:collapse; margin:16px 0; }
th,td { padding:12px 10px; text-align:left; vertical-align:middle; border-bottom:1px solid var(--line); }
th { background:#eaf1ec; font-weight:600; }
tr:nth-child(even) td { background:#f8faf8; }
td img { max-width:80px; }
#config .data { min-width:0; }
pre { white-space:pre-wrap; }
/* Photo upload editor only. */
.photo-upload-page #work form { margin:0 0 24px; padding:12px 16px; }
.photo-upload-page #work fieldset { display:flex; align-items:center; flex-wrap:wrap; gap:8px 16px; margin:0; }
.photo-upload-page #work legend { display:none; }
.photo-upload-page #work label { margin:0; font-weight:600; }
.photo-upload-page .editor-heading h2 { margin:24px 0 6px; }
.photo-upload-page .editor-heading p { margin:0 0 22px; }
.photo-upload-page .editor-errors { padding:12px 16px; margin-bottom:22px; border-left:4px solid currentColor; background:#fff5f3; }
.photo-upload-page #work_form { margin:0; padding:0; border:0; background:transparent; }
.photo-upload-page .editor-section { width:100%; margin:0 0 26px; padding:20px 0 0; border-top:1px solid var(--line); }
.photo-upload-page .editor-section legend { float:left; width:100%; margin:0 0 16px; padding:0; font-size:1.1rem; }
.photo-upload-page .editor-section legend + * { clear:both; }
.photo-upload-page .editor-fields,.photo-upload-page .upload-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px 24px; }
.photo-upload-page .editor-field { min-width:0; margin:0 0 18px; }
.photo-upload-page .editor-fields .editor-field { margin:0; }
.photo-upload-page .editor-field label,.photo-upload-page .editor-label,.photo-upload-page .upload-slot > label { display:block; margin:0 0 7px; font-weight:600; }
.photo-upload-page .editor-field .hint { margin:5px 0 0; }
.photo-upload-page .field-required,.photo-upload-page .field-optional { display:inline-block; margin-left:6px; font-size:.75rem; font-weight:400; vertical-align:middle; }
.photo-upload-page .field-required { color:#a22d2d; }
.photo-upload-page .field-optional { color:var(--muted); }
.photo-upload-page .upload-slot { min-width:0; padding:16px; border:1px solid var(--line); background:#f8faf8; }
.photo-upload-page .upload-preview { display:flex; justify-content:center; align-items:center; min-height:112px; margin:12px 0; padding:10px; border:1px dashed #b3c6bb; background:white; }
.photo-upload-page .upload-placeholder { color:var(--muted); font-size:.85rem; text-align:center; }
.photo-upload-page .upload-preview img { display:block; width:auto; max-width:100%; height:160px; object-fit:contain; margin:0; background:transparent; }
.photo-upload-page .upload-preview [hidden],.photo-upload-page .upload-slot button[hidden] { display:none; }
.photo-upload-page .upload-status { margin:8px 0 0; overflow-wrap:anywhere; }
.photo-upload-page .clear-upload { margin:8px 0 0; padding:4px 10px; min-height:36px; border-color:#a8bdb0; color:var(--accent); background:white; font-size:.85rem; }
.photo-upload-page .editor-category { display:flex; align-items:center; flex-wrap:wrap; gap:10px 16px; }
.photo-upload-page .editor-category select { min-width:180px; }
.photo-upload-page .editor-datetime { display:grid; grid-template-columns:1.4fr repeat(4,minmax(0,1fr)); gap:10px; max-width:560px; }
.photo-upload-page .editor-datetime label { margin:0; color:var(--muted); font-size:.85rem; font-weight:400; }
.photo-upload-page .editor-datetime input { display:block; width:100%; margin-top:4px; }
.photo-upload-page .editor-actions { display:flex; flex-wrap:wrap; gap:8px 12px; padding:20px 0 8px; border-top:1px solid var(--line); }
.photo-upload-page .editor-actions > * { margin:0; }
.photo-upload-page .editor-actions button { min-width:180px; }
.photo-upload-page .photo-delete { margin-top:30px; padding-top:16px; border-top:1px solid var(--line); }
.photo-upload-page .photo-delete h2 { margin:0; font-size:1rem; }
/* Photo edit/delete list: same controls and spacing as the upload editor. */
.photo-list-page #work form { margin:0 0 24px; padding:12px 16px; }
.photo-list-page #work fieldset { display:flex; align-items:center; flex-wrap:wrap; gap:8px 16px; margin:0; }
.photo-list-page #work legend { display:none; }
.photo-list-page #work label { margin:0; font-weight:600; }
.photo-list-page .photo-list-title { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px 20px; margin:24px 0 22px; }
.photo-list-page .photo-list-title h2 { margin:0 0 6px; }
.photo-list-page .photo-list-title p,.photo-list-page .photo-list-title .button { margin:0; }
.photo-list-page #photo-filter { margin:0 0 20px; padding:16px; }
.photo-list-page #photo-filter fieldset { margin:0; }
.photo-list-page #photo-filter legend { padding:0; margin-bottom:12px; }
.photo-list-page .photo-filter-controls { display:flex; align-items:center; flex-wrap:wrap; gap:10px 16px; }
.photo-list-page .photo-filter-controls label { margin:0; font-weight:600; }
.photo-list-page .photo-filter-controls select { min-width:180px; max-width:100%; }
.photo-list-page .photo-filter-controls button { margin:0; }
.photo-list-page .photo-list-summary { display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:4px 16px; margin:0 0 10px; }
.photo-list-page .photo-list-summary p { margin:0; }
.photo-list-page .photo-list-head,.photo-list-page .photo-record { display:grid; grid-template-columns:104px minmax(0,1fr) 200px; gap:20px; align-items:center; }
.photo-list-page .photo-list-head { padding:12px 16px; background:#eaf1ec; font-size:.88rem; font-weight:600; }
.photo-list-page .photo-list-head span:last-child { text-align:center; }
.photo-list-page .photo-records { margin:0; padding:0; list-style:none; }
.photo-list-page .photo-record { padding:20px 16px; border-bottom:1px solid var(--line); }
.photo-list-page .photo-record > * { min-width:0; }
.photo-list-page .photo-record-image { display:flex; justify-content:center; align-items:center; width:104px; min-height:124px; background:var(--canvas); }
.photo-list-page .photo-record-image img { display:block; width:100px; height:124px; object-fit:contain; }
.photo-list-page .photo-record-info h3 { margin:0 0 4px; font-size:1.1rem; }
.photo-list-page .photo-record-info h3 a { text-decoration:none; }
.photo-list-page .photo-record-info h3 a:hover { text-decoration:underline; }
.photo-list-page .photo-record-id { margin:0 0 8px; color:var(--muted); font-size:.85rem; }
.photo-list-page .photo-record-id span { margin-left:6px; }
.photo-list-page .photo-record-details { display:grid; grid-template-columns:3.5em minmax(0,1fr); gap:2px 8px; margin:0; font-size:.9rem; }
.photo-list-page .photo-record-details dt { padding:0; color:var(--muted); font-weight:400; }
.photo-list-page .photo-record-details dd { margin:0; }
.photo-list-page .photo-record-date { margin:8px 0 0; font-size:.8rem; }
.photo-list-page .photo-record-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.photo-list-page .photo-record-actions .button,.photo-list-page .photo-record-actions button { display:block; width:100%; min-height:44px; margin:0; padding:9px 10px; }
.photo-list-page .photo-record-actions .inline-form { display:block; margin:0; }
.photo-list-page .photo-edit { color:white; background:var(--accent); }
.photo-list-page .photo-empty { padding:32px 16px; border-block:1px solid var(--line); text-align:center; }
.photo-list-page .photo-empty h3 { margin:0 0 8px; }
.photo-list-page .photo-pagination { margin:24px 0; }
.photo-list-page .photo-pagination ul { align-items:center; gap:8px; }
.photo-list-page .photo-pagination a,.photo-list-page .photo-pagination span { display:inline-flex; justify-content:center; align-items:center; min-width:44px; min-height:44px; padding:6px 12px; border:1px solid var(--line); border-radius:4px; text-decoration:none; }
.photo-list-page .photo-pagination [aria-current=page] { color:white; background:var(--accent); border-color:var(--accent); }
/* Category list and form share the upload page's spacing and controls. */
.category-page #work form { margin:0 0 24px; padding:12px 16px; }
.category-page #work fieldset { display:flex; align-items:center; flex-wrap:wrap; gap:8px 16px; margin:0; }
.category-page #work legend { display:none; }
.category-page #work label { margin:0; font-weight:600; }
.category-page .category-list-title { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px 20px; margin:24px 0 18px; }
.category-page .category-list-title h2,.category-page .category-heading h2 { margin:0 0 6px; }
.category-page .category-list-title p,.category-page .category-list-title .button,.category-page .category-heading p { margin:0; }
.category-page .category-heading { margin:24px 0 22px; }
.category-page .category-delete-note { margin:0 0 18px; }
.category-page .category-list-head,.category-page .category-record { display:grid; grid-template-columns:minmax(0,1fr) 96px 200px; align-items:center; gap:20px; }
.category-page .category-list-head { padding:12px 16px; background:#eaf1ec; font-size:.88rem; font-weight:600; }
.category-page .category-list-head span:not(:first-child) { text-align:center; }
.category-page .category-records { margin:0; padding:0; list-style:none; }
.category-page .category-record { padding:20px 16px; border-bottom:1px solid var(--line); }
.category-page .category-record > * { min-width:0; }
.category-page .category-record-info h3 { margin:0 0 5px; font-size:1.05rem; }
.category-page .category-record-info h3 a { text-decoration:none; }
.category-page .category-record-info h3 a:hover { text-decoration:underline; }
.category-page .category-record-id { margin:0; color:var(--muted); font-size:.85rem; }
.category-page .category-record-id span { margin-left:6px; }
.category-page .category-record-order { text-align:center; }
.category-page .category-record-order span { display:none; }
.category-page .category-record-order strong { display:block; font-size:1.1rem; }
.category-page .category-record-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.category-page .category-record-actions .button,.category-page .category-record-actions button { display:block; width:100%; min-height:44px; margin:0; padding:9px 10px; }
.category-page .category-record-actions .inline-form { display:block; margin:0; }
.category-page .category-edit { color:white; background:var(--accent); }
.category-page .category-empty { padding:32px 16px; border-block:1px solid var(--line); text-align:center; }
.category-page .category-empty h3 { margin:0 0 8px; }
.category-page #work_form { margin:0; padding:0; border:0; background:transparent; }
.category-page .category-form-section { width:100%; margin:0 0 24px; padding:20px 0 0; border-top:1px solid var(--line); }
.category-page .category-form-section legend { float:left; width:100%; margin:0 0 16px; padding:0; font-size:1.1rem; }
.category-page .category-form-section legend + * { clear:both; }
.category-page .category-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 24px; }
.category-page .category-form-field { min-width:0; }
.category-page .category-form-field label { margin:0 0 7px; font-weight:600; }
.category-page .category-form-field p { margin:5px 0 0; }
.category-page .category-order-field { grid-column:1/-1; }
.category-page .category-order-field input { max-width:180px; }
.category-page .category-required { display:inline-block; margin-left:6px; color:#a22d2d; font-size:.75rem; font-weight:400; }
.category-page #category-id[readonly] { background:var(--canvas); color:var(--muted); }
.category-page .category-form-actions { display:flex; flex-wrap:wrap; gap:8px 12px; padding:20px 0 8px; border-top:1px solid var(--line); }
.category-page .category-form-actions > * { margin:0; }
.category-page .category-form-actions button { min-width:180px; }
@media (max-width:640px) {
  body { padding:10px; }
  #container { padding:16px; }
  h1 { margin:-16px -16px 16px; padding:20px 16px; }
  form { padding:14px; }
  dl { grid-template-columns:minmax(0,1fr); gap:4px; }
  dd { margin-bottom:12px; }
  #gallery ul.image { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  #gallery ul.image a { min-height:140px; }
  #gallery ul.image img { max-height:220px; }
  th,td { padding:8px 6px; font-size:.85rem; }
  .table-scroll table { min-width:500px; }
  .photo-upload-page .editor-fields,.photo-upload-page .upload-grid { grid-template-columns:minmax(0,1fr); gap:18px; }
  .photo-upload-page .upload-slot { padding:12px; }
  .photo-upload-page .upload-preview { min-height:64px; }
  .photo-upload-page .editor-actions > * { width:100%; }
  .photo-upload-page .editor-datetime { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .photo-upload-page #work form { padding:10px 12px; }
  .photo-list-page #work form { padding:10px 12px; }
  .photo-list-page .photo-list-title { align-items:flex-start; }
  .photo-list-page .photo-list-title > .button { width:100%; }
  .photo-list-page .photo-filter-controls { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; }
  .photo-list-page .photo-filter-controls select { width:100%; min-width:0; }
  .photo-list-page .photo-filter-controls a { justify-self:start; }
  .photo-list-page .photo-list-head { display:none; }
  .photo-list-page .photo-record { grid-template-columns:76px minmax(0,1fr); gap:14px; align-items:start; padding:18px 0; }
  .photo-list-page .photo-record:first-child { border-top:1px solid var(--line); }
  .photo-list-page .photo-record-image { width:76px; min-height:104px; }
  .photo-list-page .photo-record-image img { width:76px; height:104px; }
  .photo-list-page .photo-record-info h3 { font-size:1rem; }
  .photo-list-page .photo-record-details { grid-template-columns:3em minmax(0,1fr); gap:2px 6px; font-size:.85rem; }
  .photo-list-page .photo-record-actions { grid-column:1/-1; }
  .category-page #work form { padding:10px 12px; }
  .category-page .category-list-title { align-items:flex-start; }
  .category-page .category-list-title > .button { width:100%; }
  .category-page .category-list-head { display:none; }
  .category-page .category-record { grid-template-columns:minmax(0,1fr) 72px; align-items:start; gap:14px; padding:18px 0; }
  .category-page .category-record:first-child { border-top:1px solid var(--line); }
  .category-page .category-record-order span { display:block; }
  .category-page .category-record-actions { grid-column:1/-1; }
  .category-page .category-form-grid { grid-template-columns:minmax(0,1fr); gap:18px; }
  .category-page .category-order-field input { max-width:180px; }
  .category-page .category-form-actions > * { width:100%; }
}
/* Site settings editor only. Shared navigation and other forms retain their layouts. */
.settings-page .settings-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px 20px; margin:24px 0 20px; }
.settings-page .settings-heading h2 { margin:0 0 5px; }
.settings-page .settings-heading p,.settings-page .settings-heading .button { margin:0; }
.settings-page .settings-password-notice { margin:0 0 24px; }
.settings-page #work_form { padding:0; margin:0; border:0; background:transparent; }
.settings-page .settings-section { margin:0 0 28px; padding:20px 0 0; border-top:1px solid var(--line); }
.settings-page .settings-section > legend { float:left; width:100%; margin:0 0 18px; padding:0; font-size:1.1rem; }
.settings-page .settings-section > legend + * { clear:both; }
.settings-page .settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 24px; }
.settings-page .settings-install-grid { display:grid; grid-template-columns:minmax(0,1fr) 200px; gap:20px 24px; }
.settings-page .settings-field { min-width:0; }
.settings-page .settings-field > label { margin:0 0 7px; font-weight:600; }
.settings-page .settings-field input { width:100%; min-width:0; }
.settings-page .settings-field .hint { margin:6px 0 0; }
.settings-page .settings-color input { width:96px; min-height:48px; padding:5px; cursor:pointer; }
.settings-page .settings-username { max-width:440px; margin-bottom:20px; }
.settings-page .settings-required { margin-left:6px; color:#a22d2d; font-size:.75rem; font-weight:400; }
.settings-page .settings-password { padding:14px 16px; border:1px solid var(--line); background:#f8faf8; }
.settings-page .settings-password > summary { min-height:44px; padding:8px 0; cursor:pointer; font-weight:600; }
.settings-page .settings-password > summary:focus-visible { outline:3px solid #c38121; outline-offset:3px; }
.settings-page .settings-password > p { margin:6px 0 18px; }
.settings-page .settings-password-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.settings-page .settings-password input { background:white; }
.settings-page .settings-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px 18px; padding:20px 0 8px; border-top:1px solid var(--line); }
.settings-page .settings-actions button { min-width:200px; margin:0; }
.settings-page .settings-actions p { margin:0; }
@media (max-width:900px) {
 .settings-page .settings-password-grid { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:640px) {
 .settings-page h1 { font-size:1.15rem; padding-top:18px; padding-bottom:18px; }
 .settings-page .settings-heading { margin:20px 0; }
 .settings-page .settings-heading h2 { font-size:1.2rem; }
 .settings-page .settings-heading .button { width:100%; }
 .settings-page .settings-grid,.settings-page .settings-install-grid { grid-template-columns:minmax(0,1fr); gap:20px; }
 .settings-page .settings-section { margin-bottom:24px; }
 .settings-page .settings-password { padding:10px 12px; }
 .settings-page .settings-actions { display:block; }
 .settings-page .settings-actions button { width:100%; min-width:0; }
 .settings-page .settings-actions p { margin-top:8px; text-align:center; }
}

/* Environment confirmation: scoped results and native detail disclosure. */
.health-page .health-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px 20px; margin:24px 0 20px; }
.health-page .health-heading h2 { margin:0 0 5px; }
.health-page .health-heading p,.health-page .health-heading .button { margin:0; }
.health-page .health-overview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin:0 0 28px; padding:18px 0; border-block:1px solid var(--line); }
.health-page .health-overview > div { min-width:0; padding:0 20px; border-right:1px solid var(--line); }
.health-page .health-overview > div:first-child { padding-left:0; }
.health-page .health-overview > div:last-child { border-right:0; }
.health-page .health-overview dt,.health-page .health-limits dt { color:var(--muted); font-size:.85rem; }
.health-page .health-overview dd { margin:3px 0 0; font-size:1.6rem; font-weight:600; }
.health-page .health-overview small { display:inline-block; font-size:.85rem; font-weight:400; }
.health-page .is-ok { color:#176440; }
.health-page .is-warning { color:#a22d2d; }
.health-page .is-optional { color:var(--muted); }
.health-page .health-section { margin:0 0 30px; }
.health-page .health-section > h2 { margin:0 0 14px; font-size:1.1rem; }
.health-page .health-limits { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:0; padding:16px; background:#f8faf8; }
.health-page .health-limits dd { margin:3px 0 0; font-weight:600; }
.health-page .health-checks { list-style:none; margin:14px 0; padding:0; border-top:1px solid var(--line); }
.health-page .health-checks > li { display:grid; grid-template-columns:minmax(0,220px) 100px minmax(0,1fr); gap:8px 16px; align-items:center; padding:14px 0; border-bottom:1px solid var(--line); }
.health-page .health-check-name { min-width:0; }
.health-page .health-check-name strong { font-weight:600; }
.health-page .health-requirement { display:inline-block; margin-left:8px; color:var(--muted); font-size:.75rem; }
.health-page .health-status { justify-self:start; padding:2px 10px; border:1px solid currentColor; border-radius:3px; font-size:.85rem; white-space:nowrap; }
.health-page .health-checks p { margin:0; }
.health-page .health-note { margin:12px 0 0; }
.health-page .health-integrity { display:inline-block; margin:0 0 6px; padding:4px 12px; border:1px solid currentColor; border-radius:3px; background:transparent; }
.health-page .health-missing { margin-top:16px; }
.health-page .health-missing summary { min-height:44px; padding:10px 0; color:var(--accent); cursor:pointer; font-weight:600; }
.health-page .health-missing summary:focus-visible { outline:3px solid #c38121; outline-offset:3px; }
.health-page .health-missing table { width:100%; table-layout:fixed; margin:8px 0 0; border-collapse:collapse; font-size:.88rem; }
.health-page .health-missing caption { margin-bottom:8px; text-align:left; }
.health-page .health-missing th,.health-page .health-missing td { padding:10px 12px; border:1px solid var(--line); text-align:left; vertical-align:top; overflow-wrap:anywhere; }
.health-page .health-missing thead { background:#f1f5f2; }
.health-page .health-missing th:nth-child(1) { width:20%; }
.health-page .health-missing th:nth-child(2) { width:24%; }
.health-page .health-deployment { padding:18px 20px; border-left:4px solid var(--line); background:#f8faf8; }
.health-page .health-deployment h2 { margin:0 0 8px; font-size:1rem; }
.health-page .health-deployment p { margin:6px 0 0; }
@media (max-width:640px) {
 .health-page h1 { font-size:1.15rem; padding-top:18px; padding-bottom:18px; }
 .health-page .health-heading { margin:20px 0; }
 .health-page .health-heading h2 { font-size:1.2rem; }
 .health-page .health-heading .button { width:100%; }
 .health-page .health-overview { gap:12px; padding:16px 0; }
 .health-page .health-overview > div { padding:0; border:0; }
 .health-page .health-overview dt { font-size:.8rem; }
 .health-page .health-overview dd { font-size:1.4rem; }
 .health-page .health-overview small { display:block; font-size:.75rem; }
 .health-page .health-limits { grid-template-columns:minmax(0,1fr); gap:10px; padding:12px; }
 .health-page .health-limits > div { display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px 14px; }
 .health-page .health-limits dd { margin:0; }
 .health-page .health-checks > li { grid-template-columns:minmax(0,1fr) auto; gap:7px 10px; padding:14px 0; }
 .health-page .health-checks p { grid-column:1/-1; }
 .health-page .health-missing th,.health-page .health-missing td { padding:8px 6px; }
 .health-page .health-missing th:nth-child(1) { width:22%; }
 .health-page .health-missing th:nth-child(2) { width:25%; }
 .health-page .health-deployment { padding:14px 12px; }
}
/* Legacy basic settings and plugin INI forms. */
.basic-config-page #work form { margin:0 0 24px; padding:12px 16px; }
.basic-config-page #work fieldset { display:flex; align-items:center; flex-wrap:wrap; gap:8px 16px; margin:0; }
.basic-config-page #work legend { display:none; }
.basic-config-page #work label { margin:0; font-weight:600; }
.basic-config-page .config-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px 20px; margin:24px 0 20px; }
.basic-config-page .config-heading h2 { margin:0 0 5px; }
.basic-config-page .config-heading p,.basic-config-page .config-heading .button { margin:0; }
.basic-config-page .config-tabs ul { display:flex; flex-wrap:wrap; gap:8px; margin:0; padding:0; list-style:none; }
.basic-config-page .config-tabs a,.basic-config-page .config-tabs span { display:inline-flex; align-items:center; min-height:44px; padding:7px 14px; border:1px solid var(--line); border-radius:4px; text-decoration:none; }
.basic-config-page .config-tabs [aria-current] { color:var(--accent); border-color:var(--accent); background:#f1f5f2; font-weight:600; }
.basic-config-page .config-priority { margin:16px 0 24px; }
.basic-config-page #config-form { margin:24px 0 0; padding:0; border:0; background:transparent; }
.basic-config-page .config-section { margin:0 0 28px; padding:20px 0 0; border-top:1px solid var(--line); }
.basic-config-page .config-section > legend { float:left; width:100%; margin:0 0 18px; padding:0; font-size:1.1rem; }
.basic-config-page .config-section > legend + * { clear:both; }
.basic-config-page .config-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px 24px; }
.basic-config-page .config-field { min-width:0; }
.basic-config-page .config-field-wide,.basic-config-page .config-comment { grid-column:1/-1; }
.basic-config-page .config-field > label,.basic-config-page .config-label { display:block; margin:0 0 8px; padding:0; font-weight:600; }
.basic-config-page .config-field .hint { margin:6px 0 0; }
.basic-config-page .config-control { display:flex; align-items:center; flex-wrap:wrap; gap:8px; min-width:0; }
.basic-config-page .config-control input:not([type=checkbox]):not([type=radio]),.basic-config-page .config-control textarea { width:100%; min-width:0; }
.basic-config-page .config-field[data-control-type=int] .config-control input { width:140px; }
.basic-config-page .config-control select { min-width:140px; }
.basic-config-page .config-unit { color:var(--muted); font-size:.88rem; }
.basic-config-page .config-options { margin:0; padding:0; }
.basic-config-page .config-options .config-control { display:grid; gap:6px; }
.basic-config-page .config-option { display:flex; align-items:center; gap:10px; min-height:44px; margin:0; }
.basic-config-page .config-option input { flex-shrink:0; }
.basic-config-page .config-comment { margin:0; }
.basic-config-page .config-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px 12px; padding:20px 0 8px; border-top:1px solid var(--line); }
.basic-config-page .config-actions input,.basic-config-page .config-actions p { margin:0; }
.basic-config-page .config-actions input[type=submit] { min-width:200px; color:white; background:var(--accent); }
.basic-config-page .config-actions input[type=reset] { min-width:120px; }
@media (max-width:640px) {
 .basic-config-page h1 { font-size:1.15rem; padding-top:18px; padding-bottom:18px; }
 .basic-config-page #work fieldset { align-items:stretch; }
 .basic-config-page #work select { width:100%; }
 .basic-config-page .config-heading { margin:20px 0; }
 .basic-config-page .config-heading h2 { font-size:1.2rem; }
 .basic-config-page .config-heading .button { width:100%; }
 .basic-config-page .config-grid { grid-template-columns:minmax(0,1fr); gap:20px; }
 .basic-config-page .config-section { margin-bottom:24px; }
 .basic-config-page .config-actions input { width:100%; min-width:0; }
 .basic-config-page .config-actions p { width:100%; text-align:center; }
}
/* Photo administration status. Statistics keep their existing PHP calculations. */
.admin-status-page #work form { margin:0 0 24px; padding:12px 16px; }
.admin-status-page #work fieldset { display:flex; align-items:center; flex-wrap:wrap; gap:8px 16px; margin:0; }
.admin-status-page #work legend { display:none; }
.admin-status-page #work label { margin:0; font-weight:600; }
.admin-status-page .status-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px 20px; margin:24px 0 20px; }
.admin-status-page .status-heading h2 { margin:0 0 5px; }
.admin-status-page .status-heading p,.admin-status-page .status-heading .button { margin:0; }
.admin-status-page .status-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; margin:0; padding:24px 0; border-block:1px solid var(--line); }
.admin-status-page .status-metrics > div { min-width:0; padding:0 24px; border-right:1px solid var(--line); }
.admin-status-page .status-metrics > div:first-child { padding-left:0; }
.admin-status-page .status-metrics > div:last-child { padding-right:0; border-right:0; }
.admin-status-page .status-metrics dt { padding:0; color:var(--muted); font-size:.88rem; font-weight:600; }
.admin-status-page .status-value { display:flex; align-items:baseline; flex-wrap:wrap; gap:6px 10px; margin:8px 0; color:var(--accent); }
.admin-status-page .status-value strong { font-size:1.9rem; line-height:1.4; font-weight:600; font-variant-numeric:tabular-nums; }
.admin-status-page .status-value span { font-size:.85rem; }
.admin-status-page .status-note { margin:0; }
.admin-status-page .status-capacity-note { margin:12px 0 0; }
.admin-status-page .status-empty { margin:18px 0 0; padding:12px 16px; border-left:4px solid var(--line); background:#f8faf8; }
.admin-status-page .status-actions { margin-top:28px; padding-top:22px; border-top:1px solid var(--line); }
.admin-status-page .status-actions h2 { margin:0 0 5px; font-size:1.1rem; }
.admin-status-page .status-actions > p { margin:0 0 16px; }
.admin-status-page .status-action-links { display:flex; flex-wrap:wrap; gap:10px 12px; }
.admin-status-page .status-action-links .button { min-width:170px; margin:0; }
.admin-status-page .status-action-links .status-primary { color:white; background:var(--accent); }
.admin-status-page .status-actions .status-other-links { margin:16px 0 0; }
.admin-status-page .status-other-links a { display:inline-block; padding:6px 2px; }
@media (min-width:641px) and (max-width:900px) {
 .admin-status-page .status-metrics dt { min-height:3.4em; }
}
@media (max-width:640px) {
 .admin-status-page h1 { font-size:1.15rem; padding-top:18px; padding-bottom:18px; }
 .admin-status-page #work fieldset { align-items:stretch; }
 .admin-status-page #work select { width:100%; }
 .admin-status-page .status-heading { margin:20px 0; }
 .admin-status-page .status-heading h2 { font-size:1.2rem; }
 .admin-status-page .status-heading .button { width:100%; }
 .admin-status-page .status-metrics { grid-template-columns:minmax(0,1fr); padding:0; }
 .admin-status-page .status-metrics > div { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:baseline; gap:6px 16px; padding:18px 0; border-right:0; border-bottom:1px solid var(--line); }
 .admin-status-page .status-metrics > div:last-child { border-bottom:0; }
 .admin-status-page .status-value { justify-content:flex-end; margin:0; }
 .admin-status-page .status-value strong { font-size:1.6rem; }
 .admin-status-page .status-note { grid-column:1/-1; }
 .admin-status-page .status-action-links { display:grid; grid-template-columns:minmax(0,1fr); }
 .admin-status-page .status-action-links .button { width:100%; min-width:0; }
}
/* Administrator login only. Native POST fields and authentication stay unchanged. */
.admin-login-page .login-panel { width:100%; max-width:520px; margin:32px auto; padding:28px; border:1px solid var(--line); background:#f8faf8; }
.admin-login-page .login-heading h2 { margin:0 0 8px; font-size:1.3rem; }
.admin-login-page .login-heading p { margin:0; }
.admin-login-page #login_form { padding:0; margin:24px 0 0; border:0; background:transparent; }
.admin-login-page .login-password > label { margin:0 0 8px; font-weight:600; }
.admin-login-page #login-password { display:block; width:100%; min-width:0; min-height:48px; }
.admin-login-page .login-password .hint { margin:6px 0 0; }
.admin-login-page .login-remember { margin:16px 0 22px; }
.admin-login-page .login-remember label { display:flex; align-items:center; gap:10px; min-height:44px; margin:0; cursor:pointer; }
.admin-login-page .login-remember input { flex-shrink:0; margin:0; }
.admin-login-page .login-remember .hint { margin:2px 0 0 30px; }
.admin-login-page #login_form .login-submit { display:block; width:100%; min-height:48px; margin:0; color:white; background:var(--accent); }
.admin-login-page .login-errors { margin:20px 0 0; padding:14px 16px; border-left:4px solid currentColor; background:#fff5f2; }
.admin-login-page .login-errors p { margin:0; }
.admin-login-page .login-errors ul { margin:6px 0 10px; padding-left:1.3em; }
.admin-login-page .login-errors .hint { font-size:.85rem; }
.admin-login-page #navi { margin-top:18px; padding-top:12px; border-top:1px solid var(--line); }
.admin-login-page #navi ul { justify-content:center; margin:0; }
.admin-login-page #navi a { display:inline-flex; align-items:center; min-height:44px; }
@media (max-width:640px) {
 .admin-login-page h1 { font-size:1.15rem; padding-top:18px; padding-bottom:18px; }
 .admin-login-page .login-panel { margin:24px auto; padding:20px 16px; }
 .admin-login-page .login-heading h2 { font-size:1.2rem; }
 .admin-login-page .login-errors { padding:12px; }
}
@media (prefers-reduced-motion:reduce) { * { scroll-behavior:auto !important; transition:none !important; } }
.site-footer { margin-top:28px; padding-top:16px; border-top:1px solid #d3dfd8; text-align:center; color:#52675e; font-size:12px; line-height:1.8; overflow-wrap:anywhere; }
.site-footer a { color:inherit; text-underline-offset:3px; }
