/* WorkStock - lit.link風プロフィールリンクページ */

.workstock-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.workstock-header {
  margin-bottom: 2rem;
}

.workstock-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem 0;
}

.workstock-header .subtitle {
  color: #94a3b8;
  font-size: 0.95rem;
  margin: 0;
}

/* コンテンツエリア */
.workstock-content {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
}

@media (max-width: 1200px) {
  .workstock-content {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    order: -1;
  }
}

/* 編集パネル */
.edit-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.edit-section {
  background: #1e293b;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #334155;
}

.edit-section h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 1rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #334155;
}

.edit-section h2 svg {
  color: #6366f1;
}

.section-description {
  font-size: 0.85rem;
  color: #fff;
  margin: 0 0 1rem 0;
  line-height: 1.6;
}

/* フォーム */
.form-group {
  margin-bottom: 1rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #fff;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #6366f1;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #64748b;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* スライダー */
.form-group input[type="range"].slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  background: #334155;
  border-radius: 4px;
  border: none;
  padding: 0;
  cursor: pointer;
}

.form-group input[type="range"].slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: #6366f1;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}

.form-group input[type="range"].slider::-webkit-slider-thumb:hover {
  background: #818cf8;
}

.form-group input[type="range"].slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #6366f1;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

.input-hint {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.5rem;
}

/* 統計セクション */
.stats-loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #94a3b8;
  padding: 1rem 0;
}

