.ct-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 16px; align-items: start; }
.ct-wrap .panel + .panel, .ct-more .panel + .panel { margin-top: 0; }
.ct-input { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; transition: border-color 0.15s, box-shadow 0.15s; }
.ct-input:focus-within { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); box-shadow: 0 0 0 4px var(--brand-tint); }
.ct-text { min-height: 470px; border: 0; padding: 10px 8px; font-size: 16.5px; line-height: 1.85; background: transparent; }
.ct-text:focus { box-shadow: none; border-color: transparent; }
.ct-tools { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.ct-tools .btn .ico { width: 16px; height: 16px; }
.ct-input > .hint { padding: 0 4px; }
.ct-side { display: grid; gap: 12px; position: sticky; top: calc(var(--head-h) + 12px); }
.ct-big { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1px; padding: 0; overflow: hidden; background: var(--line); }
.ct-num { background: var(--surface); padding: 16px 18px 14px; min-width: 0; }
.ct-k { font-size: 13.5px; font-weight: 600; color: var(--ink-3); }
.ct-v { display: flex; align-items: baseline; gap: 3px; margin-top: 4px; }
.ct-v output { font-size: 38px; font-weight: 750; letter-spacing: -0.04em; line-height: 1.15; font-variant-numeric: tabular-nums; padding: 0 3px; margin-left: -3px; }
.ct-num:first-child output { color: var(--brand-ink); }
.ct-v small { font-size: 15px; font-weight: 600; color: var(--ink-3); }
.ct-goal { padding: 16px 18px; display: grid; gap: 10px; }
.ct-goal-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ct-goal-k { font-size: 15px; font-weight: 650; }
.ct-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ct-presets .chip { cursor: pointer; justify-content: center; padding: 0 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.ct-meter { height: 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.ct-meter-fill { display: block; height: 100%; background: var(--mks-green); transform-origin: left center; transform: scaleX(var(--p, 0)); transition: transform 0.25s var(--ease-out), background-color 0.2s; }
.ct-meter.is-over .ct-meter-fill { background: var(--red); }
.ct-goal-msg { font-size: 14.5px; font-weight: 600; line-height: 1.55; color: var(--ink-2); }
.ct-goal-msg.is-over { color: var(--red); }
.ct-goal-msg.is-done { color: var(--ok); }
.ct-detail { padding: 4px 18px 14px; }
.ct-dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ct-dl dt { font-size: 14px; color: var(--ink-2); }
.ct-dl dt small { font-size: 12px; color: var(--ink-3); margin-left: 3px; }
.ct-dl dd { margin: 0; font-size: 15.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ct-nl { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; }
.ct-nl-k { font-size: 14px; color: var(--ink-2); }
.ct-sec-h { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 12px; }
.ct-sec-h h2 { font-size: 17px; letter-spacing: -0.02em; }
.ct-sub { font-size: 13.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ct-over { margin-top: 16px; }
.ct-over .ct-sec-h { align-items: center; }
.ct-over .btn .ico { width: 16px; height: 16px; }
.ct-over-text { margin-top: 10px; padding: 14px 16px; background: var(--surface-2); border-radius: var(--radius); font-size: 15.5px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow: auto; }
.ct-cutline { display: inline-block; width: 2px; height: 1.25em; margin: 0 3px; vertical-align: -0.25em; background: var(--red); border-radius: 1px; }
.ct-mk { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--ink); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--red) 70%, transparent); text-decoration-thickness: 1.5px; border-radius: 2px; }
.ct-more { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ct-bars { display: flex; align-items: flex-end; gap: 2px; height: 128px; padding-top: 6px; border-bottom: 1px solid var(--line-2); }
.ct-bar { flex: 1 1 0; min-width: 2px; max-width: 16px; height: calc(var(--h, 0) * 100%); background: color-mix(in srgb, var(--ink) 38%, transparent); border-radius: 2px 2px 0 0; }
.ct-bar.is-long { background: var(--mks-orange); }
.ct-rhythm .hint { margin-top: 10px; }
.ct-long { list-style: none; display: grid; gap: 8px; margin-top: 12px; }
.ct-long:empty { display: none; }
.ct-long li { font-size: 14.5px; line-height: 1.7; color: var(--ink-2); cursor: pointer; padding: 9px 12px; border-radius: var(--radius-s); background: var(--surface-2); transition: background-color 0.15s; }
.ct-long li:hover, .ct-long li:focus-visible { background: color-mix(in srgb, var(--mk-orange) 45%, var(--surface-2)); outline: none; }
.ct-long-n { font-weight: 700; color: var(--warn); margin-right: 8px; font-variant-numeric: tabular-nums; }
.ct-stack { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.ct-seg { height: 100%; width: calc(var(--w, 0) * 100%); }
.k-hangul { background: var(--mks-yellow); }
.k-latin { background: var(--mks-sky); }
.k-digit { background: var(--mks-green); }
.k-space { background: var(--line-2); }
.k-newline { background: color-mix(in srgb, var(--ink) 30%, transparent); }
.k-emoji { background: var(--mks-pink); }
.k-other { background: var(--mks-violet); }
.ct-legend { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; margin-top: 12px; }
.ct-legend li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); min-width: 0; }
.ct-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.ct-legend b { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink); }
.ct-words-h { margin-top: 24px; }
#ct-top .chip b { font-weight: 700; color: var(--ink); margin-left: 3px; font-variant-numeric: tabular-nums; }
.ct-kinds .hint { margin-top: 10px; }
.ct-ms { grid-column: 1 / -1; }
.ct-ms-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.ms-page { margin: 0; }
.ms-k { font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.ms-grid { --ms-line: color-mix(in srgb, var(--red) 42%, transparent); display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); row-gap: 5px; padding: 8px; background: var(--surface); border: 1px solid var(--ms-line); container-type: inline-size; }
.ms-c { aspect-ratio: 1; display: grid; place-items: center; border: solid var(--ms-line); border-width: 1px 0 1px 1px; font-size: 12px; font-size: 3.4cqi; line-height: 1; color: var(--ink); overflow: hidden; }
.ms-c:nth-child(20n) { border-right-width: 1px; }
.ms-c.is-pair { font-size: 10px; font-size: 2.5cqi; letter-spacing: -0.04em; }
@media (min-width: 861px) and (max-height: 760px) {
.ct-side { position: static; }
}
@media (max-width: 1100px) {
.ct-wrap { grid-template-columns: minmax(0, 1fr) 300px; }
.ct-v output { font-size: 32px; }
}
@media (max-width: 860px) {
.ct-wrap { grid-template-columns: 1fr; gap: 12px; }
.ct-side { display: contents; }
.ct-big { order: -1; position: sticky; top: calc(var(--head-h) + 6px); z-index: 5; box-shadow: var(--shadow-2); }
.ct-text { min-height: 300px; }
.ct-more { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
.ct-num { padding: 12px 14px 10px; }
.ct-v output { font-size: 28px; }
.ct-tools { flex-direction: column; align-items: stretch; }
.ct-legend { grid-template-columns: 1fr; }
.ct-ms-pages { grid-template-columns: 1fr; }
}
