:root {
  --site-brand: #4f8fc9;
  --site-brand-dark: #356f9f;
  --site-accent: #d99a2b;
  --site-danger: #dc4c4c;
  --site-text: #243241;
  --site-muted: #5d6a79;
  --site-border: #d7e3ec;
}

body,
button,
input,
select,
textarea {
  font-family: 'Noto Sans JP', 'Helvetica Neue', Arial, sans-serif;
}

.site-skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 9999;
  padding: 10px 16px;
  border-radius: 4px;
  background: var(--site-brand-dark);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .2s ease;
}

.site-skip-link:focus {
  transform: translateY(0);
}

.site-brand-lockup {
  display: inline-flex !important;
  align-items: center;
  gap: 11px;
  color: var(--site-brand-dark) !important;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none !important;
  white-space: nowrap;
}

.site-brand-lockup img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
}

.site-public-nav {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 1.5vw, 20px) !important;
  min-width: 0;
  font-size: .84rem !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

.site-public-nav a {
  min-height: 46px;
  display: inline-flex !important;
  align-items: center;
  padding: 15px 0 12px !important;
  border-bottom: 3px solid transparent !important;
  color: var(--site-text) !important;
  line-height: 1.3;
  text-decoration: none !important;
  transition: color .2s ease, border-color .2s ease !important;
}

.site-public-nav a:hover,
.site-public-nav a:focus-visible,
.site-public-nav a.active,
.site-public-nav a[aria-current='page'] {
  border-bottom-color: var(--site-accent) !important;
  color: var(--site-brand-dark) !important;
}

.site-public-nav .site-staff-link {
  color: var(--site-muted) !important;
}

.site-global-header {
  border-bottom: 1px solid var(--site-border);
  background: rgba(255, 255, 255, .96);
}

.site-global-header-inner {
  width: min(1120px, calc(100% - 32px));
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
}

[role='button']:focus-visible {
  outline: 3px solid rgba(217, 154, 43, .36);
  outline-offset: 3px;
}

.site-button {
  min-height: 48px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 22px !important;
  border: 2px solid transparent !important;
  border-radius: 4px !important;
  font-size: .9rem !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  letter-spacing: .01em;
  text-align: center;
  text-decoration: none !important;
  white-space: normal;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(36, 50, 65, .10);
  transition:
    color .2s ease,
    background-color .2s ease,
    border-color .2s ease,
    box-shadow .2s ease,
    transform .2s ease !important;
}

.site-button:hover,
.site-button:focus-visible {
  filter: none !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 22px rgba(36, 50, 65, .16);
}

.site-button:focus-visible,
.site-filter:focus-visible,
.site-nav-button:focus-visible {
  outline: 3px solid rgba(217, 154, 43, .32);
  outline-offset: 3px;
}

.site-button-primary {
  border-color: var(--site-brand) !important;
  background: var(--site-brand) !important;
  color: #fff !important;
}

.site-button-primary:hover,
.site-button-primary:focus-visible {
  border-color: var(--site-brand-dark) !important;
  background: var(--site-brand-dark) !important;
}

.site-button-accent {
  border-color: var(--site-accent) !important;
  background: var(--site-accent) !important;
  color: #fff !important;
}

.site-button-accent:hover,
.site-button-accent:focus-visible {
  border-color: #bd7f17 !important;
  background: #bd7f17 !important;
}

.site-button-secondary {
  border-color: var(--site-brand) !important;
  background: #fff !important;
  color: var(--site-brand-dark) !important;
}

.site-button-secondary:hover,
.site-button-secondary:focus-visible {
  background: #eef6fc !important;
}

.site-button-outline-on-dark {
  border-color: rgba(255, 255, 255, .78) !important;
  background: transparent !important;
  color: #fff !important;
  box-shadow: none;
}

.site-button-outline-on-dark:hover,
.site-button-outline-on-dark:focus-visible {
  border-color: #fff !important;
  background: rgba(255, 255, 255, .10) !important;
}