.loading-spinner-small {
  width: 20px;
  height: 20px;
  border: 2px solid #334155;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 期間タブ */
.stats-period-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.period-tab {
  flex: 1;
  padding: 0.5rem 1rem;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 6px;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.period-tab:hover {
  background: #334155;
  color: #fff;
}

.period-tab.active {
  background: #6366f1;
  border-color: #6366f1;
  color: #fff;
}

/* 期間内クリック数 */
.stats-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.stats-total-label {
  font-size: 0.85rem;
  color: #94a3b8;
}

.stats-total-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

/* 横棒グラフ */
.stats-chart {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 1rem;
}

.chart-row {
  margin-bottom: 0.75rem;
}

.chart-row:last-child {
  margin-bottom: 0;
}

.chart-label {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-bar-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chart-bar {
  height: 24px;
  background: linear-gradient(90deg, #6366f1, #818cf8);
  border-radius: 4px;
  min-width: 4px;
  transition: width 0.3s ease;
}

.chart-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  min-width: 40px;
}

.stats-empty {
  text-align: center;
  color: #64748b;
  padding: 1rem;
  font-size: 0.9rem;
}

/* OGPアップロード */
.ogp-upload-area {
  position: relative;
  width: 100%;
  aspect-ratio: 1200 / 630;
  background: #0f172a;
  border: 2px dashed #334155;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s;
}

.ogp-upload-area:hover {
  border-color: #6366f1;
}

.ogp-upload-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.upload-placeholder svg {
  margin-bottom: 0.5rem;
}

.upload-placeholder p {
  margin: 0;
  font-size: 0.9rem;
}

.upload-placeholder span {
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* アバターアップロード */
.avatar-upload-area {
  position: relative;
  width: 100px;
  height: 100px;
  background: #0f172a;
  border: 2px dashed #334155;
  border-radius: 50%;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s;
}

.avatar-upload-area:hover {
  border-color: #6366f1;
}

.avatar-upload-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  border-radius: 50%;
}

/* プロフィール画像表示エリア（読み取り専用） */
.avatar-display-area {
  position: relative;
  width: 100px;
  height: 100px;
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: 50%;
  overflow: hidden;
}

.avatar-display-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.form-hint {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.5rem;
}

.form-hint a {
  color: #6366f1;
  text-decoration: none;
}

/* 背景画像アップロード */
.background-image-upload {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  border: 2px dashed #334155;
  border-radius: 12px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s;
}

.background-image-upload:hover {
  border-color: #6366f1;
}

.background-image-upload img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.background-image-upload .upload-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.btn-text-danger {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
}

.btn-text-danger:hover {
  text-decoration: underline;
}

.form-hint a:hover {
  text-decoration: underline;
}

/* SNS OGPプレビュー */
.sns-ogp-preview {
  width: 100%;
  aspect-ratio: 1200 / 630;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.sns-ogp-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sns-ogp-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.sns-ogp-placeholder p {
  margin: 0.5rem 0 0 0;
  font-size: 0.85rem;
}

/* URL入力 + ボタン */
.input-with-button {
  display: flex;
  gap: 0.5rem;
}

.input-with-button input {
  flex: 1;
}

.btn-fetch {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-fetch:hover {
  background: #4f46e5;
}

.btn-fetch:disabled {
  background: #475569;
  cursor: not-allowed;
}

.loading-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 0.25rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.form-hint {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.5rem;
}

/* SNSアイコンリスト */
.sns-icon-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
}

.sns-icon-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.sns-icon-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sns-icon-info {
  flex: 1;
  min-width: 0;
}

.sns-icon-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  margin: 0;
}

.sns-icon-url {
  font-size: 0.7rem;
  color: #64748b;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* SNSアイコンアイテム内の削除ボタン */
.sns-icon-item .link-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.sns-icon-item .link-actions button {
  padding: 0.5rem;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

.sns-icon-item .link-actions button:hover {
  background: #334155;
  color: #fff;
}

.sns-icon-item .link-actions button.delete:hover {
  background: #ef4444;
}

/* 追加ボタン */
.btn-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  background: transparent;
  border: 2px dashed #334155;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add:hover {
  border-color: #6366f1;
  color: #6366f1;
}

/* リンクリスト */
.sns-links-list,
.custom-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* 作品リスト - 3列グリッド */
.works-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
}

/* 作品アイテム - 3:4カード */
.work-item {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.work-item:hover {
  border-color: #6366f1;
}

.work-item.work-item-clickable {
  cursor: pointer;
}

.work-item.work-item-clickable:hover {
  transform: translateY(-2px);
}

.work-item .work-image {
  width: 100%;
  height: 100%;
}

.work-item .work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-item .work-icon-svg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.work-item .work-icon-svg svg {
  width: 48px;
  height: 48px;
}

.work-item .work-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.work-item .work-title {
  font-size: 0.75rem;
  font-weight: 500;
  color: #fff;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 作品削除ボタン（右上×） */
.work-delete-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  padding: 0;
  background: #ef4444;
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s, background 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.work-item:hover .work-delete-btn {
  opacity: 1;
}

.work-delete-btn:hover {
  background: #dc2626;
  transform: scale(1.1);
}

.link-item .link-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e293b;
  border-radius: 8px;
  color: #fff;
}

.link-item .link-info {
  flex: 1;
  min-width: 0;
}

.link-item .link-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-item .link-url {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-item .link-actions {
  display: flex;
  gap: 0.5rem;
}

.link-item .link-actions button {
  padding: 0.5rem;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

.link-item .link-actions button:hover {
  background: #334155;
  color: #fff;
}

.link-item .link-actions button.delete:hover {
  background: #ef4444;
}

/* カスタムリンクカード（編集パネル） */
.link-card-item {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  overflow: hidden;
}

.link-card-item.link-card-clickable {
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.link-card-item.link-card-clickable:hover {
  border-color: #6366f1;
  transform: translateY(-2px);
}

.link-card-image {
  width: 100%;
  aspect-ratio: 1200 / 630;
  background: #1e293b;
}

.link-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.link-card-content {
  padding: 0.75rem;
}

.link-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 0.25rem 0;
}

.link-card-description {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.link-card-url {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-card-tracking {
  font-size: 0.7rem;
  margin: 0.25rem 0 0 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.link-card-tracking .tracking-label {
  color: #22c55e;
  font-weight: 500;
}

.link-card-tracking .tracking-url {
  color: #6366f1;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s;
}

.link-card-tracking .tracking-url:hover {
  color: #818cf8;
  text-decoration: underline;
}

/* カスタムリンク削除ボタン（右上×） */
.link-card-delete-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  padding: 0;
  background: #ef4444;
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s, background 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.link-card-item:hover .link-card-delete-btn {
  opacity: 1;
}

.link-card-delete-btn:hover {
  background: #dc2626;
  transform: scale(1.1);
}

/* リンクカード画像アップロード */
.link-card-image-upload {
  position: relative;
  width: 100%;
  aspect-ratio: 1200 / 630;
  background: #0f172a;
  border: 2px dashed #334155;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s;
}

.link-card-image-upload:hover {
  border-color: #6366f1;
}

.link-card-image-upload img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 作品アイテム */
.work-item {
  flex-direction: column;
  align-items: flex-start;
}

.work-item .work-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  border-radius: 6px;
  overflow: hidden;
}

.work-item .work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-item .work-info {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.work-item .work-title {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  margin: 0;
}

/* 保存エリア */
.save-area {
  display: flex;
  gap: 1rem;
  padding-top: 1rem;
}

.btn-save {
  flex: 1;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: #334155;
  color: #fff;
}

.btn-secondary:hover {
  background: #475569;
}

/* プレビューパネル */
.preview-panel {
  position: sticky;
  top: 2rem;
  height: fit-content;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.preview-header span {
  font-size: 0.9rem;
  font-weight: 600;
  color: #94a3b8;
}

.preview-url {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #1e293b;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #64748b;
}

.preview-url svg {
  flex-shrink: 0;
}

.btn-copy {
  padding: 0.25rem;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

.btn-copy:hover {
  background: #334155;
  color: #fff;
}

/* スマホモックアップ */
.preview-frame {
  display: flex;
  justify-content: center;
}

.phone-mockup {
  width: 320px;
  background: #000;
  border-radius: 40px;
  padding: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.phone-screen {
  background: linear-gradient(180deg, #1e1e2e 0%, #0f0f1a 100%);
  border-radius: 32px;
  height: 640px;
  overflow-y: auto;
  overflow-x: hidden;
}

.phone-screen::-webkit-scrollbar {
  width: 0;
}

/* プレビューコンテンツ */
.preview-content {
  padding: 2rem 1.5rem;
  text-align: center;
}

.preview-avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  background: #334155;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.preview-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-avatar svg {
  color: #64748b;
}

.preview-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem 0;
}

.preview-bio {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0 0 1.5rem 0;
  line-height: 1.5;
}

/* プレビュー SNSアイコン */
.preview-sns-icons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.preview-sns-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #334155;
  border-radius: 50%;
  color: #fff;
  transition: transform 0.2s;
}

.preview-sns-icon:hover {
  transform: scale(1.1);
}

/* プレビュー SNSアイコン（OGP画像版） */
.preview-sns-icon-img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s;
}

.preview-sns-icon-img:hover {
  transform: scale(1.1);
}

.preview-sns-icon-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* プレビュー リンクカード */
.preview-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.preview-link-card {
  display: block;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  transition: all 0.2s;
}

.preview-link-card:hover {
  border-color: #7c3aed;
  transform: translateY(-2px);
}

.preview-link-card-image {
  width: 100%;
  aspect-ratio: 1200 / 630;
  background: rgba(255, 255, 255, 0.05);
}

.preview-link-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-link-card-icon {
  width: 100%;
  aspect-ratio: 1200 / 630;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
}

.preview-link-card-icon svg {
  width: 48px;
  height: 48px;
}

.preview-link-card-content {
  padding: 0.75rem;
}

.preview-link-card-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.25rem;
}

.preview-link-card-description {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* プレビュー 作品 */
.preview-works-section {
  margin-top: 1.5rem;
}

.preview-works-title {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.75rem;
  text-align: center;
  font-weight: 400;
}

.preview-works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.preview-work {
  aspect-ratio: 3 / 4;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.preview-work:hover {
  border-color: #7c3aed;
  transform: scale(1.05);
}

.preview-work img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-work-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

.preview-work-icon svg {
  width: 32px;
  height: 32px;
}

/* モーダル */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-content {
  background: #1e293b;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid #334155;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #334155;
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #334155;
  color: #fff;
}

.modal-body {
  padding: 1.5rem;
}

/* 画像ソースタブ */
.image-source-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tab-btn {
  flex: 1;
  padding: 0.5rem 1rem;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover {
  border-color: #6366f1;
  color: #fff;
}

.tab-btn.active {
  background: #6366f1;
  border-color: #6366f1;
  color: #fff;
}

.tab-content {
  min-height: 100px;
}

.ogp-fetch-area {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.ogp-status {
  font-size: 0.85rem;
  color: #64748b;
}

.ogp-status.loading {
  color: #6366f1;
}

.ogp-status.success {
  color: #10b981;
}

.ogp-status.error {
  color: #ef4444;
}

.link-card-image-preview {
  width: 100%;
  aspect-ratio: 1200 / 630;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  overflow: hidden;
}

.link-card-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 3タブ用 */
.image-source-tabs-3 {
  grid-template-columns: repeat(3, 1fr);
  display: grid;
}

/* アイコン選択 */
.icon-hint {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0 0 0.75rem 0;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
  padding: 0.5rem;
  background: #0f172a;
  border-radius: 8px;
}

.icon-item {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e293b;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0.5rem;
}

.icon-item:hover {
  border-color: #6366f1;
  background: #334155;
}

.icon-item.selected {
  border-color: #6366f1;
  background: #4f46e5;
}

.icon-item svg {
  width: 24px;
  height: 24px;
  color: #94a3b8;
}

.icon-item.selected svg {
  color: #fff;
}

.selected-icon-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #0f172a;
  border-radius: 8px;
}

.selected-icon-preview span {
  font-size: 0.85rem;
  color: #64748b;
}

.icon-preview-box {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #6366f1;
  border-radius: 8px;
}

.icon-preview-box svg {
  width: 28px;
  height: 28px;
  color: #fff;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid #334155;
}

/* SNSオプション */
.sns-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.sns-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: 12px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s;
}

.sns-option:hover {
  border-color: #6366f1;
  color: #fff;
}

.sns-option.selected {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.1);
  color: #fff;
}

.sns-option span {
  font-size: 0.75rem;
  font-weight: 500;
}

/* アイコンオプション */
.icon-options {
  display: flex;
  gap: 0.5rem;
}

.icon-option {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: 8px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-option:hover {
  border-color: #6366f1;
  color: #fff;
}

.icon-option.selected {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
}

/* 作品画像アップロード */
.work-image-upload {
  position: relative;
  width: 50%;
  max-width: 200px;
  aspect-ratio: 3 / 4;
  background: #0f172a;
  border: 2px dashed #334155;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s;
  margin: 0 auto;
}

.work-image-upload:hover {
  border-color: #6366f1;
}

.work-image-upload img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 作品モーダル OGP画像プレビュー 3:4比率 */
#workModal .ogp-image-adjuster {
  width: 50%;
  max-width: 200px;
  margin: 0 auto;
}

#workModal .ogp-image-container {
  aspect-ratio: 3 / 4;
}

/* Photostock選択グリッド */
.photostock-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  max-height: 400px;
  overflow-y: auto;
}

.photostock-grid-item {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.photostock-grid-item:hover {
  border-color: #6366f1;
  transform: scale(1.02);
}

.photostock-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photostock-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: #64748b;
}

.photostock-loading p {
  margin: 0.5rem 0 0 0;
}

.photostock-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem;
  color: #64748b;
}

.photostock-empty p {
  margin: 0;
}

.photostock-select-area {
  cursor: pointer;
}

/* Photostockモーダル（他のモーダルより上に表示・画面最大化） */
#photostockModal {
  z-index: 1100;
}

#photostockModal .modal-content {
  max-width: calc(100vw - 2rem);
  width: 100%;
  max-height: calc(100vh - 2rem);
  height: auto;
}

#photostockModal .photostock-grid {
  max-height: calc(100vh - 12rem);
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

/* レスポンシブ */
@media (max-width: 768px) {
  .workstock-container {
    padding: 1rem;
  }

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

  .phone-mockup {
    width: 280px;
  }

  .phone-screen {
    height: 560px;
  }

  .sns-options {
    grid-template-columns: repeat(2, 1fr);
  }

  .save-area {
    flex-direction: column;
  }
}

/* ========================================
   カスタムプロフィールエディタ
   ======================================== */

.custom-section {
  border-top: 1px dashed #334155;
  padding-top: 1.5rem;
  margin-top: 1rem;
}

.custom-editor-container {
  margin-top: 1rem;
}

/* コードタブ */
.code-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0;
}

.code-tab {
  padding: 0.5rem 1rem;
  background: #0f172a;
  border: 1px solid #334155;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  color: #94a3b8;
  font-size: 0.85rem;
  font-family: monospace;
  cursor: pointer;
  transition: all 0.2s;
}

.code-tab:hover {
  color: #fff;
  background: #1e293b;
}

.code-tab.active {
  background: #1e293b;
  border-color: #334155;
  color: #6366f1;
}

/* コードエディタ */
.code-editor-wrapper {
  position: relative;
  border: 1px solid #334155;
  border-radius: 0 8px 8px 8px;
  overflow: hidden;
}

.code-editor {
  width: 100%;
  min-height: 200px;
  padding: 1rem;
  background: #1e293b;
  border: none;
  color: #e2e8f0;
  font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  resize: vertical;
}

.code-editor:focus {
  outline: none;
}

.code-editor::placeholder {
  color: #475569;
}

/* ファイルサイズ表示 */
.code-info {
  display: flex;
  justify-content: flex-end;
  padding: 0.5rem;
  background: #0f172a;
  border: 1px solid #334155;
  border-top: none;
  border-radius: 0 0 8px 8px;
}

.file-size {
  font-size: 0.75rem;
  color: #64748b;
  font-family: monospace;
}

.file-size.warning {
  color: #f59e0b;
}

.file-size.error {
  color: #ef4444;
}

/* バリデーションエラー */
.validation-errors {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
}

.validation-errors .error-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ef4444;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.validation-errors .error-list {
  margin: 0;
  padding-left: 1.5rem;
  font-size: 0.85rem;
  color: #fca5a5;
}

.validation-errors .error-list li {
  margin-bottom: 0.25rem;
}

/* カスタムアクションボタン */
.custom-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.custom-actions button {
  flex: 1;
}

.btn-danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

/* 状態表示 */
.custom-status {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  border-radius: 6px;
}

.custom-status.deployed {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.custom-status.draft {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ヒントテキスト */
.hint {
  font-weight: normal;
  font-size: 0.8rem;
  color: #64748b;
}

/* ========================================
   カスタムAPIパネル
   ======================================== */

.btn-customize {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-customize:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-reset-template {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  background: #dc2626;
  border: 1px solid #dc2626;
  border-radius: 8px;
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-reset-template:hover:not(.disabled) {
  background: #b91c1c;
  border-color: #b91c1c;
}

.btn-reset-template.disabled {
  background: transparent;
  border-color: #4b5563;
  color: #6b7280;
  cursor: not-allowed;
}

.custom-api-panel {
  margin-top: 1rem;
  padding: 1.5rem;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
}

.api-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #334155;
}

.api-info-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.btn-copy-all {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #6366f1;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy-all:hover {
  background: #4f46e5;
}

.api-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
  .api-info-grid {
    grid-template-columns: 1fr;
  }
}

.api-info-item {
  padding: 1rem;
  background: #1e293b;
  border-radius: 8px;
}

.api-info-item label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.api-info-item code {
  display: block;
  font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
  font-size: 0.85rem;
  color: #e2e8f0;
  word-break: break-all;
}

.api-value-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.api-value-row code {
  flex: 1;
}

.btn-icon {
  padding: 0.375rem;
  background: transparent;
  border: 1px solid #334155;
  border-radius: 4px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-icon:hover {
  background: #334155;
  color: #fff;
}

.btn-regenerate {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: transparent;
  border: 1px solid #f59e0b;
  border-radius: 4px;
  color: #f59e0b;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-regenerate:hover {
  background: #f59e0b;
  color: #000;
}

/* curlセクション */
.api-curl-section {
  margin-bottom: 1.5rem;
}

.api-curl-section h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 1rem 0;
}

.curl-group {
  margin-bottom: 0.75rem;
}

.curl-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 0.375rem;
}

.curl-code {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  background: #1e293b;
  border-radius: 6px;
  overflow: hidden;
}

.curl-code code {
  flex: 1;
  padding: 0.75rem;
  font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
  font-size: 0.75rem;
  color: #94a3b8;
  word-break: break-all;
  line-height: 1.4;
}

.curl-code .btn-icon {
  border: none;
  border-radius: 0;
  background: #334155;
  padding: 0.5rem 0.75rem;
}

/* 注意事項 */
.api-notes {
  padding: 1rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 8px;
}

.api-notes p {
  margin: 0 0 0.5rem 0;
  font-size: 0.85rem;
  color: #f59e0b;
}

.api-notes ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.8rem;
  color: #fcd34d;
}

.api-notes ul li {
  margin-bottom: 0.25rem;
}

/* 制限事項リスト */
.custom-limits {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(100, 116, 139, 0.1);
  border-radius: 8px;
  border-left: 3px solid #64748b;
}

.custom-limits ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.8rem;
  color: #fff;
}

.custom-limits ul li {
  margin-bottom: 0.25rem;
}

.custom-limits ul li:last-child {
  margin-bottom: 0;
}

.custom-limits ul li strong {
  color: #f59e0b;
}

/* カスタマイズカード */
.customize-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  transition: all 0.2s;
}

.customize-card:hover {
  border-color: rgba(99, 102, 241, 0.5);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
}

.customize-card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 12px;
  flex-shrink: 0;
}

