/* Turbo C Online only. Shared look: ../../shared/tool-theme.css and tool-extras.css */
.tt .page { max-width: 1280px; }
[hidden] { display: none !important; }

.tc-bar { padding: 14px 16px; }
.tc-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tc-tools .btn { min-height: 46px; padding: 0 22px; font-size: 1rem; }
.tc-tools .btn small { font-weight: 600; opacity: .8; font-size: .72rem; }
.tc-tools select { width: auto; min-width: 190px; max-width: 100%; min-height: 44px; }
.tc-b { min-height: 44px; padding: 0 14px; border: 1.5px solid var(--t-input); border-radius: 14px; background: var(--t-card); color: var(--t-ink); font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer; }
.tc-b:hover { border-color: var(--t-indigo); color: var(--t-indigo); }
.tc-sp { flex: 1 1 auto; }
.tc-modes { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tc-modes .pill { min-height: 44px; padding: 0 14px; border: 1.5px solid var(--t-input); border-radius: 999px; background: var(--t-card); font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; }
.tc-hint { margin: 10px 0 0; font-size: .86rem; color: var(--t-muted); }
.tc-undo { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; padding: 8px 12px; border-radius: 12px; background: var(--t-soft); font-size: .9rem; }

.tc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.tc-pane { display: flex; flex-direction: column; min-width: 0; border-radius: 18px; overflow: hidden; border: 1.5px solid var(--t-input); background: var(--t-card); height: clamp(380px, 68vh, 680px); }
.tc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px; font-size: .82rem; font-weight: 800; letter-spacing: .02em; background: var(--t-soft); color: var(--t-muted); flex: 0 0 auto; }
.tc-head .tc-pos { font-weight: 600; font-variant-numeric: tabular-nums; }

.tc-ed { position: relative; display: flex; flex: 1 1 auto; min-height: 0; }
.tc-gut { flex: 0 0 auto; min-width: 46px; padding: 12px 8px 12px 6px; overflow: hidden; text-align: right; background: var(--t-soft); color: var(--t-muted); user-select: none; font: 13px/20px ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; }
.tc-gut div { height: 20px; padding-right: 2px; border-radius: 4px; }
.tc-gut div.err { background: #e5484d; color: #fff; font-weight: 800; }
.tt textarea.tc-code { flex: 1 1 auto; width: auto; min-width: 0; margin: 0; padding: 12px 14px; border: 0; border-radius: 0; resize: none; outline: none; background: var(--t-card); color: var(--t-ink); font: 14px/20px ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; tab-size: 4; white-space: pre; overflow: auto; }
.tt textarea.tc-code:focus { box-shadow: inset 0 0 0 2px var(--t-indigo); }

.tc-con { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 12px 14px; background: #0b0b0d; color: #c0c0c0; font: 15px/1.35 ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; outline: none; }
.tc-con:focus-visible { box-shadow: inset 0 0 0 2px #7C4DFF; }
.tc-pane.dark .tc-head { background: #1c1c22; color: #9a9aa6; }
.tc-con .dim { color: #7f7f88; }
.tc-con .bad { color: #ff6b6b; }
.tc-con .ok { color: #7ee2a8; }
.tc-con input { display: inline-block; width: 26ch; max-width: 100%; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; color: #fff; font: inherit; caret-color: #fff; outline: none; box-shadow: none; }
.tc-con .tc-inrow { display: flex; gap: 8px; margin-top: 10px; align-items: stretch; white-space: normal; }
.tc-con input.tc-linein { flex: 1 1 auto; width: auto; min-width: 0; min-height: 48px; padding: 0 14px; border: 1.5px solid #6b6b78; border-radius: 12px; background: #17171c; color: #fff; font: inherit; font-size: 16px; caret-color: #fff; }
.tc-con input.tc-linein:focus { border-color: #9b8cff; box-shadow: 0 0 0 2px rgba(124, 77, 255, .45); }
.tc-con input.tc-linein.key { text-align: center; }
.tc-con .tc-send { flex: 0 0 auto; min-height: 48px; padding: 0 20px; border: 0; border-radius: 12px; background: linear-gradient(90deg, #7C4DFF, #2F6BF0); color: #fff; font: inherit; font-size: 1rem; font-weight: 800; cursor: pointer; }
.tc-con .tc-keys { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; white-space: normal; }
.tc-con .tc-keys button { min-height: 48px; min-width: 56px; padding: 0 16px; border-radius: 12px; border: 1.5px solid #6b6b78; background: #1c1c22; color: #f1f1f6; font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; }
.tc-con .tc-keys button.tc-send { border: 0; color: #fff; background: linear-gradient(90deg, #7C4DFF, #2F6BF0); }
.tc-con .tc-hintline { margin-top: 10px; color: #9a9aa6; font-size: .85rem; white-space: normal; }
.tc-con .go { margin-top: 10px; white-space: normal; }
.tc-con .go button { min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid #55555f; background: #1c1c22; color: #e8e8ee; font: inherit; font-size: .85rem; cursor: pointer; }
.tc-con .go button:hover { border-color: #9a9aa6; }
.tc-con .blink { display: inline-block; width: .6em; height: 1em; vertical-align: text-bottom; background: #c0c0c0; animation: tcb 1s steps(1) infinite; }
@keyframes tcb { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tc-con .blink { animation: none; } }
.tc-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 14px; background: #1c1c22; color: #9a9aa6; font-size: .8rem; flex: 0 0 auto; }
.tc-foot button { min-height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid #55555f; background: transparent; color: #e8e8ee; font: inherit; font-size: .8rem; cursor: pointer; }
.tc-foot button:hover { border-color: #9a9aa6; }
.tc-acts { display: flex; gap: 6px; flex-wrap: wrap; }

.tc-notes ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.tc-notes li { line-height: 1.5; }
.tc-notes code { padding: 1px 6px; border-radius: 6px; background: var(--t-soft); font-size: .9em; }

@media (max-width: 860px) {
  .tc-grid { grid-template-columns: minmax(0, 1fr); }
  .tc-pane { height: clamp(320px, 56vh, 520px); }
  .tc-tools .btn { flex: 1 1 100%; }
  .tc-tools select { flex: 1 1 100%; }
  .tc-sp { display: none; }
}
@media print { .tc-bar, .tc-notes { display: none; } .tc-pane { height: auto; } }