.site-button-danger {
  border-color: var(--site-danger) !important;
  background: var(--site-danger) !important;
  color: #fff !important;
}

.site-button-danger:hover,
.site-button-danger:focus-visible {
  border-color: #b93a3a !important;
  background: #b93a3a !important;
}

.site-button:disabled,
.site-button[aria-disabled='true'] {
  opacity: .52;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

.site-filter {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 15px !important;
  border: 1px solid var(--site-border) !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: var(--site-muted) !important;
  font-size: .84rem !important;
  font-weight: 700 !important;
  line-height: 1.3;
  cursor: pointer;
  box-shadow: none !important;
  transition:
    color .2s ease,
    background-color .2s ease,
    border-color .2s ease,
    transform .2s ease !important;
}

.site-filter:hover,
.site-filter:focus-visible {
  border-color: var(--site-brand) !important;
  color: var(--site-brand-dark) !important;
  transform: translateY(-1px) !important;
}

.site-filter.active,
.site-filter[aria-pressed='true'] {
  border-color: var(--site-brand) !important;
  background: var(--site-brand) !important;
  color: #fff !important;
}

.site-nav-button {
  min-height: 40px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 8px 14px !important;
  border: 1px solid var(--site-border) !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: var(--site-brand-dark) !important;
  font-size: .82rem !important;
  font-weight: 700 !important;
  line-height: 1.3;
  text-decoration: none !important;
  transition:
    color .2s ease,
    background-color .2s ease,
    border-color .2s ease !important;
}

.site-nav-button:hover,
.site-nav-button:focus-visible,
.site-nav-button.primary {
  border-color: var(--site-brand) !important;
  background: var(--site-brand) !important;
  color: #fff !important;
}

.phone-float-btn,
.floating-phone {
  border-color: #fff !important;
  background: var(--site-brand) !important;
  color: #fff !important;
}

.phone-float-btn:hover,
.phone-float-btn:focus-visible,
.floating-phone:hover,
.floating-phone:focus-visible {
  background: var(--site-brand-dark) !important;
}

.line-float-btn,
.floating-line {
  border-radius: 4px !important;
  background: #06c755 !important;
  color: #fff !important;
  font-weight: 700 !important;
}

.line-float-btn:hover,
.line-float-btn:focus-visible,
.floating-line:hover,
.floating-line:focus-visible {
  background: #05ad4a !important;
}

.line-text-main,
.floating-line strong {
  font-weight: 700 !important;
}

@media (max-width: 600px) {
  .site-button {
    width: 100%;
    min-height: 50px;
    padding: 12px 18px !important;
  }

  .site-filter {
    min-height: 42px;
  }

  .line-float-btn {
    left: 12px !important;
    right: 82px !important;
    bottom: 12px !important;
    min-height: 52px;
    padding: 8px 14px !important;
    justify-content: center;
    border-radius: 4px !important;
  }

  .line-float-btn .line-text-sub {
    display: none;
  }

  .phone-float-btn {
    right: 12px !important;
    bottom: 12px !important;
    width: 58px !important;
    height: 52px !important;
    border-radius: 4px !important;
    animation: none !important;
  }

  .floating-contact {
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    grid-template-columns: minmax(0, 1fr) 58px;
    gap: 8px !important;
    justify-items: stretch !important;
  }

  .floating-line {
    min-height: 52px;
    justify-content: center;
  }

  .floating-line span {
    display: none;
  }

  .floating-phone {
    width: 58px !important;
    height: 52px !important;
    border-radius: 4px !important;
    justify-self: end;
  }
}

/* Important notice: lithium-ion battery products */
.lithium-notice {
  margin: 0 0 22px;
  padding: 22px;
  border: 1px solid rgba(185, 28, 28, .24);
  border-left: 5px solid #b91c1c;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(254, 242, 242, .98), rgba(255, 247, 237, .94));
  color: #4c1d1d;
  box-shadow: 0 10px 24px rgba(127, 29, 29, .08);
}

.lithium-notice-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.lithium-notice-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #b91c1c;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 5px 12px rgba(185, 28, 28, .2);
}

