/* ============================================================
   Greenlight by Fifth and Missing — unified stylesheet
   ============================================================ */

:root {
    --gl-orange:       #FF5A00;
    --gl-orange-hover: #E85100;
    --gl-bg:           #1C1B19;
    --gl-surface:      #2E2D2B;
    --gl-surface-2:    #252422;
    --gl-border:       #3C3B38;
    --gl-input-bg:     #242321;
    --gl-text:         #F0EDE8;
    --gl-text-muted:   #8E8C87;
    --gl-text-dim:     #5A5855;
    --gl-green:        #6FB833;
    --gl-amber:        #F5A623;
    --gl-red:          #E0542B;
    --gl-font:         'Poppins', system-ui, -apple-system, sans-serif;
    --gl-radius:       12px;
    --gl-radius-sm:    8px;

    /* Review-stage (white, website content area) */
    --stage-bg:        #ffffff;
    --stage-border:    var(--gl-orange);
}

/* ── Reset ──────────────────────────────────────────────── */

*, *::before, *::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

/* ── Base ───────────────────────────────────────────────── */

body {
    margin: 0;
    font-family: var(--gl-font);
    font-size: 14px;
    color: var(--gl-text);
    background: var(--gl-bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-weight: 600;
    color: var(--gl-text);
}

a {
    color: var(--gl-orange);
    text-decoration: none;
}

a:hover {
    opacity: 0.8;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: 0;
    border-radius: var(--gl-radius-sm);
    background: var(--gl-orange);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.15s ease;
}

button:hover {
    background: var(--gl-orange-hover);
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--gl-border);
    border-radius: var(--gl-radius-sm);
    background: var(--gl-input-bg);
    color: var(--gl-text);
    padding: 8px 12px;
}

input::placeholder,
textarea::placeholder {
    color: var(--gl-text-dim);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--gl-orange);
    box-shadow: 0 0 0 3px rgba(255, 90, 0, 0.18);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238E8C87'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

textarea {
    min-height: 78px;
    resize: vertical;
}

label {
    display: grid;
    gap: 6px;
    color: var(--gl-text-muted);
    font-size: 13px;
    font-weight: 500;
}

.flash,
.gl-error {
    padding: 10px 14px;
    border-radius: var(--gl-radius-sm);
    background: rgba(224, 84, 43, 0.15);
    border: 1px solid rgba(224, 84, 43, 0.35);
    color: #ff9070;
    font-size: 14px;
    margin-bottom: 4px;
}

/* ── Auth pages (login / setup) ─────────────────────────── */

.gl-auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
}

.gl-wrap {
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gl-dots {
    display: flex;
    gap: 11px;
    margin-bottom: 18px;
}

.gl-dots span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.gl-dots .green { background: var(--gl-green); }
.gl-dots .amber { background: var(--gl-amber); }
.gl-dots .red   { background: var(--gl-red); }

.gl-wordmark {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 2.5rem;
}

.gl-wordmark .name {
    font-size: 42px;
    font-weight: 600;
    letter-spacing: -1.5px;
    color: var(--gl-text);
    line-height: 1;
}

.gl-wordmark .by {
    font-size: 14px;
    font-weight: 500;
    color: var(--gl-orange);
    letter-spacing: -0.2px;
}

.gl-page-title {
    margin: 0 0 1.5rem;
    font-size: 15px;
    font-weight: 500;
    color: var(--gl-text-muted);
}

.gl-panel {
    width: 100%;
    background: var(--gl-surface);
    border: 1px solid var(--gl-border);
    border-radius: var(--gl-radius);
    padding: 2rem 2rem 2.25rem;
    display: grid;
    gap: 0;
}

.gl-field {
    margin-bottom: 1.25rem;
}

.gl-field:last-of-type {
    margin-bottom: 1.75rem;
}

.gl-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gl-text);
    margin-bottom: 8px;
}

.gl-field label small {
    font-size: 12px;
    color: var(--gl-text-muted);
    font-weight: 400;
}

.gl-field input {
    height: 50px;
    font-size: 15px;
    padding: 0 16px;
}

.gl-setup-notice {
    margin: 0 0 1.25rem;
    color: var(--gl-text-muted);
    font-size: 14px;
    text-align: center;
}

.gl-submit {
    display: block;
    width: 100%;
    height: 54px;
    background: var(--gl-orange);
    color: #fff;
    border: none;
    border-radius: var(--gl-radius-sm);
    font-family: var(--gl-font);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    line-height: 54px;
    padding: 0;
    transition: background 0.15s ease, transform 0.05s ease;
}

.gl-submit:hover { background: var(--gl-orange-hover); }
.gl-submit:active { transform: scale(0.99); }

.gl-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--gl-text-muted);
    cursor: pointer;
    user-select: none;
}

.gl-remember input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--gl-orange);
    cursor: pointer;
    flex-shrink: 0;
}

.gl-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 1.75rem;
}

.gl-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--gl-orange);
}

.gl-footer {
    margin-top: 2.5rem;
    font-size: 13px;
    color: var(--gl-text-dim);
    text-align: center;
}

@media (max-width: 480px) {
    .gl-wordmark .name { font-size: 34px; }
    .gl-panel { padding: 1.5rem 1.25rem 1.75rem; }
}

/* ── Home shell ─────────────────────────────────────────── */

.home-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    background: var(--gl-bg);
}

.home-sidebar {
    background: var(--gl-surface);
    border-right: 1px solid var(--gl-border);
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.home-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    padding: 0 6px;
}

.home-brand .gl-brand-dots {
    display: flex;
    gap: 5px;
}

.home-brand .gl-brand-dots span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.home-brand strong {
    font-size: 16px;
    font-weight: 600;
    color: var(--gl-text);
    letter-spacing: -0.3px;
}

.home-nav {
    display: grid;
    gap: 2px;
    margin-bottom: 6px;
}

