* {
  box-sizing: border-box;
}

body {
  font-family: 'Cormorant Garamond', 'Crimson Text', Georgia, serif;
  padding: 0;
  margin: 0;
  background: #fafaf8;
  min-height: 100vh;
  color: #1a1a1a;
  line-height: 1.7;
}

h1 {
  text-align: center;
  color: #1a1a1a;
  font-size: 3.5em;
  font-weight: 400;
  margin: 3rem 0 1rem;
  letter-spacing: 2px;
}

body > p {
  text-align: center;
  color: #4a4a4a;
  font-size: 1.05em;
  max-width: 800px;
  margin: 0.5rem auto;
  font-weight: 300;
}

.blue-name {
  color: #6b4423;
  text-decoration: none;
  font-weight: 400;
  transition: color 0.3s ease;
  border-bottom: 1px solid #6b4423;
}

.blue-name:hover {
  color: #8b5a3c;
  border-bottom-color: #8b5a3c;
}

.section {
  background: #ffffff;
  margin: 2rem auto;
  max-width: 900px;
  padding: 2.5rem;
  border: 1px solid #e8e8e8;
  transition: border-color 0.3s ease;
}

.section:hover {
  border-color: #6b4423;
}

.section h3 {
  color: #1a1a1a;
  font-size: 1.8em;
  font-weight: 400;
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #1a1a1a;
  letter-spacing: 1px;
}

.section p {
  color: #4a4a4a;
  margin: 1rem 0;
  font-size: 1em;
}

label {
  display: block;
  margin: 1.2rem 0 0.6rem;
  color: #1a1a1a;
  font-weight: 400;
  font-size: 1em;
}

textarea {
  width: 100%;
  margin-top: 0.8rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  padding: 1rem;
  border: 1px solid #d0d0d0;
  background: #fafaf8;
  color: #1a1a1a;
  transition: border-color 0.3s ease;
  resize: vertical;
}

textarea:focus {
  outline: none;
  border-color: #6b4423;
}

input[type="text"],
input[type="number"] {
  padding: 0.6rem 0.8rem;
  border: 1px solid #d0d0d0;
  font-size: 15px;
  transition: border-color 0.3s ease;
  background: #fafaf8;
  font-family: 'Cormorant Garamond', Georgia, serif;
}

input[type="text"]:focus,
input[type="number"]:focus {
  outline: none;
  border-color: #6b4423;
}

input[type="color"] {
  width: 60px;
  height: 40px;
  border: 1px solid #d0d0d0;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

input[type="color"]:hover {
  border-color: #6b4423;
}

button {
  margin: 0.5rem 0.5rem 0.5rem 0;
  padding: 0.8rem 2rem;
  background: #1a1a1a;
  color: #ffffff;
  border: 1px solid #1a1a1a;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Cormorant Garamond', Georgia, serif;
  letter-spacing: 1px;
  text-transform: uppercase;
}

button:hover {
  background: #6b4423;
  border-color: #6b4423;
}

button:active {
  background: #4a2f18;
}

button:disabled {
  background: #d0d0d0;
  border-color: #d0d0d0;
  cursor: not-allowed;
  color: #8a8a8a;
}

button:disabled:hover {
  background: #d0d0d0;
  border-color: #d0d0d0;
}

button:focus {
  outline: 2px solid #6b4423;
  outline-offset: 2px;
}

.open-link-visible {
  display: inline-block !important;
  margin-top: 1.5rem !important;
}

#openLink {
  margin-left: 1.5rem;
  padding: 0.8rem 2rem;
  background: #ffffff;
  color: #1a1a1a;
  text-decoration: none;
  border: 1px solid #1a1a1a;
  font-weight: 400;
  transition: all 0.3s ease;
  font-family: 'Cormorant Garamond', Georgia, serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 14px;
  display: none; 
}

#openLink:hover {
  background: #1a1a1a;
  color: #ffffff;
}

.color-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.color-group {
  background: #fafaf8;
  padding: 1.5rem;
  border: 1px solid #e8e8e8;
  transition: border-color 0.3s ease;
}

.color-group:hover {
  border-color: #6b4423;
}

.color-group label {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1em;
}

.color-group span {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85em;
  color: #4a4a4a;
  background: #ffffff;
  padding: 0.4rem 0.7rem;
  border: 1px solid #e8e8e8;
}

#csvInput {
  height: 140px;
}

#output {
  height: 220px;
}

#csvHeaders,
#googleScript {
  background: #fafaf8;
  color: #1a1a1a;
  border: 1px solid #d0d0d0;
}

pre {
  background: #fafaf8;
  padding: 1rem;
  border-left: 2px solid #1a1a1a;
  overflow-x: auto;
  color: #1a1a1a;
  font-family: 'Courier New', Courier, monospace;
}

.toggle-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
  padding: 1.2rem;
  background: #fafaf8;
  border: 1px solid #e8e8e8;
  transition: border-color 0.3s ease;
}

.toggle-container:hover {
  border-color: #d0d0d0;
}

.toggle-container label:not(.toggle-switch) {
  margin: 0;
  flex: 1;
  font-weight: 400;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 30px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d0d0d0;
  transition: 0.3s;
  border-radius: 30px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 24px;
  width: 24px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background: #6b4423;
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

#googleSheetsUrl {
  width: 100%;
  padding: 1rem;
  font-size: 15px;
  border: 1px solid #d0d0d0;
  background: #fafaf8;
  transition: border-color 0.3s ease;
  font-family: 'Courier New', Courier, monospace;
}

#googleSheetsUrl:focus {
  outline: none;
  border-color: #6b4423;
}

#linkInfo {
  text-align: center;
  max-width: 900px;
  margin: 1rem auto;
  color: #4a4a4a;
  background: #ffffff;
  padding: 1rem;
  border: 1px solid #e8e8e8;
}

div[style*="margin-top:12px"] {
  text-align: center;
  max-width: 900px;
  margin: 2rem auto !important;
  padding: 2rem;
  background: #ffffff;
  border: 1px solid #e8e8e8;
}

body > h3 {
  max-width: 900px;
  margin: 5rem auto 1rem;
  color: #1a1a1a;
  font-size: 1.8em;
  text-align: center;
  font-weight: 400;
  letter-spacing: 1px;
  padding-top: 3rem;
  border-top: 1px solid #e8e8e8;
}

body > h3:first-of-type {
  margin-top: 5rem;
}

body > textarea {
  max-width: 900px;
  margin: 1rem auto;
  display: block;
}