/* Private Source controls for TOOL45–48. */
/* TOOL45–48 use Source ToolLayout minimum button/input heights. */
.tools-native:has(>[data-tools45-48]){margin:0}
[data-tools45-48] [hidden]{display:none!important}
.tools-native [data-tools45-48] .p48-input{display:flex;box-sizing:border-box;height:44px;min-height:44px;width:100%;min-width:0;border:1px solid hsl(var(--border));border-radius:12px;background:hsl(var(--card));padding:8px 12px;font-family:inherit;font-size:14px;line-height:20px;color:hsl(var(--foreground))}
.tools-native [data-tools45-48] .p48-select{display:flex;box-sizing:border-box;height:44px;min-height:44px;width:100%;border:1px solid hsl(var(--input));border-radius:6px;background:hsl(var(--background));padding:8px 12px;font-family:inherit;font-size:14px;line-height:20px;color:hsl(var(--foreground))}
.tools-native [data-tools45-48] .p48-textarea{display:flex;box-sizing:border-box;min-height:60px;width:100%;border:1px solid hsl(var(--input));border-radius:6px;background:transparent;padding:8px 12px;font-family:inherit;font-size:16px;line-height:24px;color:hsl(var(--foreground));box-shadow:0 1px 3px 0 rgb(0 0 0/.1),0 1px 2px -1px rgb(0 0 0/.1)}
[data-tools45-48] .p48-input::placeholder,[data-tools45-48] .p48-textarea::placeholder{color:hsl(var(--muted-foreground));opacity:1}
.tools-native [data-tools45-48] :is(.p48-input,.p48-textarea,.p48-select,.p48-button):focus-visible{outline:none;box-shadow:0 0 0 1px hsl(var(--ring))}
.tools-native [data-tools45-48] .p48-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;white-space:nowrap;border-radius:12px;border:1px solid hsl(var(--border));background:transparent;color:hsl(var(--foreground));padding:0 20px;font-family:inherit;font-size:14px;line-height:20px;font-weight:500;cursor:pointer;transition:background .15s,color .15s,border-color .15s}
.tools-native [data-tools45-48] .p48-button:hover{border-color:hsl(var(--foreground));background:transparent}
.tools-native [data-tools45-48] .p48-button:disabled{pointer-events:none;opacity:.5}
.tools-native [data-tools45-48] .p48-button.p48-primary{background:hsl(var(--primary));border-color:hsl(var(--primary));color:hsl(var(--primary-foreground))}
.tools-native [data-tools45-48] .p48-primary:hover{background:hsl(var(--primary)/.9)}
.tools-native [data-tools45-48] .p48-copy{gap:6px;padding:0 12px;font-size:12px;line-height:18px;min-height:44px}
.tools-native [data-tools45-48] .p48-copy-icon{width:36px;height:36px;min-width:44px;min-height:44px;padding:0;border-color:transparent;font-size:14px;line-height:20px}
.tools-native [data-tools45-48] .p48-copy-icon:hover{border-color:transparent;background:hsl(var(--muted))}
[data-tools45-48] .p48-button svg{width:16px;height:16px;flex-shrink:0;pointer-events:none}
[data-tools45-48] .p48-alert{position:relative;margin-bottom:24px;width:100%;border:1px solid hsl(var(--destructive)/.5);border-radius:8px;background:hsl(var(--background));padding:16px;color:hsl(var(--destructive));font-size:14px;line-height:20px}
[data-tools45-48] .p48-toast{position:fixed;inset-inline:16px;top:16px;z-index:100;border:1px solid hsl(var(--border));border-radius:6px;padding:24px 32px 24px 24px;background:hsl(var(--background));box-shadow:0 10px 15px -3px rgb(0 0 0/.1),0 4px 6px -4px rgb(0 0 0/.1);font-size:14px;line-height:20px}
[data-tools45-48] .p48-toast[data-error=true]{background:hsl(var(--destructive));color:hsl(var(--destructive-foreground));border-color:hsl(var(--destructive))}
.tools-native [data-tools45-48] .p48-toast-close{position:absolute;right:8px;top:8px;min-height:0;padding:4px;border:0;border-radius:6px;background:transparent;color:inherit;opacity:0}
[data-tools45-48] .p48-toast:hover .p48-toast-close,[data-tools45-48] .p48-toast-close:focus{opacity:1}

