/* SEIZO-inspired corporate palette. Loaded after the existing page and shared styles.
   Business states, calendar cells, visibility rules and data layouts stay local
   to their original pages. Homepage composition is in seizo-home.css. */
body.seizo-site {
  --seizo-canvas: #ffffff;
  --seizo-card: #ffffff;
  --seizo-soft: #f3f5f8;
  --seizo-ink: #172033;
  --seizo-deep: #111827;
  --seizo-copy: #374151;
  --seizo-muted: #5e6778;
  --seizo-blue: #1d36ed;
  --seizo-rule: #e3e7ee;
  --seizo-input-rule: #9aa4b4;
  --seizo-white: #ffffff;
  --seizo-shadow: 0 6px 22px rgba(23, 32, 51, .045);
  --seizo-sans: 'Noto Sans JP', 'Yu Gothic', 'Hiragino Kaku Gothic ProN', 'Microsoft YaHei', Arial, sans-serif;
  --site-brand: var(--seizo-blue);
  --site-brand-dark: #1628b8;
  --site-accent: var(--seizo-blue);
  --site-text: var(--seizo-ink);
  --site-muted: var(--seizo-muted);
  --site-border: var(--seizo-rule);
  --brand: var(--seizo-blue) !important;
  --brand-blue: var(--seizo-blue) !important;
  --brand-dark: #1628b8 !important;
  --brand-light: rgba(29, 54, 237, .06) !important;
  --brand-soft: var(--seizo-soft) !important;
  --accent: var(--seizo-blue) !important;
  --accent-soft: #edf1ff;
  --text: var(--seizo-ink) !important;
  --text-main: var(--seizo-ink) !important;
  --text-sub: var(--seizo-muted) !important;
  --sub: var(--seizo-muted) !important;
  --muted: var(--seizo-muted);
  --line: var(--seizo-rule) !important;
  --bg: var(--seizo-canvas) !important;
  --bg-color: var(--seizo-canvas) !important;
  --card: var(--seizo-card) !important;
  --surface: var(--seizo-card);
  --glass: var(--seizo-card);
  --glass-bg: var(--seizo-card) !important;
  --glass-border: var(--seizo-rule);
  --shadow: var(--seizo-shadow);
  --radius-lg: 4px;
  --radius-sm: 4px;
}

