:root {
  color-scheme: light;
  font-family:
    "Microsoft YaHei",
    "Segoe UI",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: #f4f5f0;
  color: #1f2528;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(244, 245, 240, 0.96)),
    #f4f5f0;
}

button,
textarea,
input {
  font: inherit;
}

.app-shell {
  width: min(1180px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 8px;
  border-bottom: 1px solid #d7dbd1;
}

.brand h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 720;
  letter-spacing: 0;
}

.brand p {
  margin: 8px 0 0;
  color: #5e686c;
  font-size: 15px;
}

.controls,
.actions,
.stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.option {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #cbd1c5;
  border-radius: 8px;
  background: #ffffff;
  color: #263033;
  white-space: nowrap;
}

.option input {
  width: 16px;
  height: 16px;
  accent-color: #116b5b;
}

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

.panel {
  min-height: 620px;
  display: flex;
  flex-direction: column;
  border: 1px solid #cfd6c9;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 44px rgba(31, 37, 40, 0.08);
  overflow: hidden;
}

.panel-header {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #e1e5dc;
  background: #fbfcf8;
}

.panel-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 680;
  letter-spacing: 0;
}

button {
  min-height: 38px;
  border: 1px solid #0d5b4e;
  border-radius: 8px;
  padding: 0 14px;
  color: #ffffff;
  background: #116b5b;
  cursor: pointer;
}

button:hover {
  background: #0d5b4e;
}

button:active {
  transform: translateY(1px);
}

button.secondary {
  border-color: #c7cec1;
  color: #263033;
  background: #ffffff;
}

button.secondary:hover {
  background: #edf0e8;
}

textarea {
  flex: 1;
  width: 100%;
  min-height: 360px;
  resize: none;
  border: 0;
  outline: 0;
  padding: 18px;
  line-height: 1.7;
  font-size: 16px;
  color: #1f2528;
  background: #ffffff;
}

textarea::placeholder {
  color: #8a9497;
}

#resultText {
  background: #fcfdf9;
}

.stats {
  min-height: 44px;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid #e1e5dc;
  color: #607073;
  font-size: 13px;
  background: #fbfcf8;
}

#copyStatus {
  min-width: 5em;
  text-align: right;
  color: #116b5b;
  font-weight: 600;
}

@media (max-width: 860px) {
  .app-shell {
    width: min(100vw - 20px, 720px);
    padding: 14px 0;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .panel {
    min-height: 420px;
  }

  .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .actions button {
    flex: 1;
  }
}
