﻿@import url('https://fonts.googleapis.com/css2?family=Architects+Daughter&display=swap');
        :root {
            --phone-reader-size: 20px;
            --phone-bottom-space: calc(7rem + env(safe-area-inset-bottom, 0px));
        }
        body {
            margin: 0;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            box-sizing: border-box;
            padding: 14px;
            background-image: url("images/elz_001_bg.jpg");
            background-repeat: repeat;
            background-size: auto;
        }

        body.phone-mode {
            padding: 10px;
            background-repeat: no-repeat;
            background-position: center center;
            background-size: cover;
        }

        body.phone-mode.phone-bible-active {
            background: #000;
        }

        body.phone-mode.phone2-active {
            background: #000;
        }

        .container {
            max-width: calc(100vw - 28px);
            max-height: calc(100vh - 28px);
        }

        body.phone-mode .container {
            max-width: none;
            max-height: none;
        }

        img
        {
            max-width: 100%;
            height: auto;
        }
    .text {
            margin-right: 20px;
            text-align: left;
           font-family: Consolas, monospace, 'Architects Daughter';
            font-size: 1.2rem;
        }

        .image-wrapper {
            position: relative;
            display: inline-block;
        }

        body.phone-mode .image-wrapper {
            display: block;
            width: min(calc(100vw - 20px), calc((100vh - 20px) * 9 / 16));
            aspect-ratio: 9 / 16;
            border: 1px solid rgba(255, 191, 0, 0.18);
            box-shadow:
                0 0 0 1px rgba(255, 191, 0, 0.06) inset,
                0 18px 48px rgba(0, 0, 0, 0.45);
            overflow: hidden;
        }

        body.phone-mode .image-wrapper > img {
            display: none;
        }

        body.phone-mode .text {
            display: none;
        }

        body.phone-mode.phone-bible-active .image-wrapper {
            width: 100vw;
            height: 100svh;
            aspect-ratio: auto;
            border: 0;
            box-shadow: none;
            overflow: hidden;
        }

        body.phone-mode.phone2-active .image-wrapper {
            width: 100vw;
            height: 100svh;
            aspect-ratio: auto;
            border: 0;
            box-shadow: none;
            overflow: hidden;
        }

        .terminal-mask {
            position: absolute;
            inset: 5px;
            z-index: 5;
            background: rgba(0, 0, 0, 0.7);
            opacity: 0;
            pointer-events: none;
            transition: opacity 160ms ease;
        }

        .terminal-mask.is-active {
            opacity: 1;
        }

        .terminal-frame {
            position: absolute;
            left: 5px;
            right: 5px;
            top: 5px;
            bottom: 5px;
            height: auto;
            z-index: 10;
            border: none;
            background: transparent;
           /*color: #00ff33;*/
            color: #FFBF00;
            font-family: Consolas, monospace;
            font-size: 1.05rem;
            font-weight: 600;
            line-height: 1.3rem;
            padding: 10px;
            overflow: hidden;
            text-shadow: 1px 1px 0 rgba(0,0,0,0.85);
        }

        body.phone-mode .terminal-frame {
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
            padding: 14px 12px;
            font-size: var(--phone-reader-size);
            line-height: 1.38;
        }

        body.phone-mode.phone-bible-active .terminal-frame {
            padding: 0;
        }

        .terminal-content {
            position: absolute;
            left: 10px;
            right: 10px;
            top: 10px;
            bottom: 10px;
            display: flex;
            flex-direction: column;
            min-height: 0;
        }

        body.phone-mode .terminal-content {
            left: 12px;
            right: 12px;
            top: 12px;
            bottom: 12px;
        }

        body.phone-mode.phone-bible-active .terminal-content {
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
        }

        body.phone-mode #output {
            padding-right: 0.15rem;
        }

        body.phone-mode.phone-bible-active #output {
            width: 100vw;
            height: 100svh;
            padding: 0 0 var(--phone-bottom-space);
            overflow-x: hidden;
            overflow-y: auto;
            scrollbar-width: none;
        }

        body.phone-mode.phone-bible-active #output::-webkit-scrollbar {
            display: none;
        }

        body.phone-mode.phone-bible-active #outputInner {
            justify-content: flex-start;
        }

        body.phone-mode.phone-bible-active #outputInner > .terminal-line {
            display: none;
        }

        body.phone-mode.phone-bible-active #outputInner > .terminal-bible:last-of-type {
            display: block;
            width: 100%;
            max-width: none;
            margin: 0 auto;
            box-sizing: border-box;
            padding: 0 1rem 2rem;
        }

        body.phone-mode .terminal-line {
            font-size: 1em;
            line-height: 1.38;
        }

        body.phone-mode .terminal-input {
            font-size: 1em;
            line-height: 1.38;
        }

        body.phone-mode.phone-bible-active .terminal-input {
            display: flex;
            position: relative;
            z-index: 30;
            padding: 0.4rem 1rem 0.2rem;
            background: #000;
        }

        body.phone-mode .terminal-input span,
        body.phone-mode #commandInput {
            font-size: 1em;
            line-height: 1.38;
        }

        body.phone-mode .terminal-bible-list-grid {
            grid-template-columns: 1fr;
            gap: 0.9rem;
        }

        body.phone-mode.phone-bible-active .terminal-bible-header {
            margin-bottom: 2rem;
            padding-top: 2.4rem;
            text-align: center;
        }

        body.phone-mode.phone-bible-active .terminal-bible-title {
            font-size: 1.6rem;
            font-weight: 400;
            letter-spacing: 0;
            color: #fff1b3;
        }

        body.phone-mode.phone-bible-active .terminal-bible-meta {
            margin-top: 0.25rem;
            font-size: 0.32em;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: rgba(255, 191, 0, 0.68);
        }

        body.phone-mode .terminal-bible-columns {
            column-count: 1;
            column-gap: 0;
        }

        body.phone-mode .terminal-bible-rows {
            gap: 0.85rem;
        }

        body.phone-mode .terminal-bible-row {
            grid-template-columns: 1fr;
            gap: 0.55rem;
        }

        body.phone-mode .terminal-bible-row-notes {
            padding-top: 0.05rem;
            font-size: 0.54em;
            line-height: 1.5;
            color: rgba(255, 191, 0, 0.8);
        }

        body.phone-mode .terminal-bible-verse {
            margin-bottom: 0.58rem;
            line-height: 1.38;
            text-align: justify;
            hyphens: auto;
        }

        body.phone-mode .terminal-bible-verse-number {
            min-width: 1.55em;
            font-size: 0.62em;
            vertical-align: super;
            font-weight: 900;
            color: #fff1b3;
            text-shadow:
                0 0 1px rgba(255, 248, 210, 1),
                0 0 6px rgba(255, 215, 96, 0.55),
                0 0 10px rgba(255, 191, 0, 0.28),
                1px 1px 0 rgba(0,0,0,0.9);
        }

        body.phone-mode .terminal-bible-dropcap {
            font-size: 7.6rem;
            line-height: 0.72;
            margin-right: 0.42rem;
        }

        body.phone-mode .terminal-bible-dropcap-body {
            min-height: 5.8rem;
        }

        body.phone-mode.phone-bible-active .terminal-bible-note-group + .terminal-bible-note-group {
            margin-top: 0.28rem;
        }

        body.phone-mode.phone-bible-active .terminal-bible-note-line {
            margin-bottom: 0.08rem;
        }

        body.phone-mode.phone-bible-active .terminal-bible-note-tag {
            min-width: 4.2em;
            color: rgba(255, 191, 0, 0.68);
        }

        .phone-toolbox {
            display: none !important;
        }

        .phone-toolbox-inner,
        .phone-toolbox button,
        .phone-toolbox-toggle {
            display: none !important;
        }

        .phone2-overlay {
            position: absolute;
            inset: 0;
            z-index: 35;
            display: none;
            background: #000;
        }

        body.phone2-active .phone2-overlay {
            display: block;
        }

        body.phone2-active .terminal-mask,
        body.phone2-active .terminal-frame {
            display: none;
        }

        #output {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            overflow-x: hidden;
            padding-right: 0.45rem;
            scrollbar-width: thin;
            scrollbar-color: rgba(255, 191, 0, 0.7) rgba(0, 0, 0, 0.15);
            user-select: text;
            -webkit-user-select: text;
        }

        #outputInner {
            min-height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
        }

        #output::-webkit-scrollbar {
            width: 10px;
        }

        #output::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.12);
        }

        #output::-webkit-scrollbar-thumb {
            background: rgba(255, 191, 0, 0.7);
            border-radius: 999px;
        }

        #output::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 224, 130, 0.78);
        }

        .terminal-line {
            white-space: pre-wrap;
            font-weight: 600;
        }

        .terminal-line a {
            color: inherit;
            text-decoration: underline;
            text-underline-offset: 0.12em;
        }

        .terminal-md-strong {
            font-weight: 900;
            letter-spacing: 0.02em;
            color: #fff1b3;
            text-shadow:
                0 0 1px rgba(255, 248, 210, 1),
                0 0 6px rgba(255, 215, 96, 0.55),
                0 0 10px rgba(255, 191, 0, 0.28),
                1px 1px 0 rgba(0,0,0,0.9);
        }

        .terminal-bible {
            white-space: normal;
        }

        .terminal-bible-header {
            margin-bottom: 0.45rem;
        }

        .terminal-bible-title {
            font-weight: 900;
            letter-spacing: 0.02em;
            color: #fff1b3;
        }

        .terminal-bible-meta {
            font-size: 0.9em;
            opacity: 0.8;
        }

        .terminal-bible-section + .terminal-bible-section {
            margin-top: 0.9rem;
        }

        .terminal-bible-list-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 1.4rem;
        }

        .terminal-bible-list-column {
            min-width: 0;
        }

        .terminal-bible-list-items {
            margin-top: 0.45rem;
            display: grid;
            grid-template-columns: minmax(0, max-content) max-content;
            column-gap: 0.7rem;
            row-gap: 0.22rem;
            justify-content: start;
        }

        .terminal-bible-list-item {
            display: contents;
        }

        .terminal-bible-list-name {
            min-width: 0;
        }

        .terminal-bible-list-count {
            flex: 0 0 auto;
            font-weight: 900;
            color: #fff1b3;
            text-align: right;
        }

        .terminal-bible-columns {
            column-count: 2;
            column-gap: 1.4rem;
        }

        .terminal-bible-rows {
            display: grid;
            gap: 0.4rem;
        }

        .terminal-bible-row {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
            gap: 1.4rem;
            align-items: start;
        }

        .terminal-bible-row-text {
            min-width: 0;
        }

        .terminal-bible-row-notes {
            min-width: 0;
            padding-left: 0;
        }

        .terminal-bible-note-group + .terminal-bible-note-group {
            margin-top: 0.55rem;
        }

        .terminal-bible-note-line {
            line-height: 1.35;
            margin-bottom: 0.16rem;
        }

        .terminal-bible-note-tag {
            display: inline-block;
            min-width: 3.3em;
            margin-right: 0.45rem;
            font-weight: 400;
            color: inherit;
        }

        .terminal-bible-note-empty {
            opacity: 0.72;
            min-height: 1.3rem;
        }

        .terminal-bible-verse {
            break-inside: avoid;
            margin-bottom: 0.38rem;
            line-height: 1.35;
        }

        .terminal-bible-verse-number {
            display: inline-block;
            min-width: 1.8em;
            font-weight: 900;
            color: #fff1b3;
        }

        .terminal-bible-dropcap {
            float: left;
            font-family: Georgia, serif;
            font-size: 3.25rem;
            font-weight: 900;
            line-height: 0.74;
            margin-top: 0.20rem;
            margin-right: 0.5rem;
            color: #fff1b3;
            /*padding: 0.12rem 0.28rem 0 0;*/
        }

        .terminal-bible-dropcap-body {
            display: block;
            min-height: 2.4rem;
        }

        @media (max-width: 900px) {
            body.phone-mode {
                padding: 0;
            }

            body.phone-mode .image-wrapper {
                width: 100vw;
                height: 100vh;
                aspect-ratio: auto;
                border: 0;
                box-shadow: none;
            }

            .phone-toolbox-inner {
                width: 100vw;
            }

            .terminal-bible-list-grid {
                grid-template-columns: 1fr;
            }

            .terminal-bible-row {
                grid-template-columns: 1fr;
            }

            .terminal-bible-row-notes {
                padding-left: 0;
                padding-top: 0.8rem;
                border-top: 0;
            }

            .terminal-bible-columns {
                column-count: 1;
            }
        }

        .terminal-old {
            opacity: 0.95;
        }

        .terminal-input {
            position: relative;
            display: flex;
            align-items: center;
        }

        .terminal-input span {
            margin-right: 6px;
        }

        .terminal-cursor {
            position: absolute;
            width: 0.09em;
            height: 1.08em;
            background: #FFBF00;
            border-radius: 1px;
            box-shadow:
                0 0 1px rgba(255, 191, 0, 0.95),
                0 0 4px rgba(255, 191, 0, 0.28),
                1px 1px 0 rgba(0,0,0,0.85);
            opacity: 0;
            pointer-events: none;
            animation: terminalCursorBlink 1.05s steps(1, end) infinite;
        }

        .terminal-cursor.is-visible {
            opacity: 1;
        }

        #commandInput {
            flex: 1;
            border: none;
            outline: none;
            background: transparent;
            /*color: #00ff33;*/
            color: #FFBF00;
            font-family: Consolas, monospace;
            font-size: 1.05rem;
            font-weight: 600;
            caret-color: transparent;
            text-shadow: 1px 1px 0 rgba(0,0,0,0.85);
        }

        @keyframes terminalCursorBlink {
            0%, 48% {
                opacity: 1;
            }
            49%, 100% {
                opacity: 0;
            }
        }

        .shutdown-screen {
            position: fixed;
            inset: 0;
            z-index: 9999;
            background: #000;
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
        }

        .shutdown-screen.is-active {
            opacity: 1;
            visibility: visible;
            pointer-events: all;
        }

        .editor-overlay {
            position: fixed;
            inset: 0;
            z-index: 5000;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 24px;
            background: rgba(0, 0, 0, 0.58);
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
        }

        .editor-overlay.is-active {
            opacity: 1;
            visibility: visible;
            pointer-events: all;
        }

        .editor-modal {
            width: min(50vw, 860px);
            height: min(50vh, 620px);
            min-width: min(760px, calc(100vw - 48px));
            min-height: min(360px, calc(100vh - 48px));
            display: flex;
            flex-direction: column;
            border: 1px solid rgba(255, 191, 0, 0.78);
            background: rgba(0, 0, 0, 0.93);
            box-shadow:
                0 0 0 1px rgba(255, 191, 0, 0.18) inset,
                0 18px 50px rgba(0, 0, 0, 0.5);
            color: #FFBF00;
            font-family: Consolas, monospace;
            text-shadow: 1px 1px 0 rgba(0,0,0,0.85);
        }

        .editor-header,
        .editor-footer {
            padding: 0.55rem 0.8rem;
            font-size: 0.98rem;
            font-weight: 600;
            background: rgba(255, 191, 0, 0.06);
        }

        .editor-header {
            border-bottom: 1px solid rgba(255, 191, 0, 0.24);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .editor-footer {
            border-top: 1px solid rgba(255, 191, 0, 0.24);
            opacity: 0.92;
        }

        .editor-textarea {
            flex: 1;
            width: 100%;
            border: none;
            outline: none;
            resize: none;
            margin: 0;
            padding: 0.8rem;
            background: transparent;
            color: inherit;
            font: inherit;
            font-size: 1rem;
            font-weight: 600;
            line-height: 1.35;
            caret-color: #FFBF00;
            tab-size: 4;
        }

        .editor-textarea::selection {
            background: rgba(255, 191, 0, 0.28);
            color: #fff1b3;
        }

        .inline-bible-note-editor {
            margin-top: 0.9rem;
            padding: 0.7rem;
            border: 1px solid rgba(255, 191, 0, 0.35);
            background: rgba(0, 0, 0, 0.35);
        }

        .inline-bible-note-editor textarea {
            width: 100%;
            min-height: 7.5rem;
            border: none;
            outline: none;
            resize: vertical;
            padding: 0;
            background: transparent;
            color: #FFBF00;
            font-family: Consolas, monospace;
            font-size: 1rem;
            font-weight: 600;
            line-height: 1.35;
            caret-color: #FFBF00;
        }

        .inline-bible-note-editor-help {
            margin-top: 0.45rem;
            opacity: 0.86;
        }

        .terminal-bible-row-notes[data-bible-note-editable=\"true\"] {
            cursor: text;
        }

        @media (max-width: 900px) {
            .editor-overlay {
                padding: 12px;
            }

            .editor-modal {
                width: calc(100vw - 24px);
                height: calc(100vh - 24px);
                min-width: 0;
                min-height: 0;
            }
        }