.lithium-notice-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #b91c1c;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.3;
}

.lithium-notice :where(h2, h3) {
  margin: 7px 0 0;
  color: #7f1d1d;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.45;
  letter-spacing: 0;
}

.lithium-notice-lead {
  margin: 17px 0 14px;
  padding: 12px 14px;
  border-radius: 4px;
  background: #b91c1c;
  color: #fff !important;
  font-size: 1rem;
  font-weight: 700 !important;
  line-height: 1.6;
}

.lithium-notice-body {
  display: grid;
  gap: 9px;
}

.lithium-notice p {
  color: #612525;
  line-height: 1.75;
}

.lithium-notice-body p,
.lithium-notice-compact > p {
  margin: 0;
}

.lithium-notice .lithium-notice-exception {
  margin: 15px 0 0;
  padding: 12px 14px;
  border-left: 3px solid #d97706;
  border-radius: 4px;
  background: #fffbeb;
  color: #78350f;
  line-height: 1.7;
}

.lithium-notice-exception strong {
  color: #92400e;
  font-weight: 700;
}

.lithium-notice-examples {
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid rgba(185, 28, 28, .16);
}

.lithium-notice-examples h4 {
  margin: 0 0 10px;
  color: #7f1d1d;
  font-size: .88rem;
}

.lithium-notice-examples ul {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lithium-notice-examples li {
  padding: 6px 9px;
  border: 1px solid rgba(185, 28, 28, .16);
  border-radius: 4px;
  background: rgba(255, 255, 255, .82);
  color: #612525;
  font-size: .78rem;
  font-weight: 700 !important;
  line-height: 1.35;
}

.lithium-notice-compact {
  margin: 0 0 26px;
}

.lithium-notice-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 15px;
  padding: 9px 14px;
  border: 1px solid #b91c1c;
  border-radius: 4px;
  background: #fff;
  color: #991b1b;
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.lithium-notice-link:hover,
.lithium-notice-link:focus-visible {
  background: #b91c1c;
  color: #fff;
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .lithium-notice {
    padding: 17px;
    border-left-width: 4px;
  }

  .lithium-notice-header {
    gap: 10px;
  }

  .lithium-notice-icon {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
    font-size: 1.05rem;
  }

  .lithium-notice-lead {
    margin-top: 14px;
    padding: 11px 12px;
    font-size: .93rem;
  }

  .lithium-notice-link {
    width: 100%;
  }
}

@media (max-width: 960px) {
  .header .header-inner {
    flex-wrap: wrap;
    gap: 8px 20px !important;
    padding-top: 10px;
  }

  .site-public-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 8px !important;
    overflow-x: auto;
    padding-top: 2px;
    border-top: 1px solid var(--site-border);
    scrollbar-width: none;
  }

  .site-public-nav::-webkit-scrollbar {
    display: none;
  }

  .site-public-nav a {
    min-height: 42px;
    flex: 0 0 auto;
    padding: 9px 10px 8px !important;
  }

  .site-global-header-inner {
    flex-wrap: wrap;
    gap: 8px 20px;
    padding: 10px 0 0;
  }
}

/* Internal systems: admin, staff and trainee pages */
.site-internal {
  --brand: var(--site-brand) !important;
  --brand-blue: var(--site-brand) !important;
  --brand-dark: var(--site-brand-dark) !important;
  --accent: var(--site-accent) !important;
  --text: var(--site-text) !important;
  --text-main: var(--site-text) !important;
  --sub: var(--site-muted) !important;
  --text-sub: var(--site-muted) !important;
  --line: var(--site-border) !important;
  --bg: #f6f9fc !important;
  --card: #fff !important;
  --danger: var(--site-danger) !important;
  color: var(--site-text) !important;
  background-color: #f6f9fc;
  font-family: 'Noto Sans JP', 'Helvetica Neue', Arial, sans-serif !important;
}

