/* Reader workshop. Shared theme tokens; bounded columns and native controls. */
.cx-page { padding-top: 44px; }
.cx-hero { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 36px; align-items: center; padding-bottom: 28px; }
.cx-hero h1 { margin: 17px 0 24px; }
.cx-intro { max-width: 620px; }
.cx-orbit { position: relative; width: 260px; height: 260px; border: 1px solid var(--line); border-radius: 50%; background: var(--lavender); margin: auto; }
.cx-orbit i { position: absolute; inset: 37px; border: 1px dashed var(--blue); border-radius: 50%; }
.cx-orbit b { position: absolute; inset: 90px 30px; text-align: center; font-size: 20px; line-height: 1.45; font-weight: 500; }
.cx-orbit span { position: absolute; z-index: 1; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--blue); color: var(--on-blue); font-size: 12px; }
.cx-orbit span:nth-child(1) { top: 5px; left: 70px; }.cx-orbit span:nth-child(2) { top: 110px; right: -4px; }.cx-orbit span:nth-child(3) { bottom: 10px; left: 30px; }
.cx-storage { padding: 14px 18px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font-size: 12px; }
.cx-storage.cx-memory { border-color: var(--blue); background: var(--lavender); }
.cx-status { font-size: 13px; min-height: 24px; overflow-wrap: anywhere; }
.cx-status:empty { min-height: 0; margin: 0; }
.cx-top-actions, .cx-toolbar, .cx-step-actions, .cx-tour-actions, .cx-tour-links { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cx-top-actions { margin: 24px 0; }
.cx-workspace { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; }
.cx-collection, .cx-main { min-width: 0; }
.cx-collection { padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cx-collection h2 { font-size: 21px; margin: 0 0 20px; }
.cx-collection h2 span { display: block; font: 11px system-ui, sans-serif; color: var(--muted); margin-top: 10px; }
#cx-trails { display: grid; gap: 10px; margin-bottom: 20px; }
.cx-trail { text-align: left; padding: 14px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); border-radius: 7px; overflow-wrap: anywhere; }
.cx-trail[aria-pressed="true"] { border-color: var(--blue); background: var(--lavender); }
.cx-trail strong { display: block; font-size: 13px; line-height: 1.5; }.cx-trail span { display: block; font-size: 11px; margin-top: 7px; color: var(--muted); }
.cx-toolbar { padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.cx-toolbar .btn, .cx-top-actions .btn { white-space: normal; }
.cx-main label, .cx-capture label, .cx-compare label { display: block; font-size: 12px; line-height: 1.7; min-width: 0; }
.cx-main input, .cx-main textarea, .cx-main select, .cx-capture input, .cx-capture textarea, .cx-capture select, .cx-compare select { display: block; width: 100%; margin: 8px 0 18px; font-size: 16px; min-width: 0; }
.cx-main textarea, .cx-capture textarea { resize: vertical; }
.cx-metadata { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.cx-composer { margin-top: 32px; }.cx-composer > h2 { font-size: 26px; }
.cx-add { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .7fr); gap: 0 15px; align-items: end; }
.cx-add > button { grid-column: 1 / -1; justify-self: start; margin: 0 0 16px; }
.cx-composer-grid { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; }
.cx-step-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.cx-step-list button { width: 100%; min-height: 46px; text-align: left; padding: 12px; font-size: 12px; line-height: 1.5; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); overflow-wrap: anywhere; }
.cx-step-list button[aria-pressed="true"] { background: var(--lavender); border-color: var(--blue); }
.cx-step-editor { min-width: 0; }.cx-step-editor .cx-frame { max-height: none; }
.cx-fields { margin-top: 25px; }.cx-step-actions { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 18px; }
.cx-frame { width: 100%; max-width: var(--cx-frame-width, 100%); aspect-ratio: var(--cx-ratio, 1); margin: 0 auto; overflow: hidden; background: #fff; border-radius: 4px; }
.cx-frame > img { display: block; max-width: none; height: auto; transform-origin: left top; }
.cx-frame.cx-unavailable { aspect-ratio: auto; min-height: 160px; padding: 24px; display: grid; align-content: center; background: var(--lavender); color: var(--ink); font-size: 13px; line-height: 1.8; }
.cx-empty { padding: 48px 24px; text-align: center; border: 1px dashed var(--line); border-radius: 12px; }.cx-empty > span { font-size: 48px; color: var(--blue); }.cx-empty h2 { font-size: 28px; }.cx-empty p { max-width: 450px; margin: 20px auto 0; }
.cx-empty-small { background: var(--lavender); border-radius: 10px; padding: 24px; font-size: 13px; }
.cx-how { border-top: 1px solid var(--line); padding: 30px 0; margin: 45px 0 0; }.cx-how h2 { font-size: 28px; }.cx-how p { max-width: 760px; }
.cx-tour-head h2 { font-size: 31px; }.cx-tour-head p { white-space: pre-wrap; overflow-wrap: anywhere; }
.cx-map { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 10px; margin: 25px 0; }
.cx-map-point { padding: 13px 11px; min-height: 46px; font-size: 11px; line-height: 1.5; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); overflow-wrap: anywhere; }
.cx-map-point[aria-current="step"] { background: var(--blue); color: var(--on-blue); border-color: var(--blue); }
.cx-map-point:disabled { opacity: 1; color: var(--muted); background: var(--soft); cursor: default; }
.cx-observation { padding: 25px 0; }.cx-observation h3 { font-size: 30px; overflow-wrap: anywhere; }.cx-observation > p { white-space: pre-wrap; overflow-wrap: anywhere; }.cx-observation details { padding: 18px 0; border-top: 1px solid var(--line); margin: 22px 0; }.cx-observation summary { cursor: pointer; min-height: 36px; font-size: 13px; }.cx-observation details p { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cx-tour-actions { margin-top: 25px; }.cx-tour-links { margin-top: 25px; }
.cx-compare-dialog { width: min(1180px, calc(100% - 24px)); }.cx-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px; }.cx-compare > section { min-width: 0; }.cx-compare-note { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.cx-import-steps { max-height: 250px; overflow: auto; padding-left: 26px; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }.cx-import-title, .cx-import-intro, .cx-export-title { overflow-wrap: anywhere; white-space: pre-wrap; }
.cx-capture-result { padding-top: 16px; }.cx-capture-result .actions { margin-top: 20px; }
.cx-invitation { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 25px; margin: 26px 0; padding: 28px; background: var(--lavender); border: 1px solid var(--line); border-radius: 12px; }.cx-invitation > div { flex: 1 1 300px; }.cx-invitation h2 { font-size: 29px; margin: 12px 0; }.cx-invitation p { font-size: 13px; margin-bottom: 0; }
@media (max-width: 1100px) { .cx-workspace { grid-template-columns: 190px minmax(0, 1fr); gap: 20px; }.cx-collection { padding: 18px; }.cx-composer-grid { grid-template-columns: 1fr; }.cx-step-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }.cx-hero { grid-template-columns: minmax(0, 1fr) 220px; }.cx-orbit { transform: scale(.8); } }
@media (max-width: 760px) { .cx-page { padding-top: 25px; }.cx-hero { grid-template-columns: 1fr; gap: 0; }.cx-orbit { display: none; }.cx-workspace { grid-template-columns: 1fr; }.cx-collection h2 span { display: inline; margin-left: 12px; }#cx-trails { grid-template-columns: repeat(2, minmax(0, 1fr)); }.cx-collection { padding: 18px; }.cx-add { grid-template-columns: 1fr; gap: 0; }.cx-top-actions .btn { flex: 1 1 160px; }.cx-compare { grid-template-columns: 1fr; }.cx-compare-dialog { padding: 20px; }.cx-invitation { padding: 22px; }.cx-observation h3 { font-size: 26px; }.cx-tour-actions .btn { flex: 1 1 150px; }.cx-metadata { padding: 18px; }.cx-toolbar { gap: 10px; } }
@media (max-width: 380px) { #cx-trails, .cx-step-list { grid-template-columns: 1fr; }.cx-toolbar > .btn { width: 100%; }.cx-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }.cx-empty { padding: 30px 18px; } }
@media (prefers-reduced-motion: reduce) { .cx-page *, .cx-compare-dialog * { scroll-behavior: auto !important; transition: none !important; } }
@media print { .cx-top-actions, .cx-toolbar, .cx-collection, .cx-add, .cx-fields, .cx-step-actions { display: none !important; }.cx-workspace { display: block; } }
