
  #hfc-wmk, #hfc-wmk * { box-sizing: border-box; }
  #hfc-wmk {
    --wmk-ink: #1c1b1a;
    --wmk-paper: #eff1ec;
    --wmk-card: #ffffff;
    --wmk-accent: #d7263d;
    --wmk-accent-soft: rgba(215,38,61,0.08);
    --wmk-line: #d8dad4;
    --wmk-muted: #6b6e68;
    --wmk-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --wmk-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

    max-width: 560px;
    margin: 2rem auto;
    background: var(--wmk-card);
    border: 1px solid var(--wmk-line);
    border-radius: 14px;
    overflow: hidden;
    font-family: var(--wmk-sans);
    color: var(--wmk-ink);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  }

  #hfc-wmk .hfc-wmk__header {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--wmk-ink);
    color: #f4f4f2;
    padding: 18px 20px;
  }
  #hfc-wmk .hfc-wmk__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--wmk-accent);
    flex-shrink: 0;
    animation: hfc-wmk-pulse 2.2s ease-in-out infinite;
  }
  @media (prefers-reduced-motion: reduce) {
    #hfc-wmk .hfc-wmk__dot { animation: none; }
  }
  @keyframes hfc-wmk-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
  }
  #hfc-wmk .hfc-wmk__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #f4f4f2 !important;
  }
  #hfc-wmk .hfc-wmk__tag {
    margin: 2px 0 0;
    font-size: 0.85rem;
    color: #c7c7c3 !important;
  }

  #hfc-wmk .hfc-wmk__body { padding: 20px; background: var(--wmk-paper); }

  #hfc-wmk .hfc-wmk__label {
    display: block;
    font-size: 0.82rem;
    color: var(--wmk-muted) !important;
    margin-bottom: 6px;
    padding: 0;
    border: none;
  }

  #hfc-wmk .hfc-wmk__typefield { border: none; padding: 0; margin: 0 0 14px; }
  #hfc-wmk .hfc-wmk__segmented {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  #hfc-wmk .hfc-wmk__seg {
    padding: 10px 6px;
    border: 1px solid var(--wmk-line);
    border-radius: 9px;
    background: var(--wmk-card);
    font-family: var(--wmk-sans);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--wmk-ink) !important;
    cursor: pointer;
    text-align: center;
  }
  #hfc-wmk .hfc-wmk__seg.is-active {
    border-color: var(--wmk-accent);
    background: var(--wmk-accent-soft);
    color: var(--wmk-accent) !important;
  }

  #hfc-wmk .hfc-wmk__controls {
    background: var(--wmk-card);
    border: 1px solid var(--wmk-line);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  #hfc-wmk .hfc-wmk__row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  #hfc-wmk .hfc-wmk__input {
    width: 100%;
    font-family: var(--wmk-sans);
    font-size: 0.88rem;
    padding: 8px 10px;
    border: 1px solid var(--wmk-line);
    border-radius: 8px;
    background: var(--wmk-paper);
    color: var(--wmk-ink) !important;
  }
  #hfc-wmk .hfc-wmk__color {
    width: 100%;
    height: 36px;
    padding: 2px;
    border: 1px solid var(--wmk-line);
    border-radius: 8px;
    background: var(--wmk-paper);
    cursor: pointer;
  }
  #hfc-wmk .hfc-wmk__range { width: 100%; accent-color: var(--wmk-accent); }

  #hfc-wmk .hfc-wmk__uploadbtn {
    display: inline-block;
    padding: 9px 14px;
    background: var(--wmk-ink);
    color: #f4f4f2 !important;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
  }
  #hfc-wmk .hfc-wmk__note {
    display: block;
    font-size: 0.76rem;
    color: var(--wmk-muted) !important;
    margin-top: 8px;
  }

  #hfc-wmk .hfc-wmk__posgrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    max-width: 140px;
  }
  #hfc-wmk .hfc-wmk__pos {
    aspect-ratio: 1;
    border: 1px solid var(--wmk-line);
    border-radius: 6px;
    background: var(--wmk-paper);
    cursor: pointer;
  }
  #hfc-wmk .hfc-wmk__pos.is-active {
    border-color: var(--wmk-accent);
    background: var(--wmk-accent);
  }

  #hfc-wmk .hfc-wmk__dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    padding: 28px 16px;
    border: 1.5px dashed var(--wmk-line);
    border-radius: 12px;
    background: var(--wmk-card);
    cursor: pointer;
    margin-bottom: 16px;
  }
  #hfc-wmk .hfc-wmk__dropzone.is-dragover {
    border-color: var(--wmk-accent);
    background: var(--wmk-accent-soft);
  }
  #hfc-wmk .hfc-wmk__dropmain {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--wmk-ink) !important;
  }
  #hfc-wmk .hfc-wmk__dropnote {
    font-size: 0.76rem;
    color: var(--wmk-muted) !important;
  }

  #hfc-wmk .hfc-wmk__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
  }
  #hfc-wmk .hfc-wmk__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--wmk-card);
    border: 1px solid var(--wmk-line);
    border-radius: 10px;
  }
  #hfc-wmk .hfc-wmk__thumb {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--wmk-paper);
    flex-shrink: 0;
  }
  #hfc-wmk .hfc-wmk__rowinfo { flex: 1; min-width: 0; }
  #hfc-wmk .hfc-wmk__rowname {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--wmk-ink) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #hfc-wmk .hfc-wmk__rowdl {
    padding: 7px 12px;
    border-radius: 7px;
    background: var(--wmk-ink);
    color: #f4f4f2 !important;
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
  }

  #hfc-wmk .hfc-wmk__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  #hfc-wmk .hfc-wmk__btn {
    flex: 1;
    min-width: 160px;
    padding: 11px 14px;
    border-radius: 9px;
    border: 1px solid var(--wmk-accent);
    background: var(--wmk-accent);
    color: #ffffff !important;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
  }
  #hfc-wmk .hfc-wmk__btn--ghost {
    background: var(--wmk-card);
    color: var(--wmk-accent) !important;
  }

  #hfc-wmk button:focus-visible,
  #hfc-wmk input:focus-visible,
  #hfc-wmk label:focus-within {
    outline: 2px solid var(--wmk-accent);
    outline-offset: 2px;
  }