.site-internal h1,
.site-internal h2,
.site-internal h3,
.site-internal .panel-title,
.site-internal .section-title,
.site-internal .item-title,
.site-internal .app-title {
  color: var(--site-brand-dark) !important;
  font-family: 'Noto Sans JP', 'Helvetica Neue', Arial, sans-serif !important;
  font-weight: 700 !important;
}

.site-internal .muted,
.site-internal .hint,
.site-internal .app-desc,
.site-internal .item-body,
.site-internal .empty {
  color: var(--site-muted) !important;
}

.site-internal label,
.site-internal strong,
.site-internal th {
  font-weight: 700 !important;
}

.site-internal .header,
.site-internal .topbar {
  border-bottom: 1px solid var(--site-border) !important;
  background: rgba(255, 255, 255, .96) !important;
  color: var(--site-text) !important;
  box-shadow: 0 4px 18px rgba(36, 50, 65, .04);
  backdrop-filter: blur(10px);
}

.site-internal .header-inner,
.site-internal .topbar {
  min-height: 70px;
}

.site-internal .brand {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  color: var(--site-brand-dark) !important;
  font-size: 1.02rem !important;
  font-weight: 700 !important;
  line-height: 1.3;
  text-decoration: none !important;
  white-space: nowrap;
}

.site-internal .brand::before {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: url('images/image-logo.jpg') center / cover no-repeat;
  content: '';
}

.site-internal .nav,
.site-internal .header-actions,
.site-internal .top-actions {
  display: flex;
  align-items: center;
  gap: 8px !important;
}

.site-internal .nav a,
.site-internal .nav button,
.site-internal .header-actions .pill,
.site-internal .top-actions .pill {
  min-height: 40px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 8px 13px !important;
  border: 1px solid var(--site-border) !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: var(--site-brand-dark) !important;
  font-size: .82rem !important;
  font-weight: 700 !important;
  line-height: 1.3;
  text-align: center;
  text-decoration: none !important;
  white-space: nowrap;
  box-shadow: none !important;
  transition:
    color .2s ease,
    background-color .2s ease,
    border-color .2s ease,
    transform .2s ease !important;
}

.site-internal .nav a:hover,
.site-internal .nav a:focus-visible,
.site-internal .nav button:hover,
.site-internal .nav button:focus-visible,
.site-internal .header-actions .pill:hover,
.site-internal .header-actions .pill:focus-visible,
.site-internal .top-actions .pill:hover,
.site-internal .top-actions .pill:focus-visible,
.site-internal .nav a.active,
.site-internal .header-actions .pill.primary {
  border-color: var(--site-brand) !important;
  background: var(--site-brand) !important;
  color: #fff !important;
}

.site-internal button,
.site-internal input,
.site-internal select,
.site-internal textarea {
  font-family: 'Noto Sans JP', 'Helvetica Neue', Arial, sans-serif !important;
}

.site-internal button {
  border-radius: 4px !important;
  font-weight: 700 !important;
}

.site-internal :where(
  .btn,
  .submit,
  .save-btn,
  .bulk-save,
  .file-button,
  .ledger-button,
  .row-print-btn,
  .install-box button,
  .login-panel a
) {
  min-height: 44px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px !important;
  border: 1px solid var(--site-brand) !important;
  border-radius: 4px !important;
  background: var(--site-brand) !important;
  color: #fff !important;
  font-size: .88rem !important;
  font-weight: 700 !important;
  line-height: 1.35;
  text-align: center;
  text-decoration: none !important;
  box-shadow: 0 5px 14px rgba(36, 50, 65, .10);
  transition:
    color .2s ease,
    background-color .2s ease,
    border-color .2s ease,
    box-shadow .2s ease,
    transform .2s ease !important;
}