.home-nav a,
.project-empty a {
    display: block;
    border-radius: 7px;
    color: var(--gl-text-muted);
    padding: 9px 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.1s ease, color 0.1s ease;
}

.home-nav a.active,
.home-nav a:hover {
    background: rgba(255, 90, 0, 0.12);
    color: var(--gl-text);
}

.home-nav a.active {
    color: var(--gl-orange);
}

.project-nav-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 22px 8px 10px;
    color: var(--gl-text-dim);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.project-nav-head a {
    color: var(--gl-text-muted);
    text-decoration: none;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    transition: color 0.1s ease;
}

.project-nav-head a:hover {
    color: var(--gl-orange);
    opacity: 1;
}

.project-empty {
    display: grid;
    gap: 4px;
    color: var(--gl-text-dim);
    font-size: 13px;
}

.project-empty > span {
    color: var(--gl-text-dim);
    font-size: 36px;
    text-align: center;
    display: block;
    margin-bottom: 4px;
}

.project-empty p {
    margin: 0;
    text-align: center;
    color: var(--gl-text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.home-main {
    padding: 32px 52px;
    background: var(--gl-bg);
}

.home-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
}

.home-top h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--gl-text);
}

.home-top div {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--gl-text-muted);
}

.new-canvas-button {
    display: inline-flex;
    align-items: center;
    height: 40px;
    border-radius: var(--gl-radius-sm);
    background: var(--gl-orange);
    color: #fff;
    padding: 0 18px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.15s ease;
}

.new-canvas-button:hover {
    background: var(--gl-orange-hover);
    opacity: 1;
}

.canvas-tools {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.canvas-tools button {
    height: 36px;
    border: 1px solid var(--gl-border);
    background: var(--gl-surface);
    color: var(--gl-text-muted);
    padding: 0 14px;
    font-size: 13px;
}

.canvas-tools button:hover {
    background: var(--gl-surface-2);
    color: var(--gl-text);
}

.canvas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 360px));
    gap: 28px;
}

.canvas-card {
    position: relative;
    color: var(--gl-text);
}

.canvas-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--gl-input-bg);
    border-radius: var(--gl-radius);
}

.canvas-thumb {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 10px solid var(--gl-border);
    border-radius: var(--gl-radius);
    background: var(--gl-input-bg);
}

.canvas-thumb iframe {
    width: 1600px;
    height: 1200px;
    border: 0;
    pointer-events: none;
    transform: scale(.25);
    transform-origin: top left;
}

.canvas-card strong {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gl-text);
}

.canvas-card > span {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: var(--gl-text-muted);
}

.canvas-hover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border-radius: var(--gl-radius);
    opacity: 0;
    background: rgba(20, 18, 16, 0.72);
    color: #fff;
    transition: opacity 0.15s ease;
}

.canvas-thumb-wrap:hover .canvas-hover,
.canvas-thumb-wrap:focus-within .canvas-hover {
    opacity: 1;
}

.canvas-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 4px;
}

.canvas-actions button,
.canvas-actions > a,
.canvas-actions summary {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 7px;
    background: rgba(30, 28, 26, 0.85);
    color: #fff;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
    backdrop-filter: blur(4px);
}

.canvas-actions details {
    position: relative;
}

.canvas-actions summary { list-style: none; }
.canvas-actions summary::-webkit-details-marker { display: none; }

.canvas-menu {
    position: absolute;
    top: 38px;
    right: 0;
    z-index: 3;
    display: grid;
    width: 170px;
    padding: 6px;
    border-radius: 8px;
    background: var(--gl-surface);
    border: 1px solid var(--gl-border);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.canvas-menu a {
    color: var(--gl-text-muted);
    padding: 8px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
}

.canvas-menu a:hover {
    background: rgba(255, 90, 0, 0.1);
    color: var(--gl-text);
    opacity: 1;
}

.canvas-menu form {
    margin: 0;
}

/* Button inside canvas-menu — matches .canvas-menu a exactly.
   .canvas-menu button has specificity (0,1,1) which beats both
   the global `button` rule (0,0,1) and a class-only selector (0,1,0). */
.canvas-menu button {
    display: block;
    width: 100%;
    text-align: left;
    border-radius: 6px;
    background: transparent;
    color: var(--gl-text-muted);
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 400;
}

.canvas-menu button:hover {
    background: rgba(255, 90, 0, 0.1);
    color: var(--gl-text);
}

.open-canvas {
    display: inline-flex;
    align-items: center;
    height: 40px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.92);
    color: #1a1917;
    padding: 0 18px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.canvas-host {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    color: rgba(255, 255, 255, 0.7) !important;
    text-align: center;
    font-size: 12px;
}

/* ── Modals ─────────────────────────────────────────────── */

.modal-target {
    display: none;
}

.modal-target:target {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 9, 8, 0.72);
}

.canvas-modal {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 16px;
    width: min(500px, calc(100vw - 40px));
    padding: 28px;
    border-radius: var(--gl-radius);
    background: var(--gl-surface);
    border: 1px solid var(--gl-border);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.canvas-modal h2 {
    margin: 0;
    font-size: 17px;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    color: var(--gl-text-muted);
    text-decoration: none;
    font-size: 26px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--gl-text);
    opacity: 1;
}

.canvas-modal button[type="submit"] {
    height: 44px;
    font-size: 14px;
}

/* Share modal */

.share-target {
    display: none;
}

.share-target:target {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
}

