:root, .theme-preview {
    color-scheme: light;
    --ink: #202e3d;
    --muted: #526273;
    --line: #a4b3c2;
    --blue: #245d8c;
    --primary: #28618f;
    --primary-hover: #1c4d75;
    --focus: #245d8c;
    --glass: rgba(255,255,255,.94);
    --surface: #fff;
    --surface-soft: #e7edf3;
    --surface-hover: #e1edf7;
    --surface-subtle: rgba(255,255,255,.8);
    --surface-selected: #d7e9f8;
    --line-hover: #6b8ba6;
    --selected-ink: #164a75;
    --danger-ink: #a35145;
    --danger-surface: #fff3f0;
    --danger-line: #e4bcb7;
    --success-ink: #326548;
    --success-surface: #f0faf4;
    --success-line: #b7d6c9;
    --notice-surface: #eff7ff;
    --notice-line: #cfdeeb;
    --warning-surface: #fff2cf;
    --page-glow: #e1edfc;
    --page-start: #f5f8fd;
    --page-end: #fffaf5;
}

:root[data-color-scheme="dark"], .theme-preview[data-color-scheme="dark"] {
    color-scheme: dark;
    --ink: #fafafa;
    --muted: #c1c1c8;
    --line: #525259;
    --blue: #b2ccef;
    --focus: #b2ccef;
    --glass: rgba(32,32,34,.94);
    --surface: #2b2b2e;
    --surface-soft: #303034;
    --surface-hover: #3a3a3f;
    --surface-subtle: rgba(32,32,34,.8);
    --surface-selected: #39393f;
    --line-hover: #83838e;
    --selected-ink: #fff;
    --danger-ink: #f2aaa0;
    --danger-surface: #402a30;
    --danger-line: #85504f;
    --success-ink: #9fd6b9;
    --success-surface: #203d34;
    --success-line: #476f5e;
    --notice-surface: #303036;
    --notice-line: #70707c;
    --warning-surface: #493c24;
    --page-glow: #242426;
    --page-start: #171719;
    --page-end: #101012;
}

:root[data-theme="ocean"], .theme-preview[data-theme="ocean"] {
    --ink: #eaf5ff;
    --muted: #afc8dc;
    --line: #45647d;
    --blue: #8bd6f0;
    --primary: #246a89;
    --primary-hover: #1c5772;
    --focus: #8bd6f0;
    --glass: rgba(19,39,57,.96);
    --surface: #19364c;
    --surface-soft: #203f56;
    --surface-hover: #294e68;
    --surface-subtle: rgba(19,39,57,.85);
    --surface-selected: #244c65;
    --line-hover: #75a6c2;
    --selected-ink: #d9f6ff;
    --notice-surface: #203f56;
    --notice-line: #45647d;
    --page-glow: #163d57;
    --page-start: #0c2030;
    --page-end: #091722;
}

:root[data-theme="forest"], .theme-preview[data-theme="forest"] {
    --ink: #edf8f0;
    --muted: #b2cdbb;
    --line: #496b58;
    --blue: #a0dfb8;
    --primary: #356c4c;
    --primary-hover: #29563c;
    --focus: #a0dfb8;
    --glass: rgba(24,43,33,.96);
    --surface: #213d2e;
    --surface-soft: #294936;
    --surface-hover: #345940;
    --surface-subtle: rgba(24,43,33,.85);
    --surface-selected: #30583f;
    --line-hover: #7fa58c;
    --selected-ink: #d9fbe5;
    --notice-surface: #294936;
    --notice-line: #496b58;
    --page-glow: #244b35;
    --page-start: #12251b;
    --page-end: #0d1b14;
}

:root[data-theme="lavender"], .theme-preview[data-theme="lavender"] {
    --ink: #332b43;
    --muted: #665775;
    --line: #b7a7c8;
    --blue: #6b4094;
    --primary: #754b9c;
    --primary-hover: #5e387f;
    --focus: #754b9c;
    --glass: rgba(255,252,255,.94);
    --surface: #fffcff;
    --surface-soft: #eee5f5;
    --surface-hover: #e9ddf3;
    --surface-subtle: rgba(255,252,255,.8);
    --surface-selected: #e3d4ef;
    --line-hover: #8d70a7;
    --selected-ink: #57317a;
    --notice-surface: #eee5f5;
    --notice-line: #b7a7c8;
    --page-glow: #e8d8f5;
    --page-start: #f3edf8;
    --page-end: #eae2f1;
}

:root[data-theme="sand"], .theme-preview[data-theme="sand"] {
    --ink: #3c3025;
    --muted: #6c5c4b;
    --line: #bdad95;
    --blue: #855425;
    --primary: #8a5b2d;
    --primary-hover: #704722;
    --focus: #8a5b2d;
    --glass: rgba(255,252,245,.94);
    --surface: #fffcf5;
    --surface-soft: #eee5d6;
    --surface-hover: #eee0c9;
    --surface-subtle: rgba(255,252,245,.8);
    --surface-selected: #e9d8bc;
    --line-hover: #9d805a;
    --selected-ink: #70451e;
    --notice-surface: #f3e9d8;
    --notice-line: #bdad95;
    --page-glow: #f2dfbd;
    --page-start: #f7f1e5;
    --page-end: #eee5d5;
}

