

.task-hud-dock {
    position: absolute;
    top: 78px;
    right: 18px;
    z-index: 18;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.task-hud-toggle {
    min-width: 104px;
    height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(7, 12, 20, 0.82);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(12px);
    cursor: pointer;
}

.task-hud-main-icon {
    font-size: 18px;
    line-height: 1;
}

.task-hud-main-value {
    font-size: 14px;
    font-weight: 800;
}

.task-status-box {
    width: min(62vw, 268px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(7, 12, 20, 0.72);
    color: #fff;
    pointer-events: none;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.task-stat-card {
    min-height: 52px;
    border-radius: 14px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
}

.task-stat-wide {
    grid-column: 1 / -1;
}

.task-stat-icon {
    font-size: 18px;
    line-height: 1;
}

.task-stat-value {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.task-stat-coords {
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: 0;
}

.task-guide-arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    margin-left: -30px;
    margin-top: -30px;
    z-index: 16;
    pointer-events: none;
}

.task-guide-arrow::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    border-top: 10px solid #ff3b30;
    border-right: 10px solid #ff3b30;
    transform: rotate(45deg);
    box-shadow: 2px -2px 2px rgba(0, 0, 0, 0.25);
}

.camera-navigation-panel {
    position: absolute;
    left: 50%;
    bottom: calc(116px + env(safe-area-inset-bottom, 0px));
    z-index: 18;
    width: var(--camera-navigation-width, min(92vw, 420px));
    min-height: 86px;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(5, 10, 18, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(16px);
    pointer-events: auto;
}

.camera-navigation-panel .floating-ui-controls {
    grid-column: 1 / -1;
    margin: -4px -2px 0;
}

.camera-navigation-panel.floating-ui-size-sm {
    --camera-navigation-width: min(76vw, 320px);
    grid-template-columns: 46px minmax(0, 1fr);
    min-height: 72px;
}

.camera-navigation-panel.floating-ui-size-sm .camera-navigation-arrow {
    width: 42px;
    height: 42px;
}

.camera-navigation-panel.floating-ui-size-sm .camera-navigation-distance {
    font-size: 20px;
}

.camera-navigation-panel.floating-ui-size-sm .camera-navigation-direction {
    font-size: 14px;
}

.camera-navigation-panel.floating-ui-size-lg {
    --camera-navigation-width: min(94vw, 520px);
}

.camera-navigation-panel.hidden {
    display: none !important;
}

.camera-navigation-arrow {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(255, 221, 112, 0.96), rgba(255, 146, 58, 0.96));
    box-shadow: 0 10px 24px rgba(255, 166, 62, 0.26);
    position: relative;
    transform: rotate(0deg);
    transition: transform 0.18s ease-out;
}

.camera-navigation-arrow::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 11px;
    width: 18px;
    height: 18px;
    border-left: 5px solid #1b1205;
    border-top: 5px solid #1b1205;
    transform: translateX(-50%) rotate(45deg);
}

.camera-navigation-arrow::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 23px;
    width: 5px;
    height: 20px;
    border-radius: 999px;
    background: #1b1205;
    transform: translateX(-50%);
}

.camera-navigation-panel.arrived .camera-navigation-arrow {
    background: linear-gradient(180deg, rgba(88, 232, 147, 0.96), rgba(36, 180, 104, 0.96));
    box-shadow: 0 10px 24px rgba(36, 180, 104, 0.25);
}

.camera-navigation-copy {
    min-width: 0;
}

.camera-navigation-distance {
    font-size: 24px;
    line-height: 1.05;
    font-weight: 900;
}

.camera-navigation-direction {
    margin-top: 3px;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 800;
}

.camera-navigation-meta {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.72);
}

.task-target-obj {
    position: absolute;
    top: 54%;
    left: 50%;
    width: 260px;
    z-index: 17;
    text-align: center;
    cursor: pointer;
    pointer-events: auto;
    transform: translate(-50%, -50%);
    transition: opacity 0.08s linear;
    will-change: transform, opacity;
}

.task-target-obj img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

.task-target-label {
    margin-top: 10px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.7);
}

.task-encounter-card,
.answer-card,
.lock-card,
.completion-card {
    width: min(460px, 92vw);
    background: rgba(25, 25, 25, 0.96);
    border-radius: 20px;
    padding: 22px;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.answer-card {
    display: flex;
    flex-direction: column;
    max-height: min(88vh, 760px);
    overflow: hidden;
}

#answerInputContainer {
    overflow-y: auto;
    max-height: 48vh;
    padding-right: 2px;
    -webkit-overflow-scrolling: touch;
}

.task-encounter-cover {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
}

.task-encounter-title,
.answer-title,
.lock-title,
.completion-title {
    margin-top: 14px;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
}

.task-encounter-actions,
.answer-actions,
.lock-actions,
.completion-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.answer-actions {
    position: sticky;
    bottom: 0;
    padding-top: 12px;
    background: linear-gradient(180deg, rgba(25,25,25,0), rgba(25,25,25,0.98) 36%);
}

