:root {
  --bs-border-color: var(--bs-gray-500);
  --bs-font-sans-serif: "OWDict Sarabun", "OWDict Roboto", sans-serif;
  --bs-body-font-weight: 350;
  --ow-font-title: 1.5rem;
  --ow-control-font-size: .75rem;
  --ow-control-padding: .25rem;
  --ow-control-size: calc(var(--ow-control-font-size) * var(--bs-body-line-height) + 2 * var(--ow-control-padding) + 2 * var(--bs-border-width));
  --ow-word-actions-width: calc(2 * var(--ow-control-size) + var(--ow-control-padding));
  /* Real Light 300 for Thai and Roboto 350 for Latin/Cyrillic. Both scripts
     use the component's unadjusted size; no synthetic weights or scaling. */
  font-synthesis: none;
}

/* Keep the shared page shell at the approved Bootstrap xl width on larger screens. */
@media (min-width: 1400px) {
  .container {
    max-width: 1140px;
  }
}

/* Private CSS names select our exact self-hosted faces. Swap ensures a late
   font still replaces the readable system fallback. */
@font-face {
  font-family: "OWDict Sarabun";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/static/v-320b3c4daf70b9cc322f/fonts/sarabun/sarabun-light-thai.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: "OWDict Roboto";
  font-style: normal;
  font-weight: 350;
  font-display: swap;
  src: url("/static/v-01818c94a3c2cde4fa14/fonts/roboto/roboto.woff2") format("woff2");
  font-stretch: 100%;
}

/* User-approved normal weight, shared by Bootstrap's normal utility and fields.
   The variable Roboto face is restricted to 350; Thai resolves to its real 300. */
.fw-normal {
  font-weight: var(--bs-body-font-weight) !important;
}
.form-control, .form-select {
  font-weight: var(--bs-body-font-weight);
}

/* iOS focus zoom is triggered by compact text fields. Keep the whole small
   input group on Bootstrap's normal 1rem scale on phones and touch devices;
   desktop compact controls and user pinch zoom remain unchanged. */
@media (max-width: 767.98px), (any-pointer: coarse) {
  .form-control-sm, .form-select-sm,
  .input-group-sm > .form-control, .input-group-sm > .form-select,
  .input-group-sm > .input-group-text, .input-group-sm > .btn {
    font-size: 1rem;
  }
}

/* Fixed Bootstrap h4 scale for page titles: no extra responsive font sizes. */
.h4 {
  font-size: var(--ow-font-title);
}

/* Design-system action button: Bootstrap variables, shared by every .btn.
   Icon buttons are square; text buttons grow only to fit their label. */
.btn {
  --bs-btn-font-weight: var(--bs-body-font-weight);
  --bs-btn-font-size: var(--ow-control-font-size);
  --bs-btn-padding-x: var(--ow-control-padding);
  --bs-btn-padding-y: var(--ow-control-padding);
  min-width: calc(var(--bs-btn-font-size) * var(--bs-btn-line-height) + 2 * var(--bs-btn-padding-y) + 2 * var(--bs-btn-border-width));
}

/* Bootstrap focus ring remains available for keyboard navigation. */
.focus-ring:focus:not(:focus-visible) {
  box-shadow: none;
}

/* Shared card presentation, restored from the approved temporary sample.
   The rounded frame owns the outside border; Bootstrap owns the cell grid.
   Equal columns apply to any supplied structure, irrespective of part of speech. */
[data-word-card-table] {
  border-style: hidden;
  table-layout: fixed;
}

[data-word-card-table] th {
  font-weight: var(--bs-body-font-weight);
}

/* Additional header rows follow the table's disclosure state. */
[data-word-card-table][data-card-collapsed] > thead > tr:not(:first-child) {
  display: none;
}

[data-card-cell] {
  cursor: pointer;
}


/* Absolute centering must use the full intrinsic brand width. Auto width can
   shrink its box while the nonshrinking text overflows, defeating header fit. */
[data-header-brand-group] {
  width: max-content;
}

/* The user-approved logo reduction is shared by all page and access states. */
.site-header-logo {
  width: calc(132px * .7);
  height: auto;
}

/* Reserve the same corner controls space in every card, including guest cards.
   The dimensions derive from the existing shared button geometry above. */
.word-card-heading {
  position: relative;
  padding-inline: var(--ow-word-actions-width);
}
.word-card-actions {
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: 0;
}
.word-card-status {
  width: var(--ow-control-size);
  min-height: var(--ow-control-size);
  font-size: var(--ow-control-font-size);
}