.share-modal {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 14px;
    width: min(540px, calc(100vw - 40px));
    padding: 22px 24px;
    border-radius: var(--gl-radius);
    background: var(--gl-surface);
    border: 1px solid var(--gl-border);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.share-modal h2 {
    margin: 0 0 4px;
    font-size: 17px;
}

.share-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.share-row button,
.share-modal > button {
    height: 40px;
    padding: 0 14px;
    font-size: 13px;
}

.share-modal > a {
    color: var(--gl-orange);
    font-size: 13px;
}

.viewed-list {
    border-bottom: 1px solid var(--gl-border);
    padding-bottom: 14px;
}

.viewed-list strong {
    display: block;
    font-size: 12px;
    color: var(--gl-text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.viewed-list p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 13px;
    color: var(--gl-text-muted);
}

.access-row,
.pause-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.access-row small,
.pause-row small {
    display: block;
    color: var(--gl-text-muted);
    font-size: 12px;
    margin-top: 2px;
}

.pause-row {
    padding-top: 14px;
    border-top: 1px solid var(--gl-border);
}

.switch input { display: none; }

.switch span {
    display: block;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: var(--gl-border);
    padding: 3px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.switch input:checked + span {
    background: var(--gl-orange);
}

.switch span::before {
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.15s ease;
}

.switch input:checked + span::before {
    transform: translateX(20px);
}

/* ── Review app shell ───────────────────────────────────── */

.app {
    display: grid;
    grid-template-columns: 280px minmax(760px, 1fr);
    height: 100vh;
    overflow: hidden;
    padding-bottom: 46px;
    background: var(--gl-bg);
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    background: var(--gl-surface);
    border-right: 1px solid var(--gl-border);
    padding: 8px;
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 4px 2px;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--gl-orange);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar h1 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--gl-text);
}

.avatar {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gl-orange);
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
}

.comment-search {
    padding: 2px 0;
}

.comment-search input {
    height: 36px;
    font-size: 13px;
    background: var(--gl-input-bg);
}

.sidebar-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 26px;
    color: var(--gl-text-muted);
    font-size: 13px;
}

.status-tool {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--gl-text-muted);
    font-size: 13px;
    font-weight: 500;
}

.status-tool strong {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--gl-orange);
    color: #fff;
    font-size: 10px;
}

.status-tool select {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    padding: 0;
}

.tool-button {
    min-height: 24px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--gl-text-muted);
    font-size: 13px;
    font-weight: 500;
}

.tool-button:hover {
    background: transparent;
    color: var(--gl-orange);
}

.page-group {
    margin-top: 6px;
    padding: 0 4px;
    color: var(--gl-text-dim);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid var(--gl-border);
    margin: 0 -4px 4px;
}

.sidebar-tab {
    flex: 1;
    padding: 9px 8px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 12px;
    font-weight: 600;
    color: var(--gl-text-dim);
    cursor: pointer;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
    letter-spacing: 0.01em;
}

.sidebar-tab.active {
    color: var(--gl-text);
    border-bottom-color: var(--gl-orange);
}

.sidebar-tab:hover:not(.active) {
    color: var(--gl-text);
}

.comment-url-label {
    font-size: 11px;
    font-family: ui-monospace, 'SF Mono', monospace;
    color: var(--gl-text-dim);
    margin: 0 0 2px 28px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comment-list {
    display: grid;
    gap: 6px;
    overflow-y: auto;
    padding-right: 2px;
    flex: 1;
    align-content: start;
}

.comment-card {
    position: relative;
    display: grid;
    gap: 6px;
    padding: 9px 8px;
    border: 1px solid var(--gl-border);
    border-radius: 8px;
    background: var(--gl-input-bg);
    cursor: pointer;
    transition: border-color 0.12s ease;
}

.comment-card:hover,
.comment-card.active {
    border-color: var(--gl-orange);
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gl-text-muted);
    font-size: 11px;
}

.pin-id {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--gl-orange);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

.comment-card p {
    margin: 0 0 2px 28px;
    line-height: 1.4;
    font-size: 13px;
    color: var(--gl-text);
}

.card-mobile-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    display: grid;
    place-items: center;
    color: var(--gl-text-muted);
    opacity: 0.55;
    pointer-events: none;
}

.detail-mobile-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--gl-orange);
}

.device-dot {
    margin-left: auto;
    width: 14px;
    height: 11px;
    border: 2px solid var(--gl-border);
    border-radius: 2px;
    box-shadow: 0 2px 0 -1px var(--gl-border);
    flex-shrink: 0;
}

.status-control {
    width: fit-content;
    min-width: 108px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 28px;
    background: var(--gl-surface);
    color: var(--gl-text-muted);
    border-color: var(--gl-border);
}

.suggestion {
    display: grid;
    gap: 5px;
    padding: 7px 8px;
    border-left: 3px solid var(--gl-orange);
    background: rgba(255, 90, 0, 0.06);
    font-size: 12px;
    color: var(--gl-text-muted);
    margin-left: 28px;
    border-radius: 0 6px 6px 0;
}

/* ── Review stage ───────────────────────────────────────── */

.review-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--stage-bg);
}

.topbar {
    flex-shrink: 0;
    z-index: 20;
    border-bottom: 1px solid var(--gl-border);
}

/* ── Responsive / device preview bar ──────────────────────── */

.responsive-bar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    background: var(--gl-surface);
    border-bottom: 1px solid var(--gl-border);
    z-index: 19;
}

.responsive-presets {
    display: flex;
    gap: 4px;
}

.rp-btn {
    display: grid;
    place-items: center;
    width: 30px;
    height: 28px;
    border: 1px solid var(--gl-border);
    border-radius: 5px;
    background: var(--gl-input-bg);
    color: var(--gl-text-muted);
    cursor: pointer;
    transition: background 0.1s, color 0.1s, border-color 0.1s;
}

.rp-btn:hover {
    background: var(--gl-surface);
    color: var(--gl-text);
}

.rp-btn.active {
    border-color: var(--gl-orange);
    background: rgba(255, 133, 27, 0.12);
    color: var(--gl-orange);
}

.rp-width-label {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    color: var(--gl-text-muted);
}

