/* 句子列沿用 greetings；預覽布局沿用 greeting-card。 */
.bw-tool, .bw-controls, .bw-preview { min-width: 0; }
.bw-tool [hidden] { display: none !important; }
.bw-jump { display: flex; flex-wrap: wrap; gap: 8px; }
.bw-jump .btn { white-space: normal; overflow-wrap: anywhere; }
.bw-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.bw-sentence { flex: 1; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.bw-row .pick-buttons { display: flex; flex-wrap: wrap; gap: 6px; flex: none; }
.bw-group, #bw-card { scroll-margin-top: 20px; }
.bw-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24px; align-items: start; }
.bw-controls label { display: block; margin: 10px 0; }
.bw-controls select, .bw-controls textarea, .bw-controls input { width: 100%; max-width: 100%; box-sizing: border-box; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 16px; font-family: inherit; background: var(--card,#fff); color: inherit; }
.bw-controls textarea { resize: vertical; }
.bw-controls .btn { white-space: normal; overflow-wrap: anywhere; }
.bw-preview { position: sticky; top: 12px; text-align: center; }
.bw-preview canvas { display: block; max-width: 100%; max-height: 65vh; width: auto; height: auto; margin: auto; border-radius: 8px; }
#bw-manual { width: 100%; min-height: 100px; }
#bw-status:not(:empty) { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 50; margin: 0; padding: 8px 16px; border-radius: 8px; background: #222; color: #fff; max-width: calc(100vw - 32px); }
@media(max-width:800px) {
 .bw-layout { display: flex; flex-direction: column; }
 .bw-controls, .bw-preview { width: 100%; }
 .bw-preview { order: -1; position: sticky; top: 0; z-index: 2; background: var(--card,#fff); padding: 6px 0; max-height: 35vh; box-sizing: border-box; }
 .bw-preview canvas { max-height: calc(35vh - 44px); }
 .bw-preview h2 { display: none; }
 #bw-info { margin: 4px 0; font-size: 12px; line-height: 16px; }
}
@media(max-width:480px) { .bw-row { flex-direction: column; gap: 8px; } }
