:root {
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP",sans-serif;
  color: #233541;
  background: #fff;
  font-synthesis: none;
  line-height: 1.6;
  font-size: 14px;
  --ink: #142431;
  --muted: #62717b;
  --border: #dce3e7;
  --cyan: #a1e8e3;
  --focus: #087e91;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,input,select,textarea {
  font: inherit;
}

button,a,input,select,summary {
  -webkit-tap-highlight-color: transparent;
}

button,a,summary {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: .6;
}

[hidden] {
  display: none!important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

/* 画面切替の読み上げ開始位置は、操作対象のフォーカス表示と分ける。 */
#page-title:focus {
  outline: none;
}

h1,h2,h3,p {
  margin-top: 0;
}

h1,h2,h3 {
  color: var(--ink);
  line-height: 1.35;
  letter-spacing: -.035em;
}

h2 {
  font-size: 19px;
  margin-bottom: 12px;
}

h3 {
  font-size: 16px;
}

p {
  margin-bottom: 12px;
}

small,.small {
  font-size: 14px;
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: ui-monospace,SFMono-Regular,monospace;
  overflow-wrap: anywhere;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 10px 16px;
  background: white;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 23px;
  letter-spacing: -.055em;
  font-weight: 650;
  color: #fff;
}

.brand svg {
  width: 29px;
  height: 29px;
}

.brand span {
  font-size: 12px;
  border-left: 1px solid #5c6c78;
  padding-left: 12px;
  margin-left: 8px;
  color: #c6d3dc;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 208px;
  background: #f8f9fa;
  color: #4d555e;
  border-right: 1px solid var(--border);
  padding: 25px 12px;
  display: flex;
  flex-direction: column;
  z-index: 4;
}

.sidebar nav {
  display: grid;
  gap: 3px;
}

.sidebar .brand {
  color: var(--ink);
  font-size: 21px;
  padding: 0 10px;
  margin-bottom: 30px;
}

.sidebar .brand svg {
  width: 24px;
  height: 24px;
}

.sidebar .brand svg path:last-child {
  stroke: #f8f9fa;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  min-height: 36px;
  padding: 7px 11px;
  border-radius: 5px;
  color: #4d555e;
}

.sidebar nav a:hover {
  background: #eceff1;
}

.sidebar nav a[aria-current] {
  background: #e9edef;
  color: #152c38;
  font-weight: 600;
}

.nav-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  color: #737d84;
}

.sidebar nav a[aria-current] .nav-icon {
  color: #152c38;
}

.sidebar-bottom {
  margin-top: auto;
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding: 18px 9px 0;
  min-width: 0;
  align-items: center;
  min-height: 60px;
}

.sidebar-bottom:hover,.sidebar-bottom[aria-current] {
  background: #e8edef;
}

.avatar {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e3e7eb;
  color: #334651;
  display: grid;
  place-items: center;
  font-size: 13px;
}

.sidebar-bottom div {
  min-width: 0;
}

.sidebar-bottom p {
  font-size: 12px;
  margin: 0;
  overflow-wrap: anywhere;
  color: #334651;
}

.sidebar-bottom span:not(.avatar) {
  font-size: 12px;
  color: #687781;
}

.workspace-content {
  margin-left: 208px;
  padding: 32px 42px 22px;
  max-width: 1670px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 28px;
}

.page-header h1 {
  font-size: 26px;
  margin-bottom: 0;
}

.primary,.secondary,.danger,.hero-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 11px 19px;
  border-radius: 7px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
}

.primary {
  background: var(--ink);
  color: #fff;
}

.primary:hover {
  background: #29424f;
}

.secondary {
  background: #fff;
  border-color: #7b909c;
  color: #344854;
}

.secondary:hover {
  background: #f1f5f7;
}

.danger {
  color: #fff;
  background: #a33132;
}

.text-button {
  background: transparent;
  border: 0;
  min-height: 44px;
  color: #276c7c;
  padding: 8px 0;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  font-size: 14px;
  color: #3a6375;
  font-weight: 600;
  white-space: nowrap;
}

.wide {
  width: 100%;
}

.environment {
  display: flex;
  align-items: center;
  gap: 8px 13px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #536773;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 26px;
}

.environment p {
  margin: 0;
}

.surface {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 26px;
  box-shadow: 0 2px 4px #1f354105;
}

.overview-top {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 24px;
}

.credit-hero {
  background: var(--ink);
  color: #c1d2dd;
  border-radius: 12px;
  padding: 29px 32px 25px;
  position: relative;
  overflow: hidden;
}

.credit-hero>p:first-child {
  font-size: 13px;
  margin: 0 0 11px;
}

