.trace-page{min-height:calc(100vh - var(--header-height) - 54px);padding:34px 24px 64px;background:linear-gradient(180deg,#fff7f9 0%,#fff 100%)}
.trace-page__inner{width:min(1500px,100%);margin:0 auto}
.trace-header{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;margin-bottom:22px}.trace-eyebrow{margin:0 0 4px;color:#9f1239;font-size:12px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.trace-header h1{margin:0;font-size:30px;letter-spacing:-.03em}.trace-lead{margin:7px 0 0;color:var(--muted);font-size:14px}.trace-header__actions,.trace-toolbar-actions,.trace-canvas-tools{display:flex;gap:8px;align-items:center}.trace-button,.trace-small-button,.trace-icon-button{border:1px solid var(--border);background:#fff;color:var(--text);border-radius:9px;cursor:pointer;font-weight:700}.trace-button{padding:10px 14px}.trace-button--primary{background:var(--primary);border-color:var(--primary);color:#fff}.trace-button--secondary:hover,.trace-small-button:hover{background:#fff1f2}.trace-button--ghost{background:transparent}.trace-files-card,.trace-settings,.trace-workspace,.trace-details,.trace-bottom-toolbar,.trace-guide{background:#fff;border:1px solid var(--border);box-shadow:0 12px 28px rgba(159,18,57,.055)}.trace-files-card{border-radius:14px;padding:16px;margin-bottom:14px}.trace-files-card__toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:13px}.trace-muted{color:var(--muted);font-size:12px}.trace-files-card__toolbar .trace-muted{margin-left:8px}.trace-drop-zone{min-height:92px;border:1.5px dashed #e8b6c3;border-radius:12px;background:#fff9fa;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:#5a2334;cursor:pointer}.trace-drop-zone:hover,.trace-drop-zone.is-dragover{background:#fff1f2;border-color:#9f1239}.trace-drop-zone span{font-size:12px;color:var(--muted)}.trace-drop-zone__icon{font-size:25px!important;color:#9f1239!important}.trace-file-list{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}.trace-file-chip{display:inline-flex;align-items:center;gap:8px;padding:6px 9px;border:1px solid var(--border);border-radius:999px;background:#fffafb;font-size:12px}.trace-file-chip__name{max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trace-file-chip select{padding:4px 7px;border:1px solid #ead2d9;border-radius:7px;background:#fff;color:#5a2334;font-size:11px}.trace-file-chip button{border:0;background:transparent;color:#9f1239;cursor:pointer;font-weight:800;padding:0}.trace-settings{border-radius:14px;padding:18px;margin-bottom:14px}.trace-settings__header{display:flex;justify-content:space-between;gap:16px}.trace-settings__header strong{font-size:16px}.trace-settings__header p{margin:4px 0 0;color:var(--muted);font-size:12px}.trace-icon-button{width:32px;height:32px;font-size:21px;line-height:1}.trace-settings__grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:16px}.trace-field{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:700}.trace-field input,.trace-field select{width:100%;padding:9px 10px;border:1px solid #e6cbd3;border-radius:8px;background:#fff;color:var(--text);outline:none}.trace-field input:focus,.trace-field select:focus{border-color:#9f1239;box-shadow:0 0 0 3px rgba(159,18,57,.08)}.trace-field small{font-weight:400;color:var(--muted)}.trace-settings__footer{display:flex;justify-content:flex-end;margin-top:16px}.trace-workspace{display:grid;grid-template-columns:235px minmax(0,1fr);min-height:570px;border-radius:14px;overflow:hidden}.trace-lanes{min-width:0;border-right:1px solid var(--border);background:#fffafb}.trace-lanes__header{height:48px;padding:15px 14px;border-bottom:1px solid var(--border);font-size:12px;font-weight:800}.trace-lanes__body{padding:8px 0}.trace-lane-group__title{padding:8px 14px 5px;color:#7c5b66;font-size:11px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.trace-lane{display:flex;align-items:center;gap:8px;min-height:32px;padding:5px 10px 5px 18px;font-size:12px}.trace-lane input{accent-color:#9f1239}.trace-lane__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trace-canvas-panel{min-width:0;position:relative;display:flex;flex-direction:column}.trace-canvas-toolbar{height:48px;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:0 12px;border-bottom:1px solid var(--border);background:#fff;z-index:2}.trace-time-summary{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.trace-small-button{padding:6px 9px;font-size:11px}.trace-canvas-scroll{position:relative;overflow:auto;flex:1;min-height:520px;background:#fff}.trace-canvas-inner{position:relative;min-width:100%;min-height:100%}.trace-canvas-inner canvas{display:block}.trace-empty{position:absolute;inset:49px 0 0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;background:rgba(255,255,255,.92);color:var(--text);pointer-events:none}.trace-empty span{color:var(--muted);font-size:12px}.trace-details{margin-top:14px;border-radius:12px;overflow:hidden}.trace-details__header{padding:11px 14px;border-bottom:1px solid var(--border);font-size:12px;font-weight:800;background:#fffafb}.trace-details__body{padding:13px 14px;min-height:65px;font-size:12px}.trace-detail-grid{display:grid;grid-template-columns:100px 1fr;gap:7px 14px}.trace-detail-grid dt{color:var(--muted)}.trace-detail-grid dd{margin:0;word-break:break-word}.trace-bottom-toolbar{display:flex;align-items:center;gap:10px;padding:10px;margin-top:14px;border-radius:12px}.trace-search{display:flex;align-items:center;gap:6px;flex:1}.trace-search input{width:min(380px,100%);padding:8px 10px;border:1px solid #e6cbd3;border-radius:8px;outline:none}.trace-search input:focus{border-color:#9f1239}.trace-measurement{font-size:12px;font-weight:800;color:#5a2334;margin-left:auto}.trace-guide{margin-top:28px;border-radius:12px;padding:22px}.trace-guide h2{margin:0 0 8px;font-size:17px}.trace-guide p{margin:0;color:var(--muted);font-size:13px;line-height:1.8}.is-hidden{display:none!important}
@media(max-width:900px){.trace-settings__grid{grid-template-columns:repeat(2,minmax(0,1fr))}.trace-workspace{grid-template-columns:190px minmax(0,1fr)}}
@media(max-width:700px){.trace-page{padding:22px 12px 45px}.trace-header{flex-direction:column}.trace-header__actions{width:100%}.trace-header__actions .trace-button{flex:1}.trace-files-card__toolbar{align-items:flex-start;flex-direction:column}.trace-toolbar-actions{width:100%}.trace-toolbar-actions .trace-button{flex:1}.trace-settings__grid{grid-template-columns:1fr}.trace-workspace{grid-template-columns:150px minmax(0,1fr);min-height:520px}.trace-bottom-toolbar{flex-wrap:wrap}.trace-measurement{width:100%;margin-left:0}.trace-search{width:100%}}


/* Trace Viewer専用ヘッダー／フッター */
.trace-site-body {
    --header-height: 64px;
}

.trace-site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 64px;
    background: rgba(255,255,255,.96);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--border);
}

.trace-site-header__inner {
    width: min(1500px, 100%);
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.trace-site-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #3b1020;
    text-decoration: none;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.035em;
}

.trace-site-brand__mark {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    letter-spacing: 0;
}

.trace-site-header__label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.trace-site-footer {
    border-top: 1px solid var(--border);
    background: #fff;
    color: var(--muted);
    font-size: 11px;
}

.trace-site-footer__inner {
    width: min(1500px, 100%);
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

@media (max-width: 700px) {
    .trace-site-header__inner { padding: 0 14px; }
    .trace-site-header__label { display: none; }
    .trace-site-footer__inner { padding: 12px 14px; flex-direction: column; gap: 4px; }
}


/* Trace Viewer v0.2 - fixed log format / legend */
.trace-log-format{display:flex;flex-wrap:wrap;align-items:center;gap:7px 10px;margin:0 0 12px;padding:11px 13px;border:1px solid #eed6dd;border-radius:10px;background:#fffafb;color:#5a2334;font-size:12px;line-height:1.55}
.trace-log-format strong{margin-right:4px;color:#3f1724}
.trace-log-format code{padding:3px 7px;border:1px solid #ead5db;border-radius:6px;background:#fff;color:#6d2339;font-family:Consolas,"SFMono-Regular",monospace;font-size:11px}
.trace-log-format span{flex-basis:100%;color:var(--muted)}
.trace-file-chip{padding:7px 10px}
.trace-file-chip select{display:none}
.trace-legend{display:flex;align-items:flex-start;gap:14px;margin:14px 0;padding:12px 14px;background:#fff;border:1px solid var(--border);border-radius:12px;box-shadow:0 8px 22px rgba(159,18,57,.04)}
.trace-legend__title{flex:0 0 auto;padding-top:1px;font-size:12px;font-weight:800;color:#3f1724}
.trace-legend__items{display:flex;flex-wrap:wrap;gap:10px 18px;align-items:center}
.trace-legend__item{display:inline-flex;align-items:center;gap:7px;color:#60434c;font-size:11px;white-space:nowrap}
.trace-legend__line{display:inline-block;width:28px;height:7px;border-radius:5px}
.trace-legend__dot{display:inline-block;width:10px;height:10px;border-radius:50%}
.trace-depth-1{background:#9f1239}.trace-depth-2{background:#2563eb}.trace-depth-3{background:#059669}.trace-depth-4{background:#d97706}.trace-depth-5{background:#7c3aed}
.trace-event-dot{background:#475569}.trace-orphan-start-dot{background:#dc2626}.trace-orphan-end-dot{background:#0891b2}
@media(max-width:900px){.trace-legend{display:block}.trace-legend__title{margin-bottom:9px}.trace-log-format code{flex-basis:100%;overflow:auto}}


/* Trace Viewer v0.2.1 - log format / legend copy */
.trace-section-title{font-size:15px;font-weight:800;line-height:1.4;color:#3f1724}
.trace-log-format{display:block;margin:0 0 12px;padding:12px 14px}
.trace-log-format__description{margin-top:6px;color:#60434c;font-size:12px;line-height:1.7}
.trace-legend{display:flex;align-items:flex-start;gap:16px}
.trace-legend__title{padding-top:0;min-width:42px}
.trace-legend__content{min-width:0;flex:1}
.trace-legend__description{margin-top:9px;color:#6f5960;font-size:11px;line-height:1.6}
@media(max-width:900px){.trace-legend{display:block}.trace-legend__title{margin-bottom:9px}}

/* Trace Viewer v0.2.2: timeline row alignment */
.trace-files-card .trace-legend{
    margin:10px 0 12px;
}
.trace-lanes__body{
    padding:0;
}
.trace-lane-group__title{
    box-sizing:border-box;
    height:38px;
    padding:0 14px;
    display:flex;
    align-items:center;
    border-bottom:1px solid #f2e4e8;
    background:#fff7f9;
    color:#6f3d4c;
    font-size:11px;
    font-weight:800;
}
.trace-lane{
    box-sizing:border-box;
    height:38px;
    min-height:38px;
    padding:0 10px 0 18px;
    border-bottom:1px solid #f2e4e8;
}

/* Trace Viewer v0.2.4: merged left header cell */
.trace-lanes__header{
    box-sizing:border-box;
    height:88px;
    padding:0 14px;
    display:flex;
    align-items:center;
    border-bottom:1px solid #f2e4e8;
}
.trace-lanes__body{
    padding:0;
}

/* Trace Viewer v0.2.4: merged left header cell */
.trace-lanes__header{
    box-sizing:border-box;
    height:88px;
    padding:0 14px;
    display:flex;
    align-items:center;
    border-bottom:1px solid #f2e4e8;
}
.trace-lanes__body{
    padding:0;
}

/* Trace Viewer v0.2.7: virtual horizontal timeline */
.trace-canvas-inner{
    position:relative;
    min-width:100%;
    min-height:100%;
}
.trace-canvas-inner canvas{
    position:sticky;
    left:0;
    display:block;
    z-index:1;
}

/* Trace Viewer v0.2.10: vertical workspace scrolling */
.trace-workspace{
    height:620px;
    min-height:0;
    overflow-y:auto;
    overflow-x:hidden;
    align-items:start;
}
.trace-canvas-panel{
    min-height:max-content;
}
.trace-canvas-scroll{
    overflow-x:auto;
    overflow-y:visible;
    min-height:520px;
    flex:none;
}
.trace-lanes{
    min-height:max-content;
}

/* 左の「ファイル／ラベル」は右側の操作行＋日時行に合わせて結合 */
.trace-lanes__header{
    box-sizing:border-box;
    height:88px;
    padding:0 14px;
    display:flex;
    align-items:center;
    border-bottom:1px solid #f2e4e8;
}
.trace-lanes__body{
    padding:0;
}

/* Trace Viewer v0.2.11: initial empty-state header alignment
   左の「ファイル／ラベル」セルは88px。
   ログ未読込時は右側もツールバーを88pxにして下罫線位置を一致させる。
   読込後は通常の48pxツールバー + 40px日時行に戻る。 */
.trace-workspace.is-empty-state .trace-canvas-toolbar{
    height:88px;
}
.trace-workspace.is-empty-state .trace-canvas-scroll{
    min-height:480px;
}

/* Trace Viewer v0.3.0: fixed top/bottom time rulers */
.trace-workspace{
    position:relative;
}
.trace-lanes__header{
    position:sticky;
    top:0;
    z-index:8;
    height:88px;
    background:#fffafb;
}
.trace-canvas-toolbar{
    position:sticky;
    top:0;
    z-index:8;
    background:#fff;
}
.trace-axis{
    position:sticky;
    z-index:7;
    height:40px;
    background:#fff;
    overflow:hidden;
    flex:none;
}
.trace-axis--top{
    top:48px;
}
.trace-axis--bottom{
    bottom:0;
    border-top:0;
}
.trace-axis__canvas{
    display:block;
    width:100%;
    height:40px;
}
.trace-canvas-scroll{
    min-height:440px;
}
.trace-workspace.is-empty-state .trace-canvas-toolbar{
    height:48px;
}
.trace-workspace.is-empty-state .trace-canvas-scroll{
    min-height:480px;
}

/* Trace Viewer v0.3.1: empty-state header rule alignment
   初期表示では48pxの操作行直下に罫線を出さず、
   その下の40px日時領域の下端（合計88px）だけに罫線を出す。 */
.trace-workspace.is-empty-state .trace-canvas-toolbar{
    height:48px;
    border-bottom:0;
}
.trace-workspace.is-empty-state .trace-axis--top{
    height:40px;
    border-bottom:1px solid #f2e4e8;
}

/* Trace Viewer v0.3.2: horizontal scrollbar below bottom time ruler */
.trace-canvas-scroll{
    overflow-x:hidden;
}
.trace-bottom-scroll{
    position:sticky;
    bottom:0;
    z-index:9;
    height:18px;
    overflow-x:auto;
    overflow-y:hidden;
    background:#fff;
    border-top:1px solid #f2e4e8;
}
.trace-bottom-scroll__inner{
    height:1px;
    min-width:100%;
}
.trace-axis--bottom{
    bottom:18px;
}


/* Trace Viewer v0.3.8: print layout alignment / borders */


/* Trace Viewer v0.3.9: print exactly the currently visible trace viewport */


/* Trace Viewer v0.4.0: print a single image of the current viewport */


/* Trace Viewer v0.4.1: clean print implementation
   旧印刷CSSはすべて削除し、現在表示中の合成画像だけを印刷する。 */
.trace-print-image-wrap{
    display:none;
}

@media print{
    html,
    body{
        margin:0 !important;
        padding:0 !important;
        background:#fff !important;
    }

    body > *:not(.trace-print-image-wrap){
        display:none !important;
    }

    .trace-print-image-wrap{
        display:block !important;
        width:100% !important;
        margin:0 !important;
        padding:0 !important;
        background:#fff !important;
    }

    .trace-print-image{
        display:block !important;
        width:100% !important;
        height:auto !important;
        max-width:100% !important;
        object-fit:contain !important;
        margin:0 auto !important;
        break-inside:avoid !important;
        page-break-inside:avoid !important;
        -webkit-print-color-adjust:exact !important;
        print-color-adjust:exact !important;
    }
}

/* Trace Viewer version display */
.trace-title-row{
    display:flex;
    align-items:baseline;
    gap:10px;
    flex-wrap:wrap;
}
.trace-title-row h1{
    margin:0;
}
.trace-version{
    color:#7c5b66;
    font-size:12px;
    font-weight:700;
    letter-spacing:.02em;
}

/* Trace Viewer v0.4.6: file / label ordering controls */
.trace-file-chip{
    gap:6px;
}
.trace-order-buttons,
.trace-lane-order-buttons{
    display:inline-flex;
    align-items:center;
    gap:2px;
    flex:none;
}
.trace-order-button{
    width:22px;
    height:22px;
    padding:0 !important;
    border:1px solid #ead2d9 !important;
    border-radius:5px;
    background:#fff !important;
    color:#7c3349 !important;
    font-size:12px;
    font-weight:800;
    line-height:20px;
    text-align:center;
    cursor:pointer;
}
.trace-order-button:hover:not(:disabled){
    background:#fff1f2 !important;
    border-color:#d9a7b5 !important;
}
.trace-order-button:disabled{
    opacity:.28;
    cursor:default;
}
.trace-remove-button{
    margin-left:2px;
}
.trace-lane{
    display:flex;
    align-items:center;
}
.trace-lane__label{
    flex:1;
    min-width:0;
}
.trace-lane-order-buttons{
    margin-left:auto;
}
.trace-order-button--lane{
    width:21px;
    height:21px;
    font-size:11px;
    line-height:19px;
}

/* 印刷画像では操作ボタンは描画していないため、印刷レイアウトへの影響なし */

/* Trace Viewer v0.4.8: file ordering buttons in canvas-side file rows */
.trace-lane-group__title{
    display:flex;
    align-items:center;
    gap:8px;
}
.trace-file-row__name{
    flex:1;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.trace-file-row-order-buttons{
    display:inline-flex;
    align-items:center;
    gap:2px;
    margin-left:auto;
    flex:none;
}
.trace-order-button--file-row{
    width:21px;
    height:21px;
    font-size:11px;
    line-height:19px;
}

/* Trace Viewer v0.4.9: workspace vertical resize handle */
.trace-workspace-resizer{
    height:16px;
    margin-top:-1px;
    margin-bottom:14px;
    border:1px solid var(--border);
    border-top:0;
    border-radius:0 0 14px 14px;
    background:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:s-resize;
    user-select:none;
    touch-action:none;
}
.trace-workspace-resizer:hover,
.trace-workspace-resizer.is-resizing{
    background:#fff7f9;
}
.trace-workspace-resizer__grip{
    width:56px;
    height:4px;
    border-radius:999px;
    background:#d7b9c2;
}
.trace-workspace-resizer:hover .trace-workspace-resizer__grip,
.trace-workspace-resizer.is-resizing .trace-workspace-resizer__grip{
    background:#9f1239;
}

/* リサイズハンドルが外枠の続きに見えるよう、workspace下角はハンドル側に任せる */
.trace-workspace{
    border-radius:14px 14px 0 0;
}

@media print{
    .trace-workspace-resizer{
        display:none !important;
    }
}

/* Trace Viewer v0.5.0: restore horizontal scrolling after resize support */
.trace-canvas-scroll{
    overflow-x:auto !important;
    overflow-y:visible !important;
    scrollbar-width:none;          /* Firefox: native horizontal bar hidden */
    -ms-overflow-style:none;
}
.trace-canvas-scroll::-webkit-scrollbar{
    height:0;                      /* Chrome/Edge: native horizontal bar hidden */
    width:0;
}
.trace-bottom-scroll{
    display:block;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    touch-action:pan-x;
}

/* Trace Viewer v0.5.1: resize both larger and smaller */
.trace-workspace-resizer{
    cursor:ns-resize;
}


/* ========================================================
   Trace Viewer v0.5.5 - footer / information pages
======================================================== */
.trace-site-footer {
    margin-top: 22px;
    border-top: 1px solid var(--border);
    background: #fff;
    color: var(--muted);
    font-size: 13px;
}

.trace-site-footer__inner {
    width: min(1500px, 100%);
    margin: 0 auto;
    padding: 28px 24px 18px;
    display: block;
}

.trace-site-footer__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 24px;
    padding-bottom: 20px;
    text-align: center;
}

.trace-site-footer__nav a {
    color: #684955;
    text-decoration: none;
}

.trace-site-footer__nav a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.trace-site-footer__bottom {
    display: block;
    padding-top: 16px;
    border-top: 1px solid #f0e1e5;
    color: #8a737b;
    font-size: 11px;
    text-align: center;
}

.trace-info-page {
    background: #fffafb;
}

.trace-info-page .content-page__header,
.trace-info-page .content-page__body {
    width: min(960px, calc(100% - 0px));
}

.trace-info-page code {
    padding: 2px 5px;
    border-radius: 5px;
    background: #fff1f2;
    color: #7f1735;
    font-family: Consolas, "SFMono-Regular", monospace;
    font-size: .92em;
}

.trace-info-code {
    margin: 14px 0 16px;
    padding: 15px 17px;
    overflow-x: auto;
    border: 1px solid #ead5db;
    border-radius: 10px;
    background: #fffafb;
    color: #552536;
    font-family: Consolas, "SFMono-Regular", monospace;
    font-size: 13px;
    line-height: 1.8;
    white-space: nowrap;
}

.trace-info-actions {
    display: flex;
    justify-content: center;
    margin-top: 34px;
    padding-top: 28px;
    border-top: 1px solid #f2e1e6;
}

.trace-info-actions .trace-button {
    text-decoration: none;
}

.trace-button--primary {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.trace-button--primary:hover {
    background: #831331;
    color: #fff;
}

.trace-info-page .contact-form__submit {
    width: 100%;
}

@media (max-width: 760px) {
    .trace-site-footer__inner {
        padding: 24px 14px 16px;
    }

    .trace-site-footer__nav {
        justify-content: center;
        gap: 10px 18px;
    }
}

@media print {
    .trace-site-footer {
        display: none !important;
    }
}


/* Trace Viewer v0.5.6: cancel legacy footer flex layout */
.trace-site-footer__inner {
    display: block !important;
}

.trace-site-footer__nav,
.trace-site-footer__bottom {
    width: 100%;
}


/* ========================================================
   Trace Viewer v0.5.10 - common site header
======================================================== */
.trace-site-header {
    position: static;
    height: auto;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.trace-site-header__inner {
    width: min(1500px, 100%);
    min-height: 76px;
    height: auto;
    margin: 0 auto;
    padding: 16px 24px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.trace-site-header__main {
    min-width: 0;
}

.trace-site-header__title-row {
    display: flex;
    align-items: baseline;
    gap: 9px;
}

.trace-site-brand {
    display: inline-block;
    color: #3b1020;
    text-decoration: none;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.035em;
}

.trace-site-brand:hover {
    color: var(--primary);
}

.trace-site-header__subtitle {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.trace-site-header__actions {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trace-page {
    padding-top: 24px;
}

@media (max-width: 700px) {
    .trace-site-header__inner {
        min-height: 68px;
        padding: 13px 14px 12px;
        align-items: flex-start;
    }

    .trace-site-brand {
        font-size: 23px;
    }

    .trace-site-header__subtitle {
        font-size: 12px;
    }

    .trace-site-header__actions .trace-button {
        white-space: nowrap;
    }
}

@media print {
    .trace-site-header {
        display: none !important;
    }
}


/* ========================================================
   Trace Viewer v0.6.0 - language selector
======================================================== */
.trace-site-header__right {
    margin-left: auto;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.trace-site-header__right .language-menu {
    position: relative;
    top: auto;
    right: auto;
}

@media (max-width: 820px) {
    .trace-site-header__inner {
        position: relative;
        padding-right: 138px;
    }

    .trace-site-header__right {
        position: absolute;
        top: 13px;
        right: 14px;
        gap: 6px;
    }

    .trace-site-header__right .language-menu {
        position: relative;
        top: auto;
        right: auto;
    }

    .trace-site-header__actions .trace-button {
        padding-left: 9px;
        padding-right: 9px;
    }
}

@media (max-width: 560px) {
    .trace-site-header__inner {
        padding-right: 126px;
    }

    .trace-site-header__right {
        right: 10px;
    }

    .trace-site-header__right .language-menu__trigger {
        min-width: 104px;
    }

    .trace-site-header__actions {
        display: none;
    }
}