.site-internal :where(
  .btn,
  .submit,
  .save-btn,
  .bulk-save,
  .file-button,
  .ledger-button,
  .row-print-btn,
  .install-box button,
  .login-panel a
):hover,
.site-internal :where(
  .btn,
  .submit,
  .save-btn,
  .bulk-save,
  .file-button,
  .ledger-button,
  .row-print-btn,
  .install-box button,
  .login-panel a
):focus-visible {
  border-color: var(--site-brand-dark) !important;
  background: var(--site-brand-dark) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(36, 50, 65, .15);
}

.site-internal :where(.btn.secondary, .top-actions .btn:not(.primary):not(.danger)) {
  border-color: var(--site-brand) !important;
  background: #fff !important;
  color: var(--site-brand-dark) !important;
}

.site-internal :where(.btn.secondary, .top-actions .btn:not(.primary):not(.danger)):hover,
.site-internal :where(.btn.secondary, .top-actions .btn:not(.primary):not(.danger)):focus-visible {
  background: #eef6fc !important;
  color: var(--site-brand-dark) !important;
}

.site-internal :where(.btn.primary, .submit, .save-btn, .bulk-save) {
  border-color: var(--site-brand) !important;
  background: var(--site-brand) !important;
  color: #fff !important;
}

.site-internal :where(.btn.danger, .delete, .close-btn) {
  border-color: var(--site-danger) !important;
  background: var(--site-danger) !important;
  color: #fff !important;
}

.site-internal .btn.ok {
  border-color: var(--ok) !important;
  background: var(--ok) !important;
  color: #fff !important;
}

.site-internal :where(.switcher button, .tab, .tab-btn, .view-tab, .shift-preset-btn) {
  min-height: 42px;
  padding: 9px 14px !important;
  border: 1px solid var(--site-border) !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: var(--site-muted) !important;
  font-size: .86rem !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.site-internal :where(.switcher button, .tab, .tab-btn, .view-tab, .shift-preset-btn).active,
.site-internal .switcher button[data-mode].active {
  border-color: var(--site-brand) !important;
  background: var(--site-brand) !important;
  color: #fff !important;
  box-shadow: 0 5px 14px rgba(79, 143, 201, .18) !important;
}

.site-internal :where(input, select, textarea) {
  border-color: var(--site-border) !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: var(--site-text) !important;
}

.site-internal :where(input, select, textarea):focus {
  border-color: var(--site-brand) !important;
  outline: none !important;
  box-shadow: 0 0 0 4px rgba(79, 143, 201, .13) !important;
}

.site-internal :where(.panel, .card, .login-card, .calendar-card, .app-card) {
  border-color: var(--site-border) !important;
  border-radius: 4px !important;
  background-color: #fff !important;
}

.site-internal :where(button, a, input, select, textarea):focus-visible {
  outline: 3px solid rgba(217, 154, 43, .32);
  outline-offset: 2px;
}

@media (max-width: 960px) {
  .site-internal .header-inner,
  .site-internal .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px !important;
    padding: 10px 0 !important;
  }

  .site-internal .nav,
  .site-internal .header-actions,
  .site-internal .top-actions {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap !important;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .site-internal .nav::-webkit-scrollbar,
  .site-internal .header-actions::-webkit-scrollbar,
  .site-internal .top-actions::-webkit-scrollbar {
    display: none;
  }

  .site-internal .nav a,
  .site-internal .nav button,
  .site-internal .header-actions .pill,
  .site-internal .top-actions > * {
    flex: 0 0 auto !important;
  }
}

@media (max-width: 600px) {
  .site-internal .brand {
    font-size: .96rem !important;
  }

  .site-internal .brand::before {
    width: 34px;
    height: 34px;
  }

  .site-internal :where(.btn.full, .submit, .save-btn, .bulk-save) {
    width: 100%;
    min-height: 48px;
  }
}