.balance {
  font-size: 64px;
  line-height: 1.14;
  letter-spacing: -.065em;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  color: #fff;
  overflow-wrap: anywhere;
}

.balance small {
  font-size: 14px;
  letter-spacing: 0;
  font-weight: 450;
  margin-left: 12px;
  color: #a5c0cf;
}

.hero-action {
  background: var(--cyan);
  color: var(--ink);
  border-color: var(--cyan);
  margin-top: 20px;
}

.hero-action:hover {
  background: #c1f3ef;
}

.hero-action span {
  margin-left: 12px;
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin: 27px 0 0;
  padding-top: 22px;
  border-top: 1px solid #3a4d59;
}

.hero-stats dt {
  font-size: 12px;
  color: #b8cbd6;
}

.hero-stats dd {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  margin: 5px 0 0;
  color: #fff;
  overflow-wrap: anywhere;
}

.hero-stats dd small {
  font-size: 12px;
  margin-left: 5px;
  color: #bfd0da;
}

.overview-bottom {
  display: grid;
  grid-template-columns: minmax(0,1.5fr) minmax(0,1fr);
  gap: 24px;
  margin-top: 26px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin-bottom: 5px;
}

.section-heading p {
  margin: 0;
}

.empty {
  text-align: center;
  padding: 35px 18px;
  color: #5f7280;
  font-size: 14px;
}

.empty strong {
  display: block;
  color: #354b58;
  font-size: 14px;
  margin-bottom: 6px;
}

.empty p {
  margin: 0;
}

.activity {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 0;
  border-top: 1px solid #edf1f3;
}

.activity:last-child {
  padding-bottom: 0;
}

.service-mark {
  flex: none;
  height: 38px;
  width: 38px;
  border: 1px solid #dde8ea;
  border-radius: 9px;
  background: #f2f7f8;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 600;
  color: #396777;
}

.activity-info {
  min-width: 0;
  flex: 1;
}

.activity-info strong {
  font-size: 14px;
  display: block;
  overflow-wrap: anywhere;
}

.activity-info p {
  font-size: 12px;
  color: #5f7280;
  margin: 2px 0 0;
}

.activity-value {
  text-align: right;
  flex: none;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.activity-value .badge {
  margin-top: 5px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 5px;
  white-space: normal;
}

#history-count {
  flex-shrink: 0;
  white-space: nowrap;
}

.badge.success {
  background: #e7f3ee;
  color: #25694e;
}

.badge.warning {
  background: #fff2d8;
  color: #86500b;
}

.badge.neutral {
  background: #edf1f4;
  color: #526672;
}

.badge.danger {
  background: #f9e8e6;
  color: #963c33;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 17px 0;
  border-top: 1px solid #edf1f3;
  font-size: 14px;
}

.breakdown-row span {
  overflow-wrap: anywhere;
}

.breakdown-row strong {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.breakdown-note {
  margin: 22px 0 0;
  font-size: 12px;
}

.callout {
  border: 1px solid #dbe5e8;
  background: #edf4f5;
  color: #3a5967;
  border-radius: 8px;
  padding: 16px 18px;
  margin: 18px 0;
  font-size: 14px;
}

.callout strong {
  display: block;
  margin-bottom: 4px;
}

.callout p {
  margin: 0;
}

.warning.callout {
  background: #fff5e2;
  border-color: #e2c791;
  color: #7c501a;
}

.callout:empty {
  display: none;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 22px;
  margin-top: 24px;
}

.service-card {
  padding: 26px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 0;
}

.service-card .service-top {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 20px;
}

.service-card .service-top h2 {
  font-size: 17px;
  margin: 0;
  overflow-wrap: anywhere;
  flex: 1;
  min-width: 0;
}

.service-card>p {
  font-size: 14px;
  color: #637783;
  min-height: 38px;
}

.service-price {
  font-size: 22px!important;
  color: var(--ink)!important;
  font-weight: 600;
}

.service-price small {
  font-size: 12px;
  font-weight: 400;
  margin-left: 6px;
}

.service-card button {
  width: 100%;
  margin: 10px 0 20px;
}

.service-card details {
  font-size: 12px;
  border-top: 1px solid #e8edef;
  padding-top: 16px;
}

.service-card details p {
  overflow-wrap: anywhere;
  margin: 10px 0 0;
  color: #60747f;
}

.filters {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  color: #425a67;
  font-weight: 600;
}

input,select,textarea {
  min-height: 44px;
  width: 100%;
  min-width: 0;
  background: #fff;
  border: 1px solid #7b909c;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  color: #273e4b;
}

input[type=checkbox],input[type=radio] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: none;
  accent-color: #245b6a;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.history-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #60717d;
  border-bottom: 1px solid var(--border);
  padding: 12px 10px;
}

