:root{color-scheme:light;--bg:#edf4f3;--surface:#fff;--surface2:#e4efed;--ink:#20343c;--muted:#637880;--accent:#217c80;--border:#d4e3e2;--shadow:0 12px 35px #183f4518;--tile:#fff;--phone:#24343b}*{box-sizing:border-box}html{font-family:system-ui,-apple-system,Segoe UI,Arial,sans-serif}body{margin:0;background:var(--bg);color:var(--ink);min-height:100vh}button,select{font:inherit}button{cursor:pointer}button:focus-visible,select:focus-visible{outline:3px solid #e5a52b;outline-offset:3px}.topbar{padding:17px clamp(15px,3vw,44px);background:var(--surface);border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:12px}.brand{display:flex;align-items:center;gap:12px}.brand-icon{background:var(--accent);color:white;border-radius:15px;width:48px;height:48px;display:grid;place-items:center;font-size:31px}.brand strong{display:block;font-size:clamp(16px,2vw,24px)}.brand small{display:block;color:var(--muted);font-size:12px}.header-actions{display:flex;gap:12px;align-items:center}.preview-pill{border-radius:99px;background:var(--surface2);padding:8px 12px;font-size:12px;color:var(--accent);font-weight:700}select{padding:10px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--ink)}.dashboard{display:grid;grid-template-columns:minmax(150px,1fr) minmax(285px,390px) minmax(150px,1fr);align-items:center;gap:clamp(12px,2.5vw,38px);max-width:1320px;margin:24px auto;padding:0 22px}.side{display:grid;grid-template-columns:1fr;gap:18px}.tile{border:1px solid var(--border);background:var(--tile);border-radius:18px;min-height:125px;padding:15px 9px;box-shadow:var(--shadow);color:var(--ink);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;transition:transform .15s,border-color .15s}.tile:hover{transform:translateY(-3px);border-color:var(--accent)}.tile-icon{font-size:31px}.tile strong{text-transform:uppercase;letter-spacing:.04em;text-align:center;font-size:clamp(12px,1.2vw,16px)}.tile small{color:var(--muted);text-align:center;font-size:12px}.tile.urgent{background:#fff0f0;border-color:#efb3b3;color:#922e35}.tile.urgent small{color:#8e5255}.phone-column{display:flex;align-items:center;flex-direction:column;gap:14px;min-width:0}.phone{background:var(--phone);padding:10px;border-radius:37px;box-shadow:0 20px 45px #101c2440;width:100%;max-width:390px}.phone-screen{background:var(--surface);border-radius:28px;overflow:hidden;min-height:620px;display:flex;flex-direction:column}.phone-header{background:var(--accent);color:white;padding:17px 18px 13px}.phone-top{display:flex;justify-content:space-between;align-items:center;font-size:18px}.phone-top strong{font-size:16px}.phone-header small{display:block;text-align:center;opacity:.86;margin-top:4px}.feed{flex:1;padding:14px;display:flex;flex-direction:column;gap:12px}.composer,.post,.info-card{background:var(--surface);border:1px solid var(--border);border-radius:13px;padding:14px}.composer{background:var(--surface2);color:var(--muted);font-size:13px}.post h3,.info-card h3{margin:0 0 7px;font-size:15px}.post .meta{font-size:11px;color:var(--muted);margin-bottom:9px}.post p,.info-card p{margin:0;font-size:13px;line-height:1.55}.post .actions{border-top:1px solid var(--border);margin-top:12px;padding-top:10px;color:var(--muted);font-size:12px}.sos{background:#a82e38;color:#fff;border:0;border-radius:13px;padding:16px;text-align:center;font-weight:800;letter-spacing:.03em}.sos:disabled{opacity:.75;cursor:not-allowed}.phone-bottom{display:flex;justify-content:space-around;border-top:1px solid var(--border);padding:10px 0;background:var(--surface)}.phone-bottom button{background:none;border:0;color:var(--ink);display:flex;flex-direction:column;align-items:center;gap:2px;font-size:19px}.phone-bottom small{font-size:10px}.preview-note{font-size:12px;color:var(--muted);text-align:center;max-width:360px;margin:0}footer{text-align:center;padding:16px;color:var(--muted);font-size:12px}footer a{color:var(--accent)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}html[data-theme=dark]{color-scheme:dark;--bg:#15232b;--surface:#23343e;--surface2:#2c4850;--ink:#e8f2f3;--muted:#b2c6ca;--accent:#246f78;--border:#40555d;--shadow:0 12px 35px #0003;--tile:#253943;--phone:#0a1116}html[data-theme=dark] .tile.urgent{background:#5b2c35;color:#ffe4e4;border-color:#94515c}html[data-theme=dark] .tile.urgent small{color:#f1c0c5}@media(prefers-color-scheme:dark){html:not([data-theme=light]){color-scheme:dark;--bg:#15232b;--surface:#23343e;--surface2:#2c4850;--ink:#e8f2f3;--muted:#b2c6ca;--accent:#246f78;--border:#40555d;--shadow:0 12px 35px #0003;--tile:#253943;--phone:#0a1116}html:not([data-theme=light]) .tile.urgent{background:#5b2c35;color:#ffe4e4;border-color:#94515c}html:not([data-theme=light]) .tile.urgent small{color:#f1c0c5}}@media(max-width:760px){.dashboard{grid-template-columns:1fr;padding:0 12px;gap:15px;margin:12px auto}.phone-column{grid-row:1}.phone{max-width:540px;border-radius:20px;padding:5px}.phone-screen{border-radius:16px;min-height:490px}.side{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.tile{min-height:93px;border-radius:12px}.tile-icon{font-size:24px}.topbar{flex-wrap:wrap}.header-actions{width:100%;justify-content:space-between}.brand-icon{width:40px;height:40px}.preview-note{max-width:500px}}@media(max-width:380px){.brand strong{font-size:15px}.brand small{font-size:10px}}


/* Build 0.6.1: shared noticeboard markup in desktop phone and mobile page. */
.noticeboard{font:14px system-ui,sans-serif;color:var(--ink);width:100%;min-width:0}
.noticeboard *{box-sizing:border-box}
.noticeboard h1{font-size:20px;margin:4px 0 12px}
.noticeboard h2{font-size:16px;margin:0 0 8px}
.noticeboard a{color:var(--accent)}
.noticeboard .post,.noticeboard .compose,.noticeboard .notice{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:13px;margin-bottom:12px}
.noticeboard .notice{color:var(--muted)}
.noticeboard .error{color:#d74c4c}
.noticeboard .meta{font-size:12px;color:var(--muted);margin-bottom:8px}
.noticeboard .body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.45}
.noticeboard input,.noticeboard textarea{width:100%;font:inherit;padding:9px;margin:5px 0 9px;border:1px solid var(--border);border-radius:7px;background:var(--surface2);color:var(--ink)}
.noticeboard textarea{resize:vertical}
.noticeboard button{background:var(--accent);color:white;border:0;border-radius:7px;padding:8px 11px;font-weight:700;cursor:pointer}
.noticeboard button.danger{background:#9c3b43}
.noticeboard .post-photo{width:100%;height:auto;border-radius:9px;margin:9px 0}
.noticeboard .comments{border-top:1px solid var(--border);margin-top:12px;padding-top:9px}
.noticeboard .comment{border-bottom:1px solid var(--border);padding:7px 0}
.noticeboard .comment:last-child{border:0}
.noticeboard .comment strong{font-size:12px}
.noticeboard .comment p{margin:3px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.noticeboard .comment-form{display:flex;gap:6px;align-items:center}
.noticeboard .comment-form input{margin:0;min-width:0}
.noticeboard .comment-form button{flex-shrink:0}
.noticeboard .toplink{font-size:12px;float:right}
.noticeboard label{font-weight:600;font-size:12px}
body>.noticeboard{max-width:740px;margin:20px auto;padding:12px}

/* On an actual phone, the same noticeboard fills the available width. */
@media(max-width:760px){.phone{max-width:none}.phone-screen{min-height:65vh}.feed{padding:10px}.noticeboard .post,.noticeboard .compose{padding:11px}}


/* Build 0.6.3: phone-size constraints and compact, touch-friendly noticeboard. */
.phone,.phone-screen,.feed,.noticeboard,.noticeboard .post,.noticeboard .compose{min-width:0;max-width:100%}
.phone-screen{height:620px;min-height:0;max-height:620px;overflow:hidden}
.phone-header,.phone-bottom{flex:0 0 auto}
.feed{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;display:block;padding:10px;scrollbar-width:thin}
.feed>.noticeboard{width:100%;min-width:0;max-width:100%}
.noticeboard{font-size:13px;line-height:1.45;overflow-wrap:anywhere}
.noticeboard h1{font-size:17px}
.noticeboard h2{font-size:16px;line-height:1.3;margin:0 0 10px}
.noticeboard .post,.noticeboard .compose,.noticeboard .notice{padding:11px;margin:0 0 11px;min-width:0;overflow:hidden}
.noticeboard .meta{font-size:10px;line-height:1.4}
.noticeboard .body,.noticeboard .comment p{font-size:13px;overflow-wrap:anywhere;word-break:normal}
.noticeboard label{display:block;font-size:12px;font-weight:650;margin:9px 0 4px}
.noticeboard input:not([type=hidden]),.noticeboard textarea{display:block;width:100%;max-width:100%;min-width:0;min-height:36px;margin:0 0 10px;padding:8px 9px;font-size:13px;line-height:1.4;border-radius:8px}
.noticeboard textarea{min-height:82px;resize:vertical}
.noticeboard input[type=file]{font-size:11px;padding:6px;overflow:hidden}
.noticeboard button{font-size:12px;line-height:1.25;padding:9px 12px;min-height:36px}
.noticeboard .compose button[type=submit]{display:block;width:100%;margin-top:4px}
.noticeboard .post-photo,.noticeboard img{display:block;width:auto;max-width:100%;height:auto;max-height:none;object-fit:contain;margin:10px auto;border-radius:8px}
.noticeboard .comment-form{display:flex;gap:6px;align-items:center;min-width:0;margin-top:8px}
.noticeboard .comment-form input:not([type=hidden]){flex:1 1 auto;width:1px;min-width:0;margin:0}
.noticeboard .comment-form button{flex:0 0 auto}
.tile strong{font-size:13px;letter-spacing:.02em}
.tile small{font-size:11px}
.phone-top strong{font-size:14px}
.phone-header small{font-size:11px}
.phone-bottom small{font-size:10px}
@media(max-width:760px){.phone-screen{height:min(680px,78dvh);min-height:420px;max-height:none}.feed{padding:10px}.tile strong{font-size:12px}.tile small{font-size:10px}}
@media(max-width:380px){.phone-screen{height:72dvh;min-height:400px}}

/* Build 0.6.4: member avatars beside post titles and comments. */
.noticeboard .ccc-post-heading,.noticeboard .ccc-comment-heading{display:flex;align-items:center;gap:9px;min-width:0}
.noticeboard .ccc-post-heading{margin-bottom:9px}
.noticeboard .ccc-post-heading-text,.noticeboard .ccc-comment-text{min-width:0;flex:1 1 auto;overflow-wrap:anywhere}
.noticeboard .ccc-post-heading h2{margin:0 0 2px;font-size:15px;line-height:1.3}
.noticeboard .ccc-post-heading .meta{margin:0}
.noticeboard .ccc-avatar-img,.noticeboard .ccc-initials{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;object-fit:cover;color:#fff;font-weight:800;font-size:11px;vertical-align:middle}
.noticeboard .ccc-comment-heading{align-items:flex-start;gap:8px}
.noticeboard .ccc-comment-heading .ccc-avatar-img,.noticeboard .ccc-comment-heading .ccc-initials{font-size:9px}
.noticeboard .ccc-comment-text p{margin:3px 0}

/* Build 0.6.5: Avatar sizing wins over generic noticeboard image rules. */
.noticeboard .ccc-post-heading > img.ccc-avatar-img {
  display:block; width:38px; height:38px; min-width:38px; max-width:38px;
  min-height:38px; max-height:38px; flex:0 0 38px;
  margin:0; padding:0; border-radius:50%; object-fit:cover;
}
.noticeboard .ccc-comment-heading > img.ccc-avatar-img {
  display:block; width:28px; height:28px; min-width:28px; max-width:28px;
  min-height:28px; max-height:28px; flex:0 0 28px;
  margin:0; padding:0; border-radius:50%; object-fit:cover;
}
.noticeboard .ccc-post-heading > .ccc-initials {
  width:38px; height:38px; flex:0 0 38px; margin:0;
}
.noticeboard .ccc-comment-heading > .ccc-initials {
  width:28px; height:28px; flex:0 0 28px; margin:0;
}

/* Build 0.6.6: secure, full-window photo viewer (outside phone frame). */
.noticeboard img.post-photo { cursor: zoom-in; }
.noticeboard img.post-photo:focus-visible { outline:3px solid #55cbc5; outline-offset:3px; }
.ccc-photo-viewer { position:fixed; inset:0; z-index:99999; background:rgba(0,0,0,.96); color:#fff; display:flex; flex-direction:column; }
.ccc-photo-viewer[hidden] { display:none!important; }
.ccc-photo-toolbar { flex:0 0 auto; display:flex; align-items:center; gap:9px; padding:9px 12px; background:#171c20; }
.ccc-photo-toolbar .ccc-photo-caption { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.ccc-photo-toolbar button { margin:0; padding:8px 12px; min-height:38px; background:#2a454d; color:#fff; border:1px solid #54727a; border-radius:8px; font:600 14px system-ui,sans-serif; cursor:pointer; }
.ccc-photo-toolbar button:focus-visible { outline:3px solid #55cbc5; }
.ccc-photo-stage { flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; background:#080a0b; text-align:center; touch-action:pan-x pan-y; }
.ccc-photo-stage img { display:block; width:auto; max-width:none; height:auto; max-height:none; margin:auto; border:0; border-radius:0; object-fit:contain; }
body.ccc-photo-open { overflow:hidden!important; }
@media(max-width:600px) { .ccc-photo-toolbar { gap:5px; padding:7px; } .ccc-photo-toolbar button { padding:8px 9px; } .ccc-photo-toolbar .ccc-photo-caption { font-size:11px; } }
