/* 投資候補（investment-candidates.js） */

html.ivc-lock,
html.ivc-lock body {
  overflow: hidden;
}

.ivc-root,
.ivc-root * {
  box-sizing: border-box;
}

.ivc-root {
  position: fixed;
  inset: 0;
  z-index: 1000300;
  display: none;
  flex-direction: column;
  background: #f4f5f8;
  color: #263238;
  font-size: 14px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.ivc-root.is-open {
  display: flex;
}

.ivc-root [hidden] {
  display: none !important;
}

.ivc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) 8px calc(12px + env(safe-area-inset-left));
  background: #1a237e;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.ivc-title {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  font-weight: bold;
}

.ivc-title small {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  font-weight: normal;
  opacity: 0.85;
}

.ivc-icon-btn {
  appearance: none;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.ivc-icon-btn.is-dark {
  width: 34px;
  height: 34px;
  background: #eceff1;
  color: #37474f;
}

.ivc-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.ivc-toolbar,
.ivc-list {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding-left: 12px;
  padding-right: 12px;
}

.ivc-toolbar {
  padding-top: 12px;
}

.ivc-summary {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 10px 12px;
}

.ivc-summary-main {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: baseline;
  font-weight: bold;
}

.ivc-summary-count {
  color: #1a237e;
}

.ivc-summary-sum {
  color: #e65100;
  font-variant-numeric: tabular-nums;
}

.ivc-summary-note {
  color: #607d8b;
  font-size: 12px;
  font-weight: normal;
}

.ivc-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.ivc-break {
  font-size: 12px;
  color: #37474f;
  background: #f5f5f5;
  border-radius: 999px;
  padding: 2px 8px;
}

.ivc-search-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.ivc-search,
.ivc-sort,
.ivc-input,
.ivc-textarea {
  width: 100%;
  border: 1px solid #cfd8dc;
  border-radius: 10px;
  background: #fff;
  color: #263238;
  font-size: 16px;
  padding: 10px 12px;
  font-family: inherit;
}

.ivc-search,
.ivc-sort {
  font-size: 14px;
  padding: 9px 10px;
}

.ivc-sort {
  flex: 0 0 148px;
  width: auto;
}

.ivc-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 0 4px;
  scrollbar-width: none;
}

.ivc-chips::-webkit-scrollbar {
  display: none;
}

.ivc-chip {
  appearance: none;
  flex: 0 0 auto;
  border: 1px solid #c5cae9;
  background: #fff;
  color: #283593;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}

.ivc-chip.is-active {
  background: #1a237e;
  border-color: #1a237e;
  color: #fff;
}

.ivc-error {
  margin-top: 8px;
  background: #ffebee;
  color: #b71c1c;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
}

.ivc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

.ivc-card {
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
}

.ivc-card-main {
  flex: 1;
  min-width: 0;
  text-align: left;
  background: #fff;
  border: none;
  border-left: 4px solid var(--ivc-cat, #1a237e);
  padding: 12px 12px 12px 12px;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

.ivc-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.ivc-cat {
  display: inline-block;
  font-size: 11px;
  font-weight: bold;
  color: #fff;
  background: var(--ivc-cat, #1a237e);
  border-radius: 999px;
  padding: 2px 8px;
}

.ivc-amount {
  font-weight: 800;
  color: #e65100;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.ivc-amount small {
  display: block;
  font-size: 11px;
  font-weight: bold;
  color: #ef6c00;
}

.ivc-name {
  margin-top: 6px;
  font-size: 16px;
  font-weight: bold;
  word-break: break-word;
}

.ivc-problem-label {
  margin-top: 8px;
  font-size: 11px;
  font-weight: bold;
  color: #78909c;
}

.ivc-problem {
  color: #37474f;
  white-space: pre-wrap;
  word-break: break-word;
}

.ivc-problem.is-empty {
  color: #b0bec5;
}

.ivc-meta {
  margin-top: 6px;
  font-size: 11px;
  color: #90a4ae;
}

.ivc-del {
  flex: 0 0 auto;
  border: none;
  border-left: 1px solid #eeeeee;
  background: #fff;
  color: #c62828;
  padding: 0 12px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}

.ivc-empty {
  background: #fff;
  border: 1px dashed #cfd8dc;
  border-radius: 12px;
  padding: 28px 16px;
  text-align: center;
  color: #546e7a;
}

.ivc-empty p {
  margin: 0 0 8px;
}

.ivc-empty button,
.ivc-btn {
  appearance: none;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  font-family: inherit;
}

.ivc-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.ivc-btn.is-primary,
.ivc-empty button {
  background: #1a237e;
  color: #fff;
}

.ivc-btn.is-ghost {
  background: #eceff1;
  color: #37474f;
}

.ivc-fab {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 1000310;
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 14px 18px;
  background: #e65100;
  color: #fff;
  font-size: 15px;
  font-weight: bold;
  box-shadow: 0 4px 14px rgba(230, 81, 0, 0.35);
  cursor: pointer;
}

.ivc-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.42);
}

.ivc-sheet {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 640px;
  max-height: calc(100% - 24px - env(safe-area-inset-top));
  border-radius: 18px 18px 0 0;
  background: #fff;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.ivc-sheet-head,
.ivc-sheet-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 12px 16px;
}

.ivc-sheet-head {
  border-bottom: 1px solid #eceff1;
}

.ivc-sheet-title {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: bold;
}

.ivc-sheet-body {
  flex: 1;
  overflow: auto;
  padding: 12px 16px 8px;
  -webkit-overflow-scrolling: touch;
}

.ivc-sheet-foot {
  justify-content: flex-end;
  border-top: 1px solid #eceff1;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.ivc-label {
  display: block;
  margin: 10px 0 4px;
  font-size: 12px;
  font-weight: bold;
  color: #455a64;
}

.ivc-label:first-child {
  margin-top: 0;
}

.ivc-help {
  margin-top: 4px;
  font-size: 12px;
  color: #78909c;
}

.ivc-help.is-ok {
  color: #e65100;
  font-weight: bold;
}

.ivc-help.is-bad {
  color: #c62828;
}

.ivc-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.ivc-pick {
  appearance: none;
  border: 1px solid #c5cae9;
  background: #fff;
  color: #283593;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}

.ivc-pick.is-active {
  background: #1a237e;
  border-color: #1a237e;
  color: #fff;
}

.ivc-textarea {
  min-height: 110px;
  resize: vertical;
}

.ivc-form-error {
  margin-top: 10px;
  background: #ffebee;
  color: #b71c1c;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
}

@media (min-width: 760px) {
  .ivc-fab {
    right: max(16px, calc(50vw - 364px));
  }
}