.answer-description,
.lock-subtitle,
.completion-reward,
.answer-message,
.lock-msg {
    margin-top: 10px;
    text-align: center;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.82);
    white-space: pre-line;
}

.answer-input-group {
    margin-top: 14px;
}

.answer-input-group label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.85);
}

.answer-input-group input[type="text"],
.answer-input-group input[type="file"] {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.answer-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.answer-choice {
    padding: 14px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.answer-choice.selected {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.4);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.5);
}

.answer-choice.pending {
    opacity: 0.68;
    cursor: wait;
    pointer-events: none;
    border-color: rgba(255, 255, 255, 0.28);
    filter: saturate(0.72);
}

#btnAnswerSubmit.is-loading {
    opacity: 0.9;
    cursor: wait;
}

.wheel .btn-up,
.wheel .btn-down {
    width: 100%;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 8px;
    padding: 8px 0;
    font-weight: 900;
    cursor: pointer;
}

.completion-card {
    border: 2px solid rgba(34, 197, 94, 0.45);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(20, 20, 20, 0.98));
}

.completion-icon {
    font-size: 4rem;
    text-align: center;
}

.game-shell-panel.tutorial-mode #gameShellProgressBlock,
.game-shell-panel.tutorial-mode #gameShellEntriesBlock {
    display: none;
}

.game-shell-panel.tutorial-mode .game-shell-block {
    padding: 8px 10px;
    border-radius: 14px;
    background: rgba(255,255,255,0.05);
}

.game-shell-block {
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255,255,255,0.06);
}

.task-video-wrap {
    margin-top: 12px;
}

.task-video-label {
    margin-bottom: 6px;
}

.task-video-player {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 16px;
    background: #0f172a;
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.28);
}

.task-video-embed {
    display: block;
    width: 100%;
    min-height: 220px;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 16px;
    background: #0f172a;
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.28);
}

.task-video-player.video-load-failed {
    display: none;
}

.task-video-error {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(127, 29, 29, 0.2);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: rgba(254, 226, 226, 0.96);
    font-size: 13px;
    line-height: 1.6;
}

.camera-answer-helper {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(255,255,255,0.75);
}

.camera-answer-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.camera-answer-actions .btn {
    flex: 1;
}

body.formal-story-capture-clean .game-shell-panel,
body.formal-story-capture-clean #taskStatusBox,
body.formal-story-capture-clean #taskIntroPanel {
    display: none !important;
}

.task-intro-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 70vh;
    background: rgba(20, 20, 20, 0.97);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
    z-index: var(--z-confirm);
    display: flex;
    flex-direction: column;
    min-height: 0;
    pointer-events: auto;
    animation: slideUpPanel 0.3s ease-out;
}

.task-intro-panel.hidden {
    display: none !important;
}

.task-intro-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(20, 20, 20, 0.97);
}

.task-intro-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-intro-skip-btn {
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.42);
    color: #fff;
    border-radius: 999px;
    min-height: 38px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.02em;
}

.task-intro-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.task-intro-body {
    padding: 16px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.task-intro-body.has-video {
    padding-top: 0;
}

.task-intro-panel.has-video .task-intro-cover {
    margin-top: 16px;
}

.task-intro-panel.has-video .task-intro-description {
    margin-top: 16px;
}

.task-intro-panel.has-video .task-video-wrap {
    margin-top: 0;
}

.task-video-player-intro {
    max-height: 72vh;
    object-fit: contain;
}

.task-video-embed-intro {
    max-height: 72vh;
}

.task-intro-cover {
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    border-radius: 12px;
    background: #111;
    margin-bottom: 14px;
}

.task-intro-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    white-space: pre-wrap;
}

.camera-capture-bar.task-primary .shutter-btn {
    display: inline-flex;
}

.camera-task-reopen-btn {
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    background: rgba(8, 14, 28, 0.72);
    color: rgba(255,255,255,0.92);
    font-size: 13px;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(14px);
}

.photo-confirm-actions .btn {
    flex: 1;
    height: 56px;
    font-size: 1.1rem;
    border-radius: 28px;
}

.answer-toast {
    position: absolute;
    right: 18px;
    bottom: 158px;
    width: min(86vw, 340px);
    z-index: 34;
    background: rgba(8, 14, 24, 0.92);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(14px);
    padding: 14px;
}

.answer-toast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.answer-toast-title {
    font-size: 13px;
    font-weight: 700;
    color: #fde68a;
}

.answer-toast-close {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
}

.answer-toast-text {
    font-size: 13px;
    line-height: 1.6;
    max-height: 180px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.btn.primary {
    background: var(--primary-color);
    color: white;
}

.btn.secondary {
    background: #f0f0f0;
    color: #333;
}

.photo-hint {
    font-size: 13px;
    color: #666;
    text-align: center;
    margin-bottom: 10px;
    line-height: 1.5;
    max-width: 100%;
}

.photo-hint.complete {
    color: #4caf50;
    font-weight: 500;
}

body.task-intro-open .tutorial-exit-btn {
    opacity: 0;
    pointer-events: none;
}
