* { box-sizing: border-box; }
body { margin: 0; background: #eef2f5; color: #333; font: 14px Arial, Helvetica, sans-serif; }
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { min-height: 52px; background: #2d2d2d; color: #eee; display: flex; align-items: center; padding: 0 14px; gap: 14px; box-shadow: 0 1px 3px #999; }
.brand { font-size: 22px; font-weight: bold; color: #fff; }
.crumb { color: #bbb; border-left: 1px solid #555; padding-left: 14px; }
.actions { margin-left: auto; display: flex; gap: 5px; flex-wrap: wrap; }
.actions button { border: 1px solid #aaa; background: #f4f4f4; color: #333; padding: 6px 11px; border-radius: 2px; cursor: pointer; }
.actions button:hover { background: #fff; }
.actions .tab { background: #3b3b3b; color: #ddd; border-color: #555; }
.actions .tab.active { background: #fff; color: #333; }
.actions .paste-tex { background: #8e44ad; color: #fff; border-color: #732d91; }
.actions .share { background: #2b7bb9; color: #fff; border-color: #24689d; }
.actions .save { background: #5b8f29; color: #fff; border-color: #527f25; }
/* style.css 내 .actions 버튼 관련 CSS */
.actions .paste-tex { background: #8e44ad; color: #fff; border-color: #732d91; }
.actions .copy-tex { background: #16a085; color: #fff; border-color: #117a65; } /* 추가된 부분 */
.actions .share { background: #2b7bb9; color: #fff; border-color: #24689d; }
.actions .save { background: #5b8f29; color: #fff; border-color: #527f25; }

.workspace { flex: 1; min-height: 0; display: grid; padding: 10px; gap: 10px; }
.workspace.split { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
.workspace.edit .preview-panel { display: none; }
.workspace.edit .editor-panel { display: flex; }
.workspace.preview .editor-panel { display: none; }
.workspace.preview .preview-panel { display: flex; }

.panel { background: #fff; border: 1px solid #c9cdd1; min-height: 0; display: flex; flex-direction: column; box-shadow: 0 1px 2px #d5d8db; }
.panel-head { height: 39px; background: linear-gradient(#f8f8f8,#e9e9e9); border-bottom: 1px solid #c9cdd1; padding: 10px 12px; font-weight: bold; color: #555; }
.panel-head span { float: right; color: #999; font-weight: normal; font-size: 12px; }

.editor-pane { padding: 14px; overflow: auto; }
.form-row { margin-bottom: 13px; }
.form-row label { display: block; font-weight: bold; color: #555; margin-bottom: 5px; }
.form-row input, .form-row textarea { width: 100%; border: 1px solid #aaa; border-radius: 2px; background: #fff; box-shadow: inset 0 1px 2px #eee; font: 14px Arial, Helvetica, sans-serif; padding: 7px 8px; }
.form-row textarea { min-height: 105px; resize: vertical; font-family: Consolas, "Courier New", monospace; line-height: 1.45; }
.form-row textarea:focus, .form-row input:focus { outline: 1px solid #6b9dcc; border-color: #6b9dcc; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.examples-editor { border-top: 1px solid #ddd; padding-top: 12px; }
.examples-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.examples-head button { background: #eee; border: 1px solid #aaa; border-radius: 2px; padding: 5px 9px; cursor: pointer; }
.example-edit { display: grid; grid-template-columns: 90px 1fr 1fr auto; gap: 7px; margin-bottom: 8px; align-items: start; }
.example-edit span { padding-top: 7px; color: #666; }
.example-edit textarea { min-height: 75px; resize: vertical; border: 1px solid #aaa; font: 13px Consolas, "Courier New", monospace; padding: 7px; }
.remove-example { background: #eee; border: 1px solid #aaa; border-radius: 2px; padding: 5px 8px; cursor: pointer; }

.help { margin-top: 10px; color: #777; font-size: 12px; }
.help code { background: #f1f1f1; padding: 1px 3px; border: 1px solid #ddd; }

.preview-scroll { overflow: auto; background: #ddd; padding: 18px; }
.preview-page { max-width: 930px; margin: 0 auto; background: #fff; min-height: 100%; padding: 30px 48px 60px; box-shadow: 0 1px 4px #aaa; color: #222; font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 1.5; }
.statement-title { font-size: 25px; text-align: center; margin: 2px 0 5px; }
.limits { text-align: center; color: #555; font-size: 13px; margin-bottom: 25px; }
.limits span { font-weight: bold; margin-left: 15px; }
.limits span:first-child { margin-left: 0; }

.cf-section { margin: 0 0 24px; }
.cf-section h2 { font-size: 19px; margin: 0 0 8px; border-bottom: 0; font-weight: bold; color: #222; }
.section-content { font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 1.5; color: #222; }

/* Codeforces 원본 리스트 스타일 */
ul.cf-list, ol.cf-list { margin: 8px 0 12px 24px; padding: 0; }
ul.cf-list { list-style-type: disc; }
ol.cf-list { list-style-type: decimal; }
.cf-list li { margin-bottom: 6px; line-height: 1.5; }

.paragraph-gap { height: 12px; }


/* \texttt{} 전용: 삐침 없는 깔끔한 Modern Monospace 폰트 설정 */
.tt-text {
  font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
  font-size: 0.95em;
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}
.samples { display: flex; flex-direction: column; gap: 18px; }
.sample { width: 100%; }
.sample-label { font-weight: bold; margin: 3px 0; }
.sample pre { margin: 0 0 10px; background: #f5f5f5; border: 1px solid #bbb; border-radius: 2px; padding: 9px 10px; white-space: pre-wrap; font: 13px Consolas, "Courier New", monospace; }

.latex-error { background: #ffd6d6; color: #a00; padding: 0 2px; }
footer { height: 29px; background: #2d2d2d; color: #aaa; text-align: center; padding: 7px; font-size: 11px; }

@media(max-width: 900px) {
  .workspace.split { grid-template-columns: 1fr; }
  .preview-page { padding: 22px; }
  .actions .tab { display: none; }
  .crumb { display: none; }
  .example-edit { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
}