.target-word-cloud-panel {
  border: 1px solid #d8d4cf;
  background: #fff;
  padding: 20px;
}

.target-cloud-head,
.target-account-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.target-cloud-head p:not(.eyebrow) {
  margin: 5px 0 0;
  color: #6f6862;
  font-size: 13px;
}

.target-cloud-head > b {
  color: #c74634;
  white-space: nowrap;
}

.target-cloud-content {
  margin-top: 16px;
}

.target-account-form {
  justify-content: flex-start;
  max-width: 620px;
}

.target-account-form input {
  flex: 1;
  min-width: 180px;
}

.target-word-cloud {
  position: relative;
  width: 100%;
  height: clamp(230px, 25vw, 300px);
  margin: 14px auto 0;
  padding: 20px;
  overflow: hidden;
  border: 1px solid #e6e1dc;
  border-radius: 8px;
  background:
    radial-gradient(circle at center, rgba(199, 70, 52, .08) 0 2px, transparent 3px),
    linear-gradient(145deg, #fff, #f8f5f2);
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .5);
}

.target-word-wrap {
  position: absolute;
  left: var(--cloud-x, 50%);
  top: var(--cloud-y, 50%);
  z-index: var(--cloud-z, 100);
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  max-width: 190px;
  transform: translate(-50%, -50%);
  text-align: center;
}

.target-word {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #3d3732;
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-align: center;
  cursor: pointer;
  transition: color .15s ease, transform .15s ease, border-color .15s ease;
}

.target-word:hover,
.target-word:focus-visible {
  color: #c74634;
  border-bottom-color: #f18a68;
  transform: translateY(-2px);
  outline: none;
}

.target-word small {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  border-radius: 50%;
  background: #ebe6e1;
  color: #6f6862;
  font-size: 9px;
  vertical-align: top;
}

.target-word-level-1 { font-size: 14px; font-weight: 600; color: #6f6862; }
.target-word-level-2 { font-size: 18px; color: #5b5149; }
.target-word-level-3 { font-size: 23px; color: #3f3934; }
.target-word-level-4 { font-size: 30px; color: #9f3e2d; }
.target-word-level-5 { font-size: 38px; color: #c74634; }

.target-word-color-1 { color: #c74634; }
.target-word-color-2 { color: #2167ae; }
.target-word-color-3 { color: #277347; }
.target-word-color-4 { color: #7c4d9e; }
.target-word-color-5 { color: #a85d00; }
.target-word-color-6 { color: #00747a; }
.target-word-color-7 { color: #9b3f73; }
.target-word-color-8 { color: #4d5f8c; }

.target-word-memo {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 1px solid #cfc8c2;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: #6f6862;
  padding: 0;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(49, 45, 42, .12);
}

.target-word-memo:hover,
.target-word-memo:focus-visible {
  border-color: #c74634;
  color: #c74634;
  outline: 2px solid rgba(199, 70, 52, .18);
  outline-offset: 1px;
}

.target-word-memo.has-memo {
  border-color: #c74634;
  background: #fff4ef;
  color: #c74634;
}

.target-word-delete {
  border: 0;
  background: transparent;
  color: #9b948e;
  padding: 0 2px;
  font-size: 13px;
  cursor: pointer;
}

.target-word-delete:hover { color: #c74634; }
.target-cloud-empty { color: #817a74; font-size: 13px; }
.target-word-cloud .target-cloud-empty {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  transform: translate(-50%, -50%);
}
.target-cloud-help { margin: 8px 0 0; color: #6f6862; font-size: 12px; }

.target-import-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px dashed #b9b1aa;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.target-import-zone.drag-active { border-color: #c74634; background: #fff5f2; }
.target-import-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.target-import-zone strong { font-size: 13px; }
.target-import-zone span { color: #756e68; font-size: 12px; text-align: right; }
.target-import-guide { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:8px 0 0; color:#6f6862; font-size:12px; }
.target-import-guide a { color:#9f3e2d; font-weight:700; text-decoration:underline; text-underline-offset:2px; }
.target-import-status { min-height: 18px; margin-top: 6px; color: #277347; font-size: 12px; }
.target-import-status.is-error { color: #b42318; }

#targetAccountMemoDialog form { width: min(560px, calc(100vw - 32px)); }
.target-account-memo-field { display: grid; gap: 7px; color: #4d4742; font-size: 13px; font-weight: 700; }
.target-account-memo-field textarea { width: 100%; resize: vertical; min-height: 150px; padding: 12px; border: 1px solid #b9b1aa; border-radius: 4px; color: #312d2a; font: inherit; font-weight: 400; line-height: 1.55; }
.target-account-memo-field textarea:focus { border-color: #c74634; outline: 2px solid rgba(199, 70, 52, .16); }
.target-account-memo-meta { min-height: 18px; margin: 9px 0 0; color: #756e68; font-size: 12px; }

@media (max-width: 720px) {
  .target-word-cloud-panel { padding: 14px; }
  .target-cloud-head, .target-account-form, .target-import-zone { align-items: stretch; flex-direction: column; }
  .target-word-cloud { width: 100%; height: 250px; min-height: 0; padding: 14px; }
  .target-word-wrap { max-width: 112px; }
  .target-word-level-1 { font-size: 13px; }
  .target-word-level-2 { font-size: 16px; }
  .target-word-level-3 { font-size: 20px; }
  .target-word-level-4 { font-size: 25px; }
  .target-word-level-5 { font-size: 31px; }
  .target-import-zone span { text-align: left; }
  .target-import-guide { align-items:flex-start; flex-direction:column; }
}
