:root { color-scheme: light; font: 12px/1.32 Inter,"Malgun Gothic",sans-serif; color: #203b32; background: #f5f4ee; }
* { box-sizing: border-box; }
body { margin: 0; }
header, main { max-width: 620px; margin: auto; }
header, .brand, .kicker, #actions, .option { display: flex; align-items: center; }
header { justify-content: space-between; padding: 6px 10px; }
.brand { gap: 5px; font-weight: 750; }
.mark { color: #38694e; }
.edition, #section { font-size: 10.5px; color: #53665a; }
main { padding: 0 6px 5px; }
article, #finish { padding: 8px; border: 1px solid #d9dfd4; background: #fffefa; border-radius: 7px; }
.kicker { gap: 8px; font-size: 11px; font-weight: 700; }
#explain { margin-left: auto; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; min-height: 25px; border: 1px solid #bdcbbf; border-radius: 5px; padding: 2px 7px; background: #fff; }
h1 { font-size: 13.5px; line-height: 1.32; margin: 6px 0; overflow-wrap: anywhere; }
#options { display: grid; gap: 3px; }
.option { gap: 6px; width: 100%; min-height: 26px; padding: 3px 5px; text-align: left; font-size: 12px; line-height: 1.25; }
.digit { flex: none; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 4px; background: #edf2ea; font-size: 10.5px; font-weight: bold; }
.flag { font-size: 10px; margin-left: auto; white-space: nowrap; }
.right { background: #e5f4e9; border-color: #68a37b; }
.wrong { background: #fff0eb; border-color: #bb715b; }
.option:disabled { opacity: 1; cursor: default; }
#result:not(:empty) { margin-top: 5px; font-size: 11.5px; font-weight: bold; }
#solution { background: #f1f5ed; margin-top: 4px; padding: 5px 7px; border-left: 2px solid #669273; font-size: 11.5px; line-height: 1.35; overflow-wrap: anywhere; }
#solution h2, #solution h3 { font-size: inherit; display: inline; margin: 0 4px 0 0; }
#solution p { display: inline; margin: 0; }
#solution p:first-of-type::after { content: ""; display: block; height: 3px; }
#actions { margin-top: 6px; gap: 5px; }
#actions button { font-size: 11.5px; min-height: 28px; }
#prev:disabled { opacity: .4; }
#next { margin-left: auto; background: #19533f; color: white; padding-inline: 13px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #376c96; outline-offset: 1px; }
@media (orientation:landscape) and (max-height:500px) and (min-width:550px) {
  header,main { max-width: 860px; }
  #options { grid-template-columns: 1fr 1fr; }
}

#given { background: #f4f6f1; border: 1px solid #d6dfd4; border-radius: 4px; padding: 5px 7px; margin: 5px 0; line-height: 1.4; }
#given p { margin: 0; }
#given p + p { margin-top: 2px; }
#given table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; text-align: center; }
#given th, #given td { border: 1px solid #cdd8c9; padding: 2px 3px; }
#option-columns, .option.paired { display: grid; grid-template-columns: 17px 1fr 1fr 32px; text-align: center; gap: 5px; }
#option-columns { padding: 3px 6px; font-weight: bold; }
#option-columns span:first-child { grid-column: 2; }
#solution { font-size: 12px; line-height: 1.45; }
@media (orientation:landscape) { #option-columns:not([hidden]) + #options { grid-template-columns: 1fr; } }