#rp-width-input {
    width: 52px;
    height: 28px;
    font-size: 12px;
    font-family: ui-monospace, 'SF Mono', monospace;
    text-align: right;
    background: var(--gl-input-bg);
    border: 1px solid var(--gl-border);
    border-radius: 5px;
    color: var(--gl-text);
    padding: 0 6px;
}

#rp-width-input:focus {
    outline: none;
    border-color: var(--gl-orange);
}

/* hide number input spinners */
#rp-width-input::-webkit-inner-spin-button,
#rp-width-input::-webkit-outer-spin-button { -webkit-appearance: none; }
#rp-width-input { -moz-appearance: textfield; }

#rp-preset-select {
    height: 28px;
    font-size: 12px;
    background: var(--gl-input-bg);
    border: 1px solid var(--gl-border);
    border-radius: 5px;
    color: var(--gl-text-muted);
    padding: 0 6px;
    cursor: pointer;
}

#rp-preset-select:focus {
    outline: none;
    border-color: var(--gl-orange);
}

/* iframe constrained to device width — centered in stage */
#review-frame.responsive-mode {
    flex: 1;
    width: var(--rp-frame-width, 375px) !important;
    max-width: var(--rp-frame-width, 375px) !important;
    align-self: center;
    border: 1px solid var(--gl-border) !important;
    border-radius: 4px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    min-height: 0;
}

/* give stage a darker bg so the constrained iframe stands out */
.review-stage.responsive-mode {
    background: #1a1a1a;
}

/* responsive toggle active state */
#responsive-toggle.active {
    border-color: var(--gl-orange);
    color: var(--gl-orange);
    background: rgba(255, 133, 27, 0.12);
}

.topbar,
.bottombar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--gl-surface);
}

.bottombar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    min-height: 46px;
    justify-content: space-between;
    border-top: 1px solid var(--gl-border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

#review-url {
    flex: 1;
    height: 28px;
    font-size: 12px;
    font-family: ui-monospace, 'SF Mono', monospace;
    background: var(--gl-input-bg);
    border-radius: 6px;
    padding: 0 10px;
    border: 1px solid var(--gl-border);
    color: var(--gl-text);
    min-width: 0;
}

#review-url:focus {
    outline: none;
    border-color: var(--gl-orange);
}

#go-url {
    height: 28px;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 600;
    background: var(--gl-orange);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
}

#go-url:hover {
    opacity: 0.88;
}

#copy-link {
    height: 30px;
    padding: 0 12px;
    font-size: 12px;
}

.mode-toggle {
    display: inline-flex;
    justify-content: space-between;
    width: 54px;
    height: 26px;
    border: 0;
    border-radius: 999px;
    background: var(--gl-orange);
    overflow: hidden;
    padding: 3px;
}

.mode-toggle button {
    width: 20px;
    min-height: 20px;
    border-radius: 999px;
    background: transparent;
    color: transparent;
    padding: 0;
    overflow: hidden;
}

.mode-toggle button.active {
    background: #fff;
}

#review-frame {
    flex: 1;
    width: 100%;
    min-height: 0;
    border: 0;
    border-left: 3px solid var(--gl-orange);
    background: var(--stage-bg);
}

.app.is-composing #review-frame {
    filter: brightness(0.55);
}

.bottom-left,
.bottom-center,
.bottom-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bottom-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: var(--gl-text-muted);
    font-size: 12px;
    font-weight: 600;
}

.bottom-right {
    margin-left: auto;
}

.brand-mark {
    display: flex;
    gap: 4px;
    align-items: center;
}

.brand-mark span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.brand-mark span:nth-child(1) { background: var(--gl-green); }
.brand-mark span:nth-child(2) { background: var(--gl-amber); }
.brand-mark span:nth-child(3) { background: var(--gl-red); }

.bar-button,
.bar-icon,
.finish-button {
    height: 30px;
    border: 1px solid var(--gl-border);
    border-radius: 6px;
    background: var(--gl-input-bg);
    color: var(--gl-text-muted);
    padding: 0 10px;
    font-size: 12px;
    font-weight: 500;
}

.bar-icon {
    width: 32px;
    padding: 0;
}

.bar-button:hover,
.bar-icon:hover {
    background: var(--gl-surface);
    color: var(--gl-text);
}

.finish-button {
    border-color: var(--gl-green);
    background: rgba(111, 184, 51, 0.15);
    color: var(--gl-green);
}

.finish-button:hover {
    background: var(--gl-green);
    color: #fff;
}

#frame-note {
    max-width: 240px;
    color: var(--gl-text-muted);
    font-size: 11px;
    font-weight: 500;
}

/* ── Composer ───────────────────────────────────────────── */

.composer {
    position: fixed;
    top: 38%;
    right: 22%;
    z-index: 40;
    display: grid;
    gap: 0;
    width: 400px;
    min-height: 140px;
    padding: 0;
    border: 1px solid #d0d0d2;
    border-radius: 10px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.18);
    background: #ffffff;
}

#click-dot {
    position: fixed;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #3b6bff;
    border: 2px solid #ffffff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 41;
}

.composer.is-suggestion {
    top: 34px;
    left: 50%;
    right: auto;
    width: 720px;
    min-height: 0;
    border: 0;
    transform: translateX(-35%);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.4);
    background: var(--gl-surface);
}

.composer.is-suggestion .composer-head,
.composer.is-suggestion .composer-footer,
.composer.is-suggestion label:has(#comment-body) {
    display: none;
}

.composer[hidden] { display: none; }

.composer-head {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 4px 8px 0;
}

#close-composer {
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #999;
    font-size: 18px;
}

#close-composer:hover {
    background: transparent;
    color: #333;
}

.composer label {
    margin-inline: 24px;
}

.composer label:has(#comment-body) {
    margin-inline: 24px;
    align-self: stretch;
}

