:root {
  --bg: #f3f7fd;
  --panel: #ffffff;
  --ink: #10233f;
  --muted: #60708a;
  --line: #d7e3f4;
  --green: #2563eb;
  --green-dark: #1d4ed8;
  --gold: #0ea5e9;
  --blue: #1e40af;
  --danger: #9a3d2f;
  --shadow: 0 18px 45px rgba(17, 46, 92, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  -webkit-text-size-adjust: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.file-button {
  border: 0;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  min-height: 42px;
  padding: 0 16px;
  touch-action: manipulation;
}

button:hover,
.file-button:hover {
  background: var(--green-dark);
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  align-items: center;
  background: #0b1f3a;
  color: #fff;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 22px clamp(16px, 4vw, 44px);
}

.eyebrow {
  color: #93c5fd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 6px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.12;
  margin-bottom: 0;
}

.app-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
}

.app-meta span {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #eaf3ff;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.app-meta span.is-ok {
  background: rgba(147, 197, 253, 0.18);
  color: #dbeafe;
}

.app-meta span.is-warning {
  background: rgba(14, 165, 233, 0.2);
  color: #bae6fd;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.top-select {
  background: #102a4c;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  min-height: 42px;
  width: auto;
}

.file-button {
  align-items: center;
  display: inline-flex;
  position: relative;
}

.file-button input {
  inset: 0;
  opacity: 0;
  position: absolute;
  width: 100%;
}

.workspace {
  display: flex;
  flex-direction: column;
  padding: 22px clamp(14px, 3vw, 36px) 36px;
}

.hero-panel {
  background:
    linear-gradient(135deg, rgba(96, 165, 250, 0.28), rgba(14, 165, 233, 0.08) 42%, rgba(255, 255, 255, 0) 72%),
    #0b1f3a;
  border: 1px solid #3b82f6;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(14, 43, 86, 0.22);
  color: #fff;
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-bottom: 18px;
  overflow: hidden;
  padding: clamp(18px, 3vw, 30px);
  order: 1;
}

.hero-copy h2 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.12;
  margin-bottom: 12px;
  max-width: 780px;
}

.hero-copy p:not(.eyebrow) {
  color: #dbeafe;
  line-height: 1.7;
  margin-bottom: 18px;
  max-width: 720px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions button {
  background: linear-gradient(180deg, #38bdf8, #2563eb);
  color: #fff;
  min-width: 150px;
}

.hero-actions button:hover {
  background: linear-gradient(180deg, #7dd3fc, #1d4ed8);
}

.overview-card span,
.bar-label span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
}

.data-section-title {
  align-items: center;
  background: #eaf3ff;
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
  order: 3;
  padding: 16px 18px;
}

.data-section-title h2 {
  font-size: 22px;
  margin: 0;
}

.data-section-title .eyebrow {
  color: var(--blue);
}

.data-section-title span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.overview-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 0;
  order: 4;
  padding: 14px 0;
}

.overview-card,
.chart-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.overview-card {
  padding: 16px;
}

.overview-card strong {
  display: block;
  font-size: 25px;
  margin-top: 6px;
}

.chart-panel {
  margin-bottom: 14px;
  order: 5;
  overflow: hidden;
}

.compact-head {
  padding-block: 14px;
}

.category-bars {
  display: grid;
  gap: 12px;
  padding: 16px 18px 18px;
}

.bar-label {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.bar-label strong {
  color: var(--ink);
  font-size: 13px;
}

.bar-track {
  background: #dbeafe;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.bar-track span {
  background: linear-gradient(90deg, var(--green), var(--gold));
  display: block;
  height: 100%;
}

.search-panel,
.table-panel,
.detail-card,
.mini-panel,
.proposal-panel,
.edit-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.search-panel {
  margin-bottom: 18px;
  order: 2;
  padding: 18px;
}

.search-row {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1.4fr) repeat(5, minmax(150px, 1fr));
}

.search-row.external-search {
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px);
}

.internal-control {
  display: none !important;
}

.inline-filter {
  color: #536057;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid #cdd6cf;
  border-radius: 6px;
  color: var(--ink);
  min-height: 44px;
  padding: 0 12px;
  width: 100%;
}

textarea {
  padding-block: 10px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  outline: 3px solid rgba(35, 107, 67, 0.18);
}

.stats-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  margin-top: 16px;
}

.stat {
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
}

.stat span,
.detail-card span,
.range-row span,
.memo-box span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
}

.stat strong {
  display: block;
  font-size: 24px;
  margin-top: 5px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 11px;
}

