/* API料金計算機（[dgl_api_calc] のページだけで読み込む） */
.dgl-calc { margin: 2em 0 2.4em; }
.dgl-calc__box {
	background: linear-gradient(180deg, #f6f6ff 0%, #ffffff 40%);
	border: 1px solid #dfe1f5; border-radius: 20px;
	padding: clamp(18px, 3.5vw, 32px);
}
.dgl-calc .dgl-calc__step {
	margin: 1.8em 0 .8em; font-family: var(--font); font-weight: 900; font-size: 16px; color: #312e81; letter-spacing: .04em;
}
.dgl-calc .dgl-calc__step:first-child { margin-top: 0; }

.dgl-calc__presets { display: flex; flex-wrap: wrap; gap: 8px; }
.dgl-calc__chip {
	appearance: none; cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; line-height: 1.4;
	padding: 10px 16px; border-radius: 999px; border: 1.5px solid #c7c9ee; background: #fff; color: #3730a3;
	transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.dgl-calc__chip:hover { border-color: #6366f1; transform: translateY(-1px); }
.dgl-calc__chip[aria-pressed="true"] { background: linear-gradient(120deg, #6366f1, #8b5cf6); border-color: transparent; color: #fff; }
.dgl-calc__chip:focus-visible, .dgl-calc__input:focus-visible, .dgl-calc__share:focus-visible, #dgl-batch:focus-visible {
	outline: 3px solid #22d3ee; outline-offset: 2px;
}
.dgl-calc__presetnote { margin: .8em 0 0 !important; font-size: 14px; line-height: 1.8; color: var(--ink-2); }

.dgl-calc__form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; }
.dgl-calc__label { display: block; font-size: 14px; font-weight: 700; line-height: 1.5; margin-bottom: 6px; color: var(--ink); }
.dgl-calc__inputrow { display: flex; align-items: center; gap: 8px; }
.dgl-calc__input {
	flex: 1 1 auto; min-width: 0; width: 100%; font: inherit; font-size: 18px; font-variant-numeric: tabular-nums;
	padding: 10px 12px; border-radius: 12px; border: 1.5px solid #c7c9ee; background: #fff; color: var(--ink);
}
.dgl-calc__input:hover { border-color: #818cf8; }
.dgl-calc__unit { flex: 0 0 auto; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.dgl-calc__hint { margin: 6px 0 0 !important; font-size: 12.5px; line-height: 1.7; color: #5b6285; }
.dgl-calc .dgl-calc__check { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: 14px; line-height: 1.7; }
.dgl-calc__check input { width: 20px; height: 20px; margin-top: 4px; flex: 0 0 auto; accent-color: #6366f1; }

.dgl-calc__summary { min-height: 3.4em; }
.dgl-calc__lead { margin: 0 0 14px !important; font-size: 15.5px; line-height: 1.9; }
.dgl-calc__lead b { font-variant-numeric: tabular-nums; color: #3730a3; }

.dgl-calc .dgl-calc__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dgl-calc .dgl-calc__row {
	margin: 0; padding: 14px 16px; border: 1px solid #e3e5f3; border-radius: 14px; background: #fff;
}
.dgl-calc__row.is-top { border-color: #818cf8; box-shadow: 0 0 0 3px rgba(129, 140, 248, .22); }
.dgl-calc__rowhead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.dgl-calc__name { font-family: var(--font); font-weight: 900; font-size: 16px; color: #1e1b4b; }
.dgl-calc__vendor { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; color: #fff; letter-spacing: .04em; }
.dgl-calc__vendor--claude { background: #c2410c; }
.dgl-calc__vendor--openai { background: #0f766e; }
.dgl-calc__vendor--gemini { background: #1d4ed8; }
.dgl-calc__warn { font-size: 12px; font-weight: 700; color: #92400e; background: #fef3c7; padding: 2px 9px; border-radius: 999px; }
.dgl-calc__metrics { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.dgl-calc__metric { display: inline-flex; flex-direction: column; line-height: 1.4; font-variant-numeric: tabular-nums; }
.dgl-calc__metric small { font-size: 11.5px; color: #5b6285; }
.dgl-calc__metric b { font-size: 15px; color: var(--ink); }
.dgl-calc__metric--main b { font-size: 18px; color: #3730a3; }
.dgl-calc__metric.is-plus b { color: #047857; }
.dgl-calc__metric.is-minus b { color: #b91c1c; }
.dgl-calc__bar { display: block; height: 6px; margin-top: 10px; border-radius: 99px; background: #eceefb; overflow: hidden; }
.dgl-calc__barfill { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #8b5cf6, #22d3ee); }

.dgl-calc__foot { margin: 14px 0 0 !important; font-size: 12.5px; line-height: 1.8; color: #5b6285; }
.dgl-calc__share {
	appearance: none; cursor: pointer; margin-top: 14px; font: inherit; font-size: 14px; font-weight: 700;
	padding: 10px 18px; border-radius: 999px; border: 1.5px solid #6366f1; background: #fff; color: #3730a3;
}
.dgl-calc__share:hover { background: #eef0ff; }

/* 料金表（本文側の表）。横にはみ出す幅をやわらげる */
.dgl-prices-wrap { overflow-x: auto; }
.dgl-prices-wrap table { min-width: 640px; }

@media (max-width: 640px) {
	.dgl-calc__form { grid-template-columns: minmax(0, 1fr); }
	.dgl-calc__metrics { gap: 6px 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.dgl-calc__chip { transition: none; }
}
