body {
    margin: 0;
    background: #f5f7f5;
    color: #172923;
    font: 1rem/1.5 system-ui, sans-serif;
}

.app-shell {
    box-sizing: border-box;
    max-width: 40rem;
    margin-inline: auto;
    padding: 1.5rem 1rem 2rem;
}

.app-shell .page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #d5dfd9;
}

.app-shell h1 {
    margin: 0;
    font-size: 1.5rem;
}

.app-shell h2 {
    margin: 1.5rem 0 0.75rem;
    font-size: 1.875rem;
}

.app-shell button,
.app-shell input {
    box-sizing: border-box;
    min-height: 44px;
    font: inherit;
}

.app-shell .logout {
    padding: 0.5rem 0.75rem;
    border: 1px solid #aebfb5;
    border-radius: 0.5rem;
    background: white;
    color: inherit;
    cursor: pointer;
}

.area-list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.area-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid #c9d6ce;
    border-radius: 0.75rem;
    background: white;
    color: inherit;
    text-decoration: none;
}

.area-card--shared {
    border-inline-start: 4px solid #327a60;
}

.area-content {
    display: grid;
    justify-items: start;
    gap: 0.375rem;
    min-width: 0;
    overflow-wrap: anywhere;
}

.area-title {
    font-size: 1.125rem;
    font-weight: 700;
}

.area-type {
    border-radius: 0.375rem;
    padding: 0.125rem 0.5rem;
    background: #eef1ef;
    color: #3b5146;
    font-size: 0.875rem;
}

.area-card--shared .area-type {
    background: #dcefe5;
    color: #164c38;
    font-weight: 650;
}

.area-arrow {
    color: #32604e;
    font-size: 1.5rem;
}

.create-area {
    margin-top: 1.25rem;
    border: 1px solid #aebfb5;
    border-radius: 0.75rem;
    background: white;
}

.create-area summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.625rem 1rem;
    border-radius: 0.7rem;
    background: #205a45;
    color: white;
    font-weight: 650;
    cursor: pointer;
}

.create-area summary::-webkit-details-marker {
    display: none;
}

.create-area summary span {
    font-size: 1.25rem;
}

.create-area form {
    display: grid;
    gap: 0.5rem;
    padding: 1rem;
}

.create-area input,
.create-area button {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #758c80;
    border-radius: 0.5rem;
    background: white;
    color: inherit;
}

.create-area button {
    font-weight: 650;
    cursor: pointer;
}

.app-shell :focus-visible {
    outline: 3px solid #21684d;
    outline-offset: 3px;
}

.panel {
    padding: 1rem;
    border: 1px solid #c9d6ce;
    border-radius: 0.75rem;
    background: white;
}

.panel.area-card--shared {
    border-inline-start: 4px solid #327a60;
}

.app-form {
    display: grid;
    gap: 0.875rem;
}

.app-form label {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
    font-weight: 600;
}

.app-form input,
.app-form select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #758c80;
    border-radius: 0.5rem;
    background: white;
    color: inherit;
    font: inherit;
}

.primary-button {
    padding: 0.5rem 1rem;
    border: 1px solid #205a45;
    border-radius: 0.5rem;
    background: #205a45;
    color: white;
    font-weight: 650;
    cursor: pointer;
}

.form-error {
    margin: 0;
    color: #962e2e;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-height: 44px;
    margin-block: 0.25rem;
    color: #205a45;
}

.back-link span {
    font-size: 1.5rem;
}

.area-heading h2 {
    margin: 0 0 0.5rem;
    font-size: 1.375rem;
    overflow-wrap: anywhere;
}

.area-meta,
.share-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.area-meta {
    font-size: 0.875rem;
}

.share-panel {
    margin-top: 0.75rem;
}

.share-panel h3 {
    margin: 0 0 0.75rem;
}

.share-row {
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #d5dfd9;
    overflow-wrap: anywhere;
}

.location-tree {
    display: grid;
    gap: 0.25rem;
    padding: 0;
    list-style: none;
}

