:root {
  --bg-color: #f0f0f5;
  --text-color: #333;
  --primary: #007bff;
  --primary-hover: #0056b3;
  font-size: 12pt;
}

body {
  margin: 0;
  padding: 20px;
  font-family: system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

h1 {
  margin: 0;
  font-size: 2rem;
}

button {
  padding: 10px 20px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}

button:hover {
  background-color: var(--primary-hover);
}

button:disabled {
  background-color: #aaa;
  cursor: not-allowed;
}

#status {
  font-size: 1.125rem;
  margin: 1rem 0;
  font-weight: bold;
  padding: 1rem;
  background: rgba(128, 196, 255, 0.09375);
  border: 0.0625rem solid rgba(128, 196, 255, 0.125);
  border-radius: 0.25rem;
}

#grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0;
}

.card {
  background: white;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid #eee;
  margin-bottom: 10px;
}

.card label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
}

#render-container {
  display: none;
  width: 1080px;
  height: 1080px;
  background-color: #F8F8FF;
  color: #0a0a0a;
  font-family: sans-serif;
  padding: 60px;
  gap: 90px;
  box-sizing: border-box;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  z-index: 0;
}

#watermark {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-wrap: nowrap;
  color: #ff0000;
  font-size: 4.5rem;
  font-weight: bold;
  text-align: center;
  max-width: 1200px;
  width: calc(100% - 2rem);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-37.5deg);
  opacity: 0.125;
  line-height: 1.75;
  z-index: 9;
}

#tpl-question {
  font-size: 2.5rem;
  line-height: 1.5;
  font-weight: normal;
  text-align: left;
  width: auto;
  min-height: 35%;
  white-space: pre-wrap;
  z-index: 99;
}

#tpl-options {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 2rem;
  white-space: pre-wrap;
}

.tpl-option {
  font-size: 2rem;
  line-height: 1.5;
  font-weight: normal;
  text-align: left;
  display: flex;
  min-width: calc(50% - 1rem);
  flex-direction: row;
  align-items: baseline;
  gap: 1rem;
  z-index: 99;
}

#control-panel {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  min-width: 15rem;
  width: 100%;
  max-width: 16rem;
}

.input-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: calc(100vw - 1rem);
  height: 100vh;
  background-color: var(--bg-color);
  display: flex;
  flex-direction: column;
  padding: 1rem;
  box-sizing: border-box;
  z-index: 9999;
}

.modal-textarea {
  display: flex;
  margin: 1rem 0 0 0;
  padding: 1rem;
  font-size: 1rem;
  font-family: system-ui, -apple-system, sans-serif;
  resize: none;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.modal-button-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}