.history-table td {
  padding: 16px 10px;
  border-bottom: 1px solid #e8edef;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.history-table td:first-child {
  width: 40%;
}

.history-table strong {
  display: block;
  font-size: 14px;
}

.history-table .history-detail {
  font-size: 12px;
  color: #5f7280;
  margin: 5px 0 0;
}

.history-table .numeric {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.ledger-details {
  margin-top: 22px;
}

.ledger-row {
  font-size: 12px;
  border-bottom: 1px solid #e8edef;
  padding: 13px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.ledger-row p {
  margin: 3px 0 0;
  font-size: 12px;
  color: #60717d;
}

.ledger-row strong {
  font-variant-numeric: tabular-nums;
}

.purchase-layout {
  max-width: 600px;
  width: 100%;
}

#credit-buy > button {
  margin-top: 20px;
}

.purchase-note {
  margin: 12px 0 0;
}

.product-options {
  border: 0;
  padding: 0;
  margin: 20px 0 0;
}

.product-options legend {
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 8px;
}

.product {
  display: grid;
  grid-template-columns: 18px minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 400;
  color: inherit;
  cursor: pointer;
}

.product input {
  margin: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--focus);
}

.product>span {
  font-variant-numeric: tabular-nums;
}

.product-price {
  color: var(--muted);
  white-space: nowrap;
}

.purchase-history {
  margin-top: 28px;
}

.purchase-row {
  border-top: 1px solid #e4ebee;
  padding: 20px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.purchase-row .purchase-info {
  flex: 1;
  min-width: 180px;
  overflow-wrap: anywhere;
}

.purchase-info strong {
  font-size: 14px;
}

.purchase-info p {
  font-size: 12px;
  color: #5f7280;
  margin: 4px 0 0;
}

.purchase-row details {
  width: 100%;
  font-size: 12px;
  overflow-wrap: anywhere;
  color: #607784;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.purchase-row .button-row {
  justify-content: flex-end;
}

.purchase-row button,.purchase-row a {
  font-size: 12px;
  min-height: 40px;
  padding: 9px 12px;
}

summary {
  cursor: pointer;
  min-height: 40px;
  padding: 9px 0;
  font-size: 14px;
  font-weight: 600;
  color: #3c5a6b;
}

.settings-list {
  margin: 20px 0;
}

.settings-list>div {
  display: grid;
  grid-template-columns: 150px 1fr;
  padding: 14px 0;
  border-bottom: 1px solid #edf1f3;
  font-size: 14px;
}

.settings-list dt {
  color: #5f7280;
}

.settings-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.settings-actions {
  display: flex;
  gap: 10px;
  margin: 20px 0 10px;
}

@media(max-width:480px) {
  .settings-actions {
    flex-direction: column;
  }
}

.key-settings,.developer-tools {
  margin-top: 22px;
}

.inline-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin: 22px 0;
}

.inline-form label {
  flex: 1;
}

.key-row,.developer-purchase {
  padding: 18px 0;
  border-top: 1px solid #e4ebee;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.key-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.key-row p {
  flex: 1;
  margin: 0;
}

.key-row small {
  display: block;
  color: #5f7280;
}

.developer-tools>summary {
  font-size: 14px;
}

.developer-tools section {
  padding: 20px 0;
  border-top: 1px solid #dce5e9;
  margin-top: 22px;
}

.developer-form {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px;
  margin: 20px 0;
}

.developer-form button {
  align-self: end;
}

.checkbox {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin: 20px 0;
}

#secret {
  display: block;
  background: #fff;
  padding: 15px;
  border: 1px solid #ddc69d;
  border-radius: 6px;
  overflow-wrap: anywhere;
  margin: 16px 0;
  color: #5b391a;
}

.developer-purchase p,.postpaid-tools>div p {
  font-size: 12px;
}

#usage-history {
  overflow-wrap: anywhere;
}

.developer-purchase input {
  max-width: 160px;
  margin: 12px 0;
}

.developer-purchase button {
  margin: 5px 8px 5px 0;
}

.workspace-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 46px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: #5f7280;
  font-size: 12px;
}

.workspace-footer p {
  margin: 0;
  color: #405d6e;
  font-weight: 600;
}

.workspace-footer p span {
  font-weight: 400;
  margin-left: 10px;
  color: #5f7280;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 4px 0;
  width: 100%;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 13px;
  margin: 10px 0;
  overflow-wrap: anywhere;
}

.message:has([data-kind=error]) {
  border-left: 2px solid #a55820;
  padding-left: 12px;
  color: var(--ink);
}

