@charset "UTF-8";

:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: #222;
  background: #f6f7f9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f6f7f9;
}

a {
  color: inherit;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid #ddd;
}

.site-header__inner,
.site-main,
.site-footer__inner {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}

.site-header__title {
  margin: 0;
  font-size: 1.25rem;
}

.site-header__auth {
  margin-left: auto;
  white-space: nowrap;
}

.site-header__auth-form {
  margin: 0;
}

.site-header__auth-link {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.site-main {
  min-height: calc(100vh - 150px);
  padding: 32px 0 48px;
}

.site-footer {
  background: #fff;
  border-top: 1px solid #ddd;
}

.site-footer__inner {
  padding: 18px 0;
  font-size: 0.875rem;
  color: #666;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 10px;
  border: 1px solid #ddd;
  text-align: left;
  vertical-align: top;
}

form {
  margin: 16px 0;
}

label {
  display: block;
  margin: 12px 0;
}

input,
button,
select {
  font: inherit;
}

input,
select {
  max-width: 100%;
  padding: 8px;
}

button {
  padding: 8px 14px;
  cursor: pointer;
}

button:disabled,
input[type="submit"]:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.notice {
  margin: 16px 0;
  padding: 12px;
  background: #f1f3f5;
}

.warning {
  margin: 16px 0;
  padding: 12px;
  background: #fff3cd;
  border: 1px solid #ffe69c;
}

.purchase-choice {
  margin: 20px 0;
  padding: 16px;
  background: #fff;
  border: 1px solid #ddd;
}

dl {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 6px 12px;
}

dt {
  font-weight: 700;
}

@media (max-width: 640px) {
  .site-header__inner {
    align-items: flex-start;
  }

  .site-header__title {
    font-size: 1.05rem;
  }

  dl {
    grid-template-columns: 1fr;
  }
}


.site-header__auth {
  display: flex;
  align-items: center;
  gap: 16px;
}

.license-list-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin: 16px 0;
}

.license-list-controls label {
  margin: 0;
}

.license-renew-action {
  margin: 12px 0;
}

.link-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: #005bbb;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

.link-button:disabled {
  color: #888;
  text-decoration: none;
  cursor: default;
  opacity: 1;
}

.optional-license-meta {
  display: none;
}

.license-table.show-license-meta .optional-license-meta {
  display: table-cell;
}

.remaining-days {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: 3px;
  background: #c00;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

.expired-license-note {
  display: inline-block;
  margin-top: 4px;
  color: #a00;
  font-size: 0.9rem;
  font-weight: 700;
}

.purchase-mode-summary {
  margin: 18px 0;
  padding: 14px;
  background: #fff;
  border: 1px solid #ddd;
}


.table-head-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.table-head-button:hover {
  opacity: 0.75;
}


.site-header__title a {
  color: inherit;
  text-decoration: none;
}

.home-intro {
  max-width: 820px;
  margin: 0 auto;
}

.home-intro p {
  margin: 0 0 1.1rem;
}

.home-purchase-button {
  margin-top: 28px !important;
  text-align: center;
}

.home-purchase-button a {
  display: inline-block;
  min-width: 220px;
  padding: 12px 22px;
  border-radius: 999px;
  background: #1267c4;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.home-login-link {
  margin-top: 18px !important;
  text-align: center;
}

.login-choice {
  display: grid;
  gap: 12px;
  max-width: 420px;
}

.login-choice p {
  margin: 0;
}

.site-main {
  overflow-x: auto;
}

table {
  min-width: 760px;
}

input[type="email"],
input[type="text"],
input[type="number"],
select {
  width: min(100%, 420px);
}

@media (max-width: 760px) {
  .site-header__inner,
  .site-main,
  .site-footer__inner {
    width: min(100% - 24px, 1100px);
  }

  .site-header__inner {
    padding: 14px 0;
    gap: 12px;
  }

  .site-header__title {
    font-size: 1rem;
    line-height: 1.35;
  }

  .site-header__auth {
    gap: 10px;
    font-size: 0.9rem;
  }

  .site-main {
    padding: 22px 0 36px;
  }

  h2 {
    font-size: 1.35rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  button {
    min-height: 42px;
  }

  .home-purchase-button a {
    width: 100%;
    max-width: 360px;
  }
}

@media (max-width: 480px) {
  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header__auth {
    width: 100%;
    justify-content: flex-end;
  }

  dl {
    display: block;
  }

  dt {
    margin-top: 14px;
  }

  dd {
    margin-left: 0;
  }
}


/* ------------------------------
   管理者モード
------------------------------ */

body.admin-mode {
  border-top: 6px solid #b00020;
}

body.admin-mode .site-header {
  background: #fff1f3;
  border-bottom-color: #e4a6b0;
}

body.admin-mode .site-header__title a::after {
  content: " 管理者";
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #b00020;
  color: #fff;
  font-size: 0.72em;
  vertical-align: middle;
}

body.admin-mode .site-main {
  background-image:
    linear-gradient(
      135deg,
      rgba(176, 0, 32, 0.025) 25%,
      transparent 25%,
      transparent 50%,
      rgba(176, 0, 32, 0.025) 50%,
      rgba(176, 0, 32, 0.025) 75%,
      transparent 75%,
      transparent
    );
  background-size: 24px 24px;
}

.admin-context {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-left: 5px solid #b00020;
  background: #fff1f3;
}

body.admin-mode h3 {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid #ddd;
}

body.admin-mode code {
  padding: 1px 5px;
  background: #eee;
  border-radius: 3px;
}


.admin-login-shortcut {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #ddd;
}

.admin-login-shortcut form {
  margin-top: 12px;
}

body.admin-mode h2 + table,
body.admin-mode h2 + p + table {
  margin-top: 12px;
}

.invoice-create-form button[disabled] {
  cursor: wait;
  opacity: 0.65;
}

.invoice-processing-note {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #666;
}

.admin-purchaser-email {
  margin: 22px 0 30px;
  padding: 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
}

.admin-purchaser-email h2 {
  margin-top: 0;
}

/* ------------------------------
   管理者トップメニュー
------------------------------ */
.admin-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 28px;
}

.admin-menu-card {
  display: flex;
  min-height: 118px;
  padding: 18px;
  border: 1px solid #1769aa;
  border-radius: 12px;
  background: #1976d2;
  color: #fff;
  text-decoration: none;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

.admin-menu-card:visited {
  color: #fff;
}

.admin-menu-card:hover,
.admin-menu-card:focus-visible {
  background: #1565c0;
  color: #fff;
  text-decoration: none;
}

.admin-menu-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.admin-menu-card span {
  display: block;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .admin-menu-grid {
    grid-template-columns: 1fr;
  }

  .admin-menu-card {
    min-height: 0;
  }
}
