/* Bekito 現場ボード — app screens.
   Built on the Bekito UI kit (/ui/). Only kit tokens are used here: no new colours, fonts or layer numbers.
   Rules this file follows (service standard, section 2b): the PAGE is the only vertical scroller;
   a code block may scroll sideways; text wraps or is cut with the kit's helpers; nothing is clipped. */

.gb-app .bk-main { padding-top: clamp(14px, 2.4vw, 28px); }
/* the product name in the header is a link home; it keeps the ink colour (the kit styles it for a <span>) */
.bk-topbar a.bk-brand__product { color: var(--bk-fg); text-decoration: none; }
.gb-gated .bk-tabbar, .gb-gated .bk-topbar__link { display: none; }
/* short confirmations appear at the top, under the bar, where they cover no card and no button */
.gb-app .bk-toasts, .gb-app.bk-has-tabbar .bk-toasts { top: calc(var(--bk-bar-h) + env(safe-area-inset-top) + 10px); bottom: auto; }
/* while a dialog is open the page behind it does not scroll (one scrollbar at a time) */
html:has(dialog.bk-dialog[open]) { overflow: hidden; }
/* big screens on the shop floor: the app grows to 1680 px so four device columns fit */
@media (min-width: 1700px) {
  .gb-app .bk-wrap--wide, .gb-app .bk-topbar__in { max-width: 1680px; }
}
.gb-head { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: flex-end; justify-content: space-between; }
.gb-head > div { min-width: 0; }
.gb-head__h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.gb-head__side { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.gb-lead { max-width: 44em; }
.gb-gate { margin-inline: auto; max-width: 720px; }
.gb-gate form { margin-top: 8px; }
.gb-skel-card { min-height: 96px; border-radius: var(--bk-r-lg); }
.gb-skel-row { min-height: 56px; border-radius: var(--bk-r-md); }

/* who I am */
.gb-me { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 44px; padding: 0 14px; border-radius: var(--bk-r-pill); border: 1px solid var(--bk-line-strong); background: var(--bk-surface); color: var(--bk-fg-2); font-size: var(--bk-text-sm); transition: border-color var(--bk-fast), background var(--bk-fast); }
.gb-me:hover { border-color: var(--bk-fg-3); background: var(--bk-surface-2); }
.gb-me strong { color: var(--bk-fg); max-width: 12em; }
.gb-me svg { width: 16px; height: 16px; }
.gb-me__edit { color: var(--bk-fg-3); }

/* ---------- the board: devices and, beside them on wide screens, what needs a person ---------- */
.gb-board__side, .gb-board__main { min-width: 0; }
@media (min-width: 1100px) {
  .gb-board__main { grid-column: 1; grid-row: 1; }
  .gb-board__side { grid-column: 2; grid-row: 1; }
}

/* fault buttons */
.gb-try { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
/* labels are short and never wrap; the buttons fill each row and move to the next one when they do not fit */
.gb-try__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.gb-try__hint { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--bk-r-md); background: var(--bk-accent-soft); color: var(--bk-fg); line-height: 1.6; }
.gb-try__hint svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; color: var(--bk-accent); }
.gb-fault { flex: 1 1 auto; padding: 0 14px; border-radius: var(--bk-r-md); white-space: nowrap; font-size: var(--bk-text-sm); }