.login-layout {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.login-side {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.login-card {
  width: 100%;
  max-width: 365px;
}

.login-card .brand {
  color: var(--ink);
}

.login-card h1 {
  font-size: 28px;
  margin-top: 20px;
}

.login-card>p {
  font-size: 14px;
}

.login-card button {
  width: 100%;
  margin-top: 12px;
}

.login-card .callout {
  margin-top: 28px;
}

.login-card #login-mode {
  margin-top: 22px;
  font-size: 12px;
}

dialog {
  border: 1px solid #c6d5dd;
  border-radius: 12px;
  padding: 30px;
  width: min(440px,calc(100% - 32px));
  color: #233541;
  box-shadow: 0 12px 60px #14243133;
}

dialog::backdrop {
  background: #14243177;
}

dialog p {
  font-size: 13px;
}

dialog .button-row {
  justify-content: flex-end;
  margin-top: 24px;
}

@media(min-width:1500px) {
  .workspace-content {
    padding-right: 70px;
    padding-left: 70px;
  }
}

@media(max-width:1150px) {
  .sidebar {
    width: 190px;
    padding: 25px 10px;
  }
  .workspace-content {
    margin-left: 190px;
    padding: 34px 30px;
  }
  .overview-top {
    grid-template-columns: minmax(0,1fr);
    gap: 18px;
  }
  .credit-hero {
    padding: 26px;
  }
  .overview-bottom {
    gap: 18px;
  }
  .surface {
    padding: 23px;
  }
  .balance {
    font-size: 56px;
  }
}

@media(max-width:820px) {
  .sidebar {
    position: relative;
    width: 100%;
    padding: 16px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    gap: 12px;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }
  .sidebar .brand {
    font-size: 21px;
    margin: 0;
    padding: 0;
  }
  .sidebar .brand svg {
    width: 25px;
    height: 25px;
  }
  .sidebar-label {
    display: none;
  }
  .sidebar-bottom {
    margin-top: 0;
    margin-left: auto;
    border-top: 0;
    padding: 8px 10px;
    min-height: 44px;
    max-width: 100%;
  }
  .sidebar nav {
    display: flex;
    gap: 5px;
    flex: 1;
    justify-content: flex-end;
  }
  .sidebar nav a {
    font-size: 12px;
    padding: 10px;
    gap: 0;
    min-height: 44px;
  }
  .nav-icon {
    display: none;
  }
  .workspace-content {
    margin-left: 0;
    padding: 32px 24px;
  }
  .sidebar nav a[aria-current] {
    box-shadow: none;
  }
  .overview-top {
    grid-template-columns: minmax(0,1fr);
  }
  .page-header h1 {
    font-size: 26px;
  }
  .page-header {
    margin-bottom: 22px;
  }
  .overview-bottom {
    grid-template-columns: 1fr 1fr;
  }
  .login-side {
    padding: 30px;
  }
  .balance {
    font-size: 50px;
  }
}

@media(max-width:600px) {
  .sidebar {
    padding: 17px 18px 10px;
    display: block;
  }
  .sidebar .brand {
    font-size: 20px;
  }
  .sidebar-bottom {
    border-top: 1px solid var(--border);
    padding: 10px 3px 0;
    margin-top: 10px;
  }
  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 12px -6px 0;
    gap: 2px;
  }
  .sidebar nav a {
    padding: 10px 9px;
    justify-content: center;
    white-space: nowrap;
    border-radius: 4px;
    font-size: 12px;
    min-height: 44px;
  }
  .workspace-content {
    padding: 26px 18px 22px;
  }
  .page-header {
    align-items: flex-start;
    gap: 12px;
  }
  .page-header h1 {
    font-size: 26px;
  }
  .page-header button {
    font-size: 12px;
    padding: 9px 10px;
    min-height: 40px;
    max-width: 104px;
    flex: none;
  }
  .environment {
    font-size: 12px;
    row-gap: 5px;
    margin-bottom: 21px;
    align-items: flex-start;
  }
  .environment p {
    flex: 1;
    min-width: 210px;
  }
  .overview-top,.overview-bottom,.service-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .credit-hero {
    padding: 25px 24px;
  }
  .balance {
    font-size: 56px;
  }
  .hero-stats {
    margin-top: 26px;
    gap: 8px;
  }
  .hero-stats dd {
    font-size: 21px;
  }
  .hero-stats dd small {
    font-size: 12px;
    margin-left: 3px;
  }
  .overview-bottom {
    margin-top: 20px;
  }
  .surface {
    padding: 21px;
  }
  #credit-buy > button {
    width: 100%;
  }
  .section-heading {
    gap: 12px;
    margin-bottom: 18px;
  }
  .section-heading h2 {
    font-size: 17px;
  }
  .section-heading p {
    font-size: 12px;
  }
  .section-heading .text-link {
    font-size: 12px;
  }
  .activity-value {
    font-size: 12px;
  }
  .filters {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .filters label:first-child {
    grid-column: 1/-1;
  }
  .history-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
  .history-table,.history-table tbody {
    display: block;
  }
  .history-table tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    border-top: 1px solid var(--border);
    padding: 17px 0;
  }
  .history-table td {
    display: block;
    padding: 0;
    border: 0;
  }
  .history-table td:first-child {
    width: auto;
    grid-column: 1/-1;
  }
  .history-table td:nth-child(2) {
    font-size: 12px;
    color: #5f7280;
  }
  .history-table td:nth-child(3) {
    grid-column: 1;
    grid-row: 3;
    font-size: 12px;
  }
  .history-table td:nth-child(3)::before {
    content: "利用 ";
    font-weight: 400;
    color: #5f7280;
  }
  .history-table td:nth-child(4) {
    grid-column: 2;
    grid-row: 2/4;
    align-self: end;
  }
  .purchase-history {
    margin-top: 20px;
  }
  .purchase-row .button-row {
    justify-content: flex-start;
    width: 100%;
  }
  .purchase-row .purchase-info {
    min-width: 0;
  }
  .settings-list>div {
    grid-template-columns: 100px 1fr;
    font-size: 12px;
  }
  .inline-form {
    flex-direction: column;
    align-items: stretch;
  }
  .developer-form {
    grid-template-columns: 1fr;
  }
  .key-row {
    align-items: flex-start;
    gap: 12px;
  }
  .key-row button {
    font-size: 12px;
    padding: 10px 12px;
    flex: none;
  }
  .workspace-footer {
    font-size: 12px;
    margin-top: 30px;
  }
  .workspace-footer p span {
    display: block;
    margin: 3px 0 0;
  }
  .message {
    font-size: 12px;
  }
  .login-side {
    padding: 36px 25px;
  }
  .login-card .brand {
  color: var(--ink);
}

