.ds-privacy { padding: 10px 12px; margin-bottom: 12px; border-left: 4px solid #5cb85c; background: #f3faf3; font-size: 13px; color: #333; }
.ds-drop { border: 2px dashed #b5c4d6; border-radius: 6px; padding: 22px 16px; text-align: center; background: #f8fafc; transition: background .15s, border-color .15s; }
.ds-drop.ds-over { background: #e8f1fb; border-color: #337ab7; }
.ds-big { font-size: 16px; padding: 10px 18px; margin: 4px 6px; display: inline-flex; align-items: center; gap: 6px; }
.ds-big .material-icons { font-size: 22px; }
.ds-pick { cursor: pointer; }
#ds_file, #ds_file_cap { display: none !important; }		/* 共通のCSSが input[type=file] を表示に戻すため */
.ds-drop-sub { margin-top: 10px; font-size: 12px; color: #767676; }
.ds-msg { min-height: 1.5em; margin: 8px 0; font-size: 13px; color: #31708f; }
.ds-msg.ds-err { color: #a94442; }

.ds-bar { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; padding: 10px 12px; margin: 6px 0 12px; background: #fafafa; border: 1px solid #e3e3e3; border-radius: 4px; }
.ds-bar-item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ds-bar-item label { margin: 0; font-weight: bold; font-size: 13px; }
.ds-bar-item .form-control { width: auto; display: inline-block; }

.ds-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.ds-page { border: 1px solid #ddd; border-radius: 4px; background: #fff; display: flex; flex-direction: column; min-width: 0; }
.ds-page-thumb { height: 200px; display: flex; align-items: center; justify-content: center; background: #e9ecef; border-bottom: 1px solid #ddd; overflow: hidden; cursor: pointer; }
.ds-page-thumb canvas { max-width: 100%; max-height: 100%; display: block; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.ds-page-body { padding: 6px 8px 8px; display: flex; flex-direction: column; gap: 6px; }
.ds-page-no { font-weight: bold; font-size: 13px; white-space: nowrap; }
.ds-page-body .form-control { height: 30px; padding: 3px 6px; font-size: 13px; }
.ds-page-btns { display: flex; flex-wrap: wrap; gap: 4px; }
.ds-ibtn { width: 30px; height: 30px; padding: 0; border: 1px solid #ccc; border-radius: 3px; background: #fff; color: #333; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ds-ibtn .material-icons { font-size: 19px; }
.ds-ibtn:disabled { opacity: .35; cursor: default; }
.ds-reset { width: 100%; padding: 4px 6px; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; }
.ds-reset .material-icons { font-size: 18px; }
/* 対象から外すボタン(×): 見本の右上 */
.ds-page-thumb { position: relative; }
.ds-ibtn.ds-del-x { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); background: rgba(255,255,255,.92); color: #a94442; box-shadow: 0 1px 3px rgba(0,0,0,.3); z-index: 1; }
.ds-ibtn.ds-del-x .material-icons { font-size: 20px; }

.ds-save { margin: 16px 0 6px; padding: 12px; border: 1px solid #e3e3e3; border-radius: 4px; background: #fafafa; }
.ds-name-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ds-name-row label { margin: 0; white-space: nowrap; font-weight: bold; font-size: 13px; }
.ds-name-row .form-control { flex: 1 1 auto; min-width: 0; max-width: 420px; }
.ds-save-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ds-save-btns .ds-big { margin: 0 6px 0 0; }
.ds-save-btns .btn { display: inline-flex; align-items: center; gap: 4px; }
.ds-save-btns .material-icons { font-size: 18px; }

/* 撮影・範囲の調整(画面いっぱいに重ねる) */
.ds-layer { position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 10000; background: #000; color: #fff; display: flex; flex-direction: column; }
body.ds-no-scroll { overflow: hidden; }
.ds-cam-stage, .ds-edit-stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.ds-cam-stage video { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.ds-cam-stage canvas, .ds-edit-stage #ds_edit_cv { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
#ds_edit_cv { touch-action: none; outline: none; }
.ds-flash { position: absolute; left: 0; top: 0; right: 0; bottom: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .25s; }
.ds-flash.ds-on { opacity: .8; transition: none; }
.ds-cam-hint, .ds-edit-head, .ds-edit-msg { text-align: center; font-size: 14px; padding: 8px 12px; min-height: 2.4em; }
.ds-edit-msg { color: #ffb4b4; min-height: 0; padding: 0 12px; }
.ds-cam-bar, .ds-edit-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); background: #111; }
.ds-edit-bar { justify-content: center; flex-wrap: wrap; gap: 6px; padding-left: 8px; padding-right: 8px; }
.ds-edit-bar .btn { padding: 6px 12px; }
.ds-auto { margin: 0; font-weight: normal; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; flex: 1 1 0; white-space: nowrap; }
.ds-auto input { margin: 0; width: 18px; height: 18px; }
#ds_cam_done { flex: 1 1 0; max-width: 140px; margin-left: auto; white-space: nowrap; }
.ds-shutter { width: 68px; height: 68px; border-radius: 50%; border: 4px solid #fff; background: transparent; padding: 4px; flex: none; cursor: pointer; }
.ds-shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; }
.ds-shutter:active span { background: #ddd; }
.ds-shutter:disabled { opacity: .4; }
.ds-close { position: absolute; left: 10px; top: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.5); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2; }
.ds-loupe { position: absolute; width: 120px; height: 120px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.6); pointer-events: none; background: #000; }

@media (max-width: 600px) {
	.ds-big { width: 100%; justify-content: center; margin: 4px 0; }
	.ds-name-row { flex-wrap: wrap; }
	.ds-name-row .form-control { max-width: none; }
	.ds-save-btns .ds-big { width: 100%; margin: 0 0 4px; }
	.ds-page-thumb { height: 170px; }
}
