/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */
body { font-family: system-ui, "Hiragino Sans", sans-serif; margin: 24px; color: #222; }
.conditions { margin-bottom: 8px; }
.conditions .row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.note { color: #666; font-size: 0.85rem; }
table.compare { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.compare th, .compare td { border: 1px solid #ddd; padding: 8px; vertical-align: top; }
.compare th { background: #f3f6fa; text-align: left; }
.price { font-weight: bold; white-space: nowrap; }
.price.quote { color: #a15c00; font-weight: normal; }
.badge { display: inline-block; font-size: 0.75rem; padding: 2px 6px; border-radius: 4px; margin: 4px 4px 0 0; }
.badge.good { background: #e3f2e8; color: #1d5b33; }
.badge.warn { background: #fdecea; color: #8a2b1f; }
.badge.info { background: #e8eefb; color: #244a8f; }
.muted { 
  color: #888; 
  font-weight: normal;
  font-size: 10px;
  line-height: 15px;
}
.quote-bar span{
  font-size: 12px;
}
.sort-link { color: inherit; text-decoration: none; }
.sort-link:hover { text-decoration: underline; }
/* 注目のサービス（広告） */
.featured { margin: 12px 0; }
.featured-head { display: flex; align-items: baseline; gap: 12px; }
.featured-head h2 { font-size: 1rem; margin: 0 0 6px; }
.featured-cards { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.featured-card { position: relative; flex: 0 0 200px; border: 1px solid #ddd; border-radius: 6px;
                 padding: 10px 12px; color: inherit; text-decoration: none; background: #fff; }
.featured-card:hover { border-color: #999; }
.featured-name { font-weight: bold; margin: 2px 0 6px; font-size: 0.9rem; }
.featured-price { color: #c0392b; font-weight: bold; }
.pr-tag { position: absolute; top: 6px; right: 8px; font-size: 0.7rem; color: #555;
          border: 1px solid #999; border-radius: 3px; padding: 0 4px; }

/* ランキングの順位 */
.rank-cell { white-space: nowrap; }
.rank { display: inline-block; min-width: 22px; text-align: center; font-weight: bold;
        border-radius: 3px; margin-right: 6px; padding: 1px 4px; }
.rank-1 { background: #d4a017; color: #fff; }
.rank-2 { background: #9e9e9e; color: #fff; }
.rank-3 { background: #b87333; color: #fff; }
.rank-4 { border: 1px solid #999; color: #555; }
/* ===== ロゴ（横長対応） ===== */
.logo {
  display: block;
  flex-shrink: 0;
  object-fit: contain;          /* 縦横比を保って枠に収める */
  object-position: left center; /* 左寄せ */
}
.logo-thumb { height: 40px; width: 120px; }
.logo-card  { height: 48px; width: 150px; }

/* ロゴが無いときの頭文字（正方形のまま） */
.logo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef2f7;
  color: #556070;
  font-weight: 700;
  font-size: 13px;
  border-radius: 6px;
}
.logo-thumb.logo-fallback { width: 30px; height: 30px; }
.logo-card.logo-fallback  { width: 48px; }

/* スマホでは少し小さく */
@media (max-width: 600px) {
  .logo-thumb { height: 30px; width: 90px; }
  .logo-thumb.logo-fallback { width: 30px; }
}

/* ===== 会社名をロゴの右隣に ===== */
.company-line {
  display: flex;          /* 横に並べる */
  align-items: center;    /* 上下中央をそろえる */
  gap: 10px;              /* ロゴと会社名の間のすき間 */
  margin-bottom: 4px;
}
.company-line .company-name {
  font-weight: 700;
  white-space: nowrap;    /* 会社名を途中で改行しない */
}
/* ===== 検体の形態 ===== */
.sf-chip {
  display: inline-block;
  padding: 1px 6px;
  margin: 0 2px 2px 0;
  border-radius: 10px;
  font-size: 12px;
  white-space: nowrap;
}
.sf-ok      { background: #e6f4ea; color: #1e6b34; }
.sf-ng      { background: #fdecea; color: #a52a1a; }
.sf-unknown { background: #f1f3f5; color: #8a939c; }
.sf-extraction { font-size: 12px; color: #444; margin-top: 2px; white-space: nowrap; }

.kv-table { border-collapse: collapse; margin: 8px 0; }
.kv-table th, .kv-table td { border: 1px solid #dde2e8; padding: 6px 10px; text-align: left; vertical-align: top; }
.kv-table th { background: #f6f8fa; white-space: nowrap; font-weight: 600; }
/* ===== ヘッダー ===== */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid #e3e7ec; margin-bottom: 16px;
}
.site-title { font-weight: 700; text-decoration: none; color: #1f4e78; }
.site-nav { display: flex; align-items: center; gap: 12px; }
.site-nav form { margin: 0; }
.link-button {
  background: none; border: none; padding: 0; cursor: pointer;
  color: #1a5fb4; text-decoration: underline; font: inherit;
}

/* ===== フォーム・お知らせ ===== */
.narrow-page { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.stack-form h2 { margin-top: 24px; font-size: 18px; }
.stack-form label { display: block; margin: 12px 0 0; font-weight: 600; }
.stack-form input[type="text"], .stack-form input[type="email"],
.stack-form input[type="password"], .stack-form input[type="tel"], .stack-form textarea {
  display: block; width: 100%; box-sizing: border-box; margin-top: 4px; padding: 8px;
  font: inherit; font-weight: 400; border: 1px solid #c9d0d8; border-radius: 6px;
}
.req { color: #b3261e; font-size: 11px; font-weight: 600; margin-left: 4px; }
.primary-button {
  margin-top: 16px; padding: 10px 24px; background: #1f4e78; color: #fff;
  border: none; border-radius: 6px; font: inherit; cursor: pointer;
}
.flash { margin: 0 16px 12px; padding: 10px 14px; border-radius: 6px; }
.flash-notice { background: #e6f4ea; color: #1e6b34; }
.flash-alert  { background: #fdecea; color: #a52a1a; }
.badge-warn { background: #fff4e5; color: #8a5a00; }
.inline-form { display: inline; }
/* ===== 見積依頼 ===== */
.quote-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 8px 0 12px; padding: 10px 12px;
  background: #f3f7fb; border: 1px solid #d6e2ee; border-radius: 8px;
}
.primary-button.small { margin-top: 0; padding: 6px 14px; font-size: 14px; }
a.primary-button { display: inline-block; text-decoration: none; }
.quote-check { text-align: center; }
.quote-check input { width: 18px; height: 18px; }
.quote-targets { padding-left: 20px; }
.radio-group { border: 1px solid #dde2e8; border-radius: 6px; padding: 8px 12px; margin: 12px 0; }
.radio-group legend { font-weight: 600; padding: 0 4px; }
.stack-form label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 6px 0; }
.stack-form input[type="number"] {
  display: block; width: 120px; margin-top: 4px; padding: 8px;
  font: inherit; border: 1px solid #c9d0d8; border-radius: 6px;
}
.notice-box { background: #f6f8fa; border-left: 4px solid #1f4e78; padding: 10px 14px; font-size: 14px; }
.code { font-family: ui-monospace, Menlo, monospace; letter-spacing: 1px; }
.narrow-page.wide { max-width: 960px; }
/* ===== 見積の回答・比較 ===== */
.quote-cards {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin: 12px 0 24px;
}
.quote-card { border: 1px solid #dde2e8; border-radius: 10px; padding: 14px; background: #fff; }
.quote-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.quote-amount { font-size: 22px; font-weight: 700; color: #1f4e78; margin: 6px 0 10px; }
.quote-card .kv-table { width: 100%; font-size: 14px; }
.quote-card .primary-button[disabled] { background: #9aa9b8; cursor: not-allowed; }
.secondary-button {
  margin-top: 8px; padding: 8px 18px; background: #fff; color: #a52a1a;
  border: 1px solid #a52a1a; border-radius: 6px; font: inherit; cursor: pointer;
}
/* ===== 運営画面 ===== */
.admin-nav {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  padding: 8px 12px; margin-bottom: 16px;
  background: #fff8e6; border: 1px solid #f0d9a0; border-radius: 8px; font-size: 14px;
}
.badge-on { background: #e6f4ea; color: #1e6b34; font-weight: 700; }
.stack-form input[type="date"] {
  display: block; margin-top: 4px; padding: 8px; font: inherit;
  border: 1px solid #c9d0d8; border-radius: 6px;
}
/* ===== 登録企業・登録待ち ===== */
.badge-registered { background: #e8f0fb; color: #1f4e78; font-weight: 700; margin-left: 6px; }
.registered-note { font-size: 13px; color: #444; margin: 8px 0 4px; }
.delivery-note { display: inline-block; font-size: 12px; margin-top: 2px; }
.delivery-note.ok { color: #1e6b34; }
.delivery-note.wait { color: #8a5a00; }
.mail-preview {
  width: 100%; box-sizing: border-box; font: 13px/1.6 ui-monospace, Menlo, monospace;
  padding: 10px; border: 1px solid #c9d0d8; border-radius: 6px; background: #fafbfc;
}
/* ===== 利用規約 ===== */
.terms h2 { font-size: 17px; margin-top: 24px; }
.terms ol, .terms ul { padding-left: 22px; }
.terms li { margin: 4px 0; }