.coop-panel {
    --coop-ink: #234e43;
    --coop-border: #d6dfd1;
    position: fixed; bottom: max(12px, env(safe-area-inset-bottom)); right: 20px;
    z-index: 100; color: var(--coop-ink); font: 14px/1.6 system-ui, sans-serif;
}
.coop-panel [hidden] { display: none !important; }
.coop-brand { appearance: none; border: 0; background: transparent; padding: 0; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.coop-brand:focus-visible { outline: 2px solid #467a61; outline-offset: 5px; border-radius: 6px; }
.coop-panel button, .coop-panel input, .coop-panel select { font: inherit; box-sizing: border-box; }
.coop-panel button {
    cursor: pointer; min-height: 40px; padding: 8px 14px; border: 1px solid var(--coop-border);
    border-radius: 10px; background: #fffdf7; color: var(--coop-ink);
}
.coop-panel button:hover { background: #edf2e7; }
.coop-panel button:disabled { cursor: wait; opacity: .55; }
.coop-panel :focus-visible { outline: 2px solid #467a61; outline-offset: 3px; }
.coop-panel .coop-primary { background: #285d49; color: white; border-color: #285d49; }
.coop-panel .coop-primary:hover { background: #1f4c3b; }
.coop-settings {
    position: fixed; left: 24px; top: 76px; width: min(350px, calc(100vw - 48px));
    max-height: calc(100svh - 100px); overflow-y: auto; overscroll-behavior: contain;
    padding: 18px; box-sizing: border-box; border: 1px solid var(--coop-border);
    border-radius: 20px; background: #fbfaf3; box-shadow: 0 12px 48px #14372b28;
}
.coop-heading { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-bottom: 4px; }
.coop-heading h2 { margin: 0; font-size: 19px; }
.coop-heading button, .coop-panel .coop-text-button { border: 0; background: transparent; padding: 4px 8px; }
.coop-panel h3 { font-size: 17px; margin: 12px 0; }
.coop-panel p { margin: 10px 0; overflow-wrap: anywhere; }
.coop-panel a { color: #326654; }
.coop-panel label { display: block; margin: 14px 0; }
.coop-panel input:not([type="checkbox"]), .coop-panel select {
    display: block; width: 100%; min-width: 0; min-height: 44px; margin-top: 6px;
    padding: 10px 12px; border: 1px solid #bdcbb8; border-radius: 10px; background: #fffef9; color: var(--coop-ink);
}
.coop-panel input[type="file"] { font-size: 12px; }
.coop-panel input[type="checkbox"] { margin-right: 8px; }
.coop-room-form { display: flex; align-items: end; gap: 8px; margin-bottom: 12px; }
.coop-room-form label { flex: 1; min-width: 0; margin: 0; }
.coop-room-form button { min-height: 44px; }
.coop-secondary { width: 100%; }
.coop-muted, #coop-detail { color: #63766a; font-size: 13px; }
.coop-more { border-top: 1px solid var(--coop-border); margin-top: 20px; padding-top: 14px; font-size: 13px; }
.coop-more summary { cursor: pointer; }
.identity-actions { display: grid; gap: 10px; margin: 20px 0; }
.identity-actions button { display: flex; justify-content: space-between; text-align: left; padding: 12px 14px; }
.identity-key { word-break: break-all; font-size: 12px; }
#identity-status:empty { display: none; }
#identity-status { font-size: 13px; }
#coop-full { border-left: 3px solid #af9259; padding-left: 12px; margin-top: 16px; }
.pond-header { flex-wrap: wrap; }
.pond-location { display: flex; align-items: baseline; justify-content: flex-end; flex-wrap: wrap; gap: 4px 8px; min-width: 0; margin-left: auto; }
#pond-coordinates { border: 0; background: transparent; color: inherit; font: inherit; padding: 0; cursor: pointer; }
#pond-coordinates:disabled { cursor: default; opacity: .65; }
#pond-presence { font: inherit; text-align: right; }
.message-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
#message-count { white-space: nowrap; font-size: 12px; opacity: .75; }
.speak-buttons { flex-wrap: wrap; width: 100%; }
.coordinate-inputs { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.coordinate-inputs label { flex: 1; min-width: 70px; font-size: 12px; }
.coordinate-inputs input { display: block; width: 100%; box-sizing: border-box; border: 1px solid #8ca791; border-radius: 8px; padding: 9px; background: #163e36; color: #f4efda; }
#coordinate-go { min-height: 40px; border-radius: 18px; border: 0; padding: 8px 14px; background: #527663; color: #fff; }
#coordinate-status { font-size: 12px; }
#coordinate-fields[hidden] { display: none; }
@media (max-width: 600px) {
    .coop-panel { right: 12px; left: 12px; bottom: max(8px, env(safe-area-inset-bottom)); font-size: 13px; }
    .coop-scenery { left: auto; }
    #coop-status { font-size: 12px; min-width: 0; overflow-wrap: anywhere; }
    .coop-settings { left: 12px; top: 68px; width: calc(100vw - 24px); max-height: calc(100svh - 92px); padding: 16px; border-radius: 16px; }
    .coop-panel button { min-height: 44px; }
}
