Spaces:
Running
Running
File size: 6,574 Bytes
ee446e8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | /* Playbook page β setups/patterns CRUD grid + modal form. */
.playbook-title {
font-size: var(--font-lg);
font-weight: 600;
color: var(--text);
}
.playbook-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(min(var(--split-card-min-mobile), 100%), 1fr));
gap: var(--space-md);
margin-top: var(--space-md);
}
.playbook-card {
background: var(--surface-raised);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
padding: var(--space-md);
display: flex;
flex-direction: column;
gap: var(--space-xs);
cursor: pointer;
}
.playbook-card__header {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-sm);
}
.playbook-card__name {
font-weight: 600;
color: var(--text);
font-size: var(--font-md);
}
.playbook-card__badge {
background: var(--accent-bg, var(--surface));
color: var(--accent, var(--text-secondary));
border-radius: var(--radius-sm);
padding: var(--space-2xs) var(--space-xs);
font-size: var(--font-xs);
white-space: nowrap;
}
.playbook-card__timeframe {
color: var(--text-dim);
font-size: var(--font-xs);
}
.playbook-card__desc {
color: var(--text-secondary);
font-size: var(--font-sm);
margin: 0;
flex: 1;
}
.playbook-card__actions {
display: flex;
gap: var(--space-xs);
margin-top: var(--space-xs);
}
/* A few fields and a screenshot grid: the default .modal-content width (sm)
fits it, so this rule only owns the scroll. */
.playbook-modal-content {
max-height: 85vh;
max-height: 85dvh;
overflow-y: auto;
}
.playbook-card__thumb {
width: 100%;
/* The box comes from the ratio, not a hardcoded height: the card reserves
the space before the cover image loads instead of reflowing when it
does (the old fixed 140px shifted the whole grid on mobile). */
aspect-ratio: 2 / 1;
object-fit: cover;
border-radius: var(--radius-md);
margin-bottom: var(--space-xs);
}
.playbook-screenshots-grid {
display: flex;
flex-wrap: wrap;
gap: var(--space-xs);
margin-bottom: var(--space-xs);
}
.playbook-screenshot {
position: relative;
width: 88px;
aspect-ratio: 1 / 1;
display: flex;
}
.playbook-screenshot img {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: var(--radius-sm);
border: 1px solid var(--border);
}
.playbook-screenshot__remove {
position: absolute;
top: -6px;
right: -6px;
width: var(--icon-size);
height: var(--icon-size);
border-radius: var(--radius-round);
border: none;
background: var(--danger);
color: var(--bg);
font-size: var(--font-xs);
line-height: 1;
cursor: pointer;
}
.playbook-dropzone {
border: 1px dashed var(--border);
border-radius: var(--radius-md);
padding: var(--space-md);
text-align: center;
color: var(--text-dim);
font-size: var(--font-sm);
margin-bottom: var(--space-xs);
transition: border-color var(--transition-base), color var(--transition-base);
}
.playbook-dropzone--active {
border-color: var(--accent, var(--text));
color: var(--text);
}
.playbook-card__thumb,
.playbook-screenshot img {
cursor: zoom-in;
}
.playbook-screenshot__cover {
position: absolute;
top: -6px;
left: -6px;
width: var(--icon-size);
height: var(--icon-size);
border-radius: var(--radius-round);
border: none;
background: var(--surface-raised);
color: var(--text-dim);
font-size: var(--font-xs);
line-height: 1;
cursor: pointer;
}
.playbook-screenshot--cover img {
outline: var(--radius-sm) solid var(--accent);
outline-offset: var(--radius-sm);
}
.playbook-screenshot--cover .playbook-screenshot__cover {
color: var(--accent, var(--text));
}
.playbook-lightbox-content {
position: relative;
max-width: 92vw;
max-height: 92vh;
max-height: 92dvh;
display: flex;
}
.playbook-lightbox-content img {
max-width: 92vw;
max-height: 92vh;
max-height: 92dvh;
object-fit: contain;
border-radius: var(--radius-sm);
}
/* Width comes from .modal-content--md; the base max-width already shrinks it
on a narrow screen, so this rule only owns the scroll and the layout. */
.playbook-preview-content {
max-height: 85vh;
max-height: 85dvh;
overflow: hidden auto;
display: flex;
flex-direction: column;
gap: var(--space-md);
}
.playbook-preview-header {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: var(--space-sm);
}
.playbook-preview-carousel {
display: flex;
align-items: center;
justify-content: center;
gap: var(--space-sm);
min-width: 0;
}
.playbook-preview-carousel img {
min-width: 0;
max-width: 100%;
max-height: 50vh;
max-height: 50dvh;
object-fit: contain;
border-radius: var(--radius-md);
}
.playbook-preview-nav {
width: var(--space-xl);
height: var(--space-xl);
flex-shrink: 0;
border-radius: var(--radius-round);
border: none;
background: var(--surface-raised);
color: var(--text);
font-size: var(--font-sm);
line-height: 1;
cursor: pointer;
}
.playbook-preview-counter {
display: block;
text-align: center;
color: var(--text-dim);
font-size: var(--font-xs);
}
.playbook-preview-section {
display: flex;
flex-direction: column;
gap: var(--space-xs);
}
.playbook-preview-text {
color: var(--text-secondary);
font-size: var(--font-sm);
margin: 0;
white-space: pre-wrap;
overflow-wrap: break-word;
}
.playbook-lightbox-close {
position: absolute;
top: -14px;
right: -14px;
width: var(--tab-height);
height: var(--tab-height);
border-radius: var(--radius-round);
border: none;
background: var(--surface-raised);
color: var(--text);
font-size: var(--font-sm);
line-height: 1;
cursor: pointer;
}
/* ββ Phone: the close button hangs 14px outside a 92vw box, so on a 360px
screen it sits half off-viewport and is 28px wide β there is no reliable
way to dismiss the lightbox. Pin it inside the frame, give it a real
touch target, and let the lightbox go full-bleed with room for the notch
and the home indicator. ββ */
@media (width <= 480px) {
.playbook-lightbox-content {
max-width: 100vw;
max-height: 100dvh;
padding: var(--space-md);
}
.playbook-lightbox-content img {
max-width: 100%;
}
.playbook-lightbox-close {
top: var(--space-sm);
right: var(--space-sm);
width: var(--touch-min);
height: var(--touch-min);
}
/* The lightbox close is already 44px above, by literal. This is the
shared touch-target contract for the two controls this page still
sizes in tokens; both used to be listed in common.css's touch-target
block, which made that file track this page's class inventory. */
.playbook-preview-nav,
.playbook-lightbox-close {
min-width: var(--touch-min);
min-height: var(--touch-min);
}
}
|