*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg: #FDF8F4;
  --color-surface: #FFFFFF;
  --color-text: #2D2A26;
  --color-text-muted: #6B625A;
  --color-accent: #C84B31;
  --color-accent-hover: #A33A24;
  --color-border: #E0D6CC;
  --color-danger: #B22222;
  --color-success: #2E7D32;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html { font-size: 17px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.15rem;
}

.logo-text { color: var(--color-accent); }

.site-nav { display: flex; gap: 1.5rem; }

.site-nav a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.site-nav a:hover { color: var(--color-accent); }

.site-main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.app-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.panel-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--color-text);
}

.pasta-form { display: flex; flex-direction: column; gap: 1.25rem; }

.form-group { display: flex; flex-direction: column; gap: 0.35rem; }

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}

.form-hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

select, input[type="number"] {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--color-bg);
  color: var(--color-text);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--color-accent);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.quick-buttons {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.quick-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-right: 0.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--color-surface);
  color: var(--color-text);
  transition: background 0.15s, border-color 0.15s;
}

.btn:hover { background: var(--color-bg); }

.btn-quick {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
}

.btn-quick.active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn-primary:hover { background: var(--color-accent-hover); }

.btn-secondary { background: var(--color-bg); }

.btn-danger {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
}

.result-card {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.result-empty {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 1rem;
}

.hidden { display: none !important; }

.time-display {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}

.time-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
}

.time-unit {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-right: 0.75rem;
}

.time-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  text-align: center;
}

.doneness-visual {
  width: 100%;
  margin-bottom: 1.25rem;
}

.doneness-bar {
  height: 10px;
  background: var(--color-border);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.doneness-fill {
  height: 100%;
  background: linear-gradient(90deg, #E8C07A, #C84B31, #6B3A2A);
  border-radius: 5px;
  transition: width 0.2s;
}

.doneness-markers {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.timer-display {
  text-align: center;
}

.timer-countdown {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-accent);
  display: block;
  margin-bottom: 0.5rem;
}

.saved-presets {
  margin-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  padding-top: 1rem;
}

.saved-presets h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

#presets-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#presets-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  padding: 0.35rem 0.5rem;
  background: var(--color-bg);
  border-radius: 4px;
}

#presets-list button {
  background: none;
  border: none;
  color: var(--color-accent);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
}

.content-extra {
  margin-bottom: 2.5rem;
}

.content-extra h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--color-text);
}

.extra-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.extra-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.extra-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.extra-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.mistakes-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mistakes-list li {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  font-size: 0.9rem;
}

.table-wrapper {
  overflow-x: auto;
  margin-bottom: 0.5rem;
}

.brand-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.brand-table th,
.brand-table td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.brand-table th {
  background: var(--color-bg);
  font-weight: 700;
}

.table-note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.faq-item summary {
  padding: 0.8rem 1rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
}

.faq-item p {
  padding: 0 1rem 0.8rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 1.25rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
}

.footer-nav a {
  color: var(--color-accent);
  text-decoration: none;
}

.footer-note a {
  color: var(--color-accent);
}

@media (max-width: 750px) {
  .app-layout { grid-template-columns: 1fr; }
  .extra-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.7rem; }
  .time-number { font-size: 2.2rem; }
}



/* 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;
}
