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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #2c2c2c;
    background-color: #faf8f5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.site-header {
    background-color: #faf8f5;
    border-bottom: 1px solid #e0dcd5;
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #2c2c2c;
    font-weight: 600;
    font-size: 1.1rem;
}

.logo svg {
    color: #8b5e3c;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-list a {
    text-decoration: none;
    color: #555;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-list a:hover {
    color: #8b5e3c;
}

/* Main layout */
main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Workspace */
.workspace {
    margin-bottom: 3rem;
}

.workspace-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

.workspace-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 800px) {
    .workspace-grid {
        grid-template-columns: 1fr;
    }
}

/* Controls */
.controls-panel {
    background: #ffffff;
    border: 1px solid #e0dcd5;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.field-group {
    margin-bottom: 1.25rem;
}

.field-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-group input,
.field-group select,
.field-group textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fdfdfd;
    transition: border-color 0.2s;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
    outline: none;
    border-color: #8b5e3c;
    box-shadow: 0 0 0 2px rgba(139, 94, 60, 0.15);
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 500px) {
    .field-row {
        grid-template-columns: 1fr;
    }
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn-primary {
    background-color: #8b5e3c;
    color: #fff;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #6f4a2e;
}

.btn-secondary {
    background-color: #f0ede6;
    color: #333;
    border: 1px solid #ccc;
    padding: 0.7rem 1.5rem;
    border-radius: 4px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-secondary:hover {
    background-color: #e5e0d5;
}

/* Preview */
.preview-panel {
    position: relative;
}

.preview-sticky {
    position: sticky;
    top: 5rem;
}

.preview-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #777;
    margin-bottom: 0.75rem;
}

.label-card {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 1 / 1;
    border: 2px solid #333;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.85rem;
    line-height: 1.45;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.2s;
    margin: 0 auto;
}

.label-card.classic {
    background-color: #2c2c2c;
    color: #f0e6d2;
    border-color: #555;
}

.label-card.light {
    background-color: #ffffff;
    color: #1a1a1a;
    border-color: #bbb;
}

.label-card.minimal {
    background-color: #fafaf8;
    color: #1a1a1a;
    border: 1px dashed #999;
}

.label-header {
    border-bottom: 1px solid currentColor;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

.label-project {
    font-weight: 700;
    font-size: 1rem;
    display: block;
    word-break: break-word;
}

.label-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 1rem;
    flex: 1;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
}

.meta-key {
    font-weight: 600;
    opacity: 0.8;
}

.meta-value {
    text-align: right;
    word-break: break-word;
}

.label-notes {
    margin-top: 0.75rem;
    font-size: 0.7rem;
    border-top: 1px solid currentColor;
    padding-top: 0.5rem;
    opacity: 0.85;
    word-break: break-word;
}

.label-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    margin-top: 0.75rem;
    border-top: 1px solid currentColor;
    padding-top: 0.5rem;
    opacity: 0.7;
}

.print-hint {
    font-size: 0.75rem;
    color: #777;
    margin-top: 0.75rem;
    text-align: center;
}

/* Supporting content */
.supporting-content {
    margin-bottom: 3rem;
}

.supporting-content h2,
.examples-section h2,
.faq-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: #1a1a1a;
}

.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.support-card {
    background: #ffffff;
    border: 1px solid #e0dcd5;
    border-radius: 6px;
    padding: 1.25rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.support-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #8b5e3c;
}

.support-card p {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.6;
}

/* Examples */
.examples-section {
    margin-bottom: 3rem;
}

.style-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.example-item {
    background: #ffffff;
    border: 1px solid #e0dcd5;
    border-radius: 6px;
    padding: 1rem;
}

.example-swatch {
    width: 100%;
    height: 80px;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    border: 1px solid #ccc;
}

.classic-swatch {
    background-color: #2c2c2c;
}

.light-swatch {
    background-color: #ffffff;
}

.minimal-swatch {
    background-color: #fafaf8;
    border-style: dashed;
}

.example-item p {
    font-size: 0.85rem;
    color: #444;
}

/* FAQ */
.faq-section {
    margin-bottom: 3rem;
}

.faq-item {
    background: #ffffff;
    border: 1px solid #e0dcd5;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    padding: 0.25rem 1rem;
}

.faq-item summary {
    font-weight: 600;
    padding: 0.75rem 0;
    cursor: pointer;
    font-size: 0.95rem;
    color: #1a1a1a;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::before {
    content: "+ ";
    color: #8b5e3c;
    font-weight: 700;
}

.faq-item[open] summary::before {
    content: "− ";
}

.faq-item p {
    padding: 0 0 0.75rem 1.25rem;
    font-size: 0.9rem;
    color: #444;
    line-height: 1.6;
}

/* Ad slot */
.ad-slot {
    text-align: center;
    margin: 2rem 0;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f2ed;
    border-radius: 6px;
    border: 1px dashed #ddd;
}

/* Footer */
.site-footer {
    background-color: #f0ede6;
    border-top: 1px solid #e0dcd5;
    padding: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: #555;
    margin-top: auto;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-inner a {
    color: #8b5e3c;
    text-decoration: none;
}

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

.footer-version {
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.25rem;
}

/* Print styles */
@media print {
    body {
        background: white;
    }
    .site-header,
    .controls-panel,
    .supporting-content,
    .examples-section,
    .faq-section,
    .ad-slot,
    .site-footer,
    .print-hint,
    .preview-label {
        display: none !important;
    }
    .workspace-grid {
        display: block;
    }
    .preview-sticky {
        position: static;
    }
    .label-card {
        box-shadow: none;
        border: 1px solid #000;
        max-width: 100%;
        page-break-inside: avoid;
    }
}



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