/* Laundry Symbol Quick-Lookup Card — styles.css */
:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --surface-alt: #f3f0eb;
  --border: #e0dbd4;
  --text: #2c2825;
  --text-muted: #6b6560;
  --text-light: #9a948e;
  --accent: #4a7c6f;
  --accent-light: #e8f2ee;
  --accent-hover: #3d6b5f;
  --warn: #c45b3a;
  --warn-light: #fdf0ec;
  --ok: #4a7c6f;
  --ok-light: #e8f2ee;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.08);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-w: 1200px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}
.logo:hover { text-decoration: none; }
.logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.header-nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}
.header-nav a {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}
.header-nav a:hover { color: var(--accent); }

/* Hero */
.hero {
  background: var(--accent-light);
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
}
.hero h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* Layout */
.page-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 860px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
}

/* Symbol Grid */
.symbol-grid-section {
  min-width: 0;
}
.search-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.search-input {
  flex: 1;
  min-width: 200px;
  padding: 0.65rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font);
  background: var(--surface);
  transition: border-color 0.15s;
}
.search-input:focus {
  outline: none;
  border-color: var(--accent);
}
.filter-bar {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.filter-btn {
  padding: 0.4rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.82rem;
  font-family: var(--font);
  cursor: pointer;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.symbol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.6rem;
}
.symbol-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.symbol-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.symbol-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.symbol-card.selected {
  border-color: var(--accent);
  background: var(--accent-light);
}
.symbol-card svg {
  width: 36px;
  height: 36px;
  margin-bottom: 0.35rem;
}
.symbol-card .label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.3;
  display: block;
}

/* Detail Panel */
.detail-panel {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 72px;
  box-shadow: var(--shadow);
}
.detail-panel.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  text-align: center;
}
.detail-panel.empty svg {
  width: 64px;
  height: 64px;
  color: var(--text-light);
  margin-bottom: 1rem;
}
.detail-panel.empty p {
  color: var(--text-light);
  font-size: 0.95rem;
}
.detail-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 0.75rem;
}
.detail-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.detail-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.detail-meaning {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.detail-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 400px) {
  .detail-lists { grid-template-columns: 1fr; }
}
.detail-list h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}
.detail-list.do h4 { color: var(--ok); }
.detail-list.dont h4 { color: var(--warn); }
.detail-list ul {
  list-style: none;
  padding: 0;
}
.detail-list li {
  font-size: 0.85rem;
  padding: 0.25rem 0;
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.45;
}
.detail-list li::before {
  position: absolute;
  left: 0;
  top: 0.25rem;
  font-size: 0.75rem;
}
.detail-list.do li::before { content: '\2713'; color: var(--ok); }
.detail-list.dont li::before { content: '\2717'; color: var(--warn); }

.detail-tip {
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  border-left: 3px solid var(--accent);
}
.detail-tip strong { color: var(--text); }

/* Content Section */
.content-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.content-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.content-card p, .content-card li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.content-card ul { padding-left: 1.25rem; }
.content-card li { margin-bottom: 0.35rem; }

/* Scenarios */
.scenario-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}
.scenario-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}
.scenario-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.scenario-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.scenario-card h3 .emoji { font-size: 1.2rem; }
.scenario-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Print Section */
.print-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  text-align: center;
}
.print-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.print-btn:hover { background: var(--accent-hover); }
.print-btn svg { width: 18px; height: 18px; }
.print-hint {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

/* Printable Card */
.printable-card {
  display: none;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  margin-top: 2rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-links {
  display: flex;
  gap: 1.25rem;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-copy {
  font-size: 0.82rem;
  color: var(--text-light);
}

/* Ad slot */
.ad-slot {
  margin: 1.5rem auto;
  max-width: var(--max-w);
  padding: 0 1.5rem;
}
.ad-placeholder {
  background: var(--surface-alt);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Print styles */
@media print {
  .site-header, .hero, .search-bar, .filter-bar, .detail-panel,
  .print-section, .scenario-section, .ad-slot, .site-footer,
  .content-section { display: none !important; }
  body { background: #fff; }
  .printable-card {
    display: block !important;
    padding: 1rem;
  }
  .printable-card h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  .printable-card .print-date {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 1rem;
  }
  .print-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
  }
  .print-symbol {
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0.5rem;
    text-align: center;
  }
  .print-symbol svg { width: 28px; height: 28px; }
  .print-symbol .pname { font-size: 0.65rem; font-weight: 600; margin-top: 0.25rem; }
  .print-symbol .pdesc { font-size: 0.55rem; color: #555; }
}

/* Responsive */
@media (max-width: 640px) {
  .hero h1 { font-size: 1.5rem; }
  .hero p { font-size: 0.95rem; }
  .symbol-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
  .symbol-card { padding: 0.75rem 0.35rem; }
  .header-inner { padding: 0.6rem 1rem; }
  .page-layout { padding: 1.25rem 1rem; }
}

/* Visually hidden but accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}



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