/* Reset and base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f0f5f4;
  --surface: #ffffff;
  --border: #d1d5db;
  --text: #1f2937;
  --text-muted: #6b7280;
  --accent: #0d9488;
  --accent-light: #ccfbf1;
  --accent-dark: #0f766e;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --font: system-ui, -apple-system, sans-serif;
}
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 1rem 0; position: sticky; top: 0; z-index: 100; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.logo { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--text); font-size: 1rem; }
.logo:hover { text-decoration: none; }
.logo-text { white-space: nowrap; }
.site-nav { display: flex; gap: 1.25rem; font-size: .9rem; }
.site-nav a { color: var(--text-muted); font-weight: 500; }
.site-nav a:hover { color: var(--accent); text-decoration: none; }

/* Hero */
.hero { padding: 3.5rem 0 2rem; text-align: center; }
.hero h1 { font-size: 2.25rem; font-weight: 800; line-height: 1.2; margin-bottom: .75rem; }
.hero-sub { font-size: 1.1rem; color: var(--text-muted); max-width: 600px; margin: 0 auto; }

/* Planner shell */
.planner-shell { padding: 1rem 0 3rem; }
.planner-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 860px) {
  .planner-grid { grid-template-columns: 1fr; }
}

/* Cards */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin-bottom: 1.5rem; }
.card h2 { font-size: 1.2rem; margin-bottom: 1rem; }
.card h3 { font-size: 1rem; margin-bottom: .75rem; }

/* Fields */
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: .35rem; }
.field input[type="text"],
.field input[type="date"],
.field input[type="number"],
.field textarea,
.field select {
  width: 100%; padding: .6rem .75rem; border: 1px solid var(--border); border-radius: 8px;
  font-size: .95rem; font-family: var(--font); background: var(--surface); color: var(--text);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field.inline { display: flex; gap: .5rem; align-items: stretch; }
.field.inline input { flex: 1; }

/* Checkbox group */
.checkbox-group { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .5rem; }
.checkbox { display: flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 500; cursor: pointer; padding: .35rem .65rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.checkbox input { accent-color: var(--accent); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: .55rem 1rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-size: .9rem; font-weight: 500; cursor: pointer; font-family: var(--font); transition: background .15s, border-color .15s; }
.btn:hover { background: var(--accent-light); border-color: var(--accent); }
.btn-sm { padding: .4rem .75rem; font-size: .85rem; }
.btn-preset { background: var(--bg); }
.btn-preset.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Day toggles */
.day-toggles { display: flex; gap: .4rem; flex-wrap: wrap; }
.day-btn { display: flex; align-items: center; gap: .3rem; padding: .35rem .6rem; border: 1px solid var(--border); border-radius: 8px; font-size: .8rem; cursor: pointer; background: var(--bg); font-weight: 500; user-select: none; }
.day-btn:has(input:checked) { background: var(--accent); color: #fff; border-color: var(--accent); }
.day-btn input { position: absolute; opacity: 0; pointer-events: none; }

/* Preset row */
.preset-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }

.hint { font-size: .8rem; color: var(--text-muted); margin-bottom: .4rem; }

/* Action grid */
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .75rem; }
@media (max-width: 480px) { .action-grid { grid-template-columns: 1fr; } }

/* Status */
.status { font-size: .8rem; color: var(--text-muted); min-height: 1.2em; }

/* Calendar output */
.calendar-card { min-height: 400px; }
.calendar-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.badge { background: var(--accent-light); color: var(--accent-dark); font-size: .75rem; font-weight: 600; padding: .25rem .65rem; border-radius: 999px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .5rem; margin-bottom: 1.5rem; }
@media (max-width: 600px) { .calendar-grid { grid-template-columns: repeat(4, 1fr); } }
.cal-weekday { font-size: .7rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); padding-bottom: .25rem; text-align: center; }
.cal-day { border: 1px solid var(--border); border-radius: 8px; padding: .5rem; min-height: 80px; font-size: .75rem; background: var(--bg); }
.cal-day.has-post { background: var(--accent-light); border-color: var(--accent); }
.cal-day-date { font-weight: 700; font-size: .85rem; margin-bottom: .25rem; }
.cal-day-platforms { display: flex; flex-wrap: wrap; gap: .2rem; }
.cal-platform-tag { background: var(--accent); color: #fff; font-size: .65rem; padding: .1rem .4rem; border-radius: 4px; }
.cal-day.empty { opacity: .4; }

/* Schedule list */
.schedule-list { border-top: 1px solid var(--border); padding-top: 1rem; }
.schedule-list h3 { font-size: 1rem; margin-bottom: .5rem; }
.sched-item { display: flex; align-items: flex-start; gap: .75rem; padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .85rem; }
.sched-item:last-child { border-bottom: none; }
.sched-date { font-weight: 700; white-space: nowrap; min-width: 110px; }
.sched-platforms { display: flex; flex-wrap: wrap; gap: .25rem; }
.sched-tag { background: var(--accent-light); color: var(--accent-dark); font-size: .7rem; padding: .15rem .5rem; border-radius: 4px; font-weight: 600; }

/* Empty state */
.empty-state { grid-column: 1 / -1; text-align: center; color: var(--text-muted); padding: 3rem 1rem; font-size: .95rem; }

/* Content sections */
.content-section { padding: 3rem 0; }
.content-section h2 { font-size: 1.5rem; margin-bottom: 1.5rem; text-align: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
@media (max-width: 768px) { .grid-3 { grid-template-columns: 1fr; } }
.info-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.info-num { width: 32px; height: 32px; background: var(--accent); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; margin-bottom: .75rem; }
.info-card h3 { font-size: 1rem; margin-bottom: .5rem; }
.info-card p { font-size: .9rem; color: var(--text-muted); }

.note-block { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin-bottom: 1.5rem; }
.note-block h3 { font-size: 1.05rem; margin-bottom: .75rem; }
.note-block p, .note-block li { font-size: .9rem; color: var(--text-muted); }
.note-block ul { padding-left: 1.25rem; }
.note-block li { margin-bottom: .4rem; }

/* FAQ */
.faq-list details { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.25rem; margin-bottom: .75rem; }
.faq-list summary { font-weight: 600; cursor: pointer; font-size: .95rem; }
.faq-list details p { margin-top: .5rem; font-size: .9rem; color: var(--text-muted); }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 2rem 0; margin-top: 2rem; font-size: .85rem; color: var(--text-muted); }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-tag { margin-top: .25rem; }

/* Print */
@media print {
  .site-header, .site-footer, .planner-controls, .action-card, .content-section { display: none !important; }
  .planner-shell { padding: 0; }
  .planner-grid { display: block; }
  .card { box-shadow: none; border: none; padding: 0; }
  body { background: #fff; }
}



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