.customize-card-icon svg {
  color: #fff;
}

.customize-card-content {
  flex: 1;
  min-width: 0;
}

.customize-card-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 0.25rem 0;
}

.customize-card-content p {
  font-size: 0.85rem;
  color: #fff;
  margin: 0;
}

.btn-customize-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-customize-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

/* API情報モーダル */
.api-info-modal-body {
  padding: 0 !important;
}

.api-info-description {
  padding: 1rem 1.5rem;
  background: #0f172a;
  border-bottom: 1px solid #334155;
}

.api-info-description p {
  color: #e2e8f0;
  font-size: 0.875rem;
  margin: 0 0 0.75rem 0;
  line-height: 1.5;
}

.api-info-description ul {
  margin: 0;
  padding-left: 1.25rem;
  color: #94a3b8;
  font-size: 0.8rem;
  line-height: 1.7;
}

.api-info-description li {
  margin-bottom: 0.25rem;
}

.api-info-description strong {
  color: #f59e0b;
  font-weight: 600;
}

.api-info-summary {
  padding: 1.5rem;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}

.api-info-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.api-info-row:last-child {
  margin-bottom: 0;
}

.api-info-label {
  font-size: 0.8rem;
  color: #fff;
  width: 80px;
  flex-shrink: 0;
}

