/*
 * Start-owned overview and native dialogs. Values mirror the previous Bootstrap
 * layout/controls, but these selectors use no Bootstrap classes or variables.
 * Calendar's delegated subtree and shared confirmation/wait overlays retain their
 * own styles/ownership. Engine canvas/frame lifetimes remain separate from CSS.
 */
.start-ui {
    box-sizing: border-box;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    text-align: left;
}
.start-ui *, .start-ui *::before, .start-ui *::after { box-sizing: border-box; }
.start-ui [hidden], .start-dialog-backdrop[hidden] { display: none !important; }
#startViewId { background: rgb(225,235,247); border-radius: .5rem; }
.start-ui p { margin: 0 0 1rem; }
.start-ui img { vertical-align: middle; }
.start-ui label { display: inline-block; }
.start-ui strong { font-weight: 700; }
.start-ui a { color: #0d6efd; text-decoration: underline; }
.start-ui a:hover { color: #0a58ca; }
.start-ui fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
.start-ui form { margin: 0; }
/* Existing translated empty-state and Activity sentences retain their former emphasis. */
.start-ui .start-empty-explanation { margin: .5rem; padding: .5rem; font-size: 1.25rem; font-weight: 300; }
.start-activity-summary { font-size: 1.25rem; font-weight: 300; text-align: center; }

/* Existing overview grid and card geometry; not a reusable layout framework. */
.start-row { display: flex; flex-wrap: wrap; margin-right: -12px; margin-left: -12px; }
.start-row > * { flex-shrink: 0; width: 100%; max-width: 100%; padding-right: 12px; padding-left: 12px; }
.start-column, .start-welcome, .start-goals, .start-half, .start-full { flex: 0 0 auto; width: 100%; }
.start-no-gutters { margin-right: 0; margin-left: 0; }
.start-no-gutters > * { padding-right: 0; padding-left: 0; }
.start-card { position: relative; display: flex; flex-direction: column; min-width: 0; overflow-wrap: break-word; color: #212529; background: #fff; border: 1px solid rgba(0,0,0,.175); border-radius: .375rem; }
.start-card-header { padding: .5rem 1rem; background: rgba(33,37,41,.03); border-bottom: 1px solid rgba(0,0,0,.175); }
.start-card-header:first-child { border-radius: calc(.375rem - 1px) calc(.375rem - 1px) 0 0; }
.start-card-body { flex: 1 1 auto; padding: 1rem; }
.start-card-footer { padding: .5rem 1rem; background: rgba(33,37,41,.03); border-top: 1px solid rgba(0,0,0,.175); }
.start-card-footer:last-child { border-radius: 0 0 calc(.375rem - 1px) calc(.375rem - 1px); }
.start-card-text:last-child { margin-bottom: 0; }
.start-list { display: flex; flex-direction: column; padding-left: 0; margin-top: 0; margin-bottom: 0; border-radius: .375rem; }
.start-list-item { position: relative; display: block; padding: .5rem 1rem; color: #212529; text-decoration: none; background-color: #fff; border: 1px solid #dee2e6; }
.start-list-item:first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.start-list-item:last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
.start-list-item + .start-list-item { border-top-width: 0; }
.start-list-flush { border-radius: 0; }
.start-list-flush > .start-list-item { border-width: 0 0 1px; }
.start-list-flush > .start-list-item:last-child { border-bottom-width: 0; }
.start-list-numbered { counter-reset: start-items; list-style: none; }
.start-list-numbered > .start-list-item::before { content: counter(start-items) ". "; counter-increment: start-items; }
.start-section { background: #fff; }
.start-blue { background: rgb(123,145,187); }
.start-light-blue { background: rgb(220,235,249); }
.start-border { border: 1px solid #dee2e6; }
.start-border-thick { border-width: 3px; }
.start-border-color { border-color: rgb(121,144,188); }
.start-rounded { border-radius: .5rem; }
.start-circle { border-radius: 50%; }
.start-shadow { box-shadow: 0 .125rem .25rem rgba(0,0,0,.075); }
.start-success-bg { background-color: #198754; }
.start-danger-bg { background-color: #dc3545; }
.start-secondary-bg { background-color: #6c757d; }
.start-success-bg.start-opacity-half { background-color: rgba(25,135,84,.5); }
.start-danger-bg.start-opacity-quarter { background-color: rgba(220,53,69,.25); }
.start-gradient { background-image: linear-gradient(180deg,rgba(255,255,255,.15),rgba(255,255,255,0)); }
.start-pad { padding: 1rem !important; }
.start-pad-small { padding: .5rem !important; }
.start-pad-top { padding-top: 1rem !important; }
.start-margin { margin: 1rem !important; }
.start-margin-small { margin: .5rem !important; }
.start-mb { margin-bottom: 1rem !important; }
.start-mb-small { margin-bottom: .5rem !important; }
.start-my-tiny { margin-top: .25rem; margin-bottom: .25rem; }
.start-ms-tiny { margin-left: .25rem; }
.start-ms-small { margin-left: .5rem; }
.start-me-small { margin-right: .5rem; }
.start-me-auto { margin-right: auto; }
.start-width-three-quarters { width: 75% !important; }
.start-width-full { width: 100%; }
.start-height-full { height: 100%; }
.start-flex { display: flex; }
.start-justify-center { justify-content: center; }
.start-justify-between { justify-content: space-between; }
.start-align-center { align-items: center; }
.start-align-start { align-items: flex-start; }
.start-gap-tiny { gap: .25rem; }
.start-relative { position: relative; }
.start-absolute { position: absolute; }
.start-top { top: 0; }
.start-end { right: 0; }
.start-pull-right { float: right; }
.start-pointer { cursor: pointer; }
.start-bold { font-weight: 700 !important; }
.start-bolder { font-weight: bolder !important; }
.start-small { font-size: .875em; }
.start-size-body { font-size: 1rem !important; }
.start-size-large { font-size: 1.25rem !important; }
.start-size-title { font-size: calc(1.275rem + .3vw) !important; }
.start-lead { font-size: 1.25rem; font-weight: 300; }
.start-text-center { text-align: center; }
.start-text-start { text-align: left; }
.start-text-wrap { white-space: normal; }
.start-text-break { word-wrap: break-word; word-break: break-word; }
.start-text-white { color: #fff; }
.start-text-dark { color: #212529; }
.start-muted { color: rgba(33,37,41,.75); }
.start-success-text { color: #198754; }
.start-danger-text, .start-error { color: #dc3545; }
.start-strike { text-decoration: line-through !important; }
.start-icon-button { margin: 0; border-radius: 0; font: inherit; line-height: inherit; text-transform: none; }
.start-field-label { margin-bottom: .5rem; font-weight: 700; }
.start-error { margin-bottom: .5rem; }
.start-input {
    display: block;
    width: 100%;
    padding: .375rem .75rem;
    margin: 0;
    font: inherit;
    color: #212529;
    line-height: 1.5;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #dee2e6;
    border-radius: .375rem;
    appearance: none;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
.start-input:focus { color: #212529; background-color: #fff; border-color: #86b7fe; outline: 0; box-shadow: 0 0 0 .25rem rgba(13,110,253,.25); }
.start-input:disabled { background-color: #e9ecef; opacity: 1; }
.start-input::placeholder { color: rgba(33,37,41,.75); opacity: 1; }
.start-ui textarea.start-input { min-height: calc(1.5em + .75rem + 2px); resize: vertical; }
.start-ui input[type="date"] { min-height: calc(1.5em + .75rem + 2px); }
.start-ui input[type="date"]::-webkit-datetime-edit { padding: 0; }
.start-select {
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: 16px 12px;
}
.start-button {
    display: inline-block;
    margin: 0;
    padding: .375rem .75rem;
    font: inherit;
    font-weight: 400;
    line-height: 1.5;
    color: #fff;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background: #0d6efd;
    border: 1px solid transparent;
    border-radius: .375rem;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
.start-button:focus { outline: 0; }
.start-button:disabled { pointer-events: none; opacity: .65; }
.start-button-small { padding: .25rem .5rem; font-size: .875rem; border-radius: .25rem; }
.start-primary { background-color: #0d6efd; border-color: #0d6efd; }
.start-primary:hover { background-color: #0b5ed7; border-color: #0a58ca; }
.start-primary:focus-visible { background-color: #0b5ed7; border-color: #0a58ca; box-shadow: 0 0 0 .25rem rgba(49,132,253,.5); }
.start-primary:active { background-color: #0a58ca; border-color: #0a53be; }
.start-secondary { background-color: #6c757d; border-color: #6c757d; }
.start-secondary:hover { background-color: #5c636a; border-color: #565e64; }
.start-secondary:focus-visible { background-color: #5c636a; border-color: #565e64; box-shadow: 0 0 0 .25rem rgba(130,138,145,.5); }
.start-secondary:active { background-color: #565e64; border-color: #51585e; }
.start-success { background-color: #198754; border-color: #198754; }
.start-success:hover { background-color: #157347; border-color: #146c43; }
.start-success:focus-visible { background-color: #157347; border-color: #146c43; box-shadow: 0 0 0 .25rem rgba(60,153,110,.5); }
.start-success:active { background-color: #146c43; border-color: #13653f; }
.start-danger { background-color: #dc3545; border-color: #dc3545; }
.start-danger:hover { background-color: #bb2d3b; border-color: #b02a37; }
.start-danger:focus-visible { background-color: #bb2d3b; border-color: #b02a37; box-shadow: 0 0 0 .25rem rgba(225,83,97,.5); }
.start-danger:active { background-color: #b02a37; border-color: #a52834; }

/* Local dialogs remain below shared modal/backdrop/screen-cover layers. */
.start-dialog-backdrop { position: fixed; inset: 0; z-index: 1039; background: rgba(0,0,0,.5); }
dialog.start-dialog {
    position: fixed;
    z-index: 1040;
    top: .5rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 1rem);
    max-width: 500px;
    max-height: calc(100vh - 1rem);
    margin: 0;
    padding: 0;
    background: #fff;
    border: 1px solid rgba(0,0,0,.175);
    border-radius: .5rem;
    outline: 0;
    overflow: hidden;
}
dialog.start-dialog:not([open]) { display: none; }
dialog.start-dialog[open], .start-dialog-content { display: flex; flex-direction: column; }
.start-dialog-content { min-height: 0; max-height: inherit; width: 100%; }
.start-dialog-header { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; padding: 1rem; border-bottom: 1px solid #dee2e6; }
.start-dialog-header h5 { margin: 0; font: inherit; font-size: 1.25rem; font-weight: 500; line-height: 1.5; }
.start-close {
    box-sizing: content-box;
    flex: 0 0 auto;
    width: 1em;
    height: 1em;
    padding: .5rem;
    margin: -.5rem -.5rem -.5rem auto;
    font: inherit;
    line-height: 1;
    color: #000;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586l6.293-6.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: 0;
    border-radius: .375rem;
    opacity: .5;
    cursor: pointer;
}
.start-close:hover { opacity: .75; }
.start-close:focus { outline: 0; box-shadow: 0 0 0 .25rem rgba(13,110,253,.25); opacity: 1; }
.start-dialog-body { position: relative; flex: 1 1 auto; min-height: 0; padding: 1rem; overflow-y: auto; }
.start-dialog-footer { display: flex; flex-wrap: wrap; flex-shrink: 0; align-items: center; justify-content: flex-end; padding: .75rem; border-top: 1px solid #dee2e6; }
.start-dialog-footer > * { margin: .25rem; }
.start-dialog-footer > .start-dialog-spinner { margin-right: 3rem; }
.start-dialog-spinner img { vertical-align: middle; }
.start-delete-section { margin-bottom: 1rem; }

/* Native field behavior and the original checkbox appearance, without Bootstrap. */
.start-check { width: 1em; height: 1em; padding: 0; margin: .25em 0 0 1rem; vertical-align: top; appearance: none; background: #fff center/contain no-repeat; border: 1px solid rgba(0,0,0,.25); border-radius: .25em; }
.start-check:checked { background-color: #0d6efd; border-color: #0d6efd; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e"); }
.start-check:focus { border-color: #86b7fe; outline: 0; box-shadow: 0 0 0 .25rem rgba(13,110,253,.25); }
.start-profile-form { display: flex; flex-direction: column; min-height: 0; width: 100%; max-width: 330px; padding: 15px; margin: auto !important; }
.start-profile-fields { padding-right: 12px; padding-left: 12px; }
.start-profile-label { margin-bottom: .5rem; font-size: .875em; font-weight: 700; }
.start-profile-form .start-input { padding: 10px; font-size: 16px; }
.start-profile-email { margin-bottom: -1px; border-bottom-right-radius: 0; border-bottom-left-radius: 0; }
.start-chart-body { padding: 0; }
.start-collection-chart-frame { display: block; width: 100%; height: 70vh; min-height: 280px; border: 0; }
/* Match the former Activity canvas and Today card; frame contents own their engine sizing. */
.start-activity-chart-frame { display: block; width: 700px; max-width: 100%; height: 500px; border: 0; }
.start-yemdoc-frame { display: block; width: 100%; height: 100%; border: 0; }
dialog.start-dialog-chart { top: 50%; transform: translate(-50%, -50%); }
@media (min-width: 576px) {
    dialog.start-dialog { top: 1.75rem; width: calc(100% - 3.5rem); max-height: calc(100vh - 3.5rem); }
    dialog.start-dialog-chart { top: 50%; }
}
@media (min-width: 768px) {
    .start-column { flex: 1 0 0%; }
    .start-welcome { width: 25%; }
    .start-goals { width: 66.66666667%; }
    .start-half { width: 41.66666667%; }
}
@media (min-width: 992px) { dialog.start-dialog-wide, dialog.start-dialog-chart { max-width: 800px; } }
@media (min-width: 1200px) {
    .start-size-title { font-size: 1.5rem !important; }
    dialog.start-dialog-chart { max-width: 1140px; }
}
@media (prefers-reduced-motion: reduce) { .start-input, .start-button { transition: none; } }

