:root {color-scheme:light; font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; background:#f6f7f5; color:#1b2420}
* {box-sizing:border-box} body {margin:0}
header {height:56px;display:flex;align-items:center;gap:10px;padding:0 max(20px,calc((100% - 900px)/2));border-bottom:1px solid #d9dfdb;background:white;font-size:15px}
.mark {background:#0f6b58;color:white;border-radius:7px;padding:5px;font-size:13px;font-weight:700}
main {margin:32px auto;max-width:940px;padding:0 20px}
h1 {font-size:clamp(24px,3.6vw,32px);margin:0 0 5px;letter-spacing:-.035em}
h2 {font-size:17px;margin:0 0 5px} p {color:#5b6762;font-size:14px;line-height:1.5;margin:0 0 14px}
section {border:1px solid #d9dfdb;border-radius:12px;background:white;padding:20px;margin-top:10px}
button,.file {display:inline-flex;align-items:center;justify-content:center;border:1px solid #b9cac1;padding:9px 15px;border-radius:7px;background:white;color:#0d5446;font:600 14px system-ui;cursor:pointer}
.primary,.file:hover,button:hover {color:white;background:#0f6b58;border-color:#0f6b58}
.quiet {border-color:transparent}.actions,.link-row {display:flex;align-items:center;gap:8px;flex-wrap:wrap}.actions {margin-top:16px}
input[readonly] {min-width:0;flex:1 1 270px;padding:10px;background:#f6f7f5;color:#1b2420;border:1px solid #d9dfdb;border-radius:7px;font:14px system-ui}
#status:empty {display:none} #status {margin:10px 0 0;color:#0f6b58}
.details {display:grid;grid-template-columns:1fr 1fr;gap:12px}.details p:last-child {margin-bottom:0}
.sr,.file input {position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)} .file:focus-within,button:focus-visible,input:focus-visible {outline:3px solid #14936f;outline-offset:3px}
video {width:100%;margin-top:12px;background:#1b2420;border-radius:7px} [hidden] {display:none}
@media(max-width:570px){.details{grid-template-columns:1fr;gap:0}main{margin:22px auto}.link-row button{width:100%}section{padding:16px}}
form label,#invite label {display:block;margin:12px 0 5px;font-size:14px;font-weight:600}
input:not([type=file]) {font:15px system-ui;flex:1 1 220px;min-width:0;border:1px solid #b9cac1;border-radius:7px;padding:10px}
.action {display:inline-flex;text-decoration:none;border-radius:7px;padding:10px 16px;font:600 14px system-ui}
#status {margin:8px 0 10px}.link-row {margin-bottom:4px}
#call {height:100dvh;display:flex;flex-direction:column}#call[hidden]{display:none}
#tools {background:#fff;border-bottom:1px solid #d9dfdb;min-height:38px;display:flex;align-items:center;gap:10px;padding:4px 12px;font:13px system-ui}
#record {margin-left:auto;padding:6px 10px}#notice {color:#0d5446}rtk-meeting {flex:1;min-height:0;min-width:0}
#host-waiting {flex:0 1 auto;min-height:0;max-height:min(24dvh,10rem);overflow:auto;background:#fff;border-bottom:1px solid #d9dfdb}
#host-waiting > div {display:flex;align-items:center;justify-content:space-between;max-width:22rem;gap:14px;padding:4px 12px;font:600 15px system-ui}
#host-waiting span {min-width:0;overflow-wrap:anywhere}
#host-waiting button {min-height:44px;flex:none}
#host-waiting button:disabled {opacity:.7;cursor:wait}

a {color:#0f6b58} header .guide {font:600 13px system-ui;margin-left:auto;white-space:nowrap}.studio-link {margin:12px 0 0}
.notepad {max-width:700px}.notepad label {display:block;font-size:15px;font-weight:650;margin:20px 0 6px}
.notepad textarea {width:100%;min-height:36vh;border:1px solid #b9cac1;border-radius:8px;padding:12px;font:16px/1.5 system-ui;resize:vertical;background:white;color:#1b2420}
.notepad textarea:focus-visible {outline:3px solid #14936f;outline-offset:2px}.notepad #save-state {color:#0d5446;margin:7px 0 14px}
.note-foot,#note-list {font:14px/1.5 system-ui;color:#5b6762}.note-foot {margin-top:12px}
#note-list ul {margin:10px 0 0;padding-left:20px}#note-list li {margin:6px 0}#current-notes {display:inline-block;margin-bottom:8px}
#current-notes[hidden] {display:none}#tools .notepad-link {white-space:nowrap;margin-left:auto}#tools .notepad-link:not([hidden])~#record {margin-left:0}
@media(max-width:570px){#tools {flex-wrap:wrap;gap:6px}#tools #notice:empty {display:none}}

#meeting-files {width:min(100%,44rem);align-self:center;max-height:50dvh;overflow:auto;margin:0;padding:16px 20px}
#meeting-files h2 {font-size:1.35rem}
#meeting-files h3 {margin:0 0 4px;font-size:1rem}
#meeting-files article {border-top:1px solid #d9dfdb;padding:14px 0 6px}
#meeting-files a:not([hidden]),#meeting-files button:not([hidden]) {display:inline-flex;align-items:center;min-height:44px}
#meeting-files .clip-notes {display:flex;align-items:center;flex-wrap:wrap;gap:6px}
#meeting-files [role=status] {color:#5b6762;font-size:.9rem}
#meeting-files video {max-height:32dvh}
#meeting-files a.back-to-host:not([hidden]) {display:none}
#call[data-left] {height:auto;min-height:100dvh}
#call[data-left] #meeting,#call[data-left] #tools>:not(strong):not(#notice),#call[data-left] #notice:empty {display:none}
#call[data-left] #tools {min-height:56px;padding-inline:max(20px,calc((100% - 44rem)/2))}
#call[data-left] #meeting-files {margin:18px 0;max-height:none;width:min(calc(100% - 24px),44rem)}
#call[data-left] #meeting-files .back-to-host {display:inline-flex;border-top:1px solid #d9dfdb;width:100%;margin-top:12px}
#notes-nav {margin:15px 0}#saved a:not([hidden]) {margin:0 6px}#file-notes:empty {display:none}
.notes-shortcuts {display:flex;flex-wrap:wrap;gap:8px}
.notes-shortcuts a {flex:1 1 205px;display:block;padding:10px 14px;border:1px solid #b9cac1;border-radius:7px;background:white;font-weight:600;text-decoration:none}
.notes-shortcuts a span {text-decoration:underline;text-underline-offset:3px}
.notes-shortcuts a:focus-visible {outline:3px solid #14936f;outline-offset:2px}
.notes-shortcuts small {display:block;margin-top:3px;color:#5b6762;font-weight:400}

.meeting-notes {max-width:76ch}
.meeting-notes h2 {font-size:1.5rem}
.meeting-notes h3 {margin:0 0 .65em;font-size:1.1rem}
.meeting-notes section p,.meeting-notes label {font-size:1rem;line-height:1.5;color:inherit}
.meeting-notes section p:last-child {margin-bottom:0}
.meeting-notes blockquote {margin:.75em 0 .8em .3em;padding-left:.8em;border-left:2px solid #b9cac1}
.meeting-notes cite {font-size:.84em;font-style:normal;font-weight:650}
.meeting-notes blockquote p {margin:.2em 0}
#detail details {margin:.7em 0}
#detail summary {cursor:pointer;color:#0d5446}
.meeting-notes .note-task {display:flex;align-items:baseline;gap:.65em}
.meeting-notes .note-task input {flex:none;width:1.1em;height:1.1em;align-self:flex-start;margin:.25em 0;padding:0}
.meeting-notes .topic-summary {margin:.3em 0 .7em;padding-left:1.3em;font-size:1rem;line-height:1.5}

.join-actions {display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.join-actions button {min-height:44px}
.event-nav {display:flex;gap:16px;margin-bottom:16px}
.event-nav a {display:inline-flex;align-items:center;min-height:44px}
.event-nav a[aria-current="page"] {font-weight:700;text-decoration-thickness:2px}
.event-setup {display:flex;align-items:end;flex-wrap:wrap;gap:10px;margin:12px 0 16px}
.event-setup label {display:grid;gap:4px;min-width:0;font-size:14px}
.event-setup > div {min-width:0}
.event-setup label {margin-bottom:4px}
.template-files {margin:0 0 12px}.template-files summary {width:fit-content;min-height:36px;cursor:pointer}
.event-setup label[hidden] {display:none}
.event-setup select,.event-setup input,.event-setup button {min-height:44px;max-width:100%;font-size:16px}
.event-setup select {border:1px solid #b9cac1;border-radius:7px;background:white;color:inherit;padding:4px 8px}
@media(max-width:570px){.event-setup {display:grid}.event-setup label {width:100%}}
#entry:has(#device-preview:not([hidden])) {max-width:850px}
#device-preview {margin:0 0 12px}
#device-preview summary {width:fit-content;min-height:44px;line-height:44px;cursor:pointer;color:#0d5446}
#preview-video {display:block;width:min(100%,440px);height:auto;aspect-ratio:16/9;object-fit:contain;margin:0;background:#1b2420}
#preview-video[hidden],#preview-inputs label[hidden] {display:none}
#preview-inputs {max-width:440px}
#preview-inputs label {margin:8px 0 4px}
#preview-inputs select {display:block;width:100%;height:44px;padding:0 8px;font:inherit;color:inherit;background:white;border:1px solid #b9cac1;border-radius:7px}
#preview-body:has(video:not([hidden])) {display:grid;align-items:start;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:16px}
@media(max-width:570px){
  #preview-body:has(video:not([hidden])) {display:block}
  #prejoin #name,#preview-inputs select {font-size:16px}
  .join-actions {display:grid}
}
#mic-level {width:100%;max-width:440px}
#preview-status {margin:6px 0}
#preview-status:empty {display:none}
#prejoin #name {display:block;width:100%;margin-bottom:10px}
#device-options {border:0;padding:0;margin:0 0 14px}
#device-options:not([hidden]) {display:flex;gap:8px}
#device-options .device-toggle {position:relative;display:grid;place-items:center;width:54px;height:48px;margin:0;border:1px solid #b9cac1;border-radius:8px;color:#1b2420}
.device-toggle input {position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.device-toggle:has(input:focus-visible) {outline:3px solid #0f6b58;outline-offset:2px}
.device-toggle svg {width:26px;height:26px;pointer-events:none}
.device-slash {display:none;fill:none;stroke:#c12945;stroke-width:2.5;stroke-linecap:round;filter:drop-shadow(0 1px white) drop-shadow(0 -1px white)}
.device-toggle input:not(:checked) + svg .device-slash {display:block}
@media (forced-colors:active){.device-slash {stroke:CanvasText;filter:none}}
.join-privacy summary {width:fit-content;min-height:44px;line-height:44px;cursor:pointer}
@media(max-width:570px){#prejoin button{width:100%;min-height:44px}}
.saved-entry {padding:10px 0;border-bottom:1px solid #d9dfdb}
.saved-entry h3 {margin:0;font-size:14px;color:#1b2420}
.recording-detail,.saved-entry [role=status] {font-size:13px;line-height:1.4;color:#5b6762}
.recording-actions {display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px;margin-top:3px}
.recording-actions button,.recording-actions a {min-height:44px}
.recording-actions a:not([hidden]) {display:inline-flex;align-items:center}
.recording-actions [role=status]:empty {display:none}
#saved {margin-bottom:10px}
#guest-lobby {max-width:600px}
#guest-lobby h1 {font-size:clamp(22px,4vw,28px)}
#lobby-action {min-height:44px}

/* Polish layer: same brand colours, cleaner surfaces, template cards and a dark call bar. */
:root {--brand:#0f6b58;--brand-dark:#0d5446;--ink:#1b2420;--muted:#5b6762;--line:#d9dfdb;--tint:#f1f7f4;background:#f3f5f3}
header {position:sticky;top:0;z-index:5;border-bottom:0;box-shadow:0 1px 0 var(--line),0 4px 14px rgba(27,36,32,.04)}
.mark {border-radius:9px;padding:6px 7px;letter-spacing:.02em}
section {border-color:#e4e9e6;border-radius:16px;padding:24px;box-shadow:0 1px 2px rgba(27,36,32,.05),0 8px 24px rgba(27,36,32,.05)}
button,.file,.action {border-radius:10px;transition:background-color .15s,color .15s,border-color .15s,box-shadow .15s}
.primary {box-shadow:0 1px 2px rgba(15,107,88,.35)}
button.primary:hover,.action.primary:hover {background:var(--brand-dark);border-color:var(--brand-dark)}
input:not([type=file]),.event-setup select,#preview-inputs select {border-radius:10px}
input:not([type=file]):focus-visible,select:focus-visible {outline:3px solid #14936f;outline-offset:1px;border-color:var(--brand)}
.event-nav {display:inline-flex;gap:4px;padding:4px;margin-bottom:20px;background:#e3e9e6;border-radius:13px}
.event-nav a {padding:0 20px;border-radius:10px;color:var(--ink);text-decoration:none;font:600 14px system-ui}
.event-nav a[aria-current="page"] {background:white;color:var(--brand-dark);box-shadow:0 1px 3px rgba(27,36,32,.16)}
.event-nav a:focus-visible,.template-card:focus-visible {outline:3px solid #14936f;outline-offset:2px}

.template-cards {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:14px 0 18px}
.template-card {display:grid;justify-items:start;align-content:start;gap:2px;min-width:0;padding:14px;text-align:left;border:1px solid var(--line);border-radius:14px;background:white;color:var(--ink);font:inherit}
.template-card:hover {background:var(--tint);color:var(--ink);border-color:var(--brand)}
.template-card[aria-pressed="true"] {background:var(--tint);border-color:var(--brand);box-shadow:inset 0 0 0 1px var(--brand)}
.template-card svg {box-sizing:content-box;width:24px;height:24px;padding:8px;margin-bottom:8px;border-radius:11px;background:#e1f0ea;color:var(--brand-dark)}
.template-card[aria-pressed="true"] svg {background:var(--brand);color:white}
.template-card strong {font-size:15px}
.template-card small {font-size:12.5px;line-height:1.35;font-weight:400;color:var(--muted)}
@media(max-width:860px){.template-cards {grid-template-columns:repeat(3,minmax(0,1fr))}}
/* On a phone the cards become one swipeable row, so the notes shortcuts stay on the first screen. */
@media(max-width:570px){
  section {padding:16px}
  .event-nav {margin-bottom:8px}
  .template-cards {display:flex;gap:8px;margin:10px -16px 0;padding:0 16px;overflow-x:auto;scrollbar-width:none;scroll-snap-type:x proximity}
  .template-cards::-webkit-scrollbar {display:none}
  .template-cards + .event-setup {margin-top:4px}
  .template-card {flex:none;display:flex;align-items:center;gap:8px;min-height:44px;padding:0 14px 0 7px;border-radius:999px;scroll-snap-align:start}
  .template-card svg {width:18px;height:18px;padding:6px;margin:0;border-radius:50%}
  .template-card small {display:none}
}

#invite {margin-top:6px;padding:16px 18px 18px;border:1px solid #cfe5dc;border-radius:14px;background:var(--tint)}
#invite-topic {margin:0;font-size:19px;letter-spacing:-.01em}
#invite input[readonly] {background:white}
#link-form {max-width:560px}

#guest-lobby section {padding:36px 24px;text-align:center}
#guest-lobby[data-waiting] section::before {content:"";display:block;width:52px;height:52px;margin:0 auto 18px;border:4px solid #d5e9e1;border-top-color:var(--brand);border-radius:50%;animation:fm-wait 1.1s linear infinite}
@keyframes fm-wait {to {transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){#guest-lobby[data-waiting] section::before {animation:none}}
#preview-video {border-radius:12px}

/* In the call, the bar matches the dark stage. The page after leaving stays light. */
#call:not([data-left]) {background:#080808}
#call:not([data-left]) #tools {background:#141a17;border-bottom-color:#27302c;color:white;min-height:46px;padding:6px 14px}
#call:not([data-left]) #tools a {color:#bfe6d8}
#call:not([data-left]) #tools button {padding:6px 12px;border-color:#3a4640;background:#232b27;color:white;font-size:13px}
#call:not([data-left]) #tools button:hover {background:var(--brand);border-color:var(--brand)}
#call:not([data-left]) #tools button:focus-visible,#call:not([data-left]) #tools a:focus-visible {outline:3px solid #7fd6ba;outline-offset:2px}
#call:not([data-left]) #notice {color:#9fe0c8}
#tools #notice {flex:1 1 0;min-width:0}
#tools #record,#tools .notepad-link {margin-left:0}
#call-timer {padding:2px 8px;border-radius:999px;background:rgba(255,255,255,.1);font-variant-numeric:tabular-nums}
#call:not([data-left]) #host-waiting {background:#1b2420;border-bottom-color:#27302c;color:white}
rtk-meeting {--rtk-colors-brand-300:86 178 152;--rtk-colors-brand-400:38 140 114;--rtk-colors-brand-500:15 107 88;--rtk-colors-brand-600:13 84 70;--rtk-colors-brand-700:10 66 55}
@media(max-width:570px){
  #call:not([data-left]) #tools > strong {display:none}
  #call:not([data-left]) #tools {gap:6px 8px;padding:6px 10px}
}