.api-info-row code {
  flex: 1;
  font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
  font-size: 0.85rem;
  color: #e2e8f0;
  background: #0f172a;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  word-break: break-all;
}

.btn-regenerate-small {
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: 1px solid #f59e0b;
  border-radius: 4px;
  color: #f59e0b;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-regenerate-small:hover {
  background: #f59e0b;
  color: #000;
}

.api-copy-all-content {
  padding: 1rem 1.5rem;
  max-height: 300px;
  overflow-y: auto;
}

.api-copy-all-content pre {
  font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #fff;
  background: #0f172a;
  padding: 1rem;
  border-radius: 8px;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
}

@media (max-width: 600px) {
  .customize-card {
    flex-direction: column;
    text-align: center;
  }

  .btn-customize-action {
    width: 100%;
    justify-content: center;
  }

  .api-info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .api-info-label {
    width: auto;
  }

  .api-info-row code {
    width: 100%;
  }
}

/* ========================================
   アイコンSVG表示スタイル
   ======================================== */

/* SNSアイコンリストでのSVG表示 */
.sns-icon-svg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 8px;
}

.sns-icon-svg svg {
  width: 24px;
  height: 24px;
  color: #fff;
}

.sns-icon-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #334155;
  border-radius: 8px;
}

.sns-icon-placeholder svg {
  color: #64748b;
}

