.roman-numeral-converter-page .go-roman-form {
  align-items: start;
}

.roman-numeral-converter-page .go-side {
  display: flex;
  flex-direction: column;
}

.roman-numeral-converter-page .go-converter-card {
  position: relative;
}

.roman-numeral-converter-page .go-converter-title {
  padding-right: 52px;
}

.roman-numeral-converter-page .go-reset-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.roman-numeral-converter-page .go-reset-btn:hover {
  border-color: #94a3b8;
  color: #1e293b;
  background: #f8fafc;
}

.roman-numeral-converter-page .go-reset-btn:focus-visible {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 18px 34px -30px rgba(15, 23, 42, 0.7);
}

.roman-numeral-converter-page .go-pills {
  margin-top: 0;
  margin-bottom: 2px;
}

.roman-numeral-converter-page .go-roman-pills {
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0 auto 10px;
}

.roman-numeral-converter-page .go-number-pills {
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0 auto 10px;
}

.roman-numeral-converter-page #go-from-value,
.roman-numeral-converter-page #go-to-value {
  font-size: 1.9rem;
}

.roman-numeral-converter-page #go-from-value {
  letter-spacing: 0.02em;
}

.roman-numeral-converter-page #go-from-value.go-overflow-right,
.roman-numeral-converter-page #go-to-value.go-overflow-right {
  text-align: right;
}

.go-static-unit {
  width: 100%;
  border: 1px solid #b9c7df;
  border-radius: 0;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  padding: 10px 14px;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  background: #fff;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.roman-numeral-converter-page .go-max-hint {
  margin-left: auto;
  color: #94a3b8;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
}

.roman-numeral-converter-page .go-shell.go-at-max .go-max-hint {
  color: #0f172a;
}

.go-input-error {
  margin: 0;
  color: #b91c1c;
  font-size: 14px;
  font-weight: 600;
}

.roman-numeral-converter-page .go-pill {
  width: 42px;
  min-width: 42px;
  height: 42px;
  border-radius: 50%;
  padding: 0;
  line-height: 1;
  justify-content: center;
  align-items: center;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

.roman-numeral-converter-page .go-pill:focus {
  outline: none;
}

.roman-numeral-converter-page .go-pill[disabled],
.roman-numeral-converter-page .go-pill.is-disabled {
  opacity: 0.36;
  cursor: default;
  filter: saturate(0.35);
}

.roman-numeral-converter-page .go-pill-divider {
  width: 100%;
  flex-basis: 100%;
  height: 1px;
  background: #e2e8f0;
  margin: 2px 4px;
  border-radius: 999px;
  user-select: none;
}

.ancient-greek-numeral-converter-page .go-roman-pills {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px;
  justify-items: center;
  align-items: center;
  width: 100%;
}

.ancient-greek-numeral-converter-page .go-roman-pills .go-pill-divider {
  grid-column: 1 / -1;
  width: 100%;
  margin: 2px 0;
}

.ancient-greek-numeral-converter-page .go-roman-pills .go-pill {
  width: 100%;
  max-width: 42px;
  min-width: 0;
  height: auto;
  aspect-ratio: 1 / 1;
  justify-self: center;
}

.go-place-total-row td {
  font-weight: 700;
  background: #f8fafc;
}

.go-place-empty-row td {
  color: #64748b;
}

.go-roman-chart-table td,
.go-roman-chart-table th {
  white-space: nowrap;
}

.go-roman-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.egyptian-numeral-converter-page #go-from-value,
.egyptian-numeral-converter-page .go-pill[data-egypt-symbol],
.egyptian-numeral-converter-page .go-roman-chart-table tbody td:first-child {
  font-family: "Noto Sans Egyptian Hieroglyphs", "Segoe UI Symbol", "Noto Sans Symbols 2", "Noto Sans", sans-serif;
}

.egyptian-numeral-converter-page #go-from-value {
  font-size: 2.2rem;
  line-height: 1.2;
  text-align: center;
}

.babylonian-numeral-converter-page #go-from-value,
.babylonian-numeral-converter-page .go-pill[data-babylon-symbol],
.babylonian-numeral-converter-page .go-roman-chart-table tbody td:first-child {
  font-family: "Noto Sans Cuneiform", "Segoe UI Historic", "Segoe UI Symbol", "Noto Sans Symbols 2", "Noto Sans", sans-serif;
}

.egyptian-numeral-converter-page .go-pill[data-egypt-symbol] {
  font-size: 1.22rem;
}

.egyptian-numeral-converter-page #go-place-values-table tbody td:first-child,
.egyptian-numeral-converter-page .go-roman-chart-table tbody td:first-child {
  font-size: 1.32rem;
  line-height: 1.15;
}

@media (max-width: 760px) {
  .roman-numeral-converter-page #go-from-value,
  .roman-numeral-converter-page #go-to-value {
    font-size: 1.6rem;
  }

  .roman-numeral-converter-page .go-reset-btn {
    top: 12px;
    right: 12px;
  }

  .roman-numeral-converter-page .go-number-side .go-number-pills {
    order: -1;
    margin-top: 0;
    margin-bottom: 10px;
  }

  .roman-numeral-converter-page .go-roman-side .go-roman-pills {
    order: 3;
    margin-top: 10px;
    margin-bottom: 0;
  }

  .go-static-unit {
    min-height: 44px;
    font-size: 0.95rem;
  }

  .roman-numeral-converter-page .go-max-hint {
    font-size: 0.78rem;
  }

  .egyptian-numeral-converter-page #go-from-value {
    font-size: 1.95rem;
  }

  .egyptian-numeral-converter-page .go-pill[data-egypt-symbol] {
    font-size: 1.14rem;
  }

  .egyptian-numeral-converter-page #go-place-values-table tbody td:first-child,
  .egyptian-numeral-converter-page .go-roman-chart-table tbody td:first-child {
    font-size: 1.2rem;
  }
}

@media (hover: none) {
  .roman-numeral-converter-page .go-pill:hover,
  .roman-numeral-converter-page .go-pill:focus-visible {
    border-color: #d9dadb;
    color: #0f172a;
  }
}

@media (min-width: 761px) {
  .roman-numeral-converter-page .go-roman-side .go-roman-pills,
  .roman-numeral-converter-page .go-number-side .go-number-pills {
    order: 3;
    margin-top: 10px;
    margin-bottom: 0;
  }

  .roman-numeral-converter-page .go-equals {
    align-self: start;
    margin-top: 40px;
  }
}
