@font-face {
  font-family: "Source Han Sans VF";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("./font/SourceHanSans-VF.otf.woff2") format("woff2");
}

:root {
  color-scheme: light;
  font-family: "Source Han Sans VF", sans-serif;
  background-color: #f4f5f8;
  color: #111827;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #f4f5f8;
  line-height: 1.5;
}

body,
button,
textarea {
  font-family: inherit;
}

.site-header,
.site-footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem 1rem;
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-header .header-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
}

.site-header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.6rem;
}

.site-header p {
  margin: 0;
  color: #4b5563;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

.preview-panel,
.input-panel {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.panel-header h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.panel-header p {
  margin: 0;
  color: #4b5563;
  font-size: 0.95rem;
}

.preview-frame {
  margin-top: 1rem;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  padding: 0.75rem;
  display: grid;
  place-items: center;
}

.preview-frame canvas {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  border-width: 1px;
  border-color:#e0e0e0;
  border-style: solid;
  border-radius: 0px;
  background: #ffffff;
}

.actions {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

button {
  padding: 0.95rem 1.4rem;
  border: none;
  border-radius: 999px;
  background: #0e59ab;
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

button:hover,
button:focus-visible {
  background: #0c4f95;
}

.hint {
  margin: 0;
  color: #4b5563;
  font-size: 0.95rem;
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.input-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.input-card span {
  color: #111827;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
}

.text-input {
  min-height: 5.3rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  resize: none;
  font-size: 0.95rem;
  line-height: 1.4;
  background: #f9fafb;
  color: #111827;
}

.text-input:focus {
  outline: 3px solid rgba(14, 89, 171, 0.16);
  border-color: #0e59ab;
  background: #ffffff;
}

.site-footer {
  text-align: center;
  color: #6b7280;
  font-size: 0.95rem;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .input-grid {
    grid-template-columns: 1fr;
  }
  .preview-panel,
  .input-panel,
  .site-header,
  .site-footer {
    padding: 1rem;
  }
}
