/*! © 2026 Cengiz Ilerler. All rights reserved. https://cengiz.ilerler.info/ */
.tool-box.cn { width: 100%; max-width: 1040px; }
.cn-out { position: relative; text-align: center; padding: 38px 30px 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--tide); }
.cn-pre { min-height: 11px; margin: 0 0 6px; font: 600 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--amber); }
.cn-name { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "w0 locks w1" "m0 . m1"; align-items: center; gap: 8px 18px; }
.cn-w0 { grid-area: w0; justify-self: end; }
.cn-w1 { grid-area: w1; justify-self: start; }
.cn-m0 { grid-area: m0; justify-self: end; text-align: right; }
.cn-m1 { grid-area: m1; justify-self: start; text-align: left; }
.cn-locks { grid-area: locks; display: flex; gap: 6px; }
.cn-w { --cn-fs: clamp(40px, 30px + 2.4vw, 64px); display: inline-flex; align-items: center; max-width: 100%; height: calc(var(--cn-fs) * 1.12); white-space: nowrap; }
.cn-w b { display: inline-block; min-width: 2ch; font: 400 var(--cn-fs)/1.05 var(--serif); letter-spacing: -.01em; color: var(--foam); }
.cn-w.is-pop b { animation: cn-pop .35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes cn-pop { 0% { transform: scale(.94); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }
.cn-m { align-self: start; max-width: 34ch; min-height: 2.9em; margin: 0; font: 400 14.5px/1.45 var(--sans); color: var(--mist);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: opacity .25s; }
.cn-m.is-out { opacity: 0; }
.cn-out[data-cn-style="project"] .cn-name { grid-template-columns: minmax(0, 1fr); grid-template-areas: "w1" "m1"; }
.cn-out[data-cn-style="project"] :is(.cn-w0, .cn-m0, .cn-locks) { display: none; }
.cn-out[data-cn-style="project"] :is(.cn-w1, .cn-m1) { justify-self: center; text-align: center; }
.cn-lk { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 1px solid var(--hair-3); border-radius: 999px; background: none; color: var(--mist); cursor: pointer; transition: color .15s, border-color .15s, background-color .15s; }
.cn-lk svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cn-lk .cn-i-shut, .cn-lk[aria-pressed="true"] .cn-i-open { display: none; }
.cn-lk[aria-pressed="true"] .cn-i-shut { display: block; }
.cn-lk:hover { border-color: var(--sea); color: var(--sea); }
.cn-lk[aria-pressed="true"] { background: var(--foam); border-color: var(--foam); color: var(--abyss); }
.cn-star { position: absolute; top: 14px; right: 14px; width: 48px; height: 48px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--mist); cursor: pointer; transition: color .15s; }
.cn-star svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.cn-star:hover { color: var(--sea); }
.cn-star[aria-pressed="true"] { color: var(--foam); }
.cn-star[aria-pressed="true"] svg { fill: currentColor; }
.cn-star[aria-pressed="true"]:hover { color: var(--sea); }
.cn-acts { display: flex; justify-content: center; margin-top: 26px; }
.cn-roll { height: 56px; padding: 0 34px; font-size: 18px; gap: 8px; }
.cn-roll svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cn-roll.is-spin svg { animation: cn-spin .5s ease-out; }
@keyframes cn-spin { to { transform: rotate(360deg); } }
.cn-row { min-height: 32px; margin-top: 22px; }
.cn-recent { display: flex; flex-wrap: nowrap; justify-content: center; gap: 6px; overflow: hidden; }
.cn-recent[hidden], .cn-msg[hidden] { display: none; }
.cn-recent button { flex: none; height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--foam) 6%, transparent); color: var(--body); font: 400 15px/1 var(--serif); white-space: nowrap; cursor: pointer; transition: color .15s, background-color .15s; }
.cn-recent button:hover { background: color-mix(in srgb, var(--sea) 14%, transparent); color: var(--sea); opacity: 1 !important; }
.cn-recent button.is-new { animation: cn-chip .3s ease-out; }
@keyframes cn-chip { from { transform: translateY(-6px) scale(.9); opacity: 0; } }
.cn-msg { margin: 0; padding-top: 7px; font: 400 13px/1.4 var(--sans); color: var(--mist); }
.cn-fmt { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.cn-fmt button { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--abyss); color: var(--foam); text-align: left; cursor: pointer; transition: border-color .15s; }
.cn-fmt button:hover { border-color: var(--sea); }
.cn-fmt button > span { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cn-fmt svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; color: var(--mist); transition: color .15s; }
.cn-fmt button:hover svg { color: var(--sea); }
.cn-fmt small { font: 600 10px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--mist); }
.cn-fmt .is-copied small { color: var(--seaglass); }
.cn-fmt code { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 13px/1.2 var(--mono); color: var(--foam); }
.cn-opts { margin-top: 26px; gap: 14px; }
.cn-opts .tool-row { grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
.cn-opts .g-seg button { position: relative; white-space: nowrap; }
.cn-opts .g-seg { row-gap: 6px; }
.cn-opts .g-seg button::before { content: ""; position: absolute; inset: -3px 0; }
.cn-themes { display: flex; flex-wrap: wrap; gap: 6px; }
.cn-pair { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.cn-len { display: inline-flex; align-items: center; gap: 12px 14px; margin-left: 4px; }
.cn-sel { position: relative; display: inline-flex; }
.cn-sel select { height: 36px; padding: 0 30px 0 14px; border: 1px solid var(--hair-3); border-radius: 999px; background: transparent; color: var(--foam); color-scheme: dark; font: 500 13px/1 var(--sans); cursor: pointer; appearance: none; transition: border-color .15s; }
.cn-sel select:hover { border-color: var(--sea); }
.cn-sel select:focus-visible { outline: 2px solid var(--sea); outline-offset: 3px; }
.cn-sel::after { content: ""; position: absolute; right: 13px; top: 13px; width: 6px; height: 6px; border: solid var(--mist); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); pointer-events: none; }
.cn-sel option { background: var(--deep); color: var(--foam); }
.cn-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 30px 0 12px; font: 600 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--mist); }
.cn-h small { font: 400 13px/1 var(--sans); letter-spacing: 0; text-transform: none; }
.cn-fav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cn-fav li { display: inline-flex; align-items: center; height: 38px; padding-right: 3px; border: 1px solid var(--line); border-radius: 999px; }
.cn-fav-n { height: 100%; padding: 0 6px 0 14px; border: 0; border-radius: 999px; background: none; color: var(--foam); font: 400 15px/1 var(--serif); white-space: nowrap; cursor: pointer; transition: color .15s; }
.cn-fav-n:hover { color: var(--sea); }
.cn-fav-x { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--mist); cursor: pointer; transition: color .15s; }
.cn-fav-x svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.cn-fav-x:hover { color: var(--sea); }
.cn-none { margin: 0; font: 400 14px/1.5 var(--sans); color: var(--mist); }
.cn-none[hidden] { display: none; }
@media (max-width: 759px) {
  .cn-fmt { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cn-opts .tool-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .cn-pair { flex-direction: column; align-items: flex-start; gap: 18px; }
  .cn-len { flex-direction: column; align-items: flex-start; gap: 10px; margin-left: 0; }
  .cn-out { padding: 26px 16px 20px; }
  .cn-out:not([data-cn-style="project"]) .cn-name { grid-template-columns: 34px minmax(0, 1fr); grid-template-areas: "l0 w0" ". m0" "l1 w1" ". m1"; gap: 2px 14px; text-align: left; }
  .cn-out:not([data-cn-style="project"]) .cn-locks { display: contents; }
  .cn-out:not([data-cn-style="project"]) .cn-lk[data-cn-lock="0"] { grid-area: l0; }
  .cn-out:not([data-cn-style="project"]) .cn-lk[data-cn-lock="1"] { grid-area: l1; }
  .cn-out:not([data-cn-style="project"]) :is(.cn-w0, .cn-w1, .cn-m0, .cn-m1) { justify-self: start; text-align: left; }
  .cn-out:not([data-cn-style="project"]) .cn-pre { padding-left: 48px; text-align: left; }
  .cn-m { max-width: none; }
  .cn-m1 { margin-top: 0; }
  .cn-star { top: 6px; right: 6px; }
  .cn-roll { padding: 0 28px; }
}
@media (max-width: 519px) {
  .cn-fmt { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .cn-fmt button { padding: 9px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .cn-w.is-pop b, .cn-recent button.is-new, .cn-roll.is-spin svg { animation: none; }
  .cn-m { transition: none; }
}