[data-tools45-48]{color:hsl(var(--foreground))}
[data-tools45-48] .p48-card{border:1px solid hsl(var(--card-border));border-radius:12px;background:hsl(var(--card));color:hsl(var(--card-foreground))}
[data-tools45-48] .p48-pad{padding:24px}
[data-tools45-48] .p48-stack{display:flex;flex-direction:column;gap:16px;margin-bottom:32px}
[data-tools45-48] .p48-space24>*+*{margin-top:24px}
[data-tools45-48] .p48-space16>*+*{margin-top:16px}
[data-tools45-48] .p48-label{display:block;margin:0 0 6px;font-size:14px;line-height:20px;font-weight:500}
[data-tools45-48] .p48-row{display:flex;gap:8px;align-items:center}
[data-tools45-48] .p48-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
[data-tools45-48] .p48-grid>div{min-width:0}
[data-tools45-48] .p48-grid-two{grid-template-columns:repeat(2,minmax(0,1fr))}
[data-tools45-48] .p48-gap12{gap:12px}
[data-tools45-48] .p48-muted{color:hsl(var(--muted-foreground))}
[data-tools45-48] .p48-text-sm{font-size:14px;line-height:20px}
.tools-native [data-tools45-48] .p48-small{padding:0 12px;font-size:12px;line-height:18px}
.tools-native [data-tools45-48] .p48-ghost{background:transparent;border-color:transparent}
.tools-native [data-tools45-48] .p48-ghost:hover{background:hsl(var(--muted));border-color:transparent}
.tools-native [data-tools45-48] .p48-copy-icon{min-width:36px;flex-shrink:0}
.tools-native [data-tools45-48] .p48-copy-icon.p48-ghost:hover{background:hsl(var(--muted));border-color:transparent}
[data-tools45-48] .p48-upload{padding:32px;border:2px dashed hsl(var(--border));border-radius:8px;text-align:center;cursor:pointer}
[data-tools45-48] .p48-upload:hover{border-color:hsl(var(--primary)/.5)}
[data-tools45-48] .p48-upload-hint{display:flex;flex-direction:column;align-items:center;gap:8px;color:hsl(var(--muted-foreground));font-size:14px;line-height:20px}
[data-tools45-48] .p48-upload-hint>svg{width:32px;height:32px}
[data-tools45-48] .p48-upload-file{display:flex;align-items:center;justify-content:center;gap:8px}
[data-tools45-48] [data-file-name]{font-size:14px;line-height:20px;color:hsl(var(--muted-foreground));max-width:320px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tools-native [data-tools45-48] .p48-file-clear{width:24px;height:24px;min-height:44px;padding:0;flex-shrink:0}
[data-tools45-48] .p48-image-result{margin-top:24px}
[data-tools45-48] .p48-image-result h3{font-size:16px;line-height:24px;font-weight:600;margin:0}
[data-tools45-48] .p48-image-preview{border:1px solid hsl(var(--border));border-radius:8px;overflow:hidden;display:inline-block;max-width:100%}
[data-tools45-48] .p48-image-preview img{display:block;max-width:100%;height:auto;max-height:400px}
[data-tools45-48] .p48-image-result>.p48-button{display:flex;gap:6px}
[data-tools45-48] .p48-combo-wrap{position:relative}
.tools-native [data-tools45-48] .p48-combobox{display:flex;width:100%;height:44px;min-height:44px;align-items:center;justify-content:space-between;gap:8px;white-space:nowrap;border:1px solid hsl(var(--border));border-radius:12px;background:hsl(var(--card));color:hsl(var(--foreground));padding:8px 12px;font-size:14px;line-height:20px;box-shadow:none}
[data-tools45-48] .p48-combobox>[data-combo-label]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
[data-tools45-48] .p48-combobox>svg{width:16px;height:16px;opacity:.5;flex-shrink:0}
[data-tools45-48] [data-combo-options]{position:absolute;z-index:50;top:100%;left:0;min-width:100%;max-height:300px;overflow:auto;padding:4px;border:1px solid hsl(var(--border));border-radius:6px;background:hsl(var(--popover));color:hsl(var(--popover-foreground));box-shadow:0 4px 6px -1px rgb(0 0 0/.1)}
.tools-native [data-tools45-48] [data-combo-options] button{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;width:100%;padding:6px 8px;border:0;border-radius:2px;background:transparent;color:inherit;font-size:14px;line-height:20px;text-align:left;white-space:nowrap}
[data-tools45-48] [data-combo-options] button:focus{outline:none;background:hsl(var(--accent));color:hsl(var(--accent-foreground))}
[data-tools45-48] [data-combo-options] svg{width:16px;height:16px}
[data-tools45-48] [data-combo-options] [aria-selected=false]>svg{visibility:hidden}
[data-tools45-48] .p48-presets{display:flex;flex-wrap:wrap;gap:8px}
.tools-native [data-tools45-48] .p48-roll{width:100%;font-size:18px;line-height:28px;padding-top:20px;padding-bottom:20px}
[data-tools45-48] .p48-roll-wrap:active{transform:scale(.97)}
[data-tools45-48] .p48-dice-result{padding:16px 24px;text-align:center}
[data-tools45-48] .p48-dice-values{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin-bottom:12px}
[data-tools45-48] .p48-die{width:48px;height:48px;display:flex;align-items:center;justify-content:center;background:hsl(var(--primary)/.1);color:hsl(var(--primary));font-weight:700;border-radius:8px;font-size:20px;line-height:28px}
[data-tools45-48] .p48-total{font-size:14px;line-height:20px;color:hsl(var(--muted-foreground));margin:0}
[data-tools45-48] .p48-total strong{color:hsl(var(--foreground));font-weight:700}
[data-tools45-48] .p48-history-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
[data-tools45-48] .p48-history-header p{font-size:14px;line-height:20px;font-weight:500;margin:0}
[data-tools45-48] .p48-history-rows{max-height:192px;overflow-y:auto}
[data-tools45-48] .p48-history-rows>div{display:flex;justify-content:space-between;padding:4px 8px;background:hsl(var(--muted)/.5);border-radius:4px;font-size:14px;line-height:20px;color:hsl(var(--muted-foreground))}
[data-tools45-48] .p48-history-rows>div+div{margin-top:4px}
[data-tools45-48] .p48-history-rows strong{font-weight:500;color:hsl(var(--foreground))}
[data-tools45-48] .p48-entry-count{margin:4px 0 0;color:hsl(var(--muted-foreground));font-size:12px;line-height:16px}
[data-tools45-48] .p48-switches{display:flex;flex-wrap:wrap;gap:24px}
[data-tools45-48] .p48-switches>div{display:flex;align-items:center;gap:8px}
.tools-native [data-tools45-48] .p48-switch{display:inline-flex;align-items:center;width:36px;height:20px;min-height:44px;flex-shrink:0;padding:0;border:2px solid transparent;border-radius:9999px;background:hsl(var(--input));box-shadow:0 1px 3px 0 rgb(0 0 0/.1),0 1px 2px -1px rgb(0 0 0/.1);cursor:pointer}
[data-tools45-48] .p48-switch>span{pointer-events:none;display:block;width:16px;height:16px;border-radius:9999px;background:hsl(var(--background));box-shadow:0 10px 15px -3px rgb(0 0 0/.1),0 4px 6px -4px rgb(0 0 0/.1);transition:transform .15s;transform:translateX(0)}
[data-tools45-48] .p48-switch[aria-checked=true]{background:hsl(var(--primary))}
[data-tools45-48] .p48-switch[aria-checked=true]>span{transform:translateX(16px)}
[data-tools45-48] .p48-switch-label{font-size:14px;line-height:14px;font-weight:500}
.tools-native [data-tools45-48] .p48-keyword{max-width:320px}
.tools-native [data-tools45-48] .p48-count{max-width:120px}
[data-tools45-48] .p48-picker-actions{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px}
[data-tools45-48] .p48-winners{padding:24px}
[data-tools45-48] .p48-winners>*+*{margin-top:8px}
[data-tools45-48] .p48-winners>p{font-size:14px;line-height:20px;font-weight:500;margin:0 0 8px}
[data-tools45-48] .p48-winner{display:flex;align-items:center;justify-content:space-between;border-radius:6px;background:hsl(var(--muted)/.5);padding:8px 12px;font-size:14px;line-height:20px}
[data-tools45-48] .p48-copy-all{padding-top:8px}
[data-tools45-48] .p48-error{margin-top:16px;padding:16px;border:1px solid hsl(var(--destructive)/.5);border-radius:8px;color:hsl(var(--destructive));font-size:14px;line-height:20px}
[data-tools45-48] .p48-toast [data-toast-close]{position:absolute;right:8px;top:8px;padding:4px;min-height:44px;border:0;background:transparent;color:inherit}
@media(min-width:640px){[data-tools45-48] .p48-grid-responsive{grid-template-columns:repeat(2,minmax(0,1fr))}[data-tools45-48] .p48-toast{top:auto;bottom:16px}}
@media(min-width:768px){.tools-native [data-tools45-48] .p48-textarea{font-size:14px;line-height:20px}[data-tools45-48] .p48-toast{left:auto;width:388px}}

.tools-native [data-tools45-48] .p48-textarea:focus-visible{box-shadow:0 0 0 1px hsl(var(--ring)),0 1px 3px 0 rgb(0 0 0/.1),0 1px 2px -1px rgb(0 0 0/.1)}