.composer textarea {
    border: 0;
    border-radius: 0;
    padding: 0;
    color: #2a2927;
    background: transparent;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    outline: 0;
    resize: none;
    min-height: auto;
}

#comment-body {
    min-height: 65px;
}

.composer textarea::placeholder {
    color: var(--gl-text-dim);
    font-weight: 400;
}

.composer.is-suggestion #selected-text::placeholder,
.composer.is-suggestion #suggested-text::placeholder {
    color: #AEABA6;
}

.composer-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 12px 12px;
    padding-top: 8px;
    border-top: 1px solid #ebebed;
}

.suggest-button {
    height: 26px;
    padding: 0 10px;
    border-radius: 6px;
    background: rgba(255, 90, 0, 0.15);
    color: var(--gl-orange);
    border: 1px solid rgba(255, 90, 0, 0.3);
    font-size: 11px;
    font-weight: 600;
}

.suggest-button:hover {
    background: var(--gl-orange);
    color: #fff;
}

.composer-icons {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    color: #aaa;
    font-size: 15px;
    line-height: 1;
}

.composer-icons button,
.composer-icons label {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #aaa;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.composer-icons button:hover,
.composer-icons label:hover {
    background: #f1f1f3;
    color: #444;
}

#save-comment {
    height: 30px;
    padding: 0 14px;
    border-radius: 6px;
    background: var(--gl-orange);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border: 0;
}

.suggestion-toolbar {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 58px;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--gl-surface);
    border: 1px solid var(--gl-border);
}

.suggestion-toolbar[hidden] { display: none; }

.drag-handle {
    color: var(--gl-text-dim);
    font-size: 18px;
    line-height: 0.75;
    letter-spacing: 2px;
}

#save-suggestion {
    height: 38px;
    padding: 0 16px;
    border-radius: 7px;
    background: var(--gl-orange);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

#cancel-suggestion {
    height: 38px;
    padding: 0 18px;
    border: 1px solid var(--gl-border);
    border-radius: 7px;
    background: var(--gl-input-bg);
    color: var(--gl-text-muted);
    font-size: 13px;
    font-weight: 500;
}

#cancel-suggestion:hover {
    background: var(--gl-surface-2);
    color: var(--gl-text);
}

.suggestion-error {
    font-size: 12px;
    color: #ff6b6b;
    font-weight: 500;
}

.seen-by {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    color: var(--gl-text-muted);
    font-size: 13px;
}

.seen-by strong {
    display: inline-flex;
    align-items: center;
    height: 24px;
    border-radius: 6px;
    background: rgba(255, 90, 0, 0.15);
    color: var(--gl-orange);
    padding: 0 8px;
    font-weight: 500;
    font-size: 12px;
}

.composer.is-suggestion #selected-wrap,
.composer.is-suggestion #suggested-wrap {
    margin: 0;
}

.composer.is-suggestion #selected-text,
.composer.is-suggestion #suggested-text {
    min-height: 44px;
    padding: 8px 10px;
    border-radius: 6px;
    outline: 2px dashed rgba(255, 90, 0, 0.7);
    outline-offset: -2px;
    background: #ffffff;
    color: #1C1B19;
    font-size: 13px;
}

.composer.is-suggestion #selected-wrap span,
.composer.is-suggestion #suggested-wrap span {
    display: none;
}

.composer-popover {
    position: absolute;
    right: 20px;
    bottom: 46px;
    z-index: 2;
    display: grid;
    gap: 8px;
    width: 240px;
    padding: 10px;
    border: 1px solid var(--gl-border);
    border-radius: 8px;
    background: var(--gl-surface);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
}

.composer-popover input {
    height: 34px;
    border-color: var(--gl-orange);
}

.composer-popover p {
    margin: 0;
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(255, 90, 0, 0.08);
    color: var(--gl-text-muted);
    font-size: 12px;
}

.composer-popover button {
    height: 36px;
    border: 1px solid var(--gl-border);
    background: var(--gl-input-bg);
    color: var(--gl-text-muted);
    font-size: 12px;
}

.seen-popover {
    right: 0;
    width: 210px;
}

.seen-popover label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--gl-text);
    font-size: 13px;
    font-weight: 500;
}

.seen-popover label input {
    width: auto;
    flex-shrink: 0;
}

/* ── Settings overlay ───────────────────────────────────── */

.settings-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    background: rgba(10, 9, 8, 0.72);
}

.settings-modal {
    position: relative;
    width: min(920px, calc(100vw - 60px));
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    border-radius: var(--gl-radius);
    background: var(--gl-surface);
    border: 1px solid var(--gl-border);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.settings-modal header {
    padding: 22px 30px;
    background: var(--gl-surface-2);
    border-bottom: 1px solid var(--gl-border);
}

.settings-modal h2,
.settings-modal h3 {
    margin: 0;
    color: var(--gl-text);
}

.settings-close {
    position: absolute;
    top: 18px;
    right: 22px;
    background: transparent;
    color: var(--gl-text-muted);
    font-size: 26px;
    line-height: 1;
    padding: 0;
    width: 28px;
    height: 28px;
}

.settings-close:hover {
    background: transparent;
    color: var(--gl-text);
}

.settings-tabs {
    display: flex;
    gap: 4px;
    padding: 20px 30px 16px;
    border-bottom: 1px solid var(--gl-border);
}

.settings-tabs button {
    height: 38px;
    background: transparent;
    color: var(--gl-text-muted);
    padding: 0 16px;
    font-size: 14px;
    border-radius: 6px;
}

.settings-tabs button.active {
    background: rgba(255, 90, 0, 0.12);
    color: var(--gl-orange);
}

.settings-tabs button:hover {
    background: var(--gl-input-bg);
    color: var(--gl-text);
}

.settings-preview {
    margin: 22px 30px 24px;
    height: 240px;
    overflow: hidden;
    border: 1px solid var(--gl-border);
    border-radius: 8px;
}

.settings-preview iframe {
    width: 1600px;
    height: 1000px;
    border: 0;
    pointer-events: none;
    transform: scale(0.52);
    transform-origin: top left;
}

.settings-form,
.member-settings {
    display: grid;
    gap: 16px;
    margin: 0 30px 30px;
}

.settings-form label span {
    color: var(--gl-text);
    font-size: 14px;
    font-weight: 500;
}

.settings-form input {
    height: 48px;
    font-size: 16px;
}

.settings-form button,
.member-add button {
    width: fit-content;
    height: 44px;
    padding: 0 20px;
    font-size: 14px;
}

.member-add {
    display: flex;
    gap: 10px;
}

.member-list {
    display: grid;
    gap: 6px;
}

.member-list form {
    display: grid;
    grid-template-columns: 1fr 1.5fr auto;
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--gl-border);
    font-size: 13px;
    color: var(--gl-text);
}