:root[data-theme="prism"], .theme-preview[data-theme="prism"] {
    --ink: #302346;
    --muted: #615170;
    --line: #b7a1cf;
    --blue: #005e65;
    --primary: #713ac2;
    --primary-hover: #59269f;
    --focus: #713ac2;
    --glass: rgba(255,253,255,.92);
    --surface: #fffdff;
    --surface-soft: #eee4fa;
    --surface-hover: #d9f4f1;
    --surface-subtle: rgba(255,253,255,.8);
    --surface-selected: #f9ddec;
    --line-hover: #ad5388;
    --selected-ink: #852653;
    --notice-surface: #ddf5f0;
    --notice-line: #77b6ab;
    --page-glow: #f7d5ee;
    --page-start: #d7f3f5;
    --page-end: #fff0d4;
}

:root[data-theme="prism"] body {
    background:
        radial-gradient(ellipse at top left, #f3c4e9 0%, transparent 48%),
        radial-gradient(ellipse at top right, #bcefeb 0%, transparent 48%),
        radial-gradient(ellipse at bottom left, #d6ccfa 0%, transparent 50%),
        linear-gradient(135deg, #e9edff, #fff0d4);
    background-attachment: fixed;
}

:root[data-theme="prism"] .primary {
    background: linear-gradient(115deg, var(--primary), #b52872);
}

:root[data-theme="prism"] .primary:hover {
    background: linear-gradient(115deg, var(--primary-hover), #93205c);
}

.theme-preview[data-theme="prism"] {
    background: linear-gradient(135deg, #f3b2dc, #d2c3fa 35%, #a5e4df 65%, #ffe2a3);
}

* { box-sizing:border-box; }
html,body { min-height:100%; margin:0; }
html { font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,sans-serif; font-size:14px; color:var(--ink); }
body { background:radial-gradient(circle at top left,var(--page-glow) 0%,transparent 42%),linear-gradient(135deg,var(--page-start) 0%,var(--page-end) 75%); background-attachment:fixed; line-height:1.5; }

:root[data-theme="light"] body {
    background-image:
        radial-gradient(ellipse at top left, var(--page-glow) 0%, transparent 80%),
        linear-gradient(135deg, var(--page-start) 0%, var(--page-end) 100%);
}

a { color:var(--blue); text-decoration:none; } a:hover { text-decoration:underline; }
h1,h2,h3,p { margin-top:0; } h1 { font-size:32px; letter-spacing:-.035em; font-weight:650; margin-bottom:0; } h2 { font-size:19px; font-weight:600; } h3 { font-size:15px; font-weight:650; }
button,.button { display:inline-flex; gap:6px; align-items:center; justify-content:center; border:1px solid var(--line); background:var(--surface); border-radius:8px; padding:9px 14px; font:inherit; font-size:13px; font-weight:550; color:var(--ink); cursor:pointer; line-height:1.35; text-decoration:none; }
button:hover,.button:hover { background:var(--surface-hover); text-decoration:none; border-color:var(--line-hover); } button:disabled { opacity:.5; cursor:default; }
.primary { background:var(--primary); border-color:var(--primary); color:white; } .primary:hover { background:var(--primary-hover); border-color:var(--primary-hover); color:white; }
.plain { background:none; border:0; padding:4px; } .danger { color:var(--danger-ink); } .small { font-size:12px; } .muted { color:var(--muted); } .overdue { color:var(--danger-ink); }
input,select,textarea { font:inherit; color:var(--ink); border:1px solid var(--line); background:var(--surface); border-radius:7px; padding:9px 11px; max-width:100%; }
input:not([type=checkbox]):not([type=file]),textarea { width:100%; } textarea { resize:vertical; } input[type=checkbox] { accent-color:var(--primary); }
input::placeholder,textarea::placeholder { color:var(--muted); opacity:1; }
input:focus,textarea:focus,select:focus,button:focus-visible,a:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }
label:not(.check):not(.project-choice):not(.sr-only) { display:flex; flex-direction:column; gap:6px; font-size:13px; font-weight:550; margin-bottom:16px; }
label.check { display:flex; gap:7px; align-items:center; font-size:12px; font-weight:400; }
fieldset { min-width:0; margin:0; } .panel { border:1px solid var(--line); border-radius:14px; background:var(--glass); backdrop-filter:blur(18px); padding:24px; margin-bottom:24px; }
.page-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:8px 0 12px; } .page-heading.compact { margin:0 0 20px; align-items:flex-start; } .page-heading.compact h2 { font-size:25px; max-width:75%; }
.eyebrow { font-size:10px; text-transform:uppercase; letter-spacing:.15em; color:var(--muted); font-weight:650; margin-bottom:6px; }
.toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-bottom:22px; font-size:12px; } .toolbar > .muted { margin-right:auto; } .toolbar select { font-size:12px; padding:7px; } .toolbar label { margin:0; }
.board-grid { display:grid; grid-template-columns:repeat(4,minmax(200px,1fr)); gap:14px; overflow-x:auto; padding-bottom:16px; min-height:62vh; align-items:start; }
.board-column { border:1px solid var(--line); border-radius:12px; padding:10px; background:var(--glass); backdrop-filter:blur(18px); min-height:160px; }
.column-heading { display:flex; align-items:center; justify-content:space-between; padding:2px 3px 10px; } .column-heading h2 { font-size:12px; text-transform:uppercase; letter-spacing:.04em; display:flex; align-items:center; gap:7px; margin:0; }
.count { font-size:11px; background:var(--surface-soft); color:var(--muted); padding:2px 7px; border-radius:5px; font-weight:500; }
.status-dot { width:6px; height:6px; border-radius:50%; background:#a4b1bc; } .status-dot.todo { background:#7aa4c9; } .status-dot.hold { background:#c4a267; } .status-dot.inprogress { background:#7398df; } .status-dot.done { background:#81ad97; }
.kind { font-size:9px; padding:2px 5px; border-radius:4px; background:var(--surface-soft); } .bug-card .kind { color:var(--danger-ink); background:var(--danger-surface); }
.ticket-title { display:block; color:var(--ink); font-size:14px; font-weight:550; line-height:1.45; margin-bottom:15px; overflow-wrap:anywhere; }
.drop-placeholder { border:1px dashed var(--line); border-radius:9px; padding:23px 10px; text-align:center; font-size:11px; color:var(--muted); }
.stack-list { max-width:1050px; display:flex; flex-direction:column; gap:6px; } .stack-row { display:flex; align-items:center; gap:12px; border:1px solid var(--line); border-radius:10px; background:var(--glass); padding:8px 12px; }
.stack-position { width:44px; text-align:center; flex-shrink:0; font-size:20px; color:var(--muted); }
.stack-position small {
    display: block;
    font-size: 9px;
    letter-spacing: .1em;
    color: var(--blue);
    text-shadow: 0 0 6px color-mix(in srgb, var(--blue) 65%, transparent);
}
.stack-content { flex:1; min-width:0; }
.empty-state { padding:60px 20px; text-align:center; border:1px dashed var(--line); border-radius:16px; color:var(--muted); margin-top:20px; } .empty-state h2 { color:var(--blue); font-weight:500; } .empty-symbol { font-size:38px; color:#9cb5c9; margin-bottom:15px; }
.table-wrap { overflow:auto; border:1px solid var(--line); border-radius:12px; background:var(--glass); } table { width:100%; border-collapse:collapse; white-space:nowrap; } th { font-size:11px; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; text-align:left; } td,th { padding:14px 17px; border-bottom:1px solid var(--line); } td { font-size:13px; } tbody tr:last-child td { border-bottom:0; } tbody tr:hover { background:var(--surface-hover); } .title-link { color:var(--ink); }
.badge { display:inline-block; padding:3px 7px; margin-left:5px; border-radius:5px; background:var(--surface-soft); color:var(--muted); font-size:11px; } .pagination { display:flex; align-items:center; justify-content:flex-end; gap:16px; margin-top:18px; font-size:12px; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 22px; } .form-grid .full { grid-column:1/-1; } .field-label { margin-top:16px; }
.actions { display:flex; gap:9px; margin-top:20px; } .ticket-detail-grid { display:grid; grid-template-columns:minmax(0,1fr) 260px; gap:24px; align-items:start; }
dl { margin:0 0 22px; } dt { font-size:11px; color:var(--muted); text-transform:uppercase; margin-bottom:4px; } dd { margin:0 0 16px; font-size:13px; overflow-wrap:anywhere; }
.markdown { overflow-wrap:anywhere; } .markdown img { max-width:100%; } .markdown pre { overflow:auto; padding:15px; border-radius:8px; background:var(--surface-soft); } .markdown code { font-size:12px; } .markdown blockquote { border-left:3px solid var(--line); padding-left:15px; color:var(--muted); } .markdown table { white-space:normal; }
hr { border:0; border-top:1px solid var(--line); margin:25px 0; } .attachment { display:flex; gap:14px; align-items:center; margin-bottom:12px; flex-wrap:wrap; font-size:12px; } .attachment .danger { margin-left:auto; }
.upload { margin-top:20px; padding:12px; border:1px dashed var(--line); border-radius:8px; color:var(--muted); } .upload input { font-size:12px; border:0; padding:0; background:none; }
.comment { padding:15px 0; border-bottom:1px solid var(--line); } .comment .markdown p:last-child { margin-bottom:6px; }
.notice { border:1px solid var(--notice-line); background:var(--notice-surface); border-radius:9px; padding:13px 16px; margin-bottom:18px; font-size:13px; } .notice button { margin-left:8px; } .notice.error { border-color:var(--danger-line); background:var(--danger-surface); color:var(--danger-ink); } .notice.success { border-color:var(--success-line); background:var(--success-surface); color:var(--success-ink); }
.settings-row { display:flex; align-items:center; gap:12px; justify-content:space-between; border-bottom:1px solid var(--line); padding:12px 0; } .settings-row:last-of-type { margin-bottom:18px; } .settings-row p { margin:5px 0 0; }
.public-shell { max-width:780px; margin:50px auto; padding:0 20px; } .brand { display:block; font-size:34px; font-weight:750; color:var(--ink); margin-bottom:30px; } .public-shell footer { color:var(--muted); font-size:11px; margin-top:35px; } .service-form h1 { margin-bottom:15px; } .service-form form { margin-top:30px; }
.honeypot { position:absolute; left:-10000px; } .sr-only { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); }
.editor-host { background:var(--surface); border-radius:8px; overflow:hidden; } .toastui-editor-defaultUI { border-color:var(--line) !important; border-radius:8px; } .toastui-editor-contents { font-family:inherit !important; }
#blazor-error-ui { display:none; position:fixed; bottom:0; width:100%; background:var(--warning-surface); padding:15px; z-index:1000; }
@media(max-width:1050px) { .ticket-detail-grid { grid-template-columns:1fr; } .ticket-facts dl { display:grid; grid-template-columns:1fr 2fr; gap:8px; } }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media(max-width:600px) { h1 { font-size:27px; } .panel { padding:18px; } .settings-grid,.form-grid { grid-template-columns:1fr; } .page-heading { align-items:flex-start; } .stack-row { gap:8px; padding:12px; } .stack-position { width:28px; } .ticket-detail-grid { gap:0; } .toolbar { gap:9px; } .toolbar > .muted { width:100%; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none !important; scroll-behavior:auto !important; } }

h1:focus { outline:none; }

.public-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 30px;
}

.public-header .brand {
    margin-bottom: 0;
}

.theme-picker {
    display: inline-flex;
    flex-shrink: 0;
}

.theme-toggle {
    flex-shrink: 0;
    min-width: 40px;
    min-height: 40px;
    border-radius: 8px 0 0 8px;
}

.theme-menu-trigger {
    width: 34px;
    min-height: 40px;
    padding: 8px;
    border-radius: 0 8px 8px 0;
    margin-left: -1px;
}

.theme-picker button:focus-visible {
    position: relative;
    z-index: 1;
}

.theme-menu {
    position: fixed;
    inset: auto;
    margin: 0;
    padding: 8px;
    width: min(264px, calc(100vw - 24px));
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 12px 36px #0003;
}

.theme-menu-heading {
    margin: 4px 8px 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.theme-option {
    width: 100%;
    justify-content: flex-start;
    gap: 12px;
    padding: 9px 10px;
    border-color: transparent;
    text-align: left;
}

.theme-option[aria-pressed="true"] {
    color: var(--selected-ink);
    background: var(--surface-selected);
    border-color: var(--line-hover);
}

.theme-option-name {
    flex: 1;
}

.theme-option-name small {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--muted);
    text-transform: capitalize;
}

.theme-option-check {
    visibility: hidden;
}

.theme-option[aria-pressed="true"] .theme-option-check {
    visibility: visible;
}

.theme-preview {
    display: flex;
    align-items: flex-end;
    width: 36px;
    height: 32px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: linear-gradient(120deg, var(--page-glow) 40%, var(--surface) 40%);
}

.theme-preview span {
    width: 100%;
    height: 6px;
    border-radius: 2px;
    background: var(--blue);
}

.theme-toggle[aria-pressed="true"] {
    background: var(--surface-selected);
    border-color: var(--line-hover);
    color: var(--selected-ink);
}

@media (max-width: 600px) {
    .theme-toggle-label {
        display: none;
    }
}

.stack-row[draggable=true], .drag-grip { cursor:grab; }
.drag-grip { display:block; font-size:18px; line-height:1; color:var(--muted); user-select:none; }
.stack-row.dragging { opacity:.5; cursor:grabbing; }

.backlog-planning { display:flex; flex-direction:column; gap:26px; }
.planning-section { padding:18px; border:1px solid var(--line); border-radius:14px; background:var(--glass); min-width:0; }
.development-section { border-color:var(--line-hover); background:var(--surface-selected); }
.planning-section.accepting-drop { border-style:dashed; }
.planning-section .column-heading { padding-bottom:8px; }
.planning-hint { font-size:12px; margin-bottom:16px; }
.planning-list { display:flex; flex-direction:column; gap:4px; }
.planning-row { display:flex; align-items:center; gap:10px; padding:8px 10px; background:var(--surface); border:1px solid var(--line); border-radius:7px; }
.planning-row[draggable=true] { cursor:grab; }
.planning-row.dragging { opacity:.5; }
.planning-position { color:var(--muted); font-size:12px; min-width:18px; }
.planning-ticket { flex:1; min-width:0; }
.planning-main { display:grid; grid-template-columns:112px minmax(0,1fr) 28px 78px; gap:12px; align-items:center; }
.planning-main .ticket-key { font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.planning-main .ticket-title { margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.planning-title { display:flex; align-items:center; gap:8px; min-width:0; }
.planning-title .ticket-title { flex:1; min-width:0; }
.planning-due { flex-shrink:0; font-size:11px; color:var(--muted); white-space:nowrap; }
.planning-assignee { font-size:11px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.planning-status { margin:0; text-align:center; white-space:nowrap; }
.planning-title .kind { flex-shrink:0; }
.planning-milestone { max-width:30%; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; color:var(--muted); }
.planning-transfer { font-size:11px; padding:5px 8px; white-space:nowrap; }
.quick-ticket { min-width:0; }
.stack-quick-ticket { max-width:1050px; margin-top:12px; }
.quick-ticket-row { display:flex; align-items:center; gap:10px; padding:6px 10px; border:1px dashed var(--line); border-radius:7px; background:var(--surface-subtle); }
.quick-ticket-row:focus-within { border-style:solid; border-color:var(--focus); background:var(--surface); }
.quick-ticket-plus { color:var(--muted); font-size:20px; }
.quick-ticket-row input { flex:1; min-width:80px; border-color:transparent; background:transparent; padding:6px 2px; }
.quick-ticket-row select { max-width:180px; padding:5px 7px; font-size:12px; }
.quick-ticket-row button { padding:5px 10px; }
.quick-ticket-project { max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; color:var(--muted); }
.quick-ticket-feedback { margin:4px 10px 0; font-size:11px; white-space:normal; }
.board-column .quick-ticket { margin-top:10px; }
.board-column .quick-ticket-row { flex-wrap:wrap; gap:6px; }
.board-column .quick-ticket-row input { flex-basis:calc(100% - 24px); }
.board-column .quick-ticket-row select,.board-column .quick-ticket-project { flex:1; max-width:calc(100% - 50px); }
.board-column .quick-ticket-row button { margin-left:auto; }
.board-column .quick-ticket-row:not(:focus-within):has(input:placeholder-shown) :is(select,.quick-ticket-project) { display:none; }
.board-column .quick-ticket-row:not(:focus-within):has(input:placeholder-shown) input { flex-basis:0; }
tfoot td { padding:8px; }
@media(max-width:600px) {
    .planning-section { padding:12px; }
    .planning-row { gap:8px; flex-wrap:wrap; }
    .planning-ticket { flex-basis:calc(100% - 65px); }
    .planning-main { grid-template-columns:minmax(0,1fr) 28px 68px; gap:6px; }
    .planning-main .ticket-key { grid-column:1/-1; }
    .planning-main .ticket-title { font-size:12px; }
    .planning-assignee,.planning-status { font-size:10px; }
    .planning-transfer { margin-left:auto; }
    .quick-ticket-row { flex-wrap:wrap; gap:6px; }
    .quick-ticket-row input { flex-basis:calc(100% - 24px); }
    .quick-ticket-row select,.quick-ticket-project { flex:1; max-width:calc(100% - 50px); }
    .quick-ticket-row button { margin-left:auto; }
}

.ticket-detail-form { display:contents; }
.ticket-content { grid-column:1; margin-bottom:0; }
.ticket-content > label.full input { font-size:24px; font-weight:600; }
.ticket-heading { display:grid; grid-template-columns:minmax(0,1fr) 260px; column-gap:24px; }
.ticket-heading > div { min-width:0; flex:1; }
.ticket-heading > a { flex-shrink:0; justify-self:end; }
.ticket-heading .eyebrow { margin-bottom:0; }
.heading-ticket-key { margin-left:6px; white-space:nowrap; }
.inline-value { justify-content:flex-start; text-align:left; width:100%; padding:5px 7px; margin-left:-7px; border-color:transparent; background:transparent; font:inherit; line-height:inherit; }
.inline-value:hover:not(:disabled) { background:var(--surface-hover); border-color:var(--line); }
.inline-value:disabled { opacity:1; color:inherit; background:transparent; border-color:transparent; }
.inline-value .badge { margin-left:0; }
.ticket-title-block { margin-top:4px; }
.ticket-title-block h2 { font-size:32px; line-height:1.3; font-weight:650; letter-spacing:-.035em; margin-bottom:0; }
.ticket-title-block .inline-value,.ticket-title-input { width:100%; margin:0; padding:8px; font-size:32px; line-height:1.3; font-weight:650; letter-spacing:-.035em; overflow-wrap:anywhere; }
.ticket-fact { margin-bottom:16px; font-size:13px; }
.ticket-fact-label { display:block; font-size:11px; color:var(--muted); text-transform:uppercase; }
.description-preview { position:relative; border:1px solid transparent; border-radius:8px; padding:8px; margin:-8px; cursor:text; }
.description-preview:not(.read-only):hover,.description-preview:focus-within { background:var(--surface-hover); border-color:var(--line); }
.description-preview > p:last-child,.description-preview .markdown > :last-child { margin-bottom:0; }
.description-edit { float:right; margin:0 0 6px 10px; opacity:0; }
.description-preview:hover .description-edit,.description-preview:focus-within .description-edit { opacity:1; }
.description-preview.read-only { cursor:default; }
.ticket-detail-form > .ticket-facts { grid-column:2; grid-row:1 / span 2; }
.ticket-related { grid-column:1; min-width:0; }
.child-tickets { margin:0; }
.child-ticket-placeholder { justify-content:flex-start; width:100%; min-height:48px; padding:12px; border:1px dashed var(--line); color:var(--muted); background:transparent; font-weight:400; text-align:left; }
.upload input[type=file] { width:100%; min-width:0; border-radius:0; padding:3px; }
.upload input::file-selector-button { margin-right:10px; padding:6px 10px; border:1px solid var(--line); border-radius:5px; background:var(--surface); color:var(--ink); font:inherit; cursor:pointer; }
.existing-child-row { display:flex; align-items:flex-end; gap:10px; }
.existing-child-row label:not(.check):not(.project-choice):not(.sr-only) { flex:1; min-width:0; margin-bottom:0; }
.existing-child-row button { flex-shrink:0; }
@media(max-width:1050px) {
    .ticket-heading { display:flex; column-gap:16px; }
    .ticket-detail-form > .ticket-facts { grid-column:1; grid-row:auto; margin-bottom:0; }
}
@media(max-width:600px) {
    .ticket-detail-grid { gap:16px; }
    .ticket-heading { flex-wrap:wrap; }
    .ticket-heading > div { flex-basis:100%; }
    .ticket-title-block h2,.ticket-title-block .inline-value,.ticket-title-input { font-size:27px; }
    .existing-child-row { flex-wrap:wrap; }
    .existing-child-row label { flex-basis:100%; }
}

.epic-badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 2px 7px;
    border-left: 3px solid var(--epic-color);
    border-radius: 4px;
    background: color-mix(in srgb, var(--epic-color) 14%, var(--surface));
    color: var(--ink);
    font-size: 10px;
    font-weight: 500;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.epic-color-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 1px solid var(--line);
    border-radius: 50%;
    flex-shrink: 0;
}

.backlog-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.work-content { min-width: 0; }
.epic-sidebar { padding: 16px; }
.epic-sidebar h2 { margin-top: 0; }
.epic-sidebar p { font-size: 12px; }
.epic-sidebar-item { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; cursor: grab; }
.epic-sidebar-item.active { background: var(--surface-selected); border-color: var(--blue); }
.epic-sidebar-heading { display: flex; align-items: baseline; gap: 8px; }
.epic-sidebar-details { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; font-size: 12px; }
.epic-sidebar-details small { color: var(--muted); }
.epic-sidebar-item.accepting-drop { outline: 2px dashed var(--blue); border-radius: 6px; }
.epic-filter { display: block; width: 100%; text-align: left; margin-bottom: 5px; white-space: normal; }

.epic-filter small { display: block; grid-column: 1 / -1; color: var(--muted); overflow-wrap: anywhere; }
.epic-filter.active { background: var(--surface-selected); border-color: var(--blue); }
.epic-filter-summary { display: flex; align-items: center; gap: 12px; }
.epic-swimlane + .epic-swimlane { margin-top: 24px; }
.swimlane-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.swimlane-heading h2 { margin: 0; font-size: 16px; }
.swimlane-heading a { color: inherit; }
.with-swimlanes .board-grid { min-height: 0; align-items: stretch; }
.with-swimlanes .board-column { min-height: 160px; }
.planning-title .epic-badge { flex-shrink: 0; max-width: 160px; }

@media (max-width: 900px) {
    .backlog-layout { grid-template-columns: minmax(0, 1fr); }
    .epic-sidebar { max-height: 320px; overflow-y: auto; }
}

.epic-sidebar-title {
    display: block;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.board-column.drag-destination,
.planning-section.drag-destination {
    border-color: var(--blue);
    background: var(--surface-selected);
    box-shadow: inset 0 0 0 2px var(--blue);
}


.stack-row[data-reorder-id],
.planning-row[data-reorder-id],
.board-ticket,
.epic-sidebar-item,
.swimlane-heading {
    position: relative;
}

.stack-row[data-drop-position]::after,
.planning-row[data-drop-position]::after,
.board-ticket[data-drop-position]::after,
.epic-sidebar-item[data-drop-position]::after,
.swimlane-heading[data-drop-position]::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 2px;
    background: var(--blue);
    pointer-events: none;
    z-index: 2;
}

[data-drop-position="before"]::after { top: -4px; }
[data-drop-position="after"]::after { bottom: -4px; }
tr[data-drop-position="before"] > td { box-shadow: inset 0 3px var(--blue); }
tr[data-drop-position="after"] > td { box-shadow: inset 0 -3px var(--blue); }
.table-wrap tr[draggable="true"] { cursor: grab; }

.subtask-badge { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.epic-sidebar-item[role="button"] { cursor: pointer; }
.epic-sidebar-item:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.child-completed { width: 16px; height: 16px; flex-shrink: 0; margin: 0; accent-color: var(--blue); }

/* Ticket cards: project key, title, labels, then epic and type. */
.ticket-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 3px 8px #182c4010;
}

.ticket-card:hover { border-color: var(--line-hover); }
.card-heading { grid-column: 1 / -1; min-width: 0; }
.ticket-key { color: var(--muted); font-weight: 650; letter-spacing: .04em; }
.card-heading .ticket-key { display: block; margin-bottom: 2px; font-size: 10px; }
.ticket-card .ticket-title { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.35; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.card-foot { display: flex; align-items: center; justify-content: flex-end; gap: 9px; color: var(--muted); font-size: 11px; }
.card-foot > span { white-space: nowrap; }
.card-status { grid-column: 1 / -1; justify-self: start; min-width: 0; padding: 4px 6px; font-size: 11px; background: var(--surface-soft); }
.ticket-type { display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border-radius: 4px; background: var(--surface-soft); color: var(--muted); font-size: 10px; white-space: nowrap; }
.ticket-type-bug { color: var(--danger-ink); background: var(--danger-surface); }
.ticket-type-epic { color: #614600; background: #f8e6a0; }
.ticket-type .subtask-badge { color: inherit; }
.ticket-labels { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.board-ticket .card-meta > .ticket-labels { display: contents; }
.ticket-card > .ticket-labels { grid-column: 1 / -1; }
.ticket-label { display: inline-flex; align-items: center; min-height: 21px; max-width: 100%; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 650; overflow-wrap: anywhere; white-space: normal; }
.label-green { background: #baf3cd; color: #164b35; }
.label-yellow { background: #f8e6a0; color: #614600; }
.label-orange { background: #fed9b0; color: #713b09; }
.label-red { background: #ffd2cc; color: #792d26; }
.label-purple { background: #e5d5fa; color: #50317d; }
.label-blue { background: #c5e1ff; color: #194b7a; }

.stack-list { max-width: none; }
.stack-content .ticket-card {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "heading foot status" "meta foot status";
    gap: 6px 12px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.stack-content .card-heading { grid-area: heading; }
.stack-content .ticket-title { width: fit-content; max-width: 100%; }
.stack-content .ticket-title:hover { text-decoration: none; }
.stack-content .card-meta { grid-area: meta; }
.stack-content .card-foot { grid-area: foot; align-self: center; }
.stack-content .card-status { grid-area: status; align-self: center; justify-self: end; }
.planning-title .ticket-type { flex: 0 0 76px; padding-inline: 0; height: 22px; justify-content: center; }

.ticket-label-section { margin-bottom: 24px; }
.ticket-label-section > .ticket-labels { margin-bottom: 8px; }
.label-options { padding: 0; border: 0; }
.label-option { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0; }
.label-option .check { min-width: 0; }
.label-create { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }
.label-create > label { flex: 1; min-width: 100px; }
.label-editor .actions { margin-top: 4px; }

.ticket-actions { display: flex; gap: 8px; margin-bottom: 16px; }
.label-control { position: relative; z-index: 30; }
.label-popover { position: absolute; top: calc(100% + 8px); left: 0; z-index: 20; width: min(340px, calc(100vw - 88px)); max-height: 65vh; overflow: auto; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 10px 30px #0003; }
.label-popover-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.label-search { margin-bottom: 12px; }
.label-popover .label-option .check { flex: 1; }
.label-popover .label-option .ticket-label { flex: 1; min-height: 30px; align-items: center; }
.label-popover .label-create { gap: 8px; }
.label-popover .label-create > label { margin-bottom: 4px; }
.label-popover .actions { flex-wrap: wrap; }

.attachment-item { min-width: 0; margin-bottom: 16px; }
.attachment-item .attachment { margin-top: 8px; gap: 8px; }
.attachment-item .attachment a { overflow-wrap: anywhere; min-width: 0; }
.attachment-preview { border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); overflow: hidden; }
.attachment-preview summary { cursor: pointer; padding: 10px; list-style: none; }
.attachment-preview summary::-webkit-details-marker { display: none; }
.attachment-preview summary > img { display: block; width: 100%; height: 140px; object-fit: contain; margin-bottom: 8px; }
.attachment-preview pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 8px; font-size: 12px; }
.attachment-preview summary > pre, .attachment-preview summary > .markdown { max-height: 100px; overflow: hidden; }
.attachment-preview[open] summary > img, .attachment-preview[open] summary > pre, .attachment-preview[open] summary > .markdown { display: none; }
.attachment-expanded { padding: 10px; max-height: 65vh; overflow: auto; border-top: 1px solid var(--line); }
.attachment-expanded img { display: block; max-width: 100%; height: auto; margin: auto; }

.stack-layout, .stack-toolbar-layout { display: grid; grid-template-columns: minmax(0, 900px); gap: 24px; align-items: start; }
.stack-ticket-preview { display: none; }
.stack-ticket-preview { position: sticky; top: 24px; min-width: 0; max-height: calc(100vh - 48px); overflow: auto; padding: 22px; }
.preview-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: 12px; }
.stack-ticket-preview h2 { overflow-wrap: anywhere; margin-bottom: 12px; }
.stack-ticket-preview > .ticket-labels { margin-top: 12px; }
.preview-assignee { display: flex; align-items: center; gap: 8px; margin: 16px 0; font-size: 12px; }

@media (min-width: 1400px) {
    .stack-layout, .stack-toolbar-layout { grid-template-columns: minmax(0, 3fr) minmax(340px, 2fr); }
    .stack-ticket-preview { display: block; }
    .stack-row { cursor: pointer; }
    .stack-row .drag-grip { cursor: grab; }
    .stack-row.preview-selected { border-color: var(--blue); }
}

@media (max-width: 600px) {
    .stack-row { padding: 8px 10px; }
    .stack-content .ticket-card { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "heading heading" "meta meta" "foot status"; gap: 6px; }
    .stack-content .card-foot { justify-content: flex-start; }
}

.property-chip,
.property-chip-editor {
    max-width: 100%;
    min-height: var(--property-chip-height, 42px);
    padding: var(--property-chip-padding, 8px 12px);
    font-size: var(--property-chip-font-size, 14px);
    font-weight: 500;
    line-height: 20px;
}

.property-chip.ticket-type-bug {
    color: var(--danger-ink);
    background: var(--danger-surface);
}

.assignee-control {
    position: relative;
    max-width: 100%;
}

.assignee-control .property-chip-editor {
    position: absolute;
    inset: 0;
    width: 100%;
    min-width: 0;
    height: 100%;
}

.assignee-control .property-chip-editor[size]:not([size="0"]):not([size="1"]) {
    inset: 100% auto auto 0;
    height: auto;
    min-width: 100%;
    z-index: 10;
}

.property-chip {
    background: var(--surface-soft);
    border-color: transparent;
    gap: 8px;
}

.property-chip-editor {
    width: auto;
    min-width: 140px;
    background: var(--surface);
}

.property-chip-value {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assignee-control .property-chip .user-avatar {
    width: var(--property-chip-avatar-size, 24px);
    height: var(--property-chip-avatar-size, 24px);
    font-size: 11px;
}

/* Milestone planning */
.completed-milestones > summary { cursor:pointer; padding:12px 0; font-weight:600; color:var(--muted); }
.completed-milestones[open] > summary { margin-bottom:14px; }
.milestone-section { display:flex; flex-direction:column; gap:16px; }
.milestone-assignment { display:flex; flex-direction:column; gap:16px; }
.milestone-summary { display:flex; flex-direction:column; gap:12px; }
.milestone-meta, .milestone-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.milestone-progress { display:flex; align-items:center; flex-wrap:wrap; gap:12px; font-size:13px; }
.milestone-progress progress { flex:1; min-width:140px; height:12px; accent-color:var(--primary, #407da8); }
.milestone-excerpt { margin:0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.milestone-effort { white-space:nowrap; font-size:12px; color:var(--muted); }
.milestone-editor { margin-bottom:24px; }
.milestone-editor fieldset { border:0; padding:0; min-width:0; display:grid; gap:12px; }
.milestone-editor fieldset fieldset { border:1px solid var(--line); border-radius:8px; padding:12px; }
.milestone-editor > form { max-width:760px; }
.milestone-toolbar { flex-wrap:wrap; }
@media (max-width: 850px) {
    .milestone-progress progress { flex-basis:100%; }
}

.milestone-meta .property-chip { min-height:0; padding:5px 9px; border-radius:6px; font-size:12px; }
.milestone-progress progress { appearance:none; border:0; border-radius:8px; overflow:hidden; background:var(--line); }
.milestone-progress progress::-webkit-progress-bar { background:var(--line); border-radius:8px; }
.milestone-progress progress::-webkit-progress-value { background:var(--primary, #407da8); border-radius:8px; }
.milestone-progress progress::-moz-progress-bar { background:var(--primary, #407da8); border-radius:8px; }
.milestone-excerpt .markdown > :first-child { margin-top:0; }
.milestone-excerpt .markdown > :last-child { margin-bottom:0; }
.milestones-planning > [data-milestone="unscoped"] > .quick-ticket { margin-bottom:12px; }

.milestone-summary .column-heading h2 { font-size:20px; line-height:1.3; text-transform:none; letter-spacing:-.02em; }
.milestone-summary .column-heading h2 a { color:inherit; overflow-wrap:anywhere; }
.milestone-card-heading { align-items:flex-start; gap:12px; }
.milestone-card-heading h2 { flex:1; min-width:0; }
.milestone-totals { display:flex; align-items:center; justify-content:flex-end; flex-shrink:0; margin-left:auto; gap:12px; font-size:13px; color:var(--muted); }
.milestone-sidebar { padding:16px; }
.milestone-sidebar h2 { margin-top:0; }
.milestone-visibility-choice { align-items:flex-start; padding:8px 0; }
.milestone-visibility-choice input { flex-shrink:0; margin-top:3px; }
.milestone-visibility-choice span { min-width:0; overflow-wrap:anywhere; }
.milestone-ticket-row .planning-title .ticket-title { text-decoration:none; }
@media (max-width:900px) {
    .milestone-sidebar { margin-bottom:0; }
}
