:root {
  --shutxt-accent: #8b5e3c;
  --shutxt-accent-soft: #f7f0e7;
  --shutxt-border: #d9cab9;
  --shutxt-text: #3d2f23;
}

.shutxt-shell {
  display: grid;
  gap: 18px;
}

.shutxt-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 18px;
}

.shutxt-panel {
  border: 1px solid var(--shutxt-border);
  border-radius: 22px;
  background: linear-gradient(180deg, #fffefa 0%, #fbf7f0 100%);
  box-shadow: 0 14px 36px rgba(102, 69, 42, 0.08);
  padding: 18px;
}

.shutxt-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(139, 94, 60, 0.14);
}

.shutxt-panel-head h2 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 21px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--shutxt-text);
}

.shutxt-panel-head h2::before {
  content: "";
  width: 10px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, #a57449 0%, #7d5233 100%);
  box-shadow: 0 0 0 4px rgba(139, 94, 60, 0.08);
  flex: 0 0 auto;
}

.shutxt-panel-head span {
  max-width: 46%;
  padding-top: 4px;
  font-size: 13px;
  line-height: 1.7;
  color: #8b7661;
  text-align: right;
}

.shutxt-input,
.shutxt-output {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid var(--shutxt-border);
  border-radius: 16px;
  padding: 14px 15px;
  background: #fffdf9;
  color: var(--shutxt-text);
  line-height: 1.8;
  resize: vertical;
}

.shutxt-input {
  min-height: 260px;
}

.shutxt-output {
  min-height: 120px;
  margin-top: 10px;
}

.shutxt-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.shutxt-settings label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #6b5847;
}

.shutxt-settings select,
.shutxt-settings input[type="number"] {
  height: 40px;
  border: 1px solid var(--shutxt-border);
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
  color: var(--shutxt-text);
}

.shutxt-check {
  grid-column: 1 / -1;
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px dashed var(--shutxt-border);
  border-radius: 14px;
  background: var(--shutxt-accent-soft);
}

.shutxt-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.shutxt-actions button {
  border: 1px solid #d7c4af;
  background: #fff9f2;
  color: #6a4b32;
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
}

.shutxt-actions button.primary {
  color: #fff;
  border-color: #8b5e3c;
  background: linear-gradient(135deg, #8b5e3c 0%, #6f4628 100%);
}

.shutxt-status {
  min-height: 24px;
  margin-top: 12px;
  color: #7a6450;
  font-size: 14px;
}

.shutxt-status.error {
  color: #b42318;
}

.shutxt-status.success {
  color: #127c4f;
}

.shutxt-preview {
  min-height: 420px;
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(180deg, #fffdf7 0%, #f7f1e8 100%);
  overflow: auto;
  display: grid;
  gap: 14px;
}

.shutxt-preview.border-classic {
  border: 2px solid #8b5e3c;
}

.shutxt-preview.border-double {
  border: 4px double #8b5e3c;
}

.shutxt-preview.border-minimal {
  border: 1px solid #e2d6c9;
}

.shutxt-empty {
  display: grid;
  place-items: center;
  min-height: 380px;
  color: #8f7d6b;
  font-size: 14px;
}

.shutxt-page {
  display: flex;
  flex-direction: row-reverse;
  gap: 10px;
  align-items: stretch;
  justify-content: flex-start;
  padding: 16px 14px;
  border: 1px solid #e4d7c9;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.shutxt-page.is-double {
  border-style: double;
  border-width: 4px;
}

.shutxt-page.is-minimal {
  border-style: solid;
  border-color: #ede2d5;
  box-shadow: inset 0 0 0 1px #f6ede4;
}

.shutxt-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 36px;
  padding: 10px 6px;
  border-left: 1px solid rgba(139, 94, 60, 0.18);
}

.shutxt-column:last-child {
  border-left: 0;
}

.shutxt-char {
  width: 1em;
  line-height: 1;
  text-align: center;
  color: var(--shutxt-text);
  font-size: 19px;
}

.shutxt-output-wrap {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: #6b5847;
}

.shutxt-stats {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.shutxt-stats div {
  padding: 12px 14px;
  border: 1px solid #e4d7c9;
  border-radius: 16px;
  background: #fffdfa;
}

.shutxt-stats span {
  display: block;
  color: #8f7d6b;
  font-size: 12px;
}

.shutxt-stats strong {
  display: block;
  margin-top: 6px;
  color: var(--shutxt-text);
  font-size: 22px;
}

@media (max-width: 1080px) {
  .shutxt-grid,
  .shutxt-settings,
  .shutxt-stats {
    grid-template-columns: 1fr;
  }

  .shutxt-panel-head {
    gap: 8px;
  }

  .shutxt-panel-head span {
    max-width: none;
    text-align: left;
  }
}
