.yra-pp-app,
.yra-pp-app * { box-sizing: border-box; }
.yra-pp-app { width: 100%; color: #1f2937; font-family: "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif; }
.yra-pp-loading,
.yra-pp-message,
.yra-pp-empty { padding: 18px; border: 1px solid #d8e1ea; border-radius: 8px; background: #f7f9fb; text-align: center; font-size: 13px; }
.yra-pp-message { margin-bottom: 12px; }
.yra-pp-message.is-error { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.yra-pp-message.is-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.yra-pp-message a { color: inherit; font-weight: 800; }
.yra-pp-app.is-busy { opacity: .72; pointer-events: none; }
.yra-pp-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 10px; border: 1px solid #d7dee7; border-radius: 8px; background: #fff; }
.yra-pp-account { font-size: 12px; font-weight: 700; color: #475569; }
.yra-pp-free-link { font-size: 12px; font-weight: 800; color: #0369a1 !important; text-decoration: none !important; }
.yra-pp-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-bottom: 12px; }
.yra-pp-tab { border: 1px solid #cbd5e1; background: #f1f5f9; color: #475569; padding: 10px 8px; border-radius: 7px 7px 0 0; font-size: 13px; font-weight: 800; cursor: pointer; }
.yra-pp-tab.is-active { background: #172033; border-color: #dcae2b; color: #fff; }
.yra-pp-panel { border: 1px solid #d7dee7; border-radius: 8px; background: #fff; padding: 16px; }
.yra-pp-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.yra-pp-section-head h2,
.yra-pp-share-settings h2,
.yra-pp-share-settings h3,
.yra-pp-backup h2 { margin: 0 0 5px; font-size: 18px; color: #172033; }
.yra-pp-section-head p,
.yra-pp-share-settings p,
.yra-pp-backup p { margin: 0; font-size: 11px; line-height: 1.65; color: #64748b; }
.yra-pp-primary { border-color: #c99218 !important; background: linear-gradient(180deg, #ffd84d, #e9a718) !important; color: #2c2105 !important; font-weight: 900 !important; }
.yra-pp-add-card-form { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 14px; padding: 10px; border-radius: 7px; background: #f5f7fa; }
.yra-pp-add-card-form label { flex: 1; font-size: 11px; font-weight: 800; color: #475569; }
.yra-pp-add-card-form input,
.yra-pp-add-card-form button,
.yra-pp-modal input,
.yra-pp-modal select,
.yra-pp-modal textarea,
.yra-pp-modal button,
.yra-pp-share-settings button,
.yra-pp-share-settings input[type="url"],
.yra-pp-backup button,
.yra-pp-file-label { min-height: 38px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #1f2937; font: inherit; font-size: 12px; }
.yra-pp-add-card-form input { display: block; width: 100%; margin-top: 4px; }
.yra-pp-add-card-form button,
.yra-pp-modal button,
.yra-pp-share-settings button,
.yra-pp-backup button,
.yra-pp-file-label { cursor: pointer; font-weight: 800; }
.yra-pp-watch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 11px; }
.yra-pp-watch-card { position: relative; border: 1px solid #d7dee7; border-radius: 8px; overflow: hidden; background: #fff; transition: transform .15s, box-shadow .15s; }
.yra-pp-watch-card.is-dragging { opacity: .45; }
.yra-pp-watch-card.is-drag-over { outline: 3px solid #e2ad21; transform: translateY(-2px); }
.yra-pp-drag { position: absolute; top: 5px; right: 5px; z-index: 3; min-width: 28px; height: 26px; border-radius: 5px; background: rgba(15, 23, 42, .78); color: #fff; text-align: center; line-height: 26px; cursor: grab; }
.yra-pp-watch-image { display: block; width: 100%; aspect-ratio: 2 / 3; background: #f5f7fa; overflow: hidden; }
.yra-pp-watch-image img,
.yra-pp-holding-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.yra-pp-no-image { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #94a3b8; font-size: 10px; }
.yra-pp-watch-body { padding: 9px; }
.yra-pp-watch-title { display: block; min-height: 38px; color: #172033 !important; font-size: 11px; font-weight: 800; line-height: 1.45; text-decoration: none !important; }
.yra-pp-watch-key { margin: 3px 0 7px; color: #64748b; font-size: 10px; }
.yra-pp-watch-actions { display: grid; grid-template-columns: 1fr 32px 32px 1fr; gap: 4px; }
.yra-pp-watch-actions button,
.yra-pp-holding-actions button { min-height: 30px; padding: 4px 5px; border: 1px solid #cbd5e1; border-radius: 5px; background: #f8fafc; color: #334155; font-size: 10px; font-weight: 800; cursor: pointer; }
.yra-pp-watch-actions button.is-danger,
.yra-pp-holding-actions button.is-danger { color: #b91c1c; border-color: #fecaca; background: #fff1f2; }
.yra-pp-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.yra-pp-summary-card { min-width: 0; padding: 10px; border: 1px solid #d7dee7; border-radius: 8px; background: #f8fafc; text-align: center; }
.yra-pp-summary-label { font-size: 9px; color: #64748b; }
.yra-pp-summary-value { margin-top: 3px; font-size: 15px; font-weight: 900; color: #172033; white-space: nowrap; }
.yra-pp-summary-sub { margin-top: 2px; font-size: 9px; color: #64748b; }
.yra-pp-summary-card.is-plus .yra-pp-summary-value { color: #0369a1; }
.yra-pp-summary-card.is-minus .yra-pp-summary-value { color: #be123c; }
.yra-pp-holding-controls { display: grid; grid-template-columns: minmax(180px, 1.5fr) minmax(100px, .55fr) minmax(150px, .8fr) auto; gap: 8px; align-items: end; margin: -5px 0 12px; padding: 9px; border: 1px solid #d7dee7; border-radius: 8px; background: #f8fafc; }
.yra-pp-holding-controls label { min-width: 0; color: #475569; font-size: 10px; font-weight: 800; }
.yra-pp-holding-controls input,
.yra-pp-holding-controls select { display: block; width: 100%; min-width: 0; height: 34px; margin-top: 3px; padding: 5px 7px; border: 1px solid #cbd5e1; border-radius: 5px; background: #fff; color: #1f2937; font: inherit; font-size: 11px; }
.yra-pp-holding-count { align-self: center; min-width: 70px; color: #64748b; font-size: 10px; font-weight: 800; text-align: right; white-space: nowrap; }
.yra-pp-holdings { display: grid; gap: 8px; }
.yra-pp-holding-card { display: grid; grid-template-columns: 86px minmax(0, max-content) auto minmax(0, 1fr); grid-template-areas: "image header actions ." "image values values values" "image memo memo memo"; column-gap: 12px; row-gap: 5px; align-items: start; padding: 9px; border: 1px solid #d7dee7; border-radius: 8px; background: #fff; }
.yra-pp-holding-image { grid-area: image; display: block; width: 86px; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 5px; background: #f5f7fa; }
.yra-pp-holding-header { grid-area: header; min-width: 0; max-width: 420px; }
.yra-pp-holding-title { display: inline-block; max-width: 100%; color: #172033; font-size: 13px; font-weight: 900; line-height: 1.35; text-decoration: none; overflow-wrap: anywhere; }
.yra-pp-holding-title:hover, .yra-pp-holding-title:focus { color: #172033; text-decoration: underline; }
.yra-pp-holding-grade { margin: 3px 0 0; color: #0f766e; font-size: 12px; font-weight: 900; }
.yra-pp-holding-grid { grid-area: values; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.yra-pp-holding-grid > div { min-width: 0; padding: 6px; border-radius: 5px; background: #f8fafc; }
.yra-pp-holding-grid span,
.yra-pp-holding-grid small { display: block; font-size: 8px; color: #64748b; }
.yra-pp-holding-grid strong { display: block; margin: 2px 0; color: #1f2937; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yra-pp-holding-grid .is-plus strong { color: #0369a1; }
.yra-pp-holding-grid .is-minus strong { color: #be123c; }
.yra-pp-holding-memo { grid-area: memo; padding: 5px 7px; border-left: 3px solid #cbd5e1; background: #f8fafc; color: #475569; font-size: 10px; line-height: 1.45; }
.yra-pp-holding-public-badge { display: inline-block; margin-left: 6px; padding: 1px 5px; border-radius: 999px; background: #fef3c7; color: #92400e; font-size: 8px; font-weight: 800; vertical-align: 1px; }
.yra-pp-holding-actions { grid-area: actions; display: flex; flex-direction: row; gap: 5px; justify-content: flex-end; align-items: flex-start; margin-left: -2px; }
.yra-pp-share-settings,
.yra-pp-backup { padding: 14px; border: 1px solid #d7dee7; border-radius: 8px; background: #fff; }
.yra-pp-backup { margin-top: 12px; }
.yra-pp-check { display: inline-flex; align-items: center; gap: 5px; margin: 8px 10px 0 0; font-size: 11px; color: #334155; }
.yra-pp-share-holding-selection { margin: 13px 0 10px; padding: 12px; border: 1px solid #d7dee7; border-radius: 7px; background: #f8fafc; }
.yra-pp-share-holding-selection h3 { margin: 0 0 5px; font-size: 14px; }
.yra-pp-share-holdings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 10px; }
.yra-pp-share-holding-item { display: flex; align-items: flex-start; gap: 7px; min-width: 0; padding: 9px; border: 1px solid #d7dee7; border-radius: 6px; background: #fff; color: #334155; font-size: 11px; font-weight: 800; line-height: 1.45; cursor: pointer; }
.yra-pp-share-holding-item input { flex: 0 0 auto; margin: 2px 0 0; }
.yra-pp-share-holding-item span { min-width: 0; overflow-wrap: anywhere; }
.yra-pp-share-options { margin: 3px 0 10px; }
.yra-pp-share-actions,
.yra-pp-backup-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.yra-pp-share-url { display: grid; grid-template-columns: minmax(200px, 1fr) repeat(4, auto); gap: 6px; align-items: center; margin-top: 10px; }
.yra-pp-share-url input { width: 100%; }
.yra-pp-file-label { display: inline-flex; align-items: center; }
.yra-pp-file-label input { display: none; }
.yra-pp-modal[hidden] { display: none !important; }
.yra-pp-modal { position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center; padding: 18px; }
.yra-pp-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .72); }
.yra-pp-modal-dialog { position: relative; z-index: 1; width: min(680px, 100%); min-width: 0; max-width: 100%; max-height: 92vh; overflow-x: hidden; overflow-y: auto; box-sizing: border-box; padding: 20px; border-radius: 10px; background: #fff; box-shadow: 0 20px 70px rgba(0,0,0,.35); }
.yra-pp-modal-dialog h2 { margin: 0 0 14px; color: #172033; font-size: 19px; }
.yra-pp-modal-x { position: absolute; right: 10px; top: 8px; min-width: 34px !important; border: 0 !important; background: transparent !important; font-size: 22px !important; }
.yra-pp-modal form { width: 100%; overflow: hidden; }
.yra-pp-modal form,
.yra-pp-modal label,
.yra-pp-form-row,
.yra-pp-form-row > * { min-width: 0; max-width: 100%; }
.yra-pp-modal label { display: block; margin-bottom: 9px; color: #475569; font-size: 11px; font-weight: 800; }
.yra-pp-modal input,
.yra-pp-modal select,
.yra-pp-modal textarea { display: block; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; margin-top: 4px; }
.yra-pp-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.yra-pp-modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 13px; }
html.yra-pp-modal-open { overflow: hidden; }
.yra-pp-add-link { display: inline-flex; padding: 9px 13px; border: 1px solid #d9aa20; border-radius: 6px; background: #fff8db; color: #5c4300 !important; font-weight: 900; text-decoration: none !important; }

@media (max-width: 980px) {
  .yra-pp-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .yra-pp-holding-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .yra-pp-share-url { grid-template-columns: 1fr 1fr; }
  .yra-pp-share-url input { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .yra-pp-toolbar { align-items: flex-start; flex-direction: column; }
  .yra-pp-tabs { grid-template-columns: 1fr; }
  .yra-pp-tab { border-radius: 6px; padding: 8px; font-size: 11px; }
  .yra-pp-panel { padding: 10px; }
  .yra-pp-section-head { flex-direction: column; }
  .yra-pp-add-card-form { align-items: stretch; flex-direction: column; }
  .yra-pp-watch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .yra-pp-watch-body { padding: 4px; }
  .yra-pp-watch-title { min-height: 27px; font-size: 8px; line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .yra-pp-watch-key { margin: 2px 0 4px; font-size: 8px; }
  .yra-pp-drag { top: 3px; right: 3px; min-width: 22px; height: 22px; line-height: 22px; font-size: 10px; }
  .yra-pp-watch-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; }
  .yra-pp-watch-actions button { min-height: 25px; font-size: 7px; padding: 2px 1px; }
  .yra-pp-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .yra-pp-summary-card { padding: 7px 4px; }
  .yra-pp-summary-value { font-size: 12px; }
  .yra-pp-holding-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin-bottom: 8px; padding: 7px; }
  .yra-pp-holding-search { grid-column: 1 / -1; }
  .yra-pp-holding-controls input, .yra-pp-holding-controls select { height: 31px; font-size: 10px; }
  .yra-pp-holding-count { grid-column: 1 / -1; min-width: 0; text-align: left; }
  .yra-pp-holdings { gap: 6px; }
  .yra-pp-holding-card { grid-template-columns: 46px minmax(0, 1fr); grid-template-areas: "header header" "image values" "actions values" "memo memo"; column-gap: 6px; row-gap: 3px; padding: 6px; }
  .yra-pp-holding-header { display: flex; align-items: center; justify-content: flex-start; gap: 3px; width: 100%; max-width: none; min-width: 0; text-align: left; }
  .yra-pp-holding-image { width: 46px; align-self: start; }
  .yra-pp-holding-title { flex: 0 1 auto; min-width: 0; max-width: 100%; font-size: 9px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .yra-pp-holding-grade { display: inline-flex; flex: 0 0 auto; align-items: center; margin: 0; font-size: 8px; line-height: 1.25; white-space: nowrap; }
  .yra-pp-holding-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-self: start; justify-content: stretch; gap: 2px; width: 46px; margin-left: 0; }
  .yra-pp-holding-actions button { min-width: 0; min-height: 21px; padding: 1px 0; font-size: 7px; line-height: 1; }
  .yra-pp-holding-grid { align-self: start; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
  .yra-pp-holding-grid > div { padding: 4px 3px; }
  .yra-pp-holding-grid span, .yra-pp-holding-grid small { font-size: 7px; line-height: 1.2; }
  .yra-pp-holding-grid strong { margin: 1px 0; font-size: 9px; }
  .yra-pp-holding-memo { padding: 4px 6px; font-size: 8px; line-height: 1.35; }
  .yra-pp-holding-public-badge { margin-left: 4px; padding: 1px 4px; font-size: 7px; }
  .yra-pp-form-row { grid-template-columns: 1fr; gap: 0; }
  .yra-pp-modal { padding: 8px; }
  .yra-pp-modal-dialog { padding: 16px 12px; }
  .yra-pp-share-holdings { grid-template-columns: 1fr; }
  .yra-pp-share-url { grid-template-columns: 1fr; }
  .yra-pp-share-url input { grid-column: auto; }
}

@media (max-width: 320px) {
  .yra-pp-holding-header { flex-wrap: wrap; }
  .yra-pp-holding-title { flex-basis: 100%; white-space: normal; overflow: visible; text-overflow: clip; }
  .yra-pp-holding-grade { margin-left: 0; margin-top: 2px; }
}

.yra-pp-card-actions { margin: 6px 0 10px; padding: 0; border: 0; border-radius: 0; background: transparent; text-align: left; clear: both; }
.yra-pp-card-actions-buttons { display: flex; justify-content: flex-start; gap: 8px; flex-wrap: wrap; }
.yra-pp-card-action { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 14px; border: 1px solid #cbd5e1; border-radius: 7px; font-family: inherit; font-size: 12px; font-weight: 900; line-height: 1.35; text-decoration: none !important; box-sizing: border-box; cursor: pointer; }
.yra-pp-card-action-watch { background: #fff; color: #172033 !important; }
.yra-pp-card-action-holding { border-color: #c99218; background: linear-gradient(180deg, #ffd84d, #e9a718); color: #2c2105 !important; }
.yra-pp-card-action:hover { filter: brightness(.98); transform: translateY(-1px); }

.yra-pp-card-action:disabled { cursor: wait; opacity: .65; transform: none; }
.yra-pp-card-action-watch.is-saved { border-color: #16a34a; background: #f0fdf4; color: #166534 !important; }
.yra-pp-card-actions-status { margin-top: 9px; color: #166534; font-size: 12px; font-weight: 800; line-height: 1.55; }
.yra-pp-card-actions-status.is-error { color: #b91c1c; }
.yra-pp-card-actions-status a { color: inherit; font-weight: 900; text-decoration: underline; }
.yra-pp-card-actions.is-busy { opacity: .9; }
@media screen and (max-width: 640px) {
  .yra-pp-card-actions { margin: 6px 0 10px; }
  .yra-pp-card-actions-buttons { gap: 6px; flex-wrap: nowrap; }
  .yra-pp-card-action { width: auto; min-width: 0; padding: 8px; font-size: 10px; white-space: nowrap; }
}