.audit-panel {
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 14px;
  padding: 14px;
}

.audit-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.audit-head h2 {
  font-size: 16px;
  margin: 0;
}

.audit-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.audit-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.audit-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}

.audit-card span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
}

.audit-card strong {
  display: block;
  font-size: 20px;
  margin-top: 4px;
}

.audit-card.is-ok {
  border-color: #93c5fd;
}

.audit-card.is-warning {
  border-color: #e4c782;
}

.audit-card.is-danger {
  border-color: #d09a90;
}

.content-grid {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  order: 6;
}

.table-panel {
  overflow: hidden;
}

.table-tabs {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 18px;
}

.table-tab {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  flex: none;
  min-height: 36px;
  padding: 0 12px;
}

.table-tab:hover,
.table-tab.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.table-tab span {
  font-size: 12px;
  margin-left: 4px;
  opacity: 0.85;
}

.panel-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 16px 18px;
}

.panel-head h2 {
  font-size: 18px;
  margin: 0;
}

.panel-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.table-wrap {
  overflow: auto;
  max-height: 62vh;
}

.table-more {
  align-items: center;
  background: #f8fbff;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 18px;
}

.table-more span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.table-more button {
  min-height: 38px;
}

table {
  border-collapse: collapse;
  min-width: 980px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f8fbff;
  color: #526785;
  font-size: 12px;
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover,
tbody tr.is-selected {
  background: #eff6ff;
}

.club-name {
  display: block;
  font-weight: 800;
}

.club-spec {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-top: 4px;
}

.price {
  font-weight: 800;
  white-space: nowrap;
}

.status-badge {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  max-width: 220px;
  overflow-wrap: anywhere;
  padding: 5px 9px;
}

.status-badge.is-ok {
  background: #dbeafe;
  color: var(--green);
}

.status-badge.is-warning {
  background: #fff3d8;
  color: #81570a;
}

.detail-panel {
  display: grid;
  gap: 14px;
}

.detail-card {
  padding: 18px;
}

.pill {
  background: #dbeafe;
  border-radius: 999px;
  color: var(--green);
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 10px;
}

.detail-card h2 {
  font-size: 24px;
  line-height: 1.25;
  margin-bottom: 8px;
}

#selectedSpec {
  color: var(--muted);
  line-height: 1.6;
}

.price-boxes {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin: 18px 0;
}

.price-boxes div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
}

.price-boxes strong {
  display: block;
  font-size: 24px;
  margin-top: 6px;
}

.price-boxes div:first-child strong {
  color: var(--blue);
}

.price-boxes div:last-child strong {
  color: var(--gold);
}

.range-block {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.range-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.meter {
  background: #dbeafe;
  border-radius: 999px;
  height: 12px;
  margin: 12px 0;
  overflow: hidden;
}

.meter span {
  background: linear-gradient(90deg, var(--green), var(--gold));
  display: block;
  height: 100%;
  width: 60%;
}

.memo-box {
  background: #f8fbff;
  border: 1px solid #d7e3f4;
  border-radius: 6px;
  margin: 18px 0;
  padding: 14px;
}

.memo-box p {
  line-height: 1.65;
  margin: 6px 0 0;
}

.source-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 16px;
}

.source-grid div {
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
}

.source-grid strong {
  display: block;
  font-size: 13px;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.risk-box {
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 16px;
  padding: 12px;
}

.risk-box span {
  display: block;
  font-size: 13px;
  font-weight: 800;
}

.risk-box p {
  line-height: 1.55;
  margin: 5px 0 0;
}

.risk-box.is-ok {
  background: #eff6ff;
  border-color: #93c5fd;
  color: var(--green-dark);
}

.risk-box.is-warning {
  background: #fff7e6;
  border-color: #e4c782;
  color: #72500e;
}

.mini-panel {
  box-shadow: none;
  padding: 16px;
}

.mini-panel h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.mini-panel p {
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 0;
}

.proposal-panel {
  box-shadow: none;
  padding: 16px;
}

.external-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
  padding: 16px;
}

.external-primary {
  background: #0b1f3a;
  border-color: #3b82f6;
  box-shadow: 0 18px 45px rgba(14, 43, 86, 0.18);
  color: #fff;
  margin-top: 14px;
}