/* カスタムリンクカードでのアイコン表示 */
.link-card-icon {
  width: 100%;
  aspect-ratio: 1200 / 630;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.link-card-icon svg {
  width: 48px;
  height: 48px;
  color: #fff;
}

/* 作品でのアイコン表示 */
.work-icon-svg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.work-icon-svg svg {
  width: 48px;
  height: 48px;
  color: #fff;
}

/* プレビューでのアイコン表示 */
.preview-link-card-icon {
  width: 100%;
  aspect-ratio: 1200 / 630;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
}

.preview-link-card-icon svg {
  width: 32px;
  height: 32px;
  color: #fff;
}

.preview-work-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
}

.preview-work-icon svg {
  width: 32px;
  height: 32px;
  color: #fff;
}

/* ========================================
   OGP画像位置調整機能
   ======================================== */

.ogp-image-adjuster {
  position: relative;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid #334155;
}

.ogp-image-container {
  width: 100%;
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  cursor: grab;
  position: relative;
  touch-action: none;
}

.ogp-image-container:active {
  cursor: grabbing;
}

.ogp-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* ドラッグ用オーバーレイ */
.ogp-image-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.ogp-adjust-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.75rem;
  text-align: center;
  pointer-events: none;
}

.ogp-image-adjuster {
  cursor: pointer;
}