/* alerts: compact rows in the order they opened */
.gb-alerts__head { flex-wrap: wrap; }
.gb-alerts__head .bk-seg__item { min-height: 34px; padding: 0 12px; }
.gb-chip__n[data-attn="1"] { color: var(--bk-danger); font-weight: 700; opacity: 1; }
.gb-alerts__none { display: flex; align-items: center; gap: 8px; padding: 14px 16px; }
.gb-alerts__none svg { width: 18px; height: 18px; color: var(--bk-ok); }
.gb-alert { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px 16px 14px 18px; }
.gb-alert:not([hidden]) ~ .gb-alert:not([hidden]) { border-top: 1px solid var(--bk-line); }
.gb-alert::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--bk-warn); }
.gb-alert:first-child::before { border-top-left-radius: 0; }
.gb-alert[data-level="alarm"]::before { background: var(--bk-danger); }
.gb-alert[data-level="silent"]::before { background: var(--bk-fg-3); }
.gb-alert[data-status="acked"]::before { opacity: .45; }
.gb-alert__top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 4px 10px; }
.gb-alert__level { display: inline-flex; padding-top: 1px; }
.gb-alert__title { font-size: var(--bk-text-md); line-height: 1.45; overflow-wrap: break-word; }
.gb-alert__time { color: var(--bk-fg-3); padding-top: 3px; }
.gb-alert__what { line-height: 1.6; }
.gb-alert__now { display: block; font-weight: 700; white-space: nowrap; }
.gb-alert__told { display: flex; gap: 6px; align-items: flex-start; color: var(--bk-fg-2); }
.gb-alert__told svg { width: 14px; height: 14px; margin-top: 2px; }
.gb-alert__told[data-kind="esc"] { color: var(--bk-danger); font-weight: 500; }
.gb-alert__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
.gb-alert__foot > :first-child { flex: 1 1 0; min-width: 0; }
.gb-alert__foot .bk-btn { flex: 0 0 auto; }
.gb-alert__who { display: flex; align-items: center; gap: 8px; }
.gb-alert__toggle svg { transition: transform var(--bk-med) var(--bk-ease); }
.gb-alert__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.gb-alert__body { padding-top: 6px; }
.gb-alert__form { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: var(--bk-r-md); background: var(--bk-surface-2); border: 1px solid var(--bk-line); }
.gb-alert__taken { display: flex; align-items: center; gap: 14px; }
.gb-alert__taken p { min-width: 0; line-height: 1.5; }
.gb-alert__note { min-height: 72px; max-height: 14em; resize: none; field-sizing: content; }
.gb-alert__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.gb-alert__photo { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
.gb-alert__photo-btn { padding-inline: 12px; cursor: pointer; }
.gb-alert__photo-btn:focus-within { outline: 3px solid var(--bk-focus); outline-offset: 2px; }
.gb-alert__thumb { display: inline-flex; align-items: center; gap: 2px; }
.gb-alert__thumb img { width: 64px; height: 48px; object-fit: cover; border-radius: var(--bk-r-sm); border: 1px solid var(--bk-line); }
.gb-alert__resolve { flex: 1 1 9em; }

/* devices */
.gb-devbar { justify-content: space-between; }
.gb-devbar__h { margin-right: auto; }
.gb-chip__n { margin-left: 2px; opacity: .8; font-size: var(--bk-text-xs); }
.gb-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(264px, 100%), 1fr)); }
.gb-dev { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 12px 14px 12px 18px; background: var(--bk-surface); border: 1px solid var(--bk-line); border-radius: var(--bk-r-lg); box-shadow: var(--bk-shadow-1); transition: border-color var(--bk-med), box-shadow var(--bk-med); }
.gb-dev::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: transparent; transition: background var(--bk-med); }
.gb-dev[data-state="warn"]::before { background: var(--bk-warn); }
.gb-dev[data-state="alarm"]::before { background: var(--bk-danger); }
.gb-dev[data-state="silent"]::before { background: var(--bk-fg-3); }
.gb-dev[data-state="alarm"] { border-color: color-mix(in srgb, var(--bk-danger) 50%, transparent); }
.gb-dev.is-changed { animation: gb-changed 1.6s var(--bk-ease); }
@keyframes gb-changed { 0%, 30% { background: var(--bk-accent-soft); } 100% { background: var(--bk-surface); } }
.gb-dev:has(.gb-dev__more:hover) { border-color: var(--bk-line-strong); box-shadow: var(--bk-shadow-2); }
.gb-dev:has(.gb-dev__more:focus-visible) { outline: 3px solid var(--bk-focus); outline-offset: 2px; }
.gb-dev__more { position: absolute; inset: 0; border: 0; padding: 0; background: none; border-radius: inherit; cursor: pointer; }
.gb-dev__more:focus-visible { outline: none; }
.gb-dev__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.gb-dev__names { min-width: 0; }
.gb-dev__name { font-size: var(--bk-text-md); line-height: 1.4; overflow-wrap: break-word; }
.gb-dev__src { display: flex; flex-wrap: wrap; gap: 0 6px; align-items: center; min-width: 0; font-size: var(--bk-text-xs); color: var(--bk-fg-3); line-height: 1.6; }
.gb-dev__src > span { white-space: nowrap; }
/* the dot between the source and "5 min ago" is part of the source text, so it never starts a line */
.gb-dev__state { display: inline-flex; padding-top: 1px; }
.gb-dev__metrics { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
/* one value: its name and the number (never broken) on one line, its trend line full width below */
.gb-metric { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; min-width: 0; }
.gb-metric__label { font-size: var(--bk-text-sm); color: var(--bk-fg-2); }
.gb-metric__num { font-size: 1.125rem; font-weight: 700; line-height: 1.25; white-space: nowrap; text-align: right; }
.gb-dev[data-count="1"] .gb-metric__num { font-size: 1.375rem; }
.gb-spark { grid-column: 1 / -1; width: 100%; height: 26px; overflow: visible; }
.gb-dev[data-count="1"] .gb-spark { height: 40px; }
.gb-spark__line { fill: none; stroke: var(--bk-fg-2); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.gb-dev[data-state="warn"] .gb-spark__line { stroke: var(--bk-warn); }
.gb-dev[data-state="alarm"] .gb-spark__line { stroke: var(--bk-danger); }
.gb-dev[data-state="silent"] .gb-spark__line { stroke: var(--bk-fg-3); stroke-dasharray: 4 3; }
.gb-spark__limit { stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; opacity: .75; }
.gb-spark__limit--warn { stroke: var(--bk-warn); }
.gb-spark__limit--alarm { stroke: var(--bk-danger); }
.gb-dev__more-n { color: var(--bk-fg-3); margin-top: -4px; }
@media (min-width: 640px) {
  /* from tablet width up a card is a tile: every tile has the same height whether it shows one value or two */
  .gb-grid { gap: 14px; }
  .gb-dev { padding: 16px 18px 16px 20px; gap: 12px; }
  /* every card's first value starts at the same height, so the big numbers in a row line up:
     the name block always takes room for two lines of name (or one name and a wrapped source line) */
  .gb-dev__names { min-height: 62px; }
  .gb-dev__metrics { flex: 1 1 auto; justify-content: flex-start; gap: 8px; min-height: 112px; }
  .gb-dev[data-count="1"] .gb-spark { height: 64px; }
  .gb-dev[data-count="1"] .gb-metric__num { font-size: 1.625rem; }
  .gb-dev__more-n { margin-top: -6px; }
}
@media (min-width: 1700px) { .gb-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- device dialog and the large chart ---------- */
@media (min-width: 561px) { dialog.gb-dialog--wide { width: min(760px, calc(100% - 32px)); } }
.gb-detail__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.gb-detail__names { min-width: 0; }
.gb-detail__pick .bk-seg { display: inline-grid; max-width: 100%; }
.gb-detail__metric { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.gb-detail__metric h4 { min-width: 0; }
.gb-detail__now { font-size: var(--bk-text-xl); font-weight: 700; }
.gb-detail__numbers summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; color: var(--bk-accent); font-size: var(--bk-text-sm); font-weight: 500; }
.gb-detail__rules { display: flex; flex-direction: column; gap: 6px; padding-left: 1.2em; list-style: disc; font-size: var(--bk-text-sm); line-height: 1.7; }
.gb-detail__rules .is-off { color: var(--bk-fg-3); text-decoration: line-through; }
.gb-chart { width: 100%; height: 220px; touch-action: pan-y; }
@media (max-height: 700px) { .gb-chart { height: 180px; } }
.gb-chart__grid { stroke: var(--bk-line); stroke-width: 1; }
.gb-chart__axis { stroke: var(--bk-line-strong); stroke-width: 1; }
.gb-chart__label { fill: var(--bk-fg-3); font-family: var(--bk-font-latin); font-size: 12px; font-variant-numeric: tabular-nums; }
.gb-chart__line { fill: none; stroke: var(--bk-fg); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.gb-chart__dot { fill: var(--bk-accent); stroke: var(--bk-surface); stroke-width: 2; }
.gb-chart__limit { stroke-width: 1.5; stroke-dasharray: 6 4; }
.gb-chart__limit--warn { stroke: var(--bk-warn); }
.gb-chart__limit--alarm { stroke: var(--bk-danger); }
.gb-chart__limit-label { font-family: var(--bk-font); font-size: 12px; font-weight: 700; paint-order: stroke; stroke: var(--bk-surface); stroke-width: 4px; stroke-linejoin: round; }
.gb-chart__limit-label--warn { fill: var(--bk-warn); }
.gb-chart__limit-label--alarm { fill: var(--bk-danger); }
.gb-chart__cursor { stroke: var(--bk-fg-3); stroke-width: 1; stroke-dasharray: 2 3; }
.gb-chart__mark { fill: var(--bk-surface); stroke: var(--bk-fg); stroke-width: 2; }
.gb-chart__readout { min-height: 1.7em; color: var(--bk-fg-2); }

/* ---------- record ---------- */
.gb-stats { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 800px) { .gb-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
.gb-stat__dur { font-family: var(--bk-font); font-size: 1.375rem; letter-spacing: 0; line-height: 1.5; white-space: nowrap; }
.gb-summary { white-space: pre-line; line-height: 1.9; max-width: 52em; transition: opacity var(--bk-med); }
.gb-summary.is-waiting { opacity: .45; }
.gb-filters__device { flex: 0 1 16em; width: auto; min-width: 9em; min-height: 40px; padding-block: 6px; font-size: var(--bk-text-sm); }
.gb-recbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.gb-reclist { background: var(--bk-surface); border: 1px solid var(--bk-line); border-radius: var(--bk-r-lg); overflow: hidden; }
.gb-rec + .gb-rec { border-top: 1px solid var(--bk-line); }
.gb-rec__day { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--bk-surface-2); border-bottom: 1px solid var(--bk-line); font-size: var(--bk-text-sm); color: var(--bk-fg-2); }
.gb-rec + .gb-rec__day { border-top: 1px solid var(--bk-line); }
/* a row: when · what (name over one muted line) · status in its own column · the three times */
.gb-rec__sum { display: grid; grid-template-columns: 3.6em minmax(0, 1fr) auto; grid-template-areas: "when what chev" "when state chev" "when times chev"; gap: 6px 12px; align-items: start; padding: 12px 16px; cursor: pointer; list-style: none; transition: background var(--bk-fast); }
.gb-rec__sum::-webkit-details-marker { display: none; }
.gb-rec__sum:hover { background: var(--bk-surface-2); }
.gb-rec__sum:focus-visible { outline-offset: -3px; }
.gb-rec__when { grid-area: when; display: flex; flex-direction: column; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.gb-rec__when .bk-xs { font-weight: 400; }
.gb-rec__what { grid-area: what; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gb-rec__name { font-weight: 700; line-height: 1.45; overflow-wrap: break-word; }
.gb-rec__esc { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; color: var(--bk-danger); font-weight: 500; white-space: nowrap; vertical-align: 1px; }
.gb-rec__esc svg { width: 13px; height: 13px; }
.gb-rec__who { display: flex; align-items: center; gap: 6px; color: var(--bk-fg); max-width: 100%; }
.gb-rec__who.is-open { color: var(--bk-danger); }
.gb-rec__who svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--bk-fg-3); }
.gb-rec__state { grid-area: state; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gb-rec__times { grid-area: times; display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--bk-fg-2); }
.gb-rec__t { display: inline-flex; gap: 6px; white-space: nowrap; }
.gb-rec__t > span { color: var(--bk-fg-3); }
.gb-rec__t b { color: var(--bk-fg); font-weight: 600; }
.gb-rec__sum .bk-chev { grid-area: chev; align-self: center; transition: transform var(--bk-med) var(--bk-ease); }
.gb-rec[open] > .gb-rec__sum .bk-chev { transform: rotate(180deg); }
.gb-rec__body { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 4px 16px 18px; }
.gb-rec__photo img { width: 160px; height: 120px; object-fit: cover; border-radius: var(--bk-r-md); border: 1px solid var(--bk-line); }
.gb-timeline { display: flex; flex-direction: column; margin-left: 5px; padding-left: 18px; border-left: 2px solid var(--bk-line); width: 100%; }
.gb-timeline__item { position: relative; display: grid; grid-template-columns: 5em minmax(0, 1fr); gap: 0 10px; padding: 5px 0; font-size: var(--bk-text-sm); line-height: 1.6; }
.gb-timeline__item::before { content: ""; position: absolute; left: -25px; top: 11px; width: 12px; height: 12px; border-radius: 50%; background: var(--bk-surface); border: 2px solid var(--bk-line-strong); }
.gb-timeline__item--opened::before { border-color: var(--bk-warn); }
.gb-timeline__item--escalated::before { border-color: var(--bk-danger); background: var(--bk-danger); }
.gb-timeline__item--acked::before, .gb-timeline__item--resolved::before { border-color: var(--bk-ok); background: var(--bk-ok); }
.gb-timeline__time { color: var(--bk-fg-3); white-space: nowrap; }
.gb-timeline__label { font-weight: 700; }
.gb-timeline__detail { grid-column: 2; color: var(--bk-fg-2); overflow-wrap: break-word; white-space: pre-line; }
.gb-timeline__detail:empty { display: none; }
@media (min-width: 900px) {
  .gb-rec__sum { grid-template-columns: 4.6em minmax(0, 1fr) 11.5em 11.5em auto; grid-template-areas: "when what state times chev"; align-items: center; gap: 6px 18px; }
  .gb-rec__times { flex-direction: column; flex-wrap: nowrap; gap: 0; }
  .gb-rec__body { padding-left: calc(16px + 4.6em + 18px); }
  .gb-timeline__item { grid-template-columns: 5em 9em minmax(0, 1fr); }
  .gb-timeline__detail { grid-column: 3; }
}
@media (min-width: 900px) { html[lang="en"] .gb-rec__sum { grid-template-columns: 4.6em minmax(0, 1fr) 13.5em 12.5em auto; } }

/* ---------- rules ---------- */
.gb-rules { display: flex; flex-direction: column; gap: 24px; }
.gb-rules__group { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.gb-rule { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; padding: 14px 16px; }
.gb-rule.is-off { background: var(--bk-bg-sunken); box-shadow: none; }
.gb-rule__text { flex: 1 1 22em; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.gb-rule__if { font-size: var(--bk-text-lg); font-weight: 700; line-height: 1.6; }
.gb-rule__then { display: flex; gap: 8px; align-items: flex-start; }
.gb-rule__then svg { width: 16px; height: 16px; margin-top: 3px; }
.gb-rule__act { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.gb-rule__preview { font-weight: 700; line-height: 1.7; overflow-wrap: break-word; }
.gb-ruleform__pair { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }

/* ---------- connect a device ---------- */
.gb-connect { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .gb-connect { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 40px; } }
.gb-connect__main, .gb-connect__side { min-width: 0; }
.gb-url { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 10px 10px 14px; background: var(--bk-bg-sunken); border-radius: var(--bk-r-md); }
.gb-url__text { flex: 1 1 14em; min-width: 0; font-family: var(--bk-font-mono); font-size: var(--bk-text-sm); line-height: 1.7; }
.gb-tech { margin-top: 4px; font-size: var(--bk-text-sm); color: var(--bk-fg-3); }
.gb-tech code { font-family: var(--bk-font-mono); color: var(--bk-fg-2); }
/* the ways of sending wrap to a second row instead of hiding off the edge */
.gb-tabs { flex-wrap: wrap; }
/* long code lines wrap inside the block (copying still gives the exact text); nothing scrolls sideways */
.gb-code { margin: 0; max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
/* on phones: smaller type, and lines break at the edge (not at the indentation), so each command line stays recognisable */
@media (max-width: 600px) { .gb-code { font-size: var(--bk-text-xs); line-height: 1.65; word-break: break-all; padding: 12px; } }
.gb-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 44px; color: var(--bk-fg-2); }
.gb-status[data-got="1"] { padding: 10px 14px; border-radius: var(--bk-r-md); background: var(--bk-ok-soft); color: var(--bk-fg); }
.gb-status[data-got="1"] > .bk-ico svg { width: 18px; height: 18px; color: var(--bk-ok); }
.gb-status[data-got="no"] { padding: 10px 14px; border-radius: var(--bk-r-md); background: var(--bk-warn-soft); color: var(--bk-fg); align-items: flex-start; }
.gb-status[data-got="no"] > .bk-ico svg { width: 18px; height: 18px; color: var(--bk-warn); margin-top: 3px; }
.gb-status p { flex: 1 1 12em; min-width: 0; overflow-wrap: break-word; }
.gb-contract { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
.gb-contract dt { display: flex; align-items: center; gap: 8px; color: var(--bk-fg); margin-top: 10px; }
.gb-contract dt:first-child { margin-top: 0; }
.gb-contract code { font-family: var(--bk-font-mono); font-size: var(--bk-text-md); font-weight: 700; }
.gb-contract dd { font-weight: 400; color: var(--bk-fg-2); }
/* connected devices: name on its own line (up to two lines), the values on one line below, then state and 「外す」 */
.gb-mine { background: var(--bk-surface); border: 1px solid var(--bk-line); border-radius: var(--bk-r-lg); overflow: hidden; }
.gb-mine__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "ico main act"; gap: 6px 14px; align-items: center; padding: 12px 16px; }
.gb-mine__row + .gb-mine__row { border-top: 1px solid var(--bk-line); }
.gb-mine__ico { grid-area: ico; }
.gb-mine__main { grid-area: main; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gb-mine__name { font-weight: 700; line-height: 1.45; overflow-wrap: break-word; }
.gb-mine__values { font-size: var(--bk-text-sm); color: var(--bk-fg-3); }
.gb-mine__n { color: var(--bk-fg-2); }
.gb-mine__act { grid-area: act; display: flex; align-items: center; gap: 4px 8px; }
@media (max-width: 599px) {
  .gb-mine__row { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "ico main" ". act"; align-items: start; }
  .gb-mine__act { justify-content: space-between; }
}
.gb-limits { display: flex; flex-direction: column; gap: 6px; padding-left: 1.3em; list-style: disc; color: var(--bk-fg-2); line-height: 1.7; }

/* ---------- data note and delete ---------- */
.gb-foot { margin-top: clamp(32px, 6vw, 56px); }
.gb-note-list { display: flex; flex-direction: column; gap: 4px; padding-left: 1.2em; list-style: disc; }

@media print {
  .gb-try, .gb-foot, .gb-filters, .gb-recbar { display: none !important; }
}

/* touch screens: the service's own small controls get full-size targets */
@media (pointer: coarse) {
  .gb-alerts__head .bk-seg__item, .gb-filters__device, #rules-device { min-height: 44px; }
}

/* the product name next to the logo is a link: a 44 px target with any pointer (the kit does it on touch screens only) */
.bk-topbar a.bk-brand__product { display: inline-flex; align-items: center; min-height: 44px; }

/* Japanese names on the English page: break between phrases, never inside a word (Chromium; others keep whole words) */
.gb-ja { word-break: auto-phrase; }
@supports not (word-break: auto-phrase) { .gb-ja { word-break: keep-all; } }