.external-head {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.external-head h2 {
  font-size: 20px;
  margin-bottom: 6px;
}

.external-head p {
  color: #dbeafe;
  line-height: 1.55;
  margin: 0;
}

.external-head span {
  background: rgba(147, 197, 253, 0.16);
  border: 1px solid rgba(147, 197, 253, 0.45);
  border-radius: 999px;
  color: #bfdbfe;
  flex: none;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

.proposal-panel h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

.external-panel h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

.proposal-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.proposal-grid label {
  color: #536057;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

.external-panel label {
  color: #536057;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

.external-primary label {
  color: #bfdbfe;
}

.external-primary input,
.external-primary select,
.external-primary textarea {
  background: #fff;
  border-color: #93c5fd;
}

.external-links,
.external-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.external-primary .external-links button {
  align-items: center;
  background: #fff;
  border: 2px solid #bfdbfe;
  box-shadow: 0 8px 18px rgba(2, 8, 23, 0.18);
  color: #0f172a;
  display: inline-flex;
  font-size: 16px;
  justify-content: center;
  min-width: 112px;
}

.external-primary .external-actions button {
  background: #38bdf8;
  color: #082f49;
}

.external-primary .external-links button:hover {
  background: #f8fbff;
  border-color: #93c5fd;
}

.external-primary .market-card.is-yahoo {
  border-color: #facc15;
  color: #e60012;
  font-family: "Arial Black", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-weight: 900;
}

.external-primary .market-card.is-rakuten {
  border-color: #bf0000;
  color: #bf0000;
  font-family: Georgia, "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 900;
}

.external-primary .market-card.is-mercari {
  border-color: #ff4f5e;
  color: #ff4f5e;
  font-weight: 900;
}

.external-primary .market-card.is-kakaku {
  border-color: #f97316;
  color: #1d4ed8;
  font-weight: 900;
}

.external-primary .market-card.is-google {
  border-color: #d1d5db;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  letter-spacing: 0;
}

.external-primary .market-card.is-google span:nth-child(1),
.external-primary .market-card.is-google span:nth-child(4) {
  color: #4285f4;
}

.external-primary .market-card.is-google span:nth-child(2),
.external-primary .market-card.is-google span:nth-child(6) {
  color: #ea4335;
}

.external-primary .market-card.is-google span:nth-child(3) {
  color: #fbbc05;
}

.external-primary .market-card.is-google span:nth-child(5) {
  color: #34a853;
}

.external-primary .external-actions button:hover {
  background: #7dd3fc;
}

.external-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  margin-bottom: 10px;
}

.external-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 8px 0 0;
}

.external-primary .external-status {
  color: #dbeafe;
}

.proposal-results {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin: 14px 0;
}

.proposal-results div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}

.proposal-results span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
}

.proposal-results strong {
  display: block;
  font-size: 21px;
  margin-top: 5px;
}

.proposal-results div:first-child strong {
  color: var(--blue);
}

.proposal-results div:nth-child(2) strong {
  color: var(--gold);
}

.proposal-advice {
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #243b5a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
  margin: 0 0 12px;
  padding: 12px;
}

.proposal-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.history-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
  padding: 16px;
}

.history-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.history-head h3 {
  font-size: 16px;
  margin: 0;
}

.history-head div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.history-head button {
  min-height: 36px;
  padding: 0 10px;
}

.history-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.history-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 8px;
  grid-template-columns: 1.2fr 1fr;
  padding: 10px;
}

.history-item strong,
.history-item span {
  display: block;
}

.history-item span,
.empty-history {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.print-sheet {
  display: none;
}

.edit-panel {
  box-shadow: none;
  padding: 16px;
}

.edit-panel h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

.edit-panel label {
  color: #536057;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

.edit-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 10px;
}

.edit-panel textarea {
  min-height: 88px;
  padding: 10px 12px;
  resize: vertical;
}

.validation-message {
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
  margin: 10px 0;
  min-height: 18px;
}

.edit-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, 1fr);
}

.danger-button {
  background: var(--danger);
}

.danger-button:hover {
  background: #743025;
}