.login-card h1 {
    font-size: 25px;
  }
}

@media(max-width:350px) {
  .workspace-content {
    padding: 22px 12px;
  }
  .sidebar {
    padding: 16px 12px 10px;
  }
  .sidebar nav a {
    font-size: 12px;
    padding: 12px 7px;
  }
  .credit-hero {
    padding: 23px 20px;
  }
  .balance {
    font-size: 48px;
  }
  .surface {
    padding: 18px;
  }
  .section-heading {
    align-items: flex-start;
  }
  .hero-stats dd {
    font-size: 18px;
  }
  .settings-list>div {
    grid-template-columns: 82px 1fr;
  }
  .service-card {
    padding: 22px;
  }
  .service-top {
    flex-wrap: wrap;
  }
  .service-top .badge {
    margin-left: 51px;
  }
  .ledger-row {
    display: block;
  }
  .purchase-row {
    gap: 12px;
  }
}

@media(prefers-reduced-motion:no-preference) {
  button,a,input,select {
    transition: background-color .15s,border-color .15s;
  }
  dialog[open] {
    animation: appear .15s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

@media (min-width: 821px) and (max-width: 1150px) {
  .sidebar .brand {
    font-size: 19px;
    gap: 8px;
  }
  .sidebar .brand svg {
    width: 25px;
    height: 25px;
  }
}

.message p {
  margin: 0;
  padding-block: 10px;
  flex: 1;
}
.message button {
  flex: none;
  border: 0;
  background: transparent;
  color: #536773;
  width: 44px;
  height: 44px;
  font-size: 24px;
  margin: 0;
}

.account-links {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.account-links p {
  margin: 0;
}

.registered-app {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.registered-app strong {
  flex: 1 1 140px;
  overflow-wrap: anywhere;
}

.app-terms {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.product-entry {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.app-management {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.app-management form:not(.inline-form) {
  display: grid;
  gap: 14px;
  max-width: 600px;
}

.app-management form:not(.inline-form) > button {
  justify-self: start;
}

.app-member-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.app-member-row > .mono {
  flex: 1 1 200px;
  min-width: 0;
}

#service-access-panel {
  margin-top: 20px;
}

.developer-service-row { display:flex; align-items:center; gap:1rem; margin-bottom:.75rem; flex-wrap:wrap; }
#developer-secret { display:block; overflow-wrap:anywhere; margin-block:1rem; }
#developer-service-detail h3, #developer-test-panel h3 { margin-top:1.25rem; }
#developer-mode-status { margin-block:1rem; }
#developer-test-result { overflow-wrap:anywhere; }
.app-context [aria-pressed="true"] { border-color:var(--accent, #2274a5); background:#f2f7fa; font-weight:700; }

[data-panel="settings"] > .surface,
#developer-content > .surface {
  padding: 26px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}
[data-panel="settings"] > .surface:first-child,
#developer-content > .surface:first-child { padding-top: 0; }
[data-panel="settings"] h2, #developer-content h2 { font-size: 17px; letter-spacing: -.02em; }
[data-panel="settings"] .small, #developer-content .small { font-size: 12px; }
[data-panel="settings"] label, #developer-content label { font-size: 12px; }
[data-panel="settings"] input, [data-panel="settings"] select,
#developer-content input, #developer-content select { min-height: 38px; padding: 8px 10px; border-radius: 5px; }
[data-panel="settings"] button, #developer-content button { min-height: 38px; padding: 8px 12px; font-size: 12px; border-radius: 5px; }
.setting-section { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr); gap: 12px 36px; }
.setting-description p { max-width: 250px; margin-bottom: 0; }
.setting-description h2 { margin-bottom: 8px; }
.tenant-picker { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.tenant-picker label { flex: 1 1 150px; max-width: 260px; }
#metering-price-editor { grid-column: 2; }
#metering-price-editor label { margin-block: 12px; }
.setting-controls .inline-form { margin: 14px 0; flex-wrap: wrap; }
.setting-controls .inline-form label { flex: 1 1 160px; max-width: 260px; }
.setting-controls .inline-form button { flex: 0 1 auto; }
.budget-increase { margin-top: 16px; }
.budget-increase summary { font-size: 12px; font-weight: 500; }
#budget-settings-summary { margin-bottom: 16px; font-size: 13px; }
.billing-period { margin: 18px 0 4px; font-size: 17px; font-weight: 500; }
.billing-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 24px 48px; padding-block: 22px; border-bottom: 1px solid var(--border); }
.billing-totals { margin: 0; }
.billing-totals dt { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.billing-totals dd { margin: 0; font-size: 38px; font-weight: 550; line-height: 1.3; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.billing-chart h3 { font-size: 13px; margin-bottom: 14px; letter-spacing: 0; font-weight: 600; }
.billing-overview .billing-chart h3 { color: var(--muted); margin-bottom: 8px; font-size: 12px; font-weight: 400; }
.billing-chart p:last-child { margin: 12px 0 0; }
.billing-calculation { margin-top: 18px; }
.billing-calculation > summary { font-size: 12px; font-weight: 500; }
.billing-calculation .billing-chart { margin-block: 20px; max-width: 540px; }
.billing-calculation .settings-list { margin-bottom: 0; }
.usage-count { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.usage-count strong { font-size: 24px; font-weight: 550; font-variant-numeric: tabular-nums; }
.usage-meter { display: block; width: 100%; height: 12px; border: none; border-radius: 3px; background: #edf0f3; }
.usage-meter::-webkit-meter-bar { background: #edf0f3; border: none; border-radius: 3px; }
.usage-meter::-webkit-meter-optimum-value { background: #5389b7; border-radius: 3px; }
.usage-meter::-moz-meter-bar { background: #5389b7; border-radius: 3px; }
.billing-comparison { margin: 0; }
.amount-bar + .amount-bar { margin-top: 14px; }
.amount-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; position: relative; padding-bottom: 14px; font-size: 12px; }
.amount-bar dd { margin: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.amount-bar-track { position: absolute; inset: auto 0 0; height: 8px; background: #edf0f3; border-radius: 2px; overflow: hidden; }
.amount-bar-track span { display: block; height: 100%; background: #5389b7; }
.sales-fee .amount-bar-track span { background: #334651; }
#developer-statement-state { margin: 22px 0 0; }
#developer-statement-state p { margin: 6px 0 0; }
.billing-months { margin-top: 16px; }
.billing-months > summary, .billing-terms > summary { font-size: 12px; font-weight: 500; }
.developer-monthly-row { border-top: 1px solid var(--border); padding-top: 14px; }
.pricing-heading { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.pricing-heading h3 { font-size: 13px; margin-bottom: 0; }
.pricing-heading p { margin: 0; }
.pricing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 20px 0; }
.pricing-grid dt { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.pricing-grid dd { margin: 0; font-size: 14px; font-weight: 500; }
.billing-terms { margin-bottom: 22px; }
.payment-heading { border-top: 1px solid var(--border); padding-top: 22px; margin-bottom: 12px; font-size: 13px; }
#developer-billing-actions { align-items: flex-start; margin: 18px 0; }
#developer-consent-form { display: grid; gap: 14px; justify-items: start; }
#developer-consent-form label { margin: 0; }
#developer-consent-form input { min-height: auto; }
.developer-payment-recovery { width: 100%; border-top: 1px solid var(--border); padding-top: 14px; }
.developer-payment-recovery button + button { margin-left: 8px; }
.developer-services .inline-form { margin: 16px 0 10px; }
.developer-services .inline-form label { flex-basis: 160px; }
.developer-service-row { gap: 12px; }
@media (max-width: 1050px) {
  .setting-section { grid-template-columns: 1fr; gap: 18px; }
  #metering-price-editor { grid-column: 1; }
  .setting-description p { max-width: none; }
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .billing-overview { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .billing-totals dd { font-size: 34px; }
  .setting-controls .inline-form { flex-direction: row; align-items: flex-end; }
  .setting-controls .inline-form label { max-width: none; width: 100%; flex-basis: 100%; }
  .tenant-picker label { max-width: none; }
  .developer-payment-recovery button + button { margin: 8px 0 0; }
  .developer-services .inline-form label { flex-basis: auto; }
  #developer-test .inline-form { margin: 16px 0; }
}

.auth-status { max-width: 480px; margin: 14vh auto; padding: 32px; color: #526173; background: #f6f8fc; border: 1px solid #e1e6ef; border-radius: 12px; }
.auth-status .brand { color: var(--ink); }
.auth-context { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }

.budget-settings-details[open] > summary { margin-bottom: 18px; }

.app-list-row { padding: 20px 0; border-bottom: 1px solid var(--border); }
.app-list-row h2 { margin-bottom: 6px; }
.app-context { display:flex; align-items:center; gap:8px; min-width:0; }
.page-heading { min-width:0; }
.app-page-header { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px 20px; margin-bottom:8px; }
.app-page-header .app-context { grid-column:1 / -1; }
.app-context label { display:block; flex:0 1 320px; min-width:0; margin:0; }
.app-context select { width:100%; min-width:0; min-height:34px; height:34px; padding:5px 10px; border-radius:5px; font-size:13px; font-weight:500; text-overflow:ellipsis; }
.app-mode-control { display:inline-flex; flex:none; border:1px solid var(--border); border-radius:5px; background:#f8fafb; }
.app-page-header .app-mode-control button { min-height:32px; padding:5px 12px; border:0; border-radius:4px 0 0 4px; font-size:12px; }
.app-page-header .app-mode-control button + button { border-left:1px solid var(--border); border-radius:0 4px 4px 0; }
.app-page-header select:focus-visible,.app-page-header button:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }
.app-page-header .page-heading { display:flex; align-items:baseline; flex-wrap:wrap; gap:6px 14px; }
.app-page-header h1 { font-size:21px; }
.app-environment { color:var(--muted); font-size:11px; }
.app-environment p { margin:0; }
.app-page-header #reload { min-height:34px; padding:6px 10px; font-size:12px; }
.app-navigation { display:flex; flex-wrap:wrap; gap:6px 22px; border-bottom:1px solid var(--border); margin-bottom:18px; }
.app-navigation a { display:inline-flex; align-items:center; min-height:40px; padding:8px 0; color:var(--muted); font-size:13px; text-decoration:none; border-bottom:2px solid transparent; }
.app-navigation a[aria-current="page"] { color:var(--ink); border-bottom-color:currentColor; font-weight:600; }

.setup-steps { list-style:none; padding:0; margin:0; }
.setup-steps li { display:flex; justify-content:space-between; align-items:center; gap:20px; padding:18px 0; border-bottom:1px solid var(--border); }
.setup-steps a { flex-shrink:0; }
.setup-steps p { margin:8px 0 0; }
.connection-guide, .oauth-verification { margin-block:20px; }
.member-detail-header { display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:16px; margin-bottom:20px; }
.member-detail-header > div { min-width:0; }
.member-detail-header h3 { margin:0 0 8px; }
.member-detail-header > button { flex-shrink:0; }
.member-detail-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; margin-bottom:20px; }
.member-detail-toolbar .button-row { margin:0; }
.member-adjustment { margin-top:22px; }
.member-adjustment[open] > summary { margin-bottom:18px; }
.reservation-row { border-bottom:1px solid var(--border); padding:14px 0; overflow-wrap:anywhere; }
.reservation-row > span { margin-left:16px; }
.billing-attention { border-left:3px solid #b46c2d; padding-left:18px; margin-bottom:28px; }
.mobile-menu-toggle { display:none; }
@media(max-width:820px) {
  .sidebar { display:flex; align-items:center; justify-content:space-between; padding:12px 18px; }
  .mobile-menu-toggle { display:inline-flex; margin-left:auto; }
  .sidebar nav, .sidebar .sidebar-bottom { display:none; }
  .sidebar[data-menu-open="true"] nav { display:flex; flex-direction:column; flex-basis:100%; margin:0; align-items:stretch; }
  .sidebar[data-menu-open="true"] .sidebar-bottom { display:flex; flex-basis:100%; margin:0; }
  .sidebar nav a { justify-content:flex-start; }
  .page-header { margin-bottom:12px; }
  .page-header h1 { font-size:23px; }
  .workspace-content { padding-top:20px; }
  .app-page-header { gap:10px 12px; margin-bottom:6px; }
  .app-page-header h1 { font-size:20px; }
  .app-context label { flex:1; }
  .app-context select { min-height:44px; height:44px; }
  .app-mode-control { border:0; outline:1px solid var(--border); }
  .app-page-header .app-mode-control button { min-height:44px; padding-inline:10px; }
  .app-page-header #reload { min-height:44px; }
  .app-navigation { margin-bottom:16px; gap:6px 18px; }
  .app-navigation a { min-height:44px; min-width:44px; justify-content:center; }
  .service-card .service-top { display:grid; grid-template-columns:auto minmax(0,1fr); }
  .service-card .service-top .badge { grid-column:1 / -1; justify-self:start; max-width:100%; white-space:normal; }
  .setup-steps li { align-items:flex-start; }
}

.activity-filters { display:flex; flex-wrap:wrap; align-items:flex-end; gap:16px; margin-bottom:18px; }
.activity-filters label { margin:0; max-width:100%; min-width:140px; }
.activity-filters form { display:flex; flex-wrap:wrap; align-items:flex-end; gap:10px; }
.activity-filters select, .activity-filters input { width:100%; }
.activity-sales, .activity-usage { margin-bottom:24px; }
.activity-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; margin:24px 0; }
.activity-metrics dt { color:var(--muted); font-size:12px; }
.activity-metrics dd { font-size:28px; font-weight:500; margin:10px 0 0; overflow-wrap:anywhere; }
.activity-metrics small { font-size:12px; margin-left:6px; color:var(--muted); }
.activity-chart { margin:28px 0; color:#778fae; }
.activity-chart figcaption, .activity-chart summary { color:var(--ink); font-size:13px; }
.activity-chart svg { width:100%; max-height:180px; display:block; margin:12px 0; }
.activity-chart text { fill:var(--muted); font-size:11px; }
.activity-table { overflow-x:auto; }
.activity-table table { width:100%; border-collapse:collapse; font-size:12px; }
.activity-table caption { text-align:left; margin-bottom:12px; font-weight:500; }
.activity-table th, .activity-table td { text-align:right; padding:12px 8px; border-bottom:1px solid var(--border); white-space:nowrap; }
.activity-table th:first-child { text-align:left; white-space:normal; overflow-wrap:anywhere; }
.activity-empty { margin-bottom:24px; }
@media(max-width:600px) {
  .activity-filters > label { flex:1; min-width:0; }
  .activity-filters form { flex-basis:100%; }
  .activity-metrics { grid-template-columns:minmax(0,1fr); gap:16px; }
  .activity-metrics > div { display:flex; justify-content:space-between; align-items:baseline; gap:12px; }
  .activity-metrics dd { font-size:25px; margin:0; }
}

.activity-notes { margin-bottom:24px; color:var(--muted); font-size:12px; line-height:1.8; }
.activity-notes summary { color:var(--ink); }

.loading-indicator { display:flex; align-items:center; justify-content:center; min-height:120px; color:#8995a2; }
.loading-spinner { display:inline-block; width:24px; height:24px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:loading-spin .8s linear infinite; }
@keyframes loading-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .loading-spinner { animation:none; } }

.sidebar .workspace-brand { line-height:1.1; }
.sidebar .workspace-brand small { display:block; margin-top:5px; color:var(--muted); font-size:11px; font-weight:500; letter-spacing:0; }
.sidebar .sidebar-account { margin-top:auto; border-top:1px solid var(--border); padding-top:10px; }
.sidebar .sidebar-account .sidebar-bottom { border:0; margin:0; padding:8px; min-height:44px; }
.sidebar .sidebar-account > a[data-surface-link], .sidebar .surface-unavailable { font-size:12px; }
.sidebar .surface-unavailable { padding:8px 11px; color:var(--muted); }
@media(max-width:820px) {
  .sidebar .workspace-brand { display:flex; align-items:baseline; gap:8px; }
  .sidebar .workspace-brand small { margin:0; }
  .sidebar[data-menu-open="true"] .sidebar-account { margin-top:8px; }
}

.sidebar .navigation-section { display:grid; gap:3px; }
.sidebar .navigation-section h2 { margin:16px 11px 6px; color:var(--muted); font-size:11px; font-weight:600; }
.products-parent { display:inline-block; margin-bottom:8px; color:var(--muted); font-size:12px; text-decoration:none; }
