/* cloud-traum · PDF-Werkstatt */
.pw > .about { margin-bottom: 16px; }
.pw__drop { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 18px; text-align: center; padding: 26px 18px; border: 2px dashed var(--c-line); }
.pw__drop > .ic { width: 38px; height: 38px; color: var(--c-brand); }
.pw__drop.is-over { border-color: var(--c-brand); background: var(--c-brand-soft); }
.pw__msg { margin: 10px 0 0; font-weight: 600; color: var(--c-local); }
.pw__msg.is-bad { color: var(--c-coral); }
.pw__msg:empty { display: none; }
.pw__work { margin-top: 18px; }
.pw__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.pw__count { margin: 0; font-weight: 700; }
.pw__pages { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.pw__page { position: relative; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; cursor: grab; min-width: 0; }
.pw__page.is-sel { border-color: var(--c-brand); box-shadow: 0 0 0 2px var(--c-brand); }
.pw__page.is-drag { opacity: .4; }
.pw__page.is-before::before, .pw__page.is-after::after { content: ''; position: absolute; top: 6px; bottom: 6px; width: 4px; border-radius: 2px; background: var(--c-brand); }
.pw__page.is-before::before { left: -9px; } .pw__page.is-after::after { right: -9px; }
.pw__thumb { position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: var(--c-bg-2); border-radius: 10px; overflow: hidden; }
.pw__thumb img { max-width: 92%; max-height: 92%; box-shadow: 0 2px 8px rgba(20, 10, 60, .18); background: #fff; transform: rotate(var(--r, 0deg)); transition: transform .2s; }
.pw__thumb img.is-side { max-width: 70%; max-height: 70%; }
.pw__sel { position: absolute; top: 6px; left: 6px; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; background: var(--c-surface); border-radius: 8px; border: 1px solid var(--c-line); cursor: pointer; }
.pw__sel input { width: 18px; height: 18px; accent-color: var(--c-brand); cursor: pointer; }
.pw__badge { position: absolute; bottom: 6px; right: 6px; display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--c-brand); color: #fff; }
.pw__badge .ic { width: 14px; height: 14px; }
.pw__cap { margin: 0; font-size: 13px; color: var(--c-muted); display: flex; gap: 6px; min-width: 0; }
.pw__cap b { color: var(--c-text); }
.pw__cap span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw__btns { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.pw__b { font: inherit; font-size: 16px; min-height: 34px; border-radius: 8px; border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-soft); cursor: pointer; padding: 0; }
.pw__b:hover:not(:disabled) { border-color: var(--c-brand); color: var(--c-brand); }
.pw__b:disabled { opacity: .35; cursor: default; }
.pw__b--del:hover:not(:disabled) { border-color: var(--c-coral); color: var(--c-coral); }
.pw__sign { width: 100%; justify-content: center; }
.pw__out { margin-top: 22px; padding: clamp(16px, 3vw, 24px); display: flex; flex-direction: column; gap: 14px; }
.pw__outgrid { display: grid; gap: 14px; }
@media (min-width: 760px) { .pw__outgrid { grid-template-columns: 1fr 1fr; } }
.pw__meta { justify-content: center; }
.pw__res { font-weight: 600; color: var(--c-soft); }

.pw__edit { margin-top: 18px; padding: clamp(14px, 3vw, 24px); }
.pw__ehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pw__etitle { margin: 0; font-size: clamp(1.1rem, 2.6vw, 1.4rem); }
.pw__egrid { display: grid; gap: 20px; align-items: start; }
@media (min-width: 960px) { .pw__egrid { grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); } }
.pw__stagewrap { min-width: 0; }
.pw__stage { position: relative; display: inline-block; max-width: 100%; line-height: 0; box-shadow: 0 4px 18px rgba(20, 10, 60, .18); background: #fff; touch-action: none; }
.pw__stage canvas { display: block; max-width: 100%; height: auto; }
.pw__items { position: absolute; inset: 0; }
.pw__item { position: absolute; outline: 1.5px dashed var(--c-brand); outline-offset: 2px; cursor: move; touch-action: none; }
.pw__item:focus-visible { outline: 2.5px solid var(--c-brand); }
.pw__iin { position: absolute; left: 50%; top: 50%; display: flex; align-items: center; pointer-events: none; }
.pw__iin img { width: 100%; height: 100%; display: block; }
.pw__iin span { font-family: Helvetica, Arial, sans-serif; line-height: 1.2; white-space: nowrap; color: #121219; }
.pw__ix { position: absolute; top: -14px; right: -14px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--c-coral); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; padding: 0; }
.pw__ih { position: absolute; right: -8px; bottom: -8px; width: 18px; height: 18px; border-radius: 4px; background: var(--c-brand); cursor: nwse-resize; }
.pw__tools { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pw__tkick { margin-top: 10px; }
.pw__pad { position: relative; border: 2px dashed var(--c-line); border-radius: 12px; background: #fff; }
.pw__pad canvas { display: block; width: 100%; height: auto; aspect-ratio: 600 / 220; touch-action: none; cursor: crosshair; }
.pw__padline { position: absolute; left: 8%; right: 8%; bottom: 22%; border-top: 1px solid #C9C3DE; padding-top: 4px; font-size: 12px; line-height: 1.2; color: #8A84A6; text-align: center; pointer-events: none; }
.pw__pad.is-used .pw__padline { color: transparent; }
.pw__ink { margin: 0; }