@media (max-width: 920px) {
  .topbar,
  .content-grid,
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    display: grid;
  }

  .data-section-title {
    align-items: flex-start;
    display: grid;
    gap: 8px;
  }

  .overview-grid,
  .search-row,
  .stats-grid,
  .external-grid,
  .source-grid {
    grid-template-columns: 1fr 1fr;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    order: -1;
  }

  .search-row input {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  body {
    background: #eef5ff;
  }

  button,
  .file-button,
  input,
  select {
    min-height: 48px;
  }

  .topbar {
    gap: 14px;
    padding: 18px 14px;
  }

  h1 {
    font-size: 25px;
  }

  .workspace {
    padding: 12px 10px 26px;
  }

  .search-row,
  .overview-grid,
  .stats-grid,
  .external-grid,
  .price-boxes,
  .source-grid,
  .proposal-grid,
  .proposal-results,
  .proposal-actions,
  .history-item,
  .edit-grid,
  .edit-actions {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    margin-bottom: 12px;
    padding: 18px;
  }

  .hero-copy h2 {
    font-size: 27px;
  }

  .hero-copy p:not(.eyebrow) {
    font-size: 14px;
    line-height: 1.6;
  }

  .hero-actions button {
    width: 100%;
  }

  .search-panel,
  .detail-card,
  .proposal-panel,
  .edit-panel,
  .history-panel,
  .mini-panel {
    padding: 14px;
  }

  .search-panel {
    margin-bottom: 12px;
  }

  .external-primary {
    margin-top: 12px;
  }

  .top-actions {
    justify-content: stretch;
    width: 100%;
  }

  .top-actions button,
  .file-button {
    justify-content: center;
    width: 100%;
  }

  .external-head {
    display: grid;
  }

  .external-head span {
    justify-self: start;
  }

  .external-primary .external-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .external-primary .external-links button {
    min-width: 0;
    width: 100%;
  }

  .panel-head {
    align-items: flex-start;
    display: grid;
    gap: 6px;
  }

  .overview-card strong,
  .price-boxes strong,
  .proposal-results strong {
    font-size: 22px;
  }

  .table-tabs {
    padding: 10px 12px;
  }

  .table-tab {
    min-height: 40px;
  }

  .table-wrap {
    max-height: none;
    overflow: visible;
  }

  .table-more {
    align-items: stretch;
    display: grid;
    padding: 12px;
  }

  .table-more button {
    width: 100%;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  table {
    min-width: 0;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 10px;
    padding: 12px;
  }

  tbody tr {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(17, 46, 92, 0.08);
    overflow: hidden;
  }

  tbody tr:hover,
  tbody tr.is-selected {
    background: #f8fbff;
    border-color: #60a5fa;
  }

  td {
    align-items: start;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 10px;
    grid-template-columns: 92px 1fr;
    padding: 10px 12px;
  }

  td:last-child {
    border-bottom: 0;
  }

  td::before {
    color: var(--muted);
    content: "";
    font-size: 12px;
    font-weight: 800;
  }

  td:nth-child(1)::before {
    content: "クラブ";
  }

  td:nth-child(2)::before {
    content: "種類";
  }

  td:nth-child(3)::before {
    content: "年式";
  }

  td:nth-child(4)::before {
    content: "店頭相場";
  }

  td:nth-child(5)::before {
    content: "買取目安";
  }

  td:nth-child(6)::before {
    content: "粗利率";
  }

  td:nth-child(7)::before {
    content: "確認";
  }

  .detail-card h2 {
    font-size: 22px;
  }

  .history-head {
    align-items: stretch;
    display: grid;
  }

  .history-head div {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    background: #fff;
    color: #111;
  }

  .app-shell {
    display: none;
  }

  .print-sheet {
    display: block;
  }

  .print-document {
    font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
    padding: 0;
  }

  .print-document header {
    align-items: flex-start;
    border-bottom: 2px solid #111;
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
  }

  .print-document h1 {
    font-size: 28px;
    margin: 0;
  }

  .print-document h2 {
    border-left: 5px solid #111;
    font-size: 16px;
    margin: 18px 0 8px;
    padding-left: 8px;
  }

  .print-document p {
    margin: 0 0 4px;
  }

  .print-document dl {
    display: grid;
    gap: 4px;
    margin: 0;
    min-width: 220px;
  }

  .print-document dl div {
    display: grid;
    gap: 8px;
    grid-template-columns: 70px 1fr;
  }

  .print-document dt {
    color: #555;
    font-weight: 700;
  }

  .print-document dd {
    margin: 0;
  }

  .print-document table {
    border-collapse: collapse;
    min-width: 0;
    width: 100%;
  }

  .print-document th,
  .print-document td {
    border: 1px solid #777;
    font-size: 12px;
    padding: 7px 8px;
  }

  .print-document th {
    background: #f0f0f0;
    width: 150px;
  }

  .print-price-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(4, 1fr);
  }

  .print-price-grid div {
    border: 1px solid #777;
    padding: 10px;
  }

  .print-price-grid span {
    color: #555;
    display: block;
    font-size: 11px;
    font-weight: 700;
  }

  .print-price-grid strong {
    display: block;
    font-size: 19px;
    margin-top: 4px;
  }

  .print-document footer {
    border-top: 1px solid #777;
    font-size: 12px;
    margin-top: 20px;
    padding-top: 12px;
  }
}
