/* /domain/ — ドメイン最安管理パターン検索. Scoped under .dm; uses HeroUI tokens so dark mode follows. */

.dm {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 32px;
  align-items: start;
  margin-top: 8px;
}
@media (max-width: 960px) {
  .dm { grid-template-columns: minmax(0, 1fr); }
}

.dm-title { font-size: clamp(22px, 3vw, 30px); font-weight: 700; margin: 0 0 8px; line-height: 1.35; }
.dm-lead { color: var(--muted); margin: 0 0 20px; line-height: 1.7; }
.dm-h2 { font-size: 18px; font-weight: 700; margin: 0 0 12px; }
.dm-section { margin-top: 32px; }

/* form */
.dm-form {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: var(--background);
}
.dm-form__row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.dm-field { display: flex; flex-direction: column; gap: 4px; }
.dm-field--grow { flex: 1 1 260px; }
.dm-field__label { font-size: 13px; color: var(--muted); }
.dm-field input,
.dm-field select {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--background);
  color: var(--foreground);
  font: inherit;
}
/* Own chevron so it can sit a bit in from the right edge (the native one hugs it). */
.dm-field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23888' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 12px;
  cursor: pointer;
}
/* Chrome's datalist ▼ sits a little low; lift it to the visual centre. */
.dm-field input::-webkit-calendar-picker-indicator { position: relative; top: -3px; }
.dm-field input:focus-visible,
.dm-field select:focus-visible,
.dm-button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.dm-button {
  height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-foreground);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.dm-button:hover { background: var(--accent-hover); }
.dm-first { border: 0; margin: 14px 0 0; padding: 0; }
.dm-first legend { font-size: 13px; color: var(--muted); margin-bottom: 6px; padding: 0; border: 0; width: auto; }
.dm-first label { display: inline-flex; align-items: center; gap: 6px; margin: 0 16px 4px 0; font-weight: normal; }

/* tables */
.dm-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dm-table th,
.dm-table td { padding: 10px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; text-align: left; }
.dm-table th { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.dm-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dm-table small { color: var(--muted); font-size: 11px; }
.dm-table .rank { font-weight: 700; text-align: center; width: 3em; }
.dm-table .total { font-weight: 700; }
.dm-remark { font-size: 12px; color: var(--muted); }

.dm-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--default-soft, var(--border));
  font-size: 11px;
  white-space: nowrap;
}
.dm-pr {
  display: inline-block;
  margin-left: 3px;
  padding: 0 4px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 10px;
  color: var(--muted);
  vertical-align: 1px;
}
.dm-cheaper { color: var(--success, #17803d); font-weight: 600; }
.dm-dearer { color: var(--muted); }

.dm-note { font-size: 13px; color: var(--muted); margin: 10px 0 0; line-height: 1.7; }
.dm-error {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger-soft-foreground, var(--foreground));
}
.dm-notes ul { padding-left: 1.2em; margin: 0; line-height: 1.8; font-size: 14px; }

/* aside */
.dm-aside { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 961px) {
  .dm-aside { position: sticky; top: 16px; }
}
.dm-box { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.dm-box__title { font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 0 10px; letter-spacing: .04em; }
.dm-ad + .dm-ad { margin-top: 12px; }
.dm-ad img { max-width: 100%; height: auto; }
.dm-links { list-style: none; margin: 0; padding: 0; line-height: 2; font-size: 14px; }

/* sample links (主なドメイン) */
.dm-samples {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.dm-sample {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--foreground);
  text-decoration: none;
}
.dm-sample:hover { border-color: var(--accent); text-decoration: none; }
.dm-sample:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.dm-sample__tld { font-size: 18px; font-weight: 700; color: var(--accent); }
.dm-sample__total { font-weight: 700; font-variant-numeric: tabular-nums; }
.dm-sample__how { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* /domain/all/: no aside, full-width grid */
.dm--wide { grid-template-columns: minmax(0, 1fr); }
.dm-filter { margin-bottom: 16px; }
.dm-filter .dm-note { margin-top: 8px; }
.dm-samples li[hidden] { display: none; }