.tree-link {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    box-sizing: border-box;
    min-height: 44px;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    background: #eef5f0;
    color: #205a45;
    overflow-wrap: anywhere;
}

.location-path {
    color: #3b5146;
    font-size: 0.875rem;
    overflow-wrap: anywhere;
}

.inventory-description {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.inventory-photo {
    display: block;
    max-width: 100%;
    max-height: 24rem;
    border-radius: 0.5rem;
    object-fit: contain;
}

.inventory-item {
    padding-block: 0.875rem;
    border-bottom: 1px solid #d5dfd9;
}

.inventory-item h4 {
    margin: 0;
    overflow-wrap: anywhere;
}

.inventory-action {
    margin-top: 0.75rem;
}

.inventory-action summary,
.delete-entry summary {
    box-sizing: border-box;
    min-height: 44px;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    background: #eef5f0;
    color: #205a45;
    font-weight: 650;
    cursor: pointer;
}

.inventory-action form {
    margin-block: 0.75rem;
}

.app-form textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #758c80;
    border-radius: 0.5rem;
    color: inherit;
    font: inherit;
}

.app-form .photo-remove {
    display: flex;
    align-items: center;
}

.app-form .photo-remove input {
    width: 1rem;
    min-height: 0;
}

.delete-entry summary {
    background: #fbefed;
    color: #832f2f;
}

.search-panel {
    padding-block: 0.625rem;
}

.search-panel h3 {
    margin: 0.875rem 0 0.375rem;
}

#suchstatus:empty {
    display: none;
}

.search-results {
    margin: 0;
    padding: 0;
    list-style: none;
}

.search-result {
    display: grid;
    gap: 0.125rem;
    padding: 0.625rem 0.25rem;
    border-bottom: 1px solid #d5dfd9;
    color: #205a45;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.search-result:hover strong,
.search-result:focus-visible strong {
    text-decoration: underline;
}

.search-action {
    font-size: 0.875rem;
    font-weight: 650;
}

.search-panel .logout {
    margin-top: 0.5rem;
}

.inventory-item:target {
    outline: 2px solid #327a60;
    outline-offset: 0.25rem;
}

.app-topbar {
    position: sticky;
    z-index: 1;
    top: 0;
    background: #f5f7f5;
    border-bottom: 1px solid #d5dfd9;
}

.app-topbar .page-header {
    padding-block: 0.375rem;
    gap: 0.5rem;
    border: 0;
}

.app-topbar h1 a {
    color: inherit;
    text-decoration: none;
}

.tool-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.25rem;
}

.tool-nav a {
    display: grid;
    align-content: center;
    justify-items: center;
    box-sizing: border-box;
    min-height: 44px;
    padding: 0.25rem;
    border-radius: 0.5rem;
    color: #205a45;
    font-size: 0.75rem;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
}

.tool-nav a:hover,
.tool-nav a[aria-current="page"] {
    background: #dcefe5;
}

.tool-nav span {
    font-size: 1.4rem;
    line-height: 1.15;
}

.tool-nav sup {
    font-size: 0.7rem;
}

.app-shell:has(.search-panel[data-active]) .page-content {
    display: none;
}

.search-panel[data-active] .search-feedback {
    max-height: 65vh;
    overflow-y: auto;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 1.25rem 0 0.75rem;
}

.section-header h2 {
    margin: 0;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    margin: 0.75rem 0;
    padding: 0;
    list-style: none;
    font-size: 0.875rem;
}

.breadcrumbs a {
    display: inline-block;
    padding-block: 0.25rem;
    color: #205a45;
}

.breadcrumbs [aria-current] {
    font-weight: 700;
}

.inventory-item,
#freigaben {
    scroll-margin-top: 10rem;
}

.purchase-fields {
    margin-block: 0.75rem;
}

.purchase-data {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 0.35rem 0.75rem;
    overflow-wrap: anywhere;
}

.purchase-data dt {
    font-weight: 650;
}

.purchase-data dd {
    margin: 0;
}