.member-list small {
    color: var(--gl-text-muted);
    font-size: 12px;
}

.member-list button {
    background: transparent;
    border: 1px solid rgba(224, 84, 43, 0.4);
    color: var(--gl-red);
    height: 30px;
    padding: 0 12px;
    font-size: 12px;
}

.member-list button:hover {
    background: rgba(224, 84, 43, 0.1);
}

/* ── User management page ───────────────────────────────── */

.users-top {
    margin-bottom: 24px;
}

.users-layout {
    display: grid;
    gap: 30px;
    max-width: 900px;
}

.user-section {
    display: grid;
    gap: 14px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gl-border);
}

.user-section h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.user-form {
    display: grid;
    grid-template-columns: 1fr 1.2fr 0.5fr 0.5fr auto;
    gap: 8px;
    align-items: end;
}

.user-form input {
    height: 38px;
    font-size: 13px;
}

.user-form button {
    height: 38px;
    padding: 0 14px;
    font-size: 13px;
    white-space: nowrap;
}

.user-table {
    display: grid;
    gap: 6px;
}

.user-table div {
    display: grid;
    grid-template-columns: auto 1fr 1.5fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gl-border);
    font-size: 13px;
    color: var(--gl-text);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-pw-form {
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-pw-form input[type="password"] {
    width: 150px;
    height: 30px;
    font-size: 12px;
    padding: 0 8px;
}

.user-pw-form button {
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
    white-space: nowrap;
}

.user-delete-btn {
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
    background: transparent;
    border: 1px solid rgba(224, 84, 43, 0.4);
    color: var(--gl-red);
    white-space: nowrap;
}

.user-delete-btn:hover {
    background: rgba(224, 84, 43, 0.1);
    color: var(--gl-red);
}

.user-table strong {
    font-size: 13px;
    color: var(--gl-text);
}

.user-table small {
    color: var(--gl-text-muted);
    font-size: 12px;
}

.user-table em {
    color: var(--gl-text-dim);
    font-style: normal;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Sidebar user logout link ───────────────────────────── */

.sidebar-logout {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #DDD9D4;
}

.sidebar-logout a {
    display: block;
    color: #999693;
    font-size: 12px;
    padding: 6px 4px;
    text-decoration: none;
    transition: color 0.1s ease;
}

.sidebar-logout a:hover {
    color: var(--gl-orange);
    opacity: 1;
}

/* ── Review sidebar — light theme ───────────────────────── */

.sidebar {
    background: #F4F3F1;
    border-right: 1px solid #DDD9D4;
}

.sidebar h1 {
    color: #1C1B19;
}

.eyebrow {
    color: var(--gl-orange);
}

.comment-search input {
    background: #ffffff;
    border-color: #DDD9D4;
    color: #1C1B19;
}

.comment-search input::placeholder {
    color: #AEABA6;
}

.sidebar-tools {
    color: #6B6966;
}

.tool-button {
    color: #6B6966;
}

.page-group {
    color: #AEABA6;
}

.sidebar-tabs {
    border-bottom-color: #E5E2DD;
}

.sidebar-tab {
    color: #AEABA6;
}

.sidebar-tab.active {
    color: #1C1B19;
}

.sidebar-tab:hover:not(.active) {
    color: #1C1B19;
}

.comment-url-label {
    color: #AEABA6;
}

.comment-card {
    background: #ffffff;
    border-color: #DDD9D4;
}

.comment-card:hover,
.comment-card.active {
    border-color: var(--gl-orange);
}

.comment-meta {
    color: #6B6966;
}

.comment-card p,
.comment-body-text {
    margin: 0 0 2px 28px;
    line-height: 1.4;
    font-size: 13px;
    color: #1C1B19;
}

.device-dot {
    border-color: #DDD9D4;
    box-shadow: 0 2px 0 -1px #DDD9D4;
}

.status-control {
    background: #F4F3F1;
    color: #6B6966;
    border-color: #DDD9D4;
}

/* ── Comment card actions (edit / delete) ───────────────── */

.comment-card-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.1s ease;
}

.comment-card:hover .comment-card-actions {
    opacity: 1;
}

.comment-edit-btn,
.comment-delete-btn {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: transparent;
    border: 0;
    color: #AEABA6;
    font-size: 13px;
    font-weight: 400;
    padding: 0;
    cursor: pointer;
    transition: background 0.1s ease, color 0.1s ease;
}

.comment-edit-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #1C1B19;
}

.comment-delete-btn:hover {
    background: rgba(224, 84, 43, 0.1);
    color: var(--gl-red);
}

.comment-edit-form {
    margin: 0 0 2px 28px;
    display: grid;
    gap: 6px;
}

.comment-edit-input {
    width: 100%;
    border: 1px solid #DDD9D4;
    border-radius: 6px;
    background: #F9F8F6;
    color: #1C1B19;
    font-size: 13px;
    padding: 6px 8px;
    min-height: 56px;
    resize: vertical;
}

