﻿/* さくらメシ design tokens. Every colour, size and shadow the UI uses is defined here;
   page and component styles must reference these variables, never literal values. */
:root {
    /* Brand: blue (README §2). No pink. */
    --sm-color-primary: #3d6fb4;
    --sm-color-primary-dark: #2f5a96;
    --sm-color-primary-soft: #e8f0fb;
    --sm-color-navy: #1f3d63;
    --sm-color-accent: #e8672c;      /* prices, sale badges, "add" CTA emphasis */
    --sm-color-accent-dark: #cf5620;
    --sm-color-accent-soft: #fdeee6;

    --sm-color-text: #1f2933;
    --sm-color-text-muted: #6b7684;
    --sm-color-text-faint: #9aa4b0;
    --sm-color-text-invert: #ffffff;

    --sm-color-bg: #f5f7fa;
    --sm-color-surface: #ffffff;
    --sm-color-surface-alt: #f0f3f7;
    --sm-color-border: #dfe4ea;
    --sm-color-border-strong: #c4ccd6;

    --sm-color-success: #1e8e5a;
    --sm-color-success-soft: #e3f5ec;
    --sm-color-warning: #b45309;
    --sm-color-warning-soft: #fff4e5;
    --sm-color-danger: #c62828;
    --sm-color-danger-dark: #a61f1f;
    --sm-color-danger-soft: #fdecec;
    --sm-color-info-soft: #e8f0fb;
    --sm-color-favorite: #c62828;

    --sm-color-overlay: rgba(31, 41, 51, 0.55);
    --sm-color-skeleton: #e6eaf0;
    --sm-color-skeleton-shine: #f5f7fa;

    /* Typography */
    --sm-font-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", Meiryo,
        system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --sm-font-size-xs: 0.75rem;   /* 12px */
    --sm-font-size-sm: 0.875rem;  /* 14px */
    --sm-font-size-md: 1rem;      /* 16px: base, never smaller for body */
    --sm-font-size-lg: 1.125rem;  /* 18px */
    --sm-font-size-xl: 1.375rem;  /* 22px */
    --sm-font-size-2xl: 1.75rem;  /* 28px */
    --sm-font-size-3xl: 2.25rem;  /* 36px */
    --sm-line-height: 1.6;
    --sm-line-height-tight: 1.3;
    --sm-font-weight-regular: 400;
    --sm-font-weight-medium: 500;
    --sm-font-weight-bold: 700;

    /* Spacing (4px scale) */
    --sm-space-1: 0.25rem;
    --sm-space-2: 0.5rem;
    --sm-space-3: 0.75rem;
    --sm-space-4: 1rem;
    --sm-space-5: 1.25rem;
    --sm-space-6: 1.5rem;
    --sm-space-8: 2rem;
    --sm-space-10: 2.5rem;
    --sm-space-12: 3rem;
    --sm-space-16: 4rem;

    /* Radius */
    --sm-radius-sm: 6px;
    --sm-radius-md: 10px;
    --sm-radius-lg: 16px;
    --sm-radius-xl: 24px;
    --sm-radius-pill: 999px;

    /* Shadows */
    --sm-shadow-sm: 0 1px 2px rgba(31, 41, 51, 0.06), 0 1px 3px rgba(31, 41, 51, 0.08);
    --sm-shadow-md: 0 4px 12px rgba(31, 41, 51, 0.10);
    --sm-shadow-lg: 0 12px 32px rgba(31, 41, 51, 0.16);
    --sm-shadow-focus: 0 0 0 3px rgba(61, 111, 180, 0.35);

    /* Shared component rhythm */
    --sm-card-padding: var(--sm-space-4);
    --sm-section-gap: var(--sm-space-6);
    --sm-heading-gap: var(--sm-space-4);

    /* Layout */
    --sm-gutter: 1rem;
    --sm-container: 1200px;
    --sm-header-height: 76px;
    --sm-bottom-nav-height: 60px;
    --sm-touch-target: 44px;
    --sm-z-sticky: 20;
    --sm-z-header: 30;
    --sm-z-drawer: 40;
    --sm-z-modal: 50;
    --sm-z-toast: 60;
    --sm-z-loader: 70;

    /* Motion */
    --sm-duration: 180ms;
    --sm-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (min-width: 768px) {
    :root {
        --sm-card-padding: var(--sm-space-6);
        --sm-section-gap: var(--sm-space-8);
    }
}

@media (prefers-reduced-motion: reduce) {
    :root {
        --sm-duration: 0ms;
    }
}