@media screen {
  body.seizo-site {
    background: var(--seizo-canvas) !important;
    color: var(--seizo-ink) !important;
    font-family: var(--seizo-sans) !important;
    -webkit-font-smoothing: antialiased;
  }
  body.seizo-site :where(button, input, select, textarea) {
    font-family: var(--seizo-sans) !important;
  }
  body.seizo-site :where(a, button, input, select, textarea, summary, [role='button']):focus-visible {
    outline: 2px solid var(--seizo-blue) !important;
    outline-offset: 4px !important;
  }
  body.seizo-site :where(.muted, .hint, .app-desc, .empty, .price-note, .item-desc, .item-time) {
    color: var(--seizo-muted) !important;
  }
  body.seizo-site :where(.header, .site-global-header, .topbar) {
    color: var(--seizo-ink) !important;
    background: rgba(255, 255, 255, .98) !important;
    border-bottom: 1px solid var(--seizo-rule) !important;
    box-shadow: none !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  body.seizo-site :where(.brand, .brand-name, .site-brand-lockup) {
    color: var(--seizo-ink) !important;
    font-family: var(--seizo-sans) !important;
    font-weight: 700 !important;
    letter-spacing: .015em;
  }
  body.seizo-site :where(.site-brand-lockup img, .logo-img, .brand .logo) {
    object-fit: contain;
    mix-blend-mode: normal;
    border-radius: 0;
    box-shadow: none;
  }
  body.seizo-site :where(.site-button, .btn, .btn-brand, .btn-primary, .btn-recruit, .save-btn, .bulk-save, .submit, .row-save, .btn-home) {
    border-radius: 4px !important;
    font-family: var(--seizo-sans) !important;
    font-weight: 700 !important;
    letter-spacing: .015em;
    text-decoration: none;
    box-shadow: none !important;
    transition: background-color .18s, color .18s, border-color .18s !important;
  }
  body.seizo-site :where(.site-button-primary, .btn-brand, .btn-primary, .btn-recruit, .save-btn, .bulk-save, .submit, .row-save, .btn-home) {
    color: var(--seizo-card) !important;
    background: var(--seizo-blue) !important;
    border-color: var(--seizo-blue) !important;
  }
  body.seizo-site :where(.site-button-accent, .btn-recruit) {
    color: var(--seizo-white) !important;
    background: var(--seizo-blue) !important;
    border-color: var(--seizo-blue) !important;
  }
  body.seizo-site :where(.site-button-secondary, .btn-secondary, .btn-white) {
    color: var(--seizo-ink) !important;
    background: var(--seizo-card) !important;
    border-color: var(--seizo-blue) !important;
  }
  body.seizo-site :where(.site-button, .btn-brand, .btn-primary, .btn-recruit):hover {
    transform: none !important;
    filter: none !important;
  }
  body.seizo-site :where(.site-button-primary, .btn-brand, .btn-primary, .submit, .row-save):hover {
    background: #1628b8 !important;
    border-color: #1628b8 !important;
  }
  body.seizo-site :where(.site-button-secondary, .btn-secondary, .btn-white):hover {
    background: var(--seizo-soft) !important;
  }
  body.seizo-site :where(.site-button-accent, .btn-recruit):hover {
    background: #1628b8 !important;
    border-color: #1628b8 !important;
  }
  body.seizo-site :where(button, .btn, .site-button):disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none !important;
  }
  body.seizo-site :where(.glass-card, .controls-glass, .filter-panel, .admin-panel, .inventory-panel, .calendar-card, .price-card, .biz-item, .intro-card, .panel, .card, .login-card, .calendar-panel, .app-card, .summary-card, .faq-card, .metric, .item-card, .item, .message-card, .modal-card, .bottom-sheet, .bulk-panel) {
    border-color: var(--seizo-rule) !important;
    border-radius: 4px !important;
    background-color: var(--seizo-card) !important;
    box-shadow: var(--seizo-shadow) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  body.seizo-site :where(.glass-card, .price-card, .app-card):hover {
    transform: none !important;
    box-shadow: 0 8px 24px rgba(23, 32, 51, .08) !important;
  }
  body.seizo-site :where(input:not([type='checkbox']):not([type='radio']):not([type='color']):not([type='range']):not([type='hidden']):not([type='submit']):not([type='button']), select, textarea:not(.editor)) {
    color: var(--seizo-ink) !important;
    background: #ffffff !important;
    border-color: var(--seizo-input-rule) !important;
    border-radius: 4px !important;
  }
  body.seizo-site :where(input, select, textarea:not(.editor)):focus {
    border-color: var(--seizo-blue) !important;
    box-shadow: 0 0 0 3px rgba(29, 54, 237, .1) !important;
  }
  body.seizo-site :where(input, select, textarea):disabled {
    background-color: var(--seizo-soft) !important;
    color: var(--seizo-muted) !important;
  }
  body.seizo-site :where(input[type='checkbox'], input[type='radio'], input[type='range']) {
    accent-color: var(--seizo-blue);
  }
  body.seizo-site :where(input, textarea)::placeholder { color: #687182; opacity: 1; }
  body.seizo-site :where(label, .field label) { color: var(--seizo-copy); }
  body.seizo-site :where(th, td) { border-color: var(--seizo-rule) !important; }
  body.seizo-site th {
    color: var(--seizo-ink) !important;
    background: #f2f4f8 !important;
  }
  body.seizo-site :where(.table-wrap, .grid-wrap, .logs) {
    border-color: var(--seizo-rule);
    scrollbar-color: #a2abbb var(--seizo-canvas);
  }

  /* Public pages retain their structure, maps, illustrations and product photos. */
  body.seizo-public :where(h1, h2, .section-title, .xrf-headline) {
    font-family: var(--seizo-sans) !important;
    font-weight: 800 !important;
    letter-spacing: .015em;
    line-height: 1.35;
  }
  body.seizo-public :where(h3, h4, .price-name, .item-name, .panel-title) {
    font-family: var(--seizo-sans);
    font-weight: 600 !important;
  }
  body.seizo-public :where(.header .header-inner, .site-global-header-inner) { min-height: 88px; }
  body.seizo-public .site-public-nav { gap: clamp(12px, 1.5vw, 22px) !important; }
  body.seizo-public .site-public-nav a {
    font-size: .81rem;
    font-weight: 600 !important;
    color: var(--seizo-copy) !important;
    border-bottom-width: 2px !important;
    padding-top: 17px !important;
    padding-bottom: 12px !important;
    background: transparent !important;
  }
  body.seizo-public .site-public-nav :where(a:hover, a:focus-visible, a.active, a[aria-current='page']) {
    color: var(--seizo-ink) !important;
    border-bottom-color: var(--seizo-blue) !important;
  }
  body.seizo-public :where(.page-header, .page-head) { color: var(--seizo-ink); }
  body.seizo-public :where(.page-header h1, .page-head h1, .section-title, .section-heading h2, .vision-text h3, .xrf-section-heading h2, .xrf-step h3, .xrf-hero .xrf-headline) {
    color: var(--seizo-ink) !important;
  }
  body.seizo-public :where(.page-header p, .page-head p, .hero-lead, .section-heading p) { color: var(--seizo-copy); }
  body.seizo-public :where(.section-title::before, .section-title::after, .eyebrow::before, .xrf-eyebrow::before) {
    height: 3px;
    background: var(--seizo-blue);
    opacity: 1;
  }
  body.seizo-public :where(.eyebrow, .xrf-eyebrow, .step-label, .xrf-step-number) { color: var(--seizo-blue); }
  body.seizo-public :where(.price-value, .item-price, .info-label, .price-name, .item-name) { color: var(--seizo-ink); }
  body.seizo-public :where(.price-cat, .item-category, .update-badge) {
    color: var(--seizo-blue);
    background: var(--seizo-soft);
    border-color: var(--seizo-rule);
  }
  body.seizo-public :where(.price-image, .item-photo-placeholder, .step-visual, .xrf-home-visual, .xrf-step-visual) { background: var(--seizo-soft); }
  body.seizo-public :where(.chip, .cat-btn, .m-btn, .site-filter, .cat-tag, .small-link, .flow-jump a, .xrf-jumps a) {
    background: var(--seizo-card) !important;
    border-color: var(--seizo-rule) !important;
    color: var(--seizo-copy) !important;
    border-radius: 4px !important;
    box-shadow: none !important;
  }
  body.seizo-public :where(.chip.active, .cat-btn.active, .m-btn.active, .site-filter.active, .site-filter[aria-pressed='true'], .small-link.primary) {
    background: var(--seizo-blue) !important;
    border-color: var(--seizo-blue) !important;
    color: var(--seizo-card) !important;
  }
  body.seizo-public :where(.chip, .cat-btn, .m-btn, .site-filter, .cat-tag, .small-link, .flow-jump a, .xrf-jumps a):hover {
    border-color: var(--seizo-blue) !important;
    transform: none !important;
  }
  body.seizo-public .about-hero {
    background-image: linear-gradient(rgba(23, 32, 51, .66), rgba(23, 32, 51, .66)), url('images/company-large.jpg');
    color: #ffffff;
  }
  body.seizo-public .about-hero h1 { color: #ffffff; }
  body.seizo-public .hero:has(.flow-jump),
  body.seizo-public .xrf-hero { background: var(--seizo-canvas); border-color: var(--seizo-rule); }
  body.seizo-public :where(.guide, .xrf-flow) { background: var(--seizo-soft); border-color: var(--seizo-rule); }
  body.seizo-public :where(.step, .xrf-step, .xrf-home, .xrf-promises, .xrf-materials li) {
    background: var(--seizo-card);
    border-color: var(--seizo-rule);
    border-radius: 4px;
    box-shadow: var(--seizo-shadow);
  }
  body.seizo-public :where(.xrf-related, .guide-note, .xrf-note) {
    background: #eef2ff;
    border-color: var(--seizo-blue);
    color: var(--seizo-ink);
  }
  body.seizo-public .xrf-material-symbol { background: #eef1ff; color: var(--seizo-ink); }
  body.seizo-public :where(.recruit-box, .cta, .xrf-contact) { background: var(--seizo-blue); color: #ffffff; }
  body.seizo-public :where(.recruit-box, .cta, .xrf-contact) :where(h2, h3) { color: #ffffff; }
  body.seizo-public :where(footer, .footer, .xrf-footer) {
    background: var(--seizo-deep) !important;
    color: #d7deeb !important;
    border-color: var(--seizo-blue);
  }
  body.seizo-public :where(footer, .footer, .xrf-footer) :where(strong, a) { color: #ffffff; }
  body.seizo-site :where(.phone-float-btn, .floating-phone) {
    background: var(--seizo-blue) !important;
    color: var(--seizo-card) !important;
    border-color: var(--seizo-card) !important;
    box-shadow: 0 3px 12px rgba(23, 32, 51, .16) !important;
    animation: none;
  }
  body.seizo-site :where(.line-float-btn, .floating-line) {
    /* LINE's established green is an identifying color, not a theme accent. */
    border-color: var(--seizo-card) !important;
    border-radius: 4px !important;
    box-shadow: 0 3px 12px rgba(23, 32, 51, .12) !important;
  }
  body.seizo-public :where(.bottom-bar, .bottom-sheet) { background: var(--seizo-card); border-color: var(--seizo-rule); }
  body.seizo-public :where(.bulk-shortcuts button, .opt-btn:not(.active-red):not(.active-green), .bulk-status-btn:not(.active)) {
    background: var(--seizo-card);
    border-color: var(--seizo-rule);
    color: var(--seizo-copy);
  }

  /* Staff tools use the same colors with practical sans-serif headings. */
  body.seizo-internal { --seizo-canvas: #f5f7fb; }
  body.seizo-internal .header,
  body.seizo-internal .topbar {
    background: rgba(255, 255, 255, .98) !important;
    border-bottom-color: var(--seizo-rule) !important;
    box-shadow: none !important;
  }
  body.seizo-internal :where(h1, h2, h3, h4, .panel-title, .section-title, .item-title, .app-title) {
    color: var(--seizo-ink) !important;
    font-family: var(--seizo-sans) !important;
    font-weight: 700 !important;
  }
  body.seizo-internal :where(.nav a, .nav button, .header-actions a, .header-actions button, .top-actions .pill) {
    background: var(--seizo-card) !important;
    border: 1px solid var(--seizo-rule) !important;
    border-radius: 4px !important;
    color: var(--seizo-copy) !important;
    box-shadow: none !important;
    font-weight: 700 !important;
  }
  body.seizo-internal :where(.nav a, .nav button, .header-actions a, .header-actions button, .top-actions .pill):hover,
  body.seizo-internal :where(.nav a.active, .header-actions .primary, .top-actions .pill.primary) {
    color: var(--seizo-card) !important;
    background: var(--seizo-blue) !important;
    border-color: var(--seizo-blue) !important;
  }
  body.seizo-internal :where(.btn, .submit, .save-btn, .bulk-save, .row-save, .row-print-btn, .install-box button, .login-panel a, .month-bar button, .employee-picker-tools button, button.submit) {
    background: var(--seizo-blue) !important;
    border-color: var(--seizo-blue) !important;
    color: var(--seizo-card) !important;
    border-radius: 4px !important;
    box-shadow: none !important;
  }
  body.seizo-internal :where(.btn, .submit, .save-btn, .bulk-save, .row-save, .row-print-btn, .install-box button, .login-panel a):hover {
    background: #1628b8 !important;
    border-color: #1628b8 !important;
    color: var(--seizo-card) !important;
    transform: none !important;
  }
  body.seizo-internal :where(.btn.secondary, .btn.light, .btn.ghost, .top-actions .btn:not(.primary):not(.danger):not(.ok)) {
    background: var(--seizo-card) !important;
    border-color: var(--seizo-blue) !important;
    color: var(--seizo-ink) !important;
  }
  body.seizo-internal :where(.btn.secondary, .btn.light, .btn.ghost):hover { background: var(--seizo-soft) !important; }
  body.seizo-internal :where(.tab, .tab-btn, .view-tab, .shift-preset-btn, .switcher button, .pill, .ledger-button) {
    background: var(--seizo-card) !important;
    border-color: var(--seizo-rule) !important;
    color: var(--seizo-copy) !important;
    border-radius: 4px !important;
    box-shadow: none !important;
  }
  body.seizo-internal :where(.tab.active, .tab-btn.active, .view-tab.active, .shift-preset-btn.active, .switcher button.active, .switcher button[data-mode].active, .pill.primary, .ledger-button.active) {
    background: var(--seizo-blue) !important;
    border-color: var(--seizo-blue) !important;
    color: var(--seizo-card) !important;
    box-shadow: none !important;
  }
  body.seizo-internal :where(.install-box, .calc-box, .summary div, .payroll-summary div, .total-box, .test-box, .notice, .detail-box, .status-line, .switch-row) {
    background: var(--seizo-soft);
    border-color: var(--seizo-rule);
    color: var(--seizo-copy);
  }
  body.seizo-internal :where(.metric, .summary-card, .app-card) { background: var(--seizo-card); }
  body.seizo-internal :where(.metric strong, .summary-card strong, .summary strong, .payroll-summary strong, .calc-grid strong, .total-box strong, .employee-card strong) { color: var(--seizo-ink); }
  body.seizo-internal :where(.app-foot, .item-body, .employee-meta .tag, .date-chip, .entitle-note, .file-meta) { color: var(--seizo-muted); }
  body.seizo-internal :where(.tag, .date-chip, .used-dates, .fold-panel, .statusbar, .editor-head, .sidebar, .test-result, .calc-grid div) {
    background: var(--seizo-card);
    border-color: var(--seizo-rule);
  }
  body.seizo-internal .file-button {
    display: grid !important;
    text-align: left !important;
    justify-content: start !important;
    background: transparent !important;
    color: var(--seizo-ink) !important;
    border-color: transparent !important;
    box-shadow: none !important;
  }
  body.seizo-internal .file-button:hover,
  body.seizo-internal .file-button.active {
    color: var(--seizo-ink) !important;
    background: #edf1ff !important;
    border-color: var(--seizo-rule) !important;
    transform: none !important;
  }
  body.seizo-internal textarea.editor {
    /* Keep the code editor monospaced and aligned with its line-number rail. */
    font-family: Consolas, 'Courier New', monospace !important;
    background: #172033 !important;
    color: #f1f5fb !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  body.seizo-internal .editor-wrap { background: #172033; }
  body.seizo-internal .lines { background: #111827; color: #aab5c9; }
  body.seizo-internal .login-shell { background: var(--seizo-canvas); }
  body.seizo-internal .login-card { background: var(--seizo-card) !important; }
  body.seizo-internal .login-card .links a,
  body.seizo-internal .card .links a { color: var(--seizo-ink); text-underline-offset: 4px; }
  body.seizo-internal .day-name { background: #f2f4f8; }
  body.seizo-internal .day-name:first-child { color: #b42325; }
  body.seizo-internal .day.empty,
  body.seizo-internal .day-cell.empty { background: var(--seizo-soft); }

  /* Explicit functional colors remain distinct from the brand palette. */
  body.seizo-site :where(.btn.danger, .site-button-danger, .delete, .close-btn) {
    color: #fff !important;
    border-color: #b63d39 !important;
    background: #b63d39 !important;
  }
  body.seizo-site :where(.btn.danger, .site-button-danger, .delete, .close-btn):hover {
    border-color: #982f2d !important;
    background: #982f2d !important;
  }
  body.seizo-site .btn.ok {
    color: #fff !important;
    background: #2f7450 !important;
    border-color: #2f7450 !important;
  }
  body.seizo-site .btn.warn {
    color: #fff !important;
    background: #8d641c !important;
    border-color: #8d641c !important;
  }
  body.seizo-site :where(.lithium-notice h2, .lithium-notice h3, .caution-title) {
    font-family: var(--seizo-sans) !important;
    font-weight: 700 !important;
  }
  body.seizo-site :where(.lithium-notice h2, .lithium-notice h3) { color: #7f1d1d !important; }
  body.seizo-site :where(.message.error, .message-card .error, .row-status.error) { color: #b42325 !important; }
  body.seizo-site .message.success { color: #246642 !important; }
}

@media screen and (max-width: 960px) {
  body.seizo-public :where(.header .header-inner, .site-global-header-inner) { min-height: 72px; }
  body.seizo-public .site-public-nav { border-top-color: var(--seizo-rule) !important; }
  body.seizo-public .site-public-nav a { min-height: 44px; }
  body.seizo-internal :where(.nav, .header-actions, .top-actions) { scrollbar-color: #a2abbb var(--seizo-canvas); }
}
@media screen and (max-width: 600px) {
  body.seizo-public .site-brand-lockup { font-size: 1rem; }
  body.seizo-public .site-public-nav a { font-size: .79rem; }
  body.seizo-site :where(input:not([type='checkbox']):not([type='radio']), select, textarea:not(.editor)) { font-size: 16px !important; }
  body.seizo-site :where(.site-button, .btn, .save-btn, .bulk-save, .submit) { min-height: 44px; }
  body.seizo-site :where(.site-brand-lockup img, .logo-img) { width: 36px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  body.seizo-site :where(.site-button, .btn, .glass-card, .price-card, .app-card, .phone-float-btn, .floating-phone) {
    animation: none !important;
    transition: none !important;
  }
}