.comment-edit-input:focus {
    outline: none;
    border-color: var(--gl-orange);
    box-shadow: 0 0 0 3px rgba(255, 90, 0, 0.12);
}

.comment-edit-row {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.comment-save-btn {
    height: 26px;
    padding: 0 12px;
    border-radius: 6px;
    background: var(--gl-orange);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border: 0;
    cursor: pointer;
}

.comment-save-btn:hover {
    background: var(--gl-orange-hover);
}

.comment-cancel-btn {
    height: 26px;
    padding: 0 10px;
    border-radius: 6px;
    background: transparent;
    color: #6B6966;
    border: 1px solid #DDD9D4;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
}

.comment-cancel-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1C1B19;
}

/* ── HTTP Basic Auth collapsible ────────────────────────── */

.auth-details {
    border: 1px solid var(--gl-border);
    border-radius: var(--gl-radius-sm);
    overflow: hidden;
}

.auth-details summary {
    display: block;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--gl-text-muted);
    list-style: none;
    user-select: none;
}

.auth-details summary::-webkit-details-marker { display: none; }

.auth-details summary::before {
    content: '▸ ';
    font-size: 11px;
}

.auth-details[open] summary::before {
    content: '▾ ';
}

.auth-details summary:hover {
    color: var(--gl-text);
    background: var(--gl-input-bg);
}

.auth-details summary small {
    font-weight: 400;
    color: var(--gl-text-dim);
}

.auth-fields {
    display: grid;
    gap: 12px;
    padding: 14px;
    border-top: 1px solid var(--gl-border);
    background: var(--gl-input-bg);
}

/* ── Comment detail panel ───────────────────────────────── */

.comment-detail {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 4px 16px;
}

/* Nav bar: Back + position counter */
.detail-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 12px;
    border-bottom: 1px solid #DDD9D4;
    margin-bottom: 14px;
}