.ogp-image-adjuster:hover .ogp-adjust-hint {
  background: rgba(99, 102, 241, 0.9);
}

/* ========================================
   OGP画像クロッパー（note風）
   ======================================== */

.cropper-modal-content {
  max-width: 800px;
  width: 95%;
}

.cropper-modal-body {
  padding: 1rem;
  background: #0f172a;
}

.cropper-hint {
  color: #94a3b8;
  font-size: 0.875rem;
  margin: 0 0 1rem 0;
  text-align: center;
}

.cropper-container {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

/* 暗いオーバーレイ（上下） */
.cropper-overlay-top,
.cropper-overlay-bottom {
  position: absolute;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  pointer-events: none;
  z-index: 5;
}

.cropper-overlay-top {
  top: 0;
}

.cropper-overlay-bottom {
  bottom: 0;
}

/* ドラッグ可能な画像 */
.cropper-image-wrapper {
  position: relative;
  width: 100%;
  cursor: grab;
  touch-action: none;
}

.cropper-image-wrapper:active {
  cursor: grabbing;
}

.cropper-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* 明るい領域のフレーム（視覚的な境界線） */
.cropper-frame-border {
  position: absolute;
  left: 0;
  right: 0;
  border: 3px solid #6366f1;
  pointer-events: none;
  z-index: 10;
  box-sizing: border-box;
}

.cropper-frame-label {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: #6366f1;
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 11;
}

.cropper-drag-hint {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 0.8rem;
  z-index: 11;
  pointer-events: none;
}

/* ========================================
   URLチェック済バッジ
   ======================================== */

/* カスタムリンクのチェック済バッジ */
.url-checked-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 4px;
  color: #22c55e;
  font-size: 0.7rem;
  font-weight: 500;
  margin-left: 0.5rem;
}

.url-checked-badge svg {
  flex-shrink: 0;
}

/* 作品のチェック済バッジ（小さいアイコンのみ） */
.work-checked-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: rgba(34, 197, 94, 0.9);
  border-radius: 50%;
  color: #fff;
  z-index: 5;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.work-checked-badge svg {
  flex-shrink: 0;
}

/* ========================================
   トラッキングリンク一覧
   ======================================== */

.tracking-links-list {
  margin-top: 1rem;
}

.tracking-links-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #94a3b8;
  margin: 0 0 0.75rem 0;
  padding-top: 1rem;
  border-top: 1px solid #334155;
}

.tracking-links-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tracking-link-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
}

.tracking-link-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tracking-link-type {
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  background: #6366f1;
  color: #fff;
  border-radius: 4px;
  font-weight: 500;
}

.tracking-link-title {
  font-size: 0.85rem;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tracking-link-url {
  font-size: 0.75rem;
  color: #6366f1;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s;
}

.tracking-link-url:hover {
  color: #818cf8;
  text-decoration: underline;
}

.tracking-link-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tracking-link-label {
  font-size: 0.7rem;
  color: #64748b;
  flex-shrink: 0;
  width: 40px;
}

.tracking-link-original-url {
  font-size: 0.75rem;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

