/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background: #f8f9fa;
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
}

header {
  text-align: center;
  padding: 2rem 0;
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 1.5rem;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}

header p {
  color: #666;
  font-size: 1.1rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding: 1rem 0;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 1.5rem;
}

nav a {
  color: #1a73e8;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background 0.2s;
}

nav a:hover {
  background: #e8f0fe;
}

main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

section {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #1a1a1a;
}

section h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.75rem;
  color: #333;
}

section p {
  margin-bottom: 1rem;
  color: #444;
}

section ul {
  margin: 0.5rem 0 1rem 1.5rem;
  color: #444;
}

section li {
  margin-bottom: 0.5rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

label {
  font-weight: 600;
  color: #333;
}

input, select, textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

button {
  padding: 0.75rem 1.5rem;
  background: #1a73e8;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background: #1557b0;
}

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

#preview-output {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  margin-bottom: 1rem;
  min-height: 100px;
}

#preview-output .note-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

#preview-output .note-language {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}

#preview-output .note-phonetic {
  font-size: 1.2rem;
  color: #1a73e8;
  margin-bottom: 0.5rem;
}

#preview-output .note-syllables {
  font-size: 1rem;
  color: #333;
  margin-bottom: 0.5rem;
}

#preview-output .note-tip {
  font-size: 0.95rem;
  color: #555;
  font-style: italic;
  margin-top: 0.5rem;
}

#preview-output .note-extra {
  font-size: 0.95rem;
  color: #444;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e0e0e0;
}

#preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#preview-actions button {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

#saved-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.saved-note {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
}

.saved-note .saved-name {
  font-weight: 600;
  color: #1a1a1a;
}

.saved-note .saved-phonetic {
  color: #1a73e8;
  margin: 0.25rem 0;
}

.saved-note .saved-date {
  font-size: 0.8rem;
  color: #888;
}

.saved-note .delete-btn {
  background: #dc3545;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.saved-note .delete-btn:hover {
  background: #c82333;
}

footer {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid #e0e0e0;
  margin-top: 2rem;
  color: #666;
  font-size: 0.9rem;
}

footer a {
  color: #1a73e8;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  body {
    padding: 0.5rem;
  }

  header h1 {
    font-size: 1.5rem;
  }

  nav {
    flex-direction: column;
    align-items: center;
  }

  section {
    padding: 1rem;
  }

  #preview-actions {
    flex-direction: column;
  }

  #preview-actions button {
    width: 100%;
  }
}

@media print {
  nav, footer, #preview-actions, #saved, #about {
    display: none;
  }

  body {
    max-width: 100%;
    padding: 0;
  }

  section {
    box-shadow: none;
    border: none;
    padding: 0;
  }

  #preview-output {
    border: none;
    background: none;
  }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