.detail-back {
    background: none;
    border: none;
    font-size: 13px;
    color: #6B6966;
    cursor: pointer;
    padding: 0;
    font-family: var(--gl-font);
}
.detail-back:hover { color: #1C1B19; }

.detail-position {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6B6966;
}

.detail-arrow {
    background: none;
    border: 1px solid #DDD9D4;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    font-size: 14px;
    cursor: pointer;
    color: #1C1B19;
    line-height: 1;
    display: grid;
    place-items: center;
}
.detail-arrow:disabled { opacity: 0.35; cursor: default; }
.detail-arrow:not(:disabled):hover { background: #F0EDE8; }

/* Comment head */
.detail-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.detail-pin {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid white;
    color: white;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

.detail-avatar {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: white;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.detail-author {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.detail-author strong { font-size: 13px; font-weight: 600; color: #1C1B19; }
.detail-author span   { font-size: 11px; color: #6B6966; }

.detail-head-actions {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 4px;
    color: #6B6966;
    font-size: 14px;
}
.icon-btn:hover { background: #F0EDE8; color: #1C1B19; }

/* Body */
.detail-body-wrap { margin-bottom: 12px; }

.detail-body {
    margin: 0;
    font-size: 14px;
    color: #1C1B19;
    line-height: 1.5;
}

.detail-edit-input {
    width: 100%;
    padding: 8px 10px;
    background: white;
    border: 1px solid #DDD9D4;
    border-radius: 6px;
    font-size: 13px;
    font-family: var(--gl-font);
    color: #1C1B19;
    resize: vertical;
    margin-bottom: 6px;
}
.detail-edit-input:focus { outline: 2px solid var(--gl-orange); }

/* Suggestion block */
.detail-suggestion {
    background: #F8F6F3;
    border: 1px solid #DDD9D4;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 12px;
    color: #1C1B19;
    display: grid;
    gap: 4px;
    margin-bottom: 12px;
}

/* Status + Assignee pills */
.detail-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.detail-control-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-control-label {
    font-size: 11px;
    font-weight: 600;
    color: #AEABA6;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.detail-status-select,
.detail-assigned-select {
    padding: 6px 10px;
    background: #F4F3F1;
    border: 1px solid #DDD9D4;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #1C1B19;
    cursor: pointer;
    appearance: none;
    text-align: center;
    font-family: var(--gl-font);
}
.detail-status-select:focus,
.detail-assigned-select:focus { outline: 2px solid var(--gl-orange); }

/* Metadata card */
.detail-meta-card {
    display: flex;
    gap: 10px;
    background: #F4F3F1;
    border: 1px solid #DDD9D4;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 16px;
    align-items: flex-start;
}

.detail-meta-thumb {
    width: 64px;
    height: 52px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #DDD9D4;
    flex-shrink: 0;
}

.detail-meta-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    color: #6B6966;
    min-width: 0;
}
.detail-meta-info strong { font-size: 11px; font-weight: 600; color: #AEABA6; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }
.detail-meta-page { font-weight: 500; color: #1C1B19; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Replies in detail */
.detail-replies {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid #DDD9D4;
    padding-top: 12px;
}

.detail-replies .reply-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.detail-reply-form { display: grid; gap: 0; }
.detail-reply-form .reply-input {
    background: white;
    border: 1px solid #DDD9D4;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    color: #1C1B19;
    font-family: var(--gl-font);
    resize: none;
    width: 100%;
}
.detail-reply-form .reply-input:focus { outline: 2px solid var(--gl-orange); }

/* Simplify list cards — they're now just jump targets */
.comment-list .comment-card {
    cursor: pointer;
}
.comment-list .comment-card:hover { border-color: #C8C4BE; }
.comment-list .comment-card.active { border-color: var(--gl-orange); }
.comment-list .comment-card .comment-body-text {
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Quick-delete × on list cards */
.card-delete-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: #AEABA6;
    font-size: 16px;
    line-height: 1;
    padding: 0 2px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
    font-weight: 400;
}
.comment-card:hover .card-delete-btn { opacity: 1; }
.card-delete-btn:hover { color: #E0542B; background: none; }

/* ── Canvas modal tabs (URL vs Image) ───────────────────── */

.canvas-type-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--gl-input-bg);
    border-radius: var(--gl-radius-sm);
    margin-bottom: 16px;
}

.canvas-tab {
    flex: 1;
    padding: 7px 14px;
    border-radius: 6px;
    background: transparent;
    color: var(--gl-text-muted);
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.canvas-tab.active {
    background: var(--gl-surface);
    color: var(--gl-text);
}

.canvas-tab-panel {
    display: grid;
    gap: 16px;
}

.file-upload-label input[type="file"] {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--gl-input-bg);
    border: 1px solid var(--gl-border);
    border-radius: var(--gl-radius-sm);
    color: var(--gl-text);
    cursor: pointer;
    font-size: 13px;
}

/* ── Image canvas: thumbnail on dashboard card ──────────── */

.canvas-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    display: block;
}

/* ── Image canvas: review stage ─────────────────────────── */

.review-stage--image {
    background: #f0ede8;
    display: flex;
    flex-direction: column;
    overflow: auto;
}

.image-canvas-wrap {
    position: relative;
    display: inline-block;
    margin: auto;
    max-width: 100%;
    cursor: crosshair;
    flex-shrink: 0;
}

#image-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    user-select: none;
    pointer-events: none;
}

.image-pin-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.image-pin {
    position: absolute;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 2px solid white;
    border-radius: 50%;
    background: #3b6bff;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
    font: 800 10px/1 system-ui, sans-serif;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    cursor: pointer;
}

/* ── Comment bottom row (status + assigned) ─────────────── */

.comment-bottom-row {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.comment-bottom-row .status-control,
.assigned-control {
    flex: 1;
    padding: 4px 8px;
    background: var(--gl-input-bg);
    border: 1px solid var(--gl-border);
    border-radius: 6px;
    color: var(--gl-text-muted);
    font-size: 12px;
    cursor: pointer;
}

.assigned-control:focus,
.comment-bottom-row .status-control:focus {
    outline: 2px solid var(--gl-orange);
}

/* ── OS/Browser badge ───────────────────────────────────── */

.comment-ua {
    display: inline-block;
    margin-bottom: 4px;
    font-size: 11px;
    color: var(--gl-text-dim);
    background: var(--gl-input-bg);
    border: 1px solid var(--gl-border);
    border-radius: 4px;
    padding: 2px 6px;
}

/* ── Replies ────────────────────────────────────────────── */

.replies-section {
    margin-top: 10px;
    border-top: 1px solid #DDD9D4;
    padding-top: 8px;
}

.reply-item {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.reply-avatar {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gl-orange);
    color: white;
    font-size: 10px;
    font-weight: 700;
}

.reply-body {
    flex: 1;
    position: relative;
}

.reply-meta {
    display: block;
    font-size: 11px;
    color: #6B6966;
    margin-bottom: 2px;
}

.reply-body p {
    margin: 0;
    font-size: 13px;
    color: #1C1B19;
}

.reply-delete-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    color: #AEABA6;
    font-size: 14px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.15s;
}

.reply-item:hover .reply-delete-btn {
    opacity: 1;
}

.add-reply-btn {
    background: none;
    border: none;
    color: #6B6966;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    margin-top: 2px;
}

.add-reply-btn:hover {
    color: var(--gl-orange);
}

.reply-form {
    margin-top: 8px;
    display: grid;
    gap: 6px;
}

.reply-input {
    width: 100%;
    padding: 8px 10px;
    background: var(--gl-input-bg);
    border: 1px solid var(--gl-border);
    border-radius: 6px;
    color: var(--gl-text);
    font-size: 13px;
    resize: vertical;
    font-family: var(--gl-font);
}

.reply-input:focus {
    outline: 2px solid var(--gl-orange);
}

.reply-form-row {
    display: flex;
    gap: 6px;
}

.reply-save-btn {
    padding: 5px 14px;
    background: var(--gl-orange);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.reply-save-btn:hover {
    background: var(--gl-orange-hover);
}

.reply-cancel-btn {
    padding: 5px 10px;
    background: transparent;
    color: #6B6966;
    border: 1px solid #DDD9D4;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

/* ── Attachment preview (composer + reply form) ──────────── */

.attachment-preview {
    position: relative;
    display: inline-block;
    margin: 4px 0;
}

.attachment-preview img {
    display: block;
    max-height: 120px;
    max-width: 100%;
    border-radius: 6px;
    border: 1px solid #DDD9D4;
    object-fit: cover;
}

.attachment-preview button {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1C1B19;
    color: #fff;
    border: none;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
}

/* ── Attachment image in comment card list ───────────────── */

.comment-card-thumb {
    display: block;
    width: 100%;
    max-height: 80px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #DDD9D4;
    margin-top: 2px;
}

/* ── Attachment in detail view ───────────────────────────── */

.detail-attachment {
    display: block;
    margin-top: 8px;
}

.detail-attachment img {
    display: block;
    max-width: 100%;
    max-height: 300px;
    border-radius: 7px;
    border: 1px solid #DDD9D4;
    object-fit: contain;
}

/* ── Reply attach button ─────────────────────────────────── */

.reply-attach-label {
    display: flex;
    align-items: center;
    color: #AEABA6;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 5px;
    transition: color 0.15s, background 0.15s;
}

.reply-attach-label:hover {
    color: #1C1B19;
    background: #F4F3F1;
}

/* ── Copy link icon btn ──────────────────────────────────── */

.detail-copy-link {
    font-size: 14px;
    font-style: normal;
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 1120px) {
    .app {
        grid-template-columns: 230px minmax(680px, 1fr);
    }

    #frame-note {
        display: none;
    }
}
