.line-page { padding-top: 45px; }
.line-heading { max-width: 900px; display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 auto 28px; }
.line-heading h1 { margin: 12px 0 0; color: #193c3b; font-size: 44px; line-height: 1.1; }
.line-count { color: #69827a; font-size: 14px; font-weight: 800; }
.line-layout { max-width: 900px; margin: 0 auto; }
.line-play { min-width: 0; }
.line-play-top { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.line-play-top span { color: #71867f; font-size: 12px; font-weight: 750; }
.line-play-top h2 { margin: 4px 0 0; font-size: 24px; }
.line-play-top strong { color: #327168; font-size: 13px; }
#line-canvas { width: 100%; aspect-ratio: 18 / 11; display: block; border: 1px solid #c9dbd4; border-radius: 6px; background: #e6f1ef; cursor: crosshair; touch-action: none; }
.line-fail-dialog { width: min(380px, calc(100vw - 16px)); max-width: calc(100vw - 16px); max-height: calc(100svh - 20px); padding: 0; overflow: auto; border: 0; border-radius: 6px; background: #f8faf8; color: #20352f; box-shadow: 0 20px 70px #142f2a38; }
.line-fail-dialog::backdrop { background: #142f2ab8; }
.line-level-dialog { width: min(600px, calc(100vw - 16px)); max-width: calc(100vw - 16px); height: min(700px, calc(100svh - 20px)); max-height: calc(100svh - 20px); padding: 0 0 16px; overflow: hidden; border: 0; border-radius: 6px; background: #f8faf8; color: #20352f; box-shadow: 0 20px 70px #142f2a38; }
.line-level-dialog[open] { display: flex; flex-direction: column; }
.line-level-dialog::backdrop { background: #142f2ab8; }
.line-level-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; background: #f8faf8; border-bottom: 1px solid #e0e9e4; }
.line-level-head h2 { font-size: 21px; }
.line-level-close { width: 38px; min-height: 38px; padding: 0; font-size: 24px; }
.line-level-dialog .line-ad-area { flex: none; margin-top: 15px; }
.line-level-status { flex: none; min-height: 20px; margin: 6px 20px 13px; color: #526d63; font-size: 13px; font-weight: 700; text-align: center; }
.line-level-grid { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; gap: 8px; padding: 0 20px; overflow-y: auto; overscroll-behavior: contain; }
.line-level-option { min-width: 0; min-height: 64px; display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid #d4e1d9; border-radius: 5px; background: #fff; color: #203e39; text-align: left; }
.line-level-option:not(:disabled):hover { border-color: #27746b; background: #eaf4ef; }
.line-level-option:disabled { opacity: .53; }
.line-level-option span { color: #c45c54; font-size: 12px; font-weight: 850; }
.line-level-option strong { min-width: 0; overflow-wrap: anywhere; font-size: 13px; line-height: 1.25; }
.line-fail-head { padding: 23px 22px 18px; }
.line-fail-head span { color: #71867f; font-size: 12px; font-weight: 750; }
.line-fail-head h2 { margin: 5px 0 0; font-size: 25px; }
.line-fail-head h2:focus { outline: none; }
.line-ad-area { display: grid; justify-items: center; width: 100%; min-height: 280px; padding: 0 0 4px; }
.line-ad-area[hidden] { display: none; }
.line-ad-area > span { width: min(300px, 100%); margin-bottom: 9px; padding-left: 10px; color: #71867f; font-size: 12px; }
.line-ad-slot { width: 300px; max-width: 100%; min-height: 250px; }
.line-fail-actions { display: flex; justify-content: flex-end; padding: 20px 22px 22px; }
.line-fail-actions .button { min-width: 120px; }
.line-status { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; color: #6d827a; font-size: 13px; }
.line-status strong { color: #28695f; font-size: 15px; }
.line-status strong[data-state="failed"] { color: #bb5650; }
.line-status strong[data-state="won"] { color: #b17b28; }
.line-controls { display: flex; justify-content: space-between; gap: 12px; }
.line-tools { display: flex; gap: 7px; }
.line-tools .button { width: 46px; min-height: 46px; padding: 0; font-size: 23px; }
.line-tools #hint { font-size: 19px; }
.line-tools #choose-level { font-size: 24px; }
.line-tools #hint[aria-pressed="true"] { background: #f8dfaa; color: #714b19; }
.line-controls #next { min-width: 150px; }
.line-controls #next:disabled { opacity: 1; background: #e4ebe6; color: #70837a; }
@media (max-width: 560px) {
  .line-page { padding-top: 26px; }
  .line-heading h1 { font-size: 36px; }
  .line-heading { margin-bottom: 25px; }
  .line-play-top h2 { font-size: 21px; }
  .line-controls #next { min-width: 134px; }
  .line-level-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 0 14px; }
  .line-level-option { min-height: 57px; }
}
