:root { --collab-blue: #071b3a; --collab-yellow: #ffc928; }
.collaborator-page { background: #f6f8fb; color: var(--collab-blue); }
.collaborator-page .site-header { background: var(--collab-blue); }
.collaborator-back { color: var(--white); text-decoration: none; font-weight: 800; padding: .65rem .9rem; border: 1px solid rgba(255,255,255,.3); border-radius: 12px; }
.collaborator-intro { padding: clamp(3rem, 7vw, 5.4rem) 1rem 2rem; text-align: center; }
.collaborator-intro__inner { width: min(100%, 760px); margin: auto; }
.collaborator-intro h1 { margin: 0; font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1; }
.collaborator-intro p:last-child { max-width: 620px; margin: 1rem auto 0; font-size: 1.1rem; color: var(--muted); }
.collaborator-workspace { width: min(100% - 2rem, 1120px); margin: 0 auto 5rem; display: grid; gap: 2rem; padding: 1.2rem; background: var(--white); border-radius: 28px; box-shadow: 0 18px 45px rgba(7,27,58,.1); }
.collaborator-step__label { margin: 0 0 .8rem; color: var(--collab-blue); font-weight: 900; font-size: 1.05rem; }
.template-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.template-card { position: relative; aspect-ratio: 1; overflow: hidden; padding: .25rem; border: 2px solid rgba(16,32,51,.14); border-radius: 18px; background: var(--white); cursor: pointer; transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.template-card:hover, .template-card.is-selected { transform: translateY(-3px); border-color: var(--collab-yellow); box-shadow: 0 12px 24px rgba(7,27,58,.16); }
.template-card img { width: 100%; height: 100%; object-fit: contain; background: var(--white); }
.template-card span { position: absolute; left: .55rem; bottom: .55rem; padding: .25rem .5rem; border-radius: 999px; background: var(--collab-yellow); color: var(--collab-blue); font-size: .75rem; font-weight: 900; }
.collaborator-step__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; }
.upload-button { cursor: pointer; }
.privacy-note { margin: .45rem 0 1rem; color: var(--muted); font-size: .85rem; }
.canvas-shell { position: relative; width: min(100%, 620px); margin: 0 auto; aspect-ratio: 1; overflow: hidden; border-radius: 20px; background: #e9edf3; }
#photo-canvas { width: 100%; height: 100%; touch-action: none; cursor: grab; }
#photo-canvas:active { cursor: grabbing; }
.canvas-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 2rem; color: var(--muted); text-align: center; pointer-events: none; }
.canvas-empty[hidden] { display: none; }
.image-processing { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: .35rem; padding: 1.5rem; background: rgba(246,248,251,.92); color: var(--collab-blue); text-align: center; }
.image-processing[hidden] { display: none; }
.image-processing strong { font-size: clamp(1rem, 3vw, 1.3rem); }
.image-processing span:last-child { color: var(--muted); font-size: .9rem; }
.image-processing__spinner { width: 38px; height: 38px; margin-bottom: .35rem; border: 4px solid rgba(7,27,58,.14); border-top-color: var(--collab-yellow); border-radius: 50%; animation: image-processing-spin .8s linear infinite; }
.upload-button.is-disabled, .cover-replace.is-disabled { opacity: .55; cursor: wait; pointer-events: none; }
@keyframes image-processing-spin { to { transform: rotate(360deg); } }
.collaborator-controls { display: grid; gap: .8rem; margin-top: 1rem; }
.zoom-control label { display: block; margin-bottom: .45rem; font-weight: 900; }
.zoom-row { display: grid; grid-template-columns: 44px 1fr 44px; gap: .55rem; align-items: center; }
.zoom-row button { min-height: 44px; border: 0; border-radius: 12px; background: var(--collab-blue); color: var(--white); font-size: 1.5rem; cursor: pointer; }
.zoom-row input { width: 100%; accent-color: var(--collab-yellow); }
.drag-hint, .editor-status { margin: 0; color: var(--muted); font-size: .88rem; }
.download-button, .button--download { width: 100%; }
.button--download { background: var(--collab-blue); color: var(--white); text-align: center; }
.download-step-label { margin: .45rem 0 0; }
.download-button:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; }
.ready-note { margin: 0; color: var(--muted); font-size: .88rem; text-align: center; }
.ready-note[hidden] { display: none; }
.fallback-download { color: var(--collab-blue); font-size: .88rem; font-weight: 800; text-align: center; }
.fallback-download[hidden] { display: none; }
@media (min-width: 720px) { .collaborator-workspace { grid-template-columns: .8fr 1.2fr; padding: 2rem; } .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .collaborator-workspace { grid-template-columns: .75fr 1.25fr; } .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .template-card, .collaborator-back { transition: none; } .image-processing__spinner { animation-duration: 1.6s; } }
