#sheet-frame-list , #drawing-style-list, #custom-format-list { display: grid; gap: 8px; margin: 8px 0 14px; }
#detail-style-picker { color-scheme: dark; box-sizing: border-box; width: min(1480px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; overflow: hidden; border: 1px solid #414e59; border-radius: 6px; color: #edf1f5; background: #1b2329; box-shadow: 0 24px 80px #0007; }
#detail-style-picker::backdrop { background: #0c1116bd; backdrop-filter: blur(4px); }
#detail-style-picker [hidden] { display: none !important; }
#detail-style-picker button { cursor: pointer; font: inherit; margin: 0; box-shadow: none; text-transform: none; letter-spacing: normal; }
#detail-style-picker button:disabled { cursor: wait; opacity: .5; }
#detail-style-picker :focus-visible { outline: 2px solid #69b4ff; outline-offset: 3px; }
#detail-style-picker h2:focus { outline: none; }
.detail-style-browser { display: flex; flex-direction: column; max-height: calc(100dvh - 34px); }
.detail-style-header { display: flex; flex-shrink: 0; justify-content: space-between; gap: 20px; padding: 22px 24px 20px; border-bottom: 1px solid #414e59; }
#detail-style-picker .detail-style-kicker { margin: 0 0 8px; color: #a7b5c7; font-size: 11px; font-weight: 700; letter-spacing: .22em; }
#detail-style-picker h2 { color: inherit; margin: 0 0 6px; font-size: clamp(24px, 2.2vw, 32px); font-weight: 650; line-height: 1.2; letter-spacing: -.02em; }
#detail-style-picker p { text-align: left; width: auto; max-width: none; line-height: 1.5; }
#detail-style-picker [data-description] { color: #acbac9; margin: 0; font-size: 16px; }
#detail-style-picker .detail-style-close { display: grid; place-items: center; align-self: flex-start; box-sizing: border-box; width: 32px; height: 32px; min-height: 32px; flex-shrink: 0; padding: 0; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #98a8ba; line-height: 1; }
#detail-style-picker .detail-style-close:hover { background: #28333d; color: #edf1f5; }
#detail-style-picker .detail-style-close svg { display: block; width: 18px; height: 18px; }
.detail-style-rows { overflow-y: auto; padding: 0 24px; min-height: 0; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #53616e #1b2329; }
.detail-style-row { padding: 20px 0 24px; border-bottom: 1px solid #35414b; }
.detail-style-row:last-child { border: 0; }
.detail-style-row-header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
#detail-style-picker .detail-style-row h3 { color: inherit; margin: 0; font-size: 20px; font-weight: 600; line-height: 1.3; }
#detail-style-picker .detail-style-available { flex-shrink: 0; margin: 0; color: #acbac9; font-size: 14px; }
.detail-style-options { display: flex; gap: 14px; overflow-x: auto; padding: 4px; margin: -4px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #53616e transparent; }
.detail-style-card { box-sizing: border-box; flex: 0 0 calc((100% - 42px) / 4); min-width: 235px; overflow: hidden; border: 1px solid #52616e; border-radius: 8px; background: #20282f; scroll-snap-align: start; }
.detail-style-card:hover { border-color: #8799aa; }
.detail-style-card:has(input:checked) { border-color: #3498ff; box-shadow: 0 0 0 1px #3498ff; }
#detail-style-picker .detail-style-preview { position: relative; display: block; padding: 0; border: 0; border-radius: 0; width: 100%; background: #212830; }
#detail-style-picker .detail-style-preview:focus-visible { outline-offset: -3px; }
#detail-style-picker .detail-style-preview img { display: block; width: 100%; height: auto; aspect-ratio: 6 / 5; object-fit: contain; }
.detail-style-zoom { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 28px; height: 28px; box-sizing: border-box; color: #afbdca; background: #1b2329e8; border: 1px solid #3e4c58; border-radius: 4px; pointer-events: none; }
.detail-style-preview:hover .detail-style-zoom, .detail-style-preview:focus-visible .detail-style-zoom { color: #edf1f5; border-color: #8799aa; }
#detail-style-picker .detail-style-choice { display: flex; align-items: center; gap: 14px; min-height: 54px; padding: 12px 18px; margin: 0; box-sizing: border-box; border-top: 1px solid #3a4651; cursor: pointer; font-size: 14px; font-weight: 600; line-height: 1.4; color: #edf1f5; text-transform: none; letter-spacing: normal; }
#detail-style-picker .detail-style-choice > span:not(.detail-style-selected) { min-width: 0; overflow-wrap: anywhere; }
#detail-style-picker .detail-style-choice input { appearance: none; display: grid; place-items: center; box-sizing: border-box; flex: 0 0 20px; width: 20px; height: 20px; margin: 0; padding: 0; border: 1.5px solid #8b9bab; border-radius: 50%; background: transparent; cursor: pointer; }
#detail-style-picker .detail-style-choice input::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: #edf1f5; transform: scale(0); }
#detail-style-picker .detail-style-choice input:checked { border-color: #3498ff; }
#detail-style-picker .detail-style-choice input:checked::after { transform: scale(1); }
#detail-style-picker .detail-style-choice:has(input:disabled) { cursor: wait; opacity: .6; }
#detail-style-picker .detail-style-choice input:disabled { cursor: wait; }
.detail-style-selected { visibility: hidden; margin-left: auto; color: #49a4ff; font-size: 12px; font-weight: 400; }
.detail-style-card:has(input:checked) .detail-style-selected { visibility: visible; }
.detail-style-footer { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 24px; border-top: 1px solid #35414b; background: #1b2329; }
#detail-style-picker .detail-style-footer p { margin: 0; font-size: 13px; color: #acbac9; }
#detail-style-picker .detail-style-footer [data-note] { margin-top: 2px; font-size: 12px; }
#detail-style-picker [data-status]:empty { display: none; }
#detail-style-picker [data-status][data-error="true"] { color: #ffadb5; margin-top: 5px; }
.detail-style-actions { display: flex; flex-wrap: wrap; gap: 14px; flex-shrink: 0; }
#detail-style-picker .detail-style-actions button, #detail-style-picker .detail-style-enlarged button { width: auto; min-height: 40px; border: 1px solid #52616e; border-radius: 5px; background: transparent; color: #c5d0dc; padding: 10px 24px; font-size: 13px; font-weight: 500; white-space: nowrap; }
#detail-style-picker .detail-style-actions button:hover, #detail-style-picker .detail-style-enlarged button:hover { background: #28333d; border-color: #8799aa; }
#detail-style-picker .detail-style-actions [data-save] { background: #2378d4; color: #fff; border-color: #2d84e0; font-weight: 600; }
#detail-style-picker .detail-style-actions [data-save]:hover { background: #2c88eb; border-color: #3498ff; }
.detail-style-enlarged { display: flex; flex-direction: column; height: calc(100dvh - 36px); }
.detail-style-enlarged header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; border-bottom: 1px solid #414e59; }
.detail-style-enlarged h3 { margin: 0; color: inherit; font-size: 16px; }
#detail-style-picker .detail-style-enlarged button { width: auto; flex-shrink: 0; }
.detail-style-image-scroll { flex: 1; min-height: 0; overflow: auto; display: grid; place-items: center; background: #212830; padding: 16px; }
.detail-style-image-scroll img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
@media (min-width: 701px) and (max-width: 1100px) {
    .detail-style-card { flex-basis: calc((100% - 14px) / 2); }
}
@media (max-width: 700px) {
    #detail-style-picker { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
    .detail-style-browser { max-height: calc(100dvh - 18px); }
    .detail-style-header { padding: 18px 16px; gap: 12px; }
    #detail-style-picker [data-description] { font-size: 14px; }
    .detail-style-rows { padding: 0 16px; }
    .detail-style-row-header { flex-wrap: wrap; gap: 4px 12px; }
    #detail-style-picker .detail-style-row h3 { font-size: 18px; }
    #detail-style-picker .detail-style-available { font-size: 12px; }
    .detail-style-card { flex-basis: 86%; min-width: 240px; }
    #detail-style-picker .detail-style-choice { padding: 12px; gap: 10px; }
    .detail-style-footer { flex-direction: column; align-items: stretch; padding: 12px 16px; gap: 12px; }
    .detail-style-actions { justify-content: flex-end; }
    #detail-style-picker .detail-style-actions button { padding: 10px 16px; }
    .detail-style-enlarged { height: calc(100dvh - 20px); }
    .detail-style-enlarged header { flex-wrap: wrap; padding: 16px; }
}
#sidebar .sheet-frame-option { display: grid; grid-template-columns: 15px 66px minmax(0, 1fr); align-items: center; gap: 10px; padding: 12px 9px; border: 1px solid var(--sidebar-button-border, #526272); border-radius: 9px; cursor: pointer; text-transform: none; text-align: left; letter-spacing: normal; }
#sidebar .sheet-frame-option:has(input:checked) { border-color: #4395d5; background: #4395d514; }
#sidebar .sheet-frame-option:has(input:focus-visible) { outline: 2px solid #4395d5; outline-offset: 2px; }
#sidebar .sheet-frame-option:has(input:disabled) { opacity: .6; cursor: wait; }
#sidebar .sheet-frame-option input { width: 15px; min-width: 15px; height: 15px; margin: 0; accent-color: #4395d5; }
.sheet-frame-option svg { width: 66px; height: 47px; background: #fbfcfd; border-radius: 2px; fill: none; stroke: #495b6b; stroke-width: 1; }
.sheet-frame-option strong, .sheet-frame-option small { display: block; line-height: 1.4; overflow-wrap: anywhere; }
.sheet-frame-option strong { font-size: 12px; }
.sheet-frame-option small { font-size: 10px; font-weight: 400; opacity: .78; margin-top: 3px; }
.sheet-frame-option .sheet-frame-badge { color: #409adc; opacity: 1; font-weight: 600; }
#sheet-frame-add-menu , #drawing-style-add-menu, #custom-format-add-menu { border-top: 1px solid var(--sidebar-button-border, #526272); padding-top: 12px; }
#sheet-frame-add-title , #drawing-style-add-title, #custom-format-add-title { cursor: pointer; font-size: 12px; font-weight: 600; }
#sheet-frame-form , #drawing-style-form, #custom-format-form { display: grid; gap: 10px; margin-top: 14px; }
#sheet-frame-code , #drawing-style-code, #custom-format-code { width: 100%; box-sizing: border-box; min-height: 39px; font: 600 18px monospace; letter-spacing: .24em; text-align: center; text-transform: uppercase; }
#sheet-frame-status , #drawing-style-status, #custom-format-status { margin: 12px 0 0; }
#sheet-frame-status:empty , #drawing-style-status:empty, #custom-format-status:empty { display: none; }
#sheet-frame-status[data-error="true"] , #drawing-style-status[data-error="true"], #custom-format-status[data-error="true"] { color: #eb7777; }
#sheet-frame-retry[hidden] , #drawing-style-retry[hidden], #custom-format-retry[hidden] { display: none !important; }
#drawing-style-survey[data-step="beam-sections"] { width: min(1260px, calc(100vw - 48px)); padding: clamp(20px, 2.5vw, 32px); }
#drawing-style-survey[data-step="beam-sections"] .style-survey-heading { margin-bottom: 20px; }
#drawing-style-survey h1:focus { outline: none; }
#drawing-style-survey [data-survey-options="beam-sections"] img { height: clamp(150px, calc(100dvh - 370px), 470px); aspect-ratio: auto; }
#drawing-style-survey[data-step="beam-sections"] .style-survey-footer { margin-top: 16px; }
#drawing-style-survey[data-step="beam-sections"] #drawing-style-survey-status:empty { min-height: 0; margin: 0; }
@media (max-width: 760px) {
    #drawing-style-survey[data-step="beam-sections"] { width: calc(100vw - 24px); padding: 20px 16px; }
    #drawing-style-survey [data-survey-options="beam-sections"] img { height: auto; aspect-ratio: 4 / 3; }
